Repository navigation
Conversation
The AMD Windows driver's shader compiler overflowed the 1 MB default on 26 translated mesh shaders (ItsNotRexed#4816). Adds a ctest that reads SizeOfStackReserve from the built exe.
…ross-reference the 8 MB constant (BUILD-1457)
|
@PeterGrieffindor could you check this on the RX 9070 XT with the 26 mesh shaders that overflowed? On our side we could only verify the linked stack size (1 MB on main, 8 MB here) in a clang-cl cross-build; we have no AMD GPU to reproduce the driver crash. |
|
Tested The linked reserve, read two ways:
Do
So one linker setting does cover the main thread and every worker, as the PR says. No change to what the checker builds: over the translated synthetic GPU-test shaders (204 modules; no game files), AI-assisted (Claude Code). |
|
Tested 8098e35 with a native MSVC build on Windows 11 (26200): Visual Studio 2026 (VS 18) MSVC + Ninja, RelWithDebInfo, the CMake path of runtime/CMakeLists.txt (not the clang-cl cross-build): pass.
So |
|
Tested
For transparency: I hold BUILD-1457 and had the same change under test when this was opened; it is up as #4979, with a docs section for these measurements and a test that ties the script's number to CMake's. The coordination issue has the settling. |
|
Closing in favour of #4979: BUILD-1457 belongs to its finder, @PeterGrieffindor (see #5256 (comment)). |
Claimed: #4816 (comment)
What and why
vk_pipeline_checkdied with 0xC00000FD (stack overflow) inside the AMD Windows driver's shader compiler on 26 translated mesh shaders (reported by PeterGrieffindor on #4816). No stack size was set, so the main thread and everystd::threadworker got the 1 MB PE default. On Windows the workers take the PESizeOfStackReserve, so one linker setting covers all of them.runtime/CMakeLists.txt:vk_pipeline_checklinks with/STACK:8388608(MSVC and clang-cl) or-Wl,--stack,8388608(MinGW). 8 MB: 2 MB fixes the 26 mesh modules, the deeper structured trees on rdna2spirv: raise MAX_STRUCTURED_DEPTH to 64 and add --max-structured-depth (SHADER-427) #3090 need 4 MB or more. A reserve costs address space only.scripts/build_runtime.ps1: the directclline gets/link /STACK:8388608.vk_pipeline_check_stack(Windows targets only) withruntime/test/check_pe_stack_reserve.cmake: reads SizeOfStackReserve from the built .exe and fails below 8 MB. No GPU, no Vulkan device.Tested
Cross-built with clang-cl 21 + lld-link against the xwin sysroot on the pod (-j64):
vk_pipeline_check_stackctest on this branch: passed. The same script on the origin/main exe: fails ("SizeOfStackReserve 1048576 is below 8388608").tests/test_ci_registration.py,test_docs_links.py,test_runtime_paths.py,test_ctest_registration.py,test_build_runtime_fallback.py: all OK.8098e35c):check_pe_stack_reserve.cmakenow fails ifTOOLorMIN_STACKis missing, empty or not a number, or the exe is missing, so it cannot pass without checking (shown withcmake -Pruns: no arguments,TOOLonly,MIN_STACKonly,MIN_STACK=abcall exit 1; the real call exits 0 withSizeOfStackReserve = 8388608).Not covered
AI-assisted (Claude Code).
No game files.