Repository navigation
shader: bind a single directly indexed heap flag as a descriptor table - #3442
Merged
Merged
Conversation
(cherry picked from commit 3114bb1)
… with no user SGPR left for the heap
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.
Replaces #3221. Branch
compute-single-heap-table(66c3aec, 214ebfa), based on main 212d4b5.git merge-treewith main 184b15d is clean. The first commit is @tedin7's commit from #3221 (3114bb15there,66c3aec0here), cherry-picked with the same changes and tedin7 as author. The second answers the open review items there.What changes
src/gfx1013_compute_native.cpp(tedin7): the directly indexed heaps were bound as descriptor tables only when both root flags were set (0xc00) and exactly two user SGPRs were left. Each flag now binds its heap on its own:0x400binds the resource heap atnext,0x800binds the sampler heap there, and0xc00binds both, resource heap first. The heaps bind only whennext + heap_count == user. In any other case the heap stays unbound and the load is refused with "direct descriptor address outside bound table", as before.tests/native_wave_request_check.py(tedin7): the heap-slot stride program also runs withRootFlags(CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED)and 11 user SGPRs. The same words with 12 user SGPRs must be refused and write no.cso.tests/native_sampler_heap_check.py(tedin7): a sampler-only root (SAMPLER_HEAP_DIRECTLY_INDEXED, 6 user SGPRs) runs the sampler fixture.tests/native_sampler_heap_check.py(this PR): a sampler-only root with 5 user SGPRs (user == next, no SGPR left for the heap) must be refused with "direct descriptor address outside bound table" and write no.cso. This is the case for==changed to>=, which the native: bind a single directly indexed heap flag as a descriptor table #3221 cases do not catch (by reading; that mutation was not run). The check is placed before the first fixture call, so an adapter that later skips with 77 still evaluates it (by reading).docs/experiments/native-sampler-heap.md(this PR): describes the0x400,0x800and0xc00forms and thenext + heap_count == userrule, removes the line saying0x800-only roots are not covered, and adds the reproduction command.Evidence
Tests covering the change:
native_wave_request_hardware(CMakeLists.txt), andnative_sampler_heap_warp/native_sampler_heap_hardware(tests/cmake/native_sampler_heap.cmake).Release build of the branch head (base 212d4b5), one run: 2 passed, 1 skipped.
native_wave_request_hardware: Passed.native_sampler_heap_hardware: Passed.native_sampler_heap_warp: Skipped, exit 77.Not covered
src/gfx1013_compute_native.cpp; the merge is textually clean.nextis inferred fromtools/startup/gfx2hlsl.pyStage.setup_entry, not from a documented ABI. The fixtures read where the translator binds, so the GPU runs check D3D12 behaviour, not the guest layout.tests/native_wave_request_check.pyruns after the GPU fixture, so it is not reached when the fixture returns 77 first.CI
On main 184b15d the
prCTest preset filter matches none of the three tests, soBuild and test on Windowsdoes not run them.