Repository navigation
d3d12: page direct-indexed raster roots, guard scalar descriptor lookup, and enforce stride-table root budget - #295
Open
smith-3 wants to merge 1 commit 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.
Summary
Follows up on #294 (
341a9fd) to cover direct-indexed (CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED) raster root signatures and tighten the 64-DWORD root-signature budget check when appending the heap stride table (t1, space32766).Changes
runtime/d3d12/src/device/compute_table.rs:heap_indexed_tabled_root(signature, strides)(60-DWORD limit whenstridesis enabled, 62 otherwise) so appending both the paged index map (t0, space32766) and the heap stride table (t1, space32766) stays within the 64-DWORD D3D12 root-signature limit.tb_heap_mapon direct-indexedProgram::Rasterroots: 0-table bindless raster roots, multi-leading-table raster roots, single-table raster roots without a scalar-heap constant, and a fallback (append_index_map_only) for other finite-table direct-indexed raster roots.append_corroborated_rangesto also appendtb_heap_map(andheap_strideswhen it fits) for direct-indexed compute roots that fall back to corroborated ranges.pParameterspointer on 0-parameter direct-indexed roots inappend_ranges_and_map.runtime/d3d12/src/commands/recording.rs:scalar_descriptorlookup inRecordingwithif binding.scalar_mask != 0so general direct-indexed raster roots (scalar_mask == 0) bind the paged index map and retainindexed_arenasinstead of skipping draws withE_INVALIDARG("draw: no scalar descriptor for the indexed load").runtime/d3d12/src/tests/device/compute_table.rs:tabled_compute_roots_that_index_the_heap_take_the_index_mapfor thestridesparameter and assert the 60-DWORD budget when both the index map and stride table are appended.Verification
python3 build.py d3d12buildsd3d12_xs.dlland all smoke executables cleanly with zero warnings.cargo test --manifest-path runtime/d3d12/Cargo.toml --target x86_64-pc-windows-msvc --no-run --libcompiles and links thetuxbox-d3d12unit test binary (includingdevice::compute_table::tests) cleanly with zero warnings.