Repository navigation
GPU: refresh and copy back the buffer bound to each table slot - #4
Open
mohammadallami75-ops wants to merge 1 commit into
Open
mohammadallami75-ops wants to merge 1 commit into
mohammadallami75-ops wants to merge 1 commit into
Conversation
Overlapping title allocations can select different host shadows for a resource and a subrange. Keep the shadow with the host descriptor and use it for table-bound SRV refresh and UAV copy-back. AI-assisted implementation and testing.
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.
Problem
The host descriptor is built using a shadow that covers the buffer allocation. Table binding then independently looks up a shadow for the view’s byte range. When a smaller title allocation overlaps that range, the second lookup can select the smaller allocation’s shadow. The GPU uses the original shadow, so the refresh can leave it stale and UAV writes can miss title memory on copy-back.
Change
Retain the shadow alongside each host buffer descriptor and use it for table-bound refresh and copy-back. This covers mirrored slots and newly built or reused dynamic tables. The fix concerns table-bound buffer identity. Related changes cover directly indexed SRV coherency and buffer state transitions.
Verification
ffe310e: title memory retained its sentinel after a native GPU write to the descriptor’s shadow. With the patch the exact GPU-written word reached title memory and both neighbors retained their sentinels.AI-assisted implementation and testing.