Module: Mesa Branch: main Commit: a4193b859444f5092101cd3a14479029cb78c1ae URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4193b859444f5092101cd3a14479029cb78c1ae
Author: Lucas Stach <[email protected]> Date: Sat Aug 13 15:59:22 2022 +0200 etnaviv: correct comment about tile status size The earlier understanding of how tile status tracks the color/depth surface was wrong and the TS size calculations have long been fixed, as we now know that color/depth tiles have a fixed size in bytes and thus don't depend on the surface format. But nobody changed the comment explaining how TS works, so it's still around as a trap for the reader. Reword the comment to not confuse people that aren't intimately familiar with the inner workings of tile status. Signed-off-by: Lucas Stach <[email protected]> Tested-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9780> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 03b9b14fc6f..22fdf1b7f76 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -74,10 +74,9 @@ static uint64_t layout_to_modifier(enum etna_surface_layout layout) } } -/* A tile is 4x4 pixels, having 'screen->specs.bits_per_tile' of tile status. - * So, in a buffer of N pixels, there are N / (4 * 4) tiles. - * We need N * screen->specs.bits_per_tile / (4 * 4) bits of tile status, or - * N * screen->specs.bits_per_tile / (4 * 4 * 8) bytes. +/* A tile is either 64 bytes or, when the GPU has the CACHE128B256BPERLINE + * feature, 128/256 bytes of color/depth data, tracked by + * 'screen->specs.bits_per_tile' bits of tile status. */ bool etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
