aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x/codecs/codec.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 04:39:43 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 04:39:43 -0400
commit920f3f6ebdbae5528a2b3aa94e7bddf5141863ef (patch)
tree8b1fd4d6e82ac2fcc41b6f0c4a02d3cfbeee3b6f /src/video_core/host1x/codecs/codec.cpp
parent0a13c9b2e09ff0e871236b13ef3ed3177e4930ce (diff)
nx2: give sparse regions memory only where the GPU writes
nx2:gpu 214 regions with the sparse flag (word 7 bit 0x200) are Mario Kart World's terrain texture arrays and layer pools, 170 MB to 5.8 GB, mostly empty. Backed whole they ran the graphics pool dry (26 "could not allocate" per session, later regions without memory), and backing a block at a time made the texture cache rebuild the 1.45 GB arrays each time a block was mapped. A sparse region now gets a device (SMMU) range of its own when it is created, mapped for the GPU at once, so its GPU mapping never changes. Before a GPU-side write lands in it (WriteBlock, Write<T>), the 4 MiB blocks it touches get memory, cleared, behind their device pages. Unbacked device pages read zero and drop writes instead of crashing, and the unmapped-device-access errors are logged 16 times, not once per page. nx2:gpu 215 releases the device range and the blocks after the GPU is done with them. The log reports GPU-only memory in use and its peak. Mario Kart World, 180 s: no allocation failures; ~2.8 GB of terrain blocks get memory instead of 6.5 GB of whole regions, next to 3 GB of ordinary GPU-only regions. Terrain renders as before.
Diffstat (limited to 'src/video_core/host1x/codecs/codec.cpp')
0 files changed, 0 insertions, 0 deletions