Repository navigation
shader: fix MSVC lambda capture in the direct mesh VCC check (build fix for #3841) - #3852
Merged
Merged
Conversation
Give vcc_words and vcc_nonempty static storage so the captureless vcc_changed lambda can use them under MSVC (C3493/C2064).
R0Y00
approved these changes
Dec 2, 2026
R0Y00
left a comment
Owner
There was a problem hiding this comment.
I reviewed the one-line storage change on c49abb4b. The two integral values and all uses stay the same, and static storage permits the captureless lambda to refer to them. The trial combination with #3851 is clean.
I built compile_dxil and ran ctest --preset dev --no-tests=error -j 1 -V -R '^native_mesh_packed_rows_vcc_ir$' on the exact head. The IR regression passed 1/1 on Windows 11 26300.9974, MSVC 19.51 and SDK 10.0.26100. That is separate from the author's full MSVC 19.44 run. The required PR Windows job compiled and reached CTest, then failed at native_direct_mesh with +0x34: unmapped graphics export. Please rerun Windows after #3851 lands.
This was referenced Dec 2, 2026
R0Y00
enabled auto-merge (squash)
December 2, 2026 15:25
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.
#3841 added a captureless
vcc_changedlambda insrc/gfx1013_direct_mesh.inlthat reads the function-localconstexprvaluesvcc_wordsandvcc_nonempty. That is accepted by g++ and clang++, but MSVC 19.44 rejects it, somainhas not been building on Windows since that merge.Exact errors from the Windows test PC and from
Build on Windows/Build and test on Windows at /O2onmain:This marks those two constants
static constexprso they have static storage and the lambda can stay captureless. Behaviour is unchanged.Tested on Windows 11 Pro (build 26200), RTX 4070 Ti, MSVC 19.44.35230 (Visual Studio 2022 17.14.45):
cmake --preset devandcmake --build --preset devcompleted with no C3493/C2064.ctest --preset dev -R 'mesh' -E 'startup_audio_(output|pacing|provider)': 230 passed, 1 failed out of 231. The failure is the knownnative_direct_meshfixture issue (native compute +0x34: unmapped graphics export), which is already fixed separately in shader: isolate the mesh signature row fixtures #3851.g++ 14.2.0 and clang++ 19.1.7 compiled a translation unit with the same
static constexprplus captureless lambda at-std=c++17 -Werror=narrowing. A full compile ofgfx1013_compute_native.cppwas not set up on that Linux host (the repo has no Linux cmake preset).AI-assisted (Cursor)