Repository navigation
Test runtime-stride reads through a range-preserving buffer view - #3
Draft
MichaelSmithAI wants to merge 2 commits into
Draft
MichaelSmithAI wants to merge 2 commits into
MichaelSmithAI wants to merge 2 commits into
Conversation
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.
On NVIDIA hardware, reviewers found that the raw reads emitted by VIctory Marvisak#193 returned zero when bound to a structured buffer. A subsequent title-side measurement identifies the four instance-culling shaders’ access as a structured SRV selected by a GPU-loaded index. All four emitted and passed Windows SDK validation on the reporter’s Marvisak#193 + lane-mask-fix stack at wave size 32. The static-slot path in this draft does not cover that dynamic selection. Original PR and hardware discussion · Instance-culling report
This fork-local draft is for native readback before proposing changes to Marvisak#193. Baseline
0484af4contains Marvisak#193 plus the upstream test-module rename. For a read from an exact, static SRV table entry, the candidate binds a separate raw view of the original buffer range and records its index, stride, extent and count in command-list memory. This lets two recorded dispatches reuse the guest slot for different views and still read the intended data. Failed binds return the unused descriptor leases.The experiment narrows Marvisak#193's runtime-stride fallback. It handles representable structured SRV ranges and raw stride-four inputs. Unknown-stride UAV operations, typed views, and dynamically selected descriptors remain unsupported. These differences make an offline comparison of newly accepted and newly refused shaders important before integrating it.
Run the native readback on Windows with a D3D12 adapter:
The expected destination words are 0 for the skipped dispatch, 109 and 105 for two structured views, and 102 for a raw input. The fixture also checks that the guest's structured descriptor survives the alias bind and that a refused bind returns its lease. Look for
Structured SRV generation and raw SRV readbacks passedin the output. If D3D12 is unavailable, the test prints a skip message.The Linux shader library suite passed 57 tests, the synthetic shader passed Microsoft DXIL validation, and the Windows targets type-checked from Linux. On an RTX 4090 under Wine 11.22 with vkd3d-proton 3.1, the published test at
02710a0failed guest-memory readback. Applying only VIctory #322 atb58d198let the unmodified test complete with the expected 0, 109, 105 and 102 and the lease assertions passed. A separate control changed only the test destination to ordinary committed memory and also passed. Windows-native readback remains pending. This fixture remains a static-slot control. The four reported culling shaders need a separate dynamic-slot binding test that verifies the selected view, stride and record bounds before measuring their output or G-buffer occupancy.AI assistance was used for implementation and review.