Merge pull request #16557 from brumskysb/docs/agc-layer-rounding
docs(agc): measure the rounding of a halfway array layer
This commit is contained in:
1 file changed
+1
-1
@@ -391,7 +391,7 @@
|
||||
- [Benchmark rewrite failure test off Windows](../../../core/libs/prx/libSceAgcDriver/tests/PerformanceTrace.cpp) (libSceAgcDriver) - `ReplaceGzipFile` checks that a write failing at `<name>.tmp` keeps the previous `aps5-bench.json.gz` only on non-Windows builds: the `std::ios_base::failure` thrown inside the MinGW ofstream did not unwind to the test's catch, so Windows CI covers only the failed move.
|
||||
|
||||
- [Sampled array windows](../../../core/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cpp) (libSceAgcDriver) - a sampled 2D array, 1D array or cube view past slice 0 is built from its viewed slices only (`ViewedArrayWindow`). The window needs a thin surface without DCC metadata, or with keys that resolve over the whole surface to Uncompressed (the window then drops the metadata; keys are rescanned at each lookup). For a 64 KiB XOR swizzle it starts at the last slice at or before the base whose swizzle slice bits are zero (R_X 1-byte and Z_X 4-byte: a multiple of 16); when that is slice 0 the view builds slices 0 to its last slice. A window and a whole-array view of the same surface are separate images over overlapping memory, kept coherent by the existing overlap rules, at the cost of both. PPSA26344 samples a cube array at slices 4299..7232 at 1467 MiB instead of about 3.8 GB; PPSA01341 samples slice 636 of a DCC 2D array at 52 MiB instead of 2.5 GiB.
|
||||
- [1D arrays past maxImageArrayLayers](../../../core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp) (libSceAgcDriver) - a 1D array view of more than `maxImageArrayLayers` slices, sampled only by `image_sample_lz` or `image_sample_l` without depth comparison or a 128-bit T#, is a 2D image holding each viewed slice in two adjacent rows; a view of exactly the limit stays a 1D array. A shader is prepared with this mode only once such a view reaches it. The layer is rounded half to even and clamped to the view, as [Vulkan's array layer selection](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#textures-layer-selection) does; RDNA's rounding of a halfway layer is unmeasured; a NaN layer reads slice 0. Views of other mip levels, block-compressed or RGBA8-expanded formats, native depth surfaces, other uses of the view and views needing more than `maxImageDimension2D` rows throw, as do `ShaderReplay` requests (no limit recorded). PPSA08329 samples 5,120 slices.
|
||||
- [1D arrays past maxImageArrayLayers](../../../core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp) (libSceAgcDriver) - a 1D array view of more than `maxImageArrayLayers` slices, sampled only by `image_sample_lz` or `image_sample_l` without depth comparison or a 128-bit T#, is a 2D image holding each viewed slice in two adjacent rows; a view of exactly the limit stays a 1D array. A shader is prepared with this mode only once such a view reaches it. The layer is rounded half to even and clamped to the view, as [Vulkan's array layer selection](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#textures-layer-selection) does; RDNA's rounding of a halfway layer is measured on gfx1036 (driver 31.0.22044.1) with the hardware oracle, the layer being an absolute index: 0.5, 1.5 and 2.5 select slices 0, 2 and 2 of four, i.e. half to even, and -1.0 and 5.0 clamp to the first and last slice; a NaN layer reads slice 0. Views of other mip levels, block-compressed or RGBA8-expanded formats, native depth surfaces, other uses of the view and views needing more than `maxImageDimension2D` rows throw, as do `ShaderReplay` requests (no limit recorded). PPSA08329 samples 5,120 slices.
|
||||
- [2D reads of 2D arrays](../../../core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp) (libSceAgcDriver) - a sampled image whose shader shape is 2D and whose T# is a 2D array is built from its base slice alone: the T# is narrowed to that slice (`FirstLayerDescriptor`) before its decode, cache key and image, in stage A records, stage B bindings, revalidation and image tables. A whole-array read of the same T# keeps its own cache entry, so both images exist when a title uses both. Storage images read or written through a 2D shape are not narrowed and still build every slice the T# names. PPSA26344 reads a 3328x1872 R_X T# of 1537 slices this way: the whole array was a 12.4 GiB image that did not fit the device-local budget of an RTX 4090.
|
||||
- [Sampled and storage views of 1 GiB or more](../../../core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp) (libSceAgcDriver) that stay whole are only logged (sampled views by `cachedTexture`, storage views by `cachedStorageTexture`), with the registered guest range holding their base and how many of their slices fit in it; nothing is capped to that range. PPSA26344 samples a 1467 MiB cube array window of which only 838 of 2934 slices lie inside its 3380 MiB range: the rest is read from whatever follows the range. Whether such slices are ever sampled is not measured.
|
||||
- [dma-buf imports](../../../core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp) (libSceAgcDriver) - the udmabuf of a guest range lists the runs of the direct memory backing file behind it (`SharedBackingRuns`, one per physical allocation the range was mapped from, up to udmabuf's 1024), where it took the first run's offset for the whole range. The start-up probe also stores to the import from the GPU after CPU stores to the same pages and counts pages the CPU still reads stale: i915 maps a dma-buf without snooping the CPU caches (4 of 4 pages stale on Meteor Lake with Mesa 26.2.3 and main), so such a device does not fall back to dma-buf imports and copies instead. The memory type the import reports is host-coherent for the driver's own mappings; the guest's mapping of the same pages is what goes stale.
|
||||
|
||||
Reference in new issue
Block a user