Repository navigation
Conversation
Main at 0b3caae does not compile with MSVC (gta6rt_d3d12_com, acphal and the tests that use them): - d3d12_xs_device.cpp called rt::d3d12::create_console_descriptor_heap without its declaration. Including d3d12_com.h there is not an option: the proxy is built into a dozen tests without the Vulkan layer. Slot 14 now calls a handler the Vulkan layer can register (set_console_descriptor_heap_handler), as slot 133 already does. - create_console_descriptor_heap used Device's private identity() and passed the const state() to DescriptorHeap. It now forwards to a Device member. - acphal.cpp's SHAPE_XMA_CONTEXT and SHAPE_PCM_CONTEXT were 60 and 28 bytes, so their static_asserts failed with every compiler. Only sizeof is used (the context array stride); the padding now gives the GDK sizes, 64 and 32. - d3d12_console_descriptor_heap_test used Ref's missing operator-> and IID_PPV_ARGS on a void**. The slot 14 handler is not registered by default: registered for every Vulkan device, it crashed 8 ctest programs that create PC heaps through the proxy (the slot reads 16 bytes past a 16-byte PC description). The console heap test registers it itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…checksum #9492 and #8959 both added an incoming-checksum check to the RTS0 rewrite, and the merge kept both. #9492's, first in the function, refuses any checksum that does not match, including an all-zero one; #8959's accepts an all-zero checksum, as the host d3d12.dll does, and keeps it zero after the rewrite. With both, the first refuses what the second is there to accept, so two root_sig cases fail: "blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum" and "shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared". #8959's check still refuses any other mismatching checksum, so #9492's corrupted-blob cases keep passing: root_sig passes in full with MSVC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
Collaborator
|
Thank you for this fix. The diagnosis was right, and current
The Runtime AI-assisted (Claude Code, Claude Opus 5.5). |
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.
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):mainat0b3caaee, after the 2026-11-23 merge round, does not compile with MSVC.gta6rt_d3d12_com,acphaland every test that links them fail. This PR fixes the build, and with it the whole ctest suite runs again. A second commit fixesroot_sig, which a merge between two PRs broke.What was broken
d3d12_xs_device.cpp(1606):create_console_descriptor_heapis not a member ofrtd3d12_com.hthere doesn't work, becaused3d12_xs_device.cppis built into a dozen tests without the Vulkan layer.d3d12_vulkan_device.cpp(9997/9998): C2665 / C2248create_console_descriptor_heappasses theconststate()toDescriptorHeapand calls the privateidentity()acphal.cpp(146/167): static_assertSHAPE_XMA_CONTEXTandSHAPE_PCM_CONTEXTare 60 and 28 bytes with every compiler: the XMA context's third dword holds 24 bits, and a 26-bit field cannot straddle a dwordd3d12_console_descriptor_heap_test.cppRef's missingoperator->, andIID_PPV_ARGSon avoid**The change
set_console_descriptor_heap_handler), the way slot 133 already does withset_placed_at_va_handler. The proxy no longer depends on the Vulkan layer.create_console_descriptor_heapforwards to a newDevice::create_console_heapmember.acphal: the padding now gives the GDK sizes, 64 and 32. Onlysizeofis used, as the stride of the context arrays; the bit positions inside the first dwords are not verified.operator->and passes the IID explicitly.Why the handler is not registered by default
I first registered it in
Device's constructor. That crashed or failed 8 ctest programs:d3d12_descriptor,d3d12_f16_halves,d3d12_translated_draw,d3d12_m2_textured,d3d12_m2_formats,d3d12_m3_frame,d3d12_m3_first_pass,d3d12_m4_compute,d3d12_buffer_uav.The cause: slot 14 reads the 16 bytes that follow a 16-byte PC
D3D12_DESCRIPTOR_HEAP_DESC. For a PC caller those bytes are whatever is next in memory, usually non-zero, so the heap is created at a garbage address.So nothing registers it here; the console heap test registers it itself. How slot 14 should tell the console's 32-byte description from a PC one is left to the author of
#9576.Tested
Windows 11 (10.0.26300), MSVC 14.44 (VS 2022 Build Tools 17.14.45), Windows SDK 10.0.26100, Visual Studio 17 2022 generator, RelWithDebInfo, on an NVIDIA RTX 2060 (621.24).
mainfails with the errors above.ctest: 268 of 273 pass, plus 12 skipped or disabled for missing optional inputs. The 5 failures:mainbefore the merge round (5d74c272) too:d3d12_vulkan_device(slot 78;#8496/#9175) andd3d12_depth_resolve.d3d12_execute_indirect_validation: the 5 parity cases#9002changed. Here WARP and the RTX 2060 both accept them (layer=0 warp=1 hw=1 expected=0;d3d12.dll/D3D12Core.dll10.0.26100.10068, Windows 26300.10075). That is the same as the RTX 5060 / Arc reports on#9002with 10.0.26100.9818, so the host answer depends on the D3D12 runtime.d3d12_com(line 345,Close() == E_INVALIDARGafter a depth clear of 2.0). The test is unchanged in the round; I'm bisecting the merge that changed it.d3d12_console_descriptor_heap,#9576's own test, which never ran. It passes its direct checks, then callsGetCPUDescriptorHandleForHeapStartthrough the Xbox heap proxy with the PC calling convention. It gets a garbage handle (got 0x26a47b718b0 want 0x556677880000) and crashes after that. That needs its author.The
root_sigcommit#9492(c297bb57) and#8959(b95925cb) each added an incoming-checksum check to the RTS0 rewrite, and the merge kept both:#9492's check runs first and refuses any mismatching checksum, including an all-zero one.#8959's check accepts an all-zero checksum, as the hostd3d12.dlldoes.So two of
#8959's cases fail.root_sigpasses right before#8959's merge (be4a51f5) and on#8959's own branch, and fails right after the merge (1e029d6d). Keeping only#8959's check makes it pass in full:#9492's corrupted-blob cases still pass, because#8959's check also refuses any other mismatching checksum.AI-assisted (Claude Code); no game files.
🤖 Generated with Claude Code