d3d12/xs: guard 48-bit host-import VAs and sync title-written descriptor heaps (D3D-RTX5070-HOST-HEAP-SYNC) #644
Closed
TanmaySatyam wants to merge 1 commit from
upstream-pr/644 into main
pull from: upstream-pr/644
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/644"
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?
Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-24T10:49:43Z.
Claimed in the coordination issue as: D3D-RTX5070-HOST-HEAP-SYNC
AI-assisted.
Summary
runtime/shims/d3d12_vulkan_device.cpp)VK_EXT_external_memory_hostplaces a title-backed host import belowheap_base,address - heap_basewraps in 64-bit unsigned arithmetic (bits 48..63 = 0xFFFF), corrupting 48-bit V# buffer descriptors.va >= (1ull << 48)after subtractingheap_baseand falls back to the existing in-arena shadow buffer path cleanly.runtime/shims/d3d12_xs_device.cpp)ExecuteCommandLists/ExecuteCommandListsX.Testing & Verification
main@21625bca8)d3d12_existing_heap,d3d12_descriptor, andd3d12_console_descriptor_heapCTests underLEONIDA_VK_VALIDATION=1andVK_VALIDATION_VALIDATE_SYNC=1(3/3 passed, 0 validation errors).python -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp runtime/shims/d3d12_xs_device.cppexited 0.Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T11:27:08Z.
Independent Windows review of exact head
23872ccon RTX 5070 Ti (610.74), MSVC 19.44 Release, and Khronos Vulkan validation 1.4.369. The stock existing-heap, descriptor, console-heap, xmem-placement and compute tests pass (5/5), with zero validation errors.A test-only extension uses real, writable CPU storage behind the console heap descriptor and obtains two distinct, valid CBVs from the layer. The ordinary heap copy control passes. The device-write mirror and a direct CPU write made after creation both reach the new shader-visible backing at submission. Two other paths differ, in three runs with validation active and zero validation errors:
register_descriptor_rangeinitializeslast_syncedfrom the supplied CPU range without initializing the real backing, so the first diff treats those existing bytes as already copied.CopyDescriptorsSimplenorCopyDescriptorscopies the new descriptor to an ordinary destination. Recreating those same source CBVs via the proxy API makes both copies pass. The proxy translates the source handle to the real backing, which has not received the CPU-side write. These copy calls run immediately on the CPU timeline, as documented in Copying Descriptors.All inputs were synthetic. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-24T11:28:42Z.
Review: COMMENTED
One additional coverage gap on
23872ccfrom code review. The existing-heap fixture leavesVulkanDeviceInfo::buffer_device_addressunset. The device only callscreate_arena()when that flag is enabled, so this fixture cannot exercise the new condition that requires both an arena address and an imported buffer address.Could the 48-bit check get a deterministic regression case? The boundary inputs are a buffer address just below the arena, offsets of 0 and
2^48 - 1, and an offset of2^48. The valid offsets should still be accepted and the out-of-range ones should take the shadow path.AI-assisted static review. No GPU run for this observation.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-24T12:26:59Z.
Follow-up hardware Vulkan smoke test on Windows using the CI runtime artifact for this PR at
23872cc. I ran the test executables in an AppContainer without network capabilities. With the packaged synthetic shader fixtures in place,d3d12_descriptor_testandd3d12_console_descriptor_heap_testboth exited 0.d3d12_existing_heap_testterminated with0xC0000008in that restricted environment. I do not have a matching main artifact to compare, so that outcome is inconclusive. The console-heap smoke test exercises the fixed-address fixture and does not verify the new mapped-heap branch. The 48-bit guard observation in the earlier review still needs a focused case.AI-assisted. Synthetic inputs only. Vulkan validation layers were not enabled.
Update: the matching base artifact at
21625bcais available now. With the same AppContainer setup and packaged synthetic fixtures, both descriptor tests also exit 0 on the base, andd3d12_existing_heap_testterminates with the identical0xC0000008. All three outcomes match between base and PR in this harness. This comparison does not establish the cause of the existing-heap failure.Imported from ubiquitarianism/leonida. Originally posted by Timon360SB on 2026-11-24T13:35:18Z.
Independent regression verification — Turing and Blackwell
Baseline:
21625bca8cPR head:
23872cc5495d914d044ebc7ad8ef9422b3e5c357
Environment
LEONIDA_VK_VALIDATION=1 and
VK_VALIDATION_VALIDATE_SYNC=1 were set.
GPU-assisted validation was also enabled.
Results
Three repetitions per revision on each GPU.
36/36 test executions passed.
No skipped tests or reported Vulkan validation errors.
Additional observations
cases matched both native hardware D3D12 and WARP.
fallback checks passed on both revisions.
18, 19, 21, 22, 23 and 24 now execute
the CPU-handle translation handlers.
Scope and limitations
No regressions were observed in the selected tests.
BASE already passes all selected cases, so these
results do not independently reproduce or prove
the fix for the original 48-bit VA underflow.
The console heap test logs indicate a heap not
backed by title memory. Full title-written
descriptor synchronization is therefore not
established by these results.
Synchronization validation was requested, but
the dedicated positive-control test was not run.
Synthetic fixtures only. No game files used.
AI-assisted test automation and result analysis.
Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-24T14:34:15Z.
Thanks @sodove, @lixonik, and @Timon360SB for the thorough reviews and hardware checks! Rebased onto \main\ (\
d0da7dade) and pushed a follow-up commit addressing every review finding:egister_descriptor_range\ now seeds \last_synced\ from
eal_start\ instead of \custom_start, so valid descriptors already sitting in title memory before \CreateDescriptorHeap\ are detected as dirty and synced on the very first \ExecuteCommandLists.
t::d3d12::host_import_va_in_vsharp_range(arena_address, buffer_va)\ in
untime/shims/d3d12_com.h\ and added deterministic boundary checks in \d3d12_existing_heap_test\ (zero guards, \rena - 1, low VA \
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-24T15:24:54Z.
Thanks for adding the deterministic boundary cases and the live BDA fixture. One static follow-up on
2c136008: incheck_title_placed_with_bda,VirtualFree(pages, ...)runs before the localRef<ID3D12Resource> bufferdestructor releases the resource. On a successful direct import, the Vulkan memory object can still refer to those pages. The spec requires the host range to remain valid for the lifetime of the imported memory object.Could the buffer be scoped so it is destroyed before
VirtualFree, as in the existing placed-buffer checks? Fixture · Vulkan host-pointer lifetimeAI-assisted static follow-up. No GPU run on this head yet.
Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-24T15:31:23Z.
Good catch @lixonik — scoped \Ref buffer\ inside a block before \VirtualFree(pages, 0, MEM_RELEASE)\ in \check_title_placed_with_bda\ so any imported host-memory object is always released before the host pages are freed. Re-verified \d3d12_existing_heap_test\ on RTX 5070 (Driver 591.74, Windows 11, \LEONIDA_VK_VALIDATION=1, \VK_VALIDATION_VALIDATE_SYNC=1): PASS with 0 validation errors.
Imported from ubiquitarianism/leonida. Originally posted by MalexAson on 2026-11-24T19:52:49Z.
Tested c4b11a8c32 applied on
main6293c1c4f, on Intel Iris Xe (Raptor Lake-P, 8086:a7a0), Intel 32.0.101.7092, Windows 11 24H2 (26100.6584): this pull request's own cases pass;d3d12_existing_heapas a whole is red on this GPU before and after, for a reason that is already onmain.ctest -R "^(d3d12_existing_heap|d3d12_descriptor|d3d12_console_descriptor_heap)$", layer on the Iris Xe (the NVIDIA driver was kept out of the process withVK_LOADER_DRIVERS_SELECT):main6293c1c4fd3d12_descriptord3d12_console_descriptor_heapd3d12_existing_heapThe new cases in
d3d12_existing_heaprun here and pass:The guard is what answers in the BDA fixture on this driver: the layer logs
title-placed host import lies outside V# 48-bit range above heap_base; using arena shadow instead; bits 48-63: 65535. So on this Intel driver a host import does land belowheap_base, the case the guard is for.What keeps the test red is not from this pull request. In the existing
check_title_placedcases (no BDA arena) the import succeeds and the copy out of the buffer is then refused, three times, identically with and without the change:That is the finding in https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7142086637. It passed on the RTX 4060 Laptop GPU of the same machine earlier today on
main.Not run: the layer on the NVIDIA GPU (its driver was being updated during this run). Built with MSVC 19.50 + Ninja, RelWithDebInfo; the change applies cleanly on current
main.AI-assisted: this run was made with a coding agent.
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T21:20:03Z.
Independent test of head
c4b11a8c3on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24, VS 2022, Ninja, RelWithDebInfo), merged alone onto main66d4f5aa3:LEONIDA_VK_VALIDATION=1(0 VUIDs).I'm leaving the merge decision to the owner rather than merging it myself, because it changes runtime behaviour beyond a fix. Some notes for whoever decides:
readable_rangecheck. A writable check, or catching the write fault, would be safer.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-25T07:08:13Z.
A data point from another project for whoever decides on this. fxceless/victory-fork (a VIctory fork that renders gameplay on an RTX 4070) just landed the same idea in its commit
a26859f, "The first room renders right": descriptor records the title copies into its heap as bytes are mirrored before each submission, with a per-slot fingerprint so only changed records are copied. They count about 40,000 records a frame in the first gameplay room, and that change is what made the room render correctly there. That supports #644's direction (title-written descriptors synced per ExecuteCommandLists). It also suggests the per-submit cost note from my earlier test can be addressed with a per-slot fingerprint or dirty tracking rather than a full memcmp.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-25T07:52:18Z.
Update for when you rebase: this head (c4b11a8c3, based on
d0da7dade) no longer merges onto current main. A test merge ontoc7e82e26econflicts ind3d12_vulkan_device.cpp,d3d12_xs_device.cppand both test files. Also, main now has an overlapping mechanism from #939:LEONIDA_DESC_MIRROR(on by default) stores descriptor writes to a title-backed heap at the title's address as well, and list slots 35/36 pull the title's descriptors into the bound table. It would help reviewers if the rebased PR says what it adds on top of that, e.g. picking up records the title byte-copies itself, which is the case the VIctory fork commit I mentioned covers.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-25T09:07:16Z.
Rebased cleanly onto
main(3f81d46ac) on top of #939 (LEONIDA_DESC_MIRROR) and the below-arena host-import guard, addressing @sodove's findings and @QemmHD's review notes:What this adds on top of current
main:d3d12_com.h,d3d12_vulkan_device.cpp,d3d12_existing_heap_test.cpp): Main now catchesbuffer_va < arena.address(unlessLEONIDA_IMPORT_BELOW_ARENA=1), but not positive offsets>= 2^48aboveheap_base.rt::d3d12::host_import_va_in_vsharp_range()guards both bounds while preservingLEONIDA_IMPORT_BELOW_ARENA=1for below-arena imports, with deterministic boundary and BDA-arena tests.CopyDescriptors/CopyDescriptorsSimplesource sync (d3d12_xs_device.cpplocal_sync_source): Main'sLEONIDA_DESC_MIRRORmirrors writes out to the title's backing (local_write_through) and pulls 64-slot tables on list slots 35/36, but does not pull direct CPU writes from a custom-backed source heap beforeCopyDescriptors*reads the real heap (addressing @sodove's finding #2).ExecuteCommandLists(local_sync_shader_visible_heaps): Layered directly ontoDescriptorRange,local_desc_mirror()(LEONIDA_DESC_MIRROR=0disables it too), andlocal_accessible()(writable/readable checks, addressing @QemmHD's note #4). Uses 8-byte per-slot fingerprints (4x smaller than a full 32-byte shadow copy, skipping unchanged/empty slots on submit, addressing @QemmHD's note #3), initialized to 0 so pre-filled slots sync on the first submit (@sodove's finding #1), and picks up title-byte-copied descriptors across the whole shader-visible custom heap rather than only 64-slot root-table binds.Verified locally (Windows 11, NVIDIA GeForce RTX 5070, MSVC RelWithDebInfo,
LEONIDA_VK_VALIDATION=1, 0 VUIDs):ctest -R "^(d3d12_existing_heap|d3d12_console_descriptor_heap|d3d12_descriptor|xs_proxy_mock|device_proxy|queue_proxy)$"-> 6/6 passed.python -I scripts/check_no_game_data.pyon all 5 changed files -> exit 0.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-25T10:54:04Z.
Retested exact head
2ec2ca450on native Windows 11 build 26100, RTX 5070 Ti (610.74), MSVC 19.44 RelWithDebInfo. All six requested CTest cases passed, with zero VUIDs and Khronos validation 1.4.369 active on the GPU tests.The two cases from my earlier review are now covered by the stock console descriptor heap test and passed here. A valid descriptor placed in slot 0 before heap creation reached the real backing on the first submit. Both
CopyDescriptorsSimpleandCopyDescriptorsobserved a direct CPU write to a custom-backed source heap. The existing-heap test also passed its deterministic 48-bit boundary cases.Synthetic inputs only. This verifies those regressions on Blackwell. AI-assisted: yes (OpenAI Codex).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:57:37Z.
Hi @TanmaySatyam, thanks for this pull request. It currently conflicts with
main(conflicting file(s):runtime/shims/d3d12_vulkan_device.cpp,runtime/shims/d3d12_xs_device.cpp), so it carries theneeds rebaselabel. CONTRIBUTING.md asks authors to rebase their branch onmain; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:31:06Z.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed