Repository navigation
fix(agc): give each slice of a depth array its own HTILE - #5111
Conversation
|
First Windows and Intel run. Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU (NVIDIA 595.97) and an Intel Raptor Lake-S iGPU (32.0.101.6790). The head 5ea6a25 merged into
Written with AI assistance. |
|
@kr4y4 thanks for the Windows and Intel run. Here is a negative control that builds. I merged 5ea6a25 into
AI-assisted: yes |
|
@XairRrR Our focused native-depth clear follow-up #5554 declares #5111 as a prerequisite, alongside #5524. Your range/slice routing goes first; our addition uses a separate strict native extent and requires complete tracked stores, settled GPU work, no CPU/depth race, and exact zero/one HTILE words before clearing a held image. The actual-head validation composition includes your exact |
A slice of a depth array target (DB_DEPTH_VIEW SLICE_START) offset its depth and stencil addresses but kept the array's DB_HTILE_DATA_BASE as its HTILE. Every slice then shared slice 0's metadata: a fast clear of slice 0's HTILE cleared every slice, and a clear of any other slice's HTILE matched none. A slice's HTILE now starts at the base plus the slice times one slice's pipe-aligned metadata, as addrlib addresses it (sliceSize * slice in Gfx10Lib::HwlComputeHtileAddrFromCoord; HtileMetadataBytes is that slice size). The recognized HTILE clear kernel now reports the bytes it clears, 16 per thread (global_store_dwordx4 at the thread index << 4), and a surface takes the clear when that range covers its HTILE, as a DMA_DATA fill does; a clear over a whole array still clears every slice. Uncharted: Legacy of Thieves Collection (PPSA05684) renders its sun shadow cascades into the four slices of a 2048x2048 D16 array; each slice's HTILE lies 256 KiB after the previous one.
|
Rebased onto current |
5ea6a25 to
8fec47a
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
What
A slice of a depth array target (
DB_DEPTH_VIEWSLICE_START) offsets its depth and stencil addresses, but it kept the array'sDB_HTILE_DATA_BASEas its HTILE. Every slice then shared slice 0's metadata:Changes:
sliceSize * sliceinGfx10Lib::HwlComputeHtileAddrFromCoord;HtileMetadataBytesis that slice size.global_store_dwordx4at the thread index << 4. A surface takes the clear when that range covers its HTILE, as with aDMA_DATAfill. A clear over a whole array still clears every slice.Tests:
tests/Graphics.cpp: slice 2 decodes the base plus two slices of HTILE. This fails onmain.tests/DepthSurfaceReuse.cpp: two slices with adjacent HTILE ranges. A clear of the first range clears only the first slice, and a clear of both ranges clears both. The second check fails with exact-address matching.Uncharted: Legacy of Thieves Collection (PPSA05684) renders its sun shadow cascades into the four slices of a 2048x2048 D16 array. Each slice's HTILE lies 256 KiB after the previous one, and decoding a slice's words at that offset gives that cascade's footprint.
Tested
BUILD_TESTING=ON.guest_kernel_fcntl, which passed when rerun. Conventions check passed.maindoes not run it yet.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)