Repository navigation
Conversation
…tables Two gaps in mirroring title-backed descriptor heaps on the Xbox console path: - Xbox device slot 61 (CreateSamplerX) created the sampler in the real heap only. Every other descriptor creator and copier also stores the result at the title's address (local_write_through), so a title that copies samplers out of its own heap memory read zeros. Slot 61 now writes through as slot 22 does. - local_mirror_table, run when a descriptor table is bound (list slots 35/36), checked the real range with VirtualQuery even when it is a mapped range. Wine can report a live vkMapMemory span as MEM_FREE, so on Wine the table was never mirrored. It now skips the check for a mapped range, as local_write_through does. From kevincommits' finding in ProjectLeonida#1608 (item 2). xs_proxy_mock_test gains check_descriptor_mirror, with the mock's real heap pointed at memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Claimed in the coordination issue as: RT-XS-DESCRIPTOR-MIRROR-GAPS (#1608 (comment))
What and why
Item 2 of @kevincommits' finding in #1608 (#1608 (comment)). Thanks for the audit.
Both gaps are in
runtime/shims/d3d12_xs_device.cpp, where title-backed descriptor heaps are kept in step with the real heap:proxy_create_sampler_x, CreateSamplerX) created the sampler in the real heap only. Every other descriptor creator and copier callslocal_write_throughto store the result at the title's address as well: slots 17-22, 23/24, and the placed view. A title that copies slot-61 samplers out of its own heap memory into a shader-visible heap therefore copied zeros or stale bytes. Slot 61 now writes through, as slot 22 does.local_mirror_tableruns when a descriptor table is bound (list slots 35/36) and checks the real range withVirtualQuery, even for a mapped range (DescriptorRange::mapped). Wine can report a livevkMapMemoryspan asMEM_FREE, so on Wine with mapped descriptor heaps the table was never mirrored. The check is now skipped for a mapped range, aslocal_write_throughandpull_title_descriptorsalready do.No overlap with #2484 or the other open PRs on
d3d12_xs_device.cpp:git merge-treefinds no conflict with #2484.Tested
Windows 11, MSVC (VS 18), RelWithDebInfo, on
main43a9d56. CPU only.xs_proxy_mock_testgainscheck_descriptor_mirror. The mock's real heap reports a CPU start in test memory (g_mock_heap_cpu_start; other checks keep the old fake address), and the XMem hook hands out a title buffer.main's slot 61 this fails.On Windows
VirtualQueryreports that memory truthfully, so case 2 checks that the mapped path mirrors; it cannot reproduce the Wine report itself, and it passes onmaintoo.ctest -R "^(xs_proxy_mock.*|device_proxy)$": 10/10 pass.scripts/check_no_game_data.py: clean.GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11 (CPU tests only)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code