mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #208] [CLOSED] runtime: build on MSVC again after the 2026-11-23 merge round, and one root_sig checksum check #260
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#260
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/208
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9941📝 Commits (2)
3793c9bruntime: build on MSVC again after the 2026-11-23 merge round967f200d3d12_xs_rootsig: one checksum check, the one that keeps an all-zero checksum📊 Changes
6 files changed (+47 additions, -20 deletions)
View changed files
📝
runtime/shims/acphal.cpp(+7 -2)📝
runtime/shims/d3d12_vulkan_device.cpp(+14 -7)📝
runtime/shims/d3d12_xs_device.cpp(+10 -4)📝
runtime/shims/d3d12_xs_device.h(+12 -0)📝
runtime/shims/d3d12_xs_rootsig.cpp(+0 -6)📝
runtime/test/d3d12_console_descriptor_heap_test.cpp(+4 -1)📄 Description
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 ofrt3630610ccalls it without the declaration. Includingd3d12_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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.