Repository navigation
Conversation
This was referenced Nov 26, 2026
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.
Summary
Extends #218 for #191 to support non-contiguous XMem physical backings using
CreateReservedResource+ synchronousUpdateTileMappings, for the multi-view GPU-alias imports where page orders disagree across imports (@gtb-sbe measured 16 of 131 imports / 277.6 MiB requiring this path in ProjectScarlett).Changes
TuxBoxAcquirePhysicalBacking+TuxBoxReleasePhysicalBackingcontract unchanged and adds an optional fallback toTuxBoxAcquirePhysicalBackingRuns:TuxBoxAcquirePhysicalBackingfails withERROR_NOT_SUPPORTEDandTuxBoxAcquirePhysicalBackingRunsis exported, tries a 16-entry inline stack buffer (retrying onERROR_MORE_DATA/ERROR_INSUFFICIENT_BUFFER), validates 64 KiB alignment and summed byte size while always releasing the hold on error, collapses single-run responses to contiguous, and otherwise returnsAcquiredBacking::Scattered.wait_for_queue/with_init_transition) onInitTransitionand added synchronousmap_reserved_tiles(UpdateTileMappings).extra_heaps+ImportedHeap::scatteredpreserving drop order (native->extra_heaps->_pin->_shadow->_backing).import_scattered_buffer(requiresoffset == 0,ID3D12Device13,TiledResourcesTier >= 1, opens each piece viaOpenExistingHeapFromAddress1, creates a buffer viaCreateReservedResource, maps all piece heaps viamap_reserved_tiles, attaches all heaps to the resource).acquire_backingintoimport_buffer_with_heapand guardsreusable_for/buffer_aliason scattered heaps.> 16runs), hold release on invalid runs, and single-run collapse, plus a real-GPU test (scattered_alias_imports_through_reserved_buffer_and_aliases_cpu_and_gpu) verifying[c, a, b]and[b, c]scattered aliasing, non-64 KiB multiple width (2 * PAGE + 1024),ALLOW_UNORDERED_ACCESS, bidirectional CPU/GPU reads/writes, hold release, and post-drop submit survival.Like #218, this stays dormant until
xmem.dllexportsTuxBoxAcquirePhysicalBackingRuns(andTuxBoxAcquirePhysicalBacking).tuxbox-d3d12teststuxbox-d3d12on RX 6900 XT (GE-Proton11-14):163 passed, 0 failed(11/11device::heap::backing::tests).tuxbox-d3d12under offline Wine:163 passed, 0 failed.Verified on Lanes
A pull request is not merged until Lanes passes on a GPU. Run:
python tuxbox.py checkpassed on this branchDormant until
xmem.dllexportsTuxBoxAcquirePhysicalBackingRuns; covered on real GPU hardware bydevice::heap::backing::tests::scattered_alias_imports_through_reserved_buffer_and_aliases_cpu_and_gpuusingFakeXmem, while all existing Lanes/fixtures (70/70) and D3D12 regression controls (19/19) pass.GPU, driver and backend: AMD Radeon RX 6900 XT (
1002:73bf), Mesa RADV26.3.1,GE-Proton11-14(vkd3d-proton), Windows DXCv1.9.2609.Paste the summary printed at the end: