The course load

The plan's last step was the course load of an Ounce game, measured on 2026-11-24 after the merge of main. With a warm pipeline cache it is now two frames of 300 to 350 ms, each with about 200 MB of texture pieces. It was 3 to 4 s before items 5b and 8 and before ASTC Auto followed the memory.

The pieces are three sparse 8192x8192 arrays of 68 layers with 12 levels each. Two are ASTC 8x8, held as BC7. One is held as it is, at a byte a texel. The game streams them a layer at a time. It maps about 1,344 brick pages a layer and fills them with NVN buffer-to-texture copies. Those copies are DMA launches whose results are GPU-owned, and the texture's next check loads the pieces from those owners on the GPU.

In a Tracy capture the load is one draw of 1.3 s on the renderer thread, and in it:

What would make the load shorter is less to encode: a BC7 cache key for a sparse texture's pieces. Today the pieces have no key, because their pages are GPU-owned (astc_content). A key from the bytes of the copy's source would let the persistent cache serve the next load of the same course. vk_tex_dma_rows could also take copies into any layer and level of a texture that needs no conversion, which would leave out the owner and the piece load for the third array. Neither changes the frame rate, only the time to load.


Made from docs/dev/draw-cost.md at 69237645142c. GPL-3.0-or-later.