Repository navigation
d3d12_vulkan_device_test: the predication block's query heap desc no longer hides heap_desc (C4456) - #952
Conversation
…longer hides heap_desc (C4456) The occlusion-query block from ProjectLeonida#858 declared a D3D12_QUERY_HEAP_DESC named heap_desc inside the function that already has a D3D12_DESCRIPTOR_HEAP_DESC heap_desc (line 2107), and MSVC /W4 warned C4456. Rename it to query_heap_desc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
This is the rename I suggested on #858. Thanks for picking it up. AI-assisted (Claude Code). |
|
Thanks @Parakeet-Wheat, and credit to you for the rename suggestion on #858; I hadn't seen it there. Your RTX 3070 with Windows 11 and my RTX 5060 Ti with Windows 10 both pass now. AI-assisted (Claude Code). |
quackottu
left a comment
There was a problem hiding this comment.
Tested e875297 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass
ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 33d3d12_vulkan_device_test(changed here): exit=0 validation=0 | [rt] d3d12: upload heaps in VRAM (DEVICE_LOCAL | HOST_VISIBLE, Resizable BAR)- 38 test programs in the build pass with 0 validation errors
d3d12_clear_testfails (R8G8B8A8_UNORM/SNORM 0.5 ties and a D16 clear byte differ from WARP) exactly as onmain4a36bb1 here, so not from this PR; #521 addresses it
Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.
|
Thanks @quackottu, that's three GPUs passing it now (RTX 5070, RTX 3070, RTX 5060 Ti). AI-assisted (Claude Code). |
Claimed in the coordination issue as: new TEST item (claim). No ID assigned yet.
What and why
In
runtime/test/d3d12_vulkan_device_test.cpp, the occlusion-query/predication block that #858 added declaresconst D3D12_QUERY_HEAP_DESC heap_descat line 3089. That's inside the function that already hasD3D12_DESCRIPTOR_HEAP_DESC heap_descat line 2107, so MSVC /W4 warns:The two have different types, so a later edit to the block could pass the wrong struct without a type error in some calls. This renames the query-heap one to
query_heap_desc, at its declaration and its one use on line 3090. The test does exactly the same thing as before.What's left: the
levelsC4456 ind3d12_descriptor_test.cpp:365, which #909 (and #904) fix. With both in, the MSVC /W4 runtime build has 0 warnings.Tested
NVIDIA GeForce RTX 5060 Ti, driver 621.14, Windows 10 19045, VS 2022 BuildTools (MSVC), Vulkan SDK 1.4.363.0.
main067d3e8(fresh worktree)heap_desc(this one), C4456levels(#909)levelsgameinputdisabled: no SDL3)LEONIDA_VK_VALIDATION=1d3d12_vulkan_device_testgives the C4456 forheap_descagain. With the rename restored, the target builds with 0 warnings.VK_EXT_conditional_rendering, so the test does not printpredication: ... skipped.d3d12_vulkan_devicepasses with validation.Not tested: other compilers (clang-cl, GCC under Wine), which don't warn on this pattern by default; AMD/Intel GPUs. The change is a rename only.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)AI-assisted (Claude Code).
🤖 Generated with Claude Code