aboutsummaryrefslogtreecommitdiff
path: root/src/common/steady_clock.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 05:16:34 -0400
committerkraibse <33869366+kraibse@users.noreply.github.com>2026-10-30 17:27:04 +0100
commit940d44ca25628288f1b5f64c25c022b3a4ae5ce2 (patch)
tree660cb9e8b59bc1fc074a891c77cc7225802fb8d8 /src/common/steady_clock.cpp
parent97ce27ab35153884d2fd05c278433928e429cd91 (diff)
texture_cache: give images over unwritten sparse blocks no device memory
Mario Kart World creates nine terrain layer pools in sparse regions (four R8 16384x16384, four RG16 8192x8192, one R16 8192x8192: 2.9 GB of device memory). In 180 s of title and attract demo not one of their blocks is written and nothing renders into them, so they hold zeros; on the console only the few tiles the game maps have memory. nx2:gpu now publishes which 4 MiB blocks of each sparse region have been written (nx2.h, a leaf lock the texture cache may take). An image of 32 MiB or more lying in one sparse region with no written block is created as a sparse resident image with nothing bound: reads return zero, as an unmapped tile does. The first write into its range, or the first time the GPU renders into it (that range then counts as written), marks it remapped, so a backed image replaces it at its next use. Mario Kart World, 180 s: the collector deletes 0-80 images per 600 frames instead of thousands, frames over 100 ms per 600 presents drop from 1-9 to 0-1, peak working set 14.7 GB. One render target in a small sparse region gets replaced once (logged).
Diffstat (limited to 'src/common/steady_clock.cpp')
0 files changed, 0 insertions, 0 deletions