Repository navigation
build: raise MSVC warnings for the shader compiler - #3794
Merged
Merged
Conversation
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
x2w_shader_compilerandcompile_dxilbuild at the default MSVC warning level in permissive mode. Shadowed locals, uninitialized aggregate members and non-conforming code in the translator are not reported, and nothing keeps a translation unit clean once it is.Change
/W4and/permissive-. Apply/WXto the ISA decoder and the vertex-ID translator when they are built into the shader compiler; other translation units can be added as they become clean. Standalone fixture builds of the same sources are unaffected.u8string()returnschar8_t.No lowering logic changes; translator output is expected to be identical, and the corpus comparison below confirms it.
Validation
Windows, MSVC,
devpreset. The CTest selection below passes on bothmain(158ef7942) and this branch (11bf403e7).Translator corpus (DXIL fingerprints and refusal reasons), produced with the same corpus script, MSVC and DXC for both commits: the TSV is byte-identical between
158ef7942and11bf403e7(same SHA-256). The corpus script istests/translator_corpus_hash.pyfrom the translator corpus PR.This touches lines also changed by #3791 (
tools/startup/compile_dxil.cpp) and #3792 (src/gfx1013_direct_compute.inl). I will rebase after whichever merges first.