v3dv: fix tile state allocation

If we had decided that we only need one layer worth of tile state
we should actually only allocate one layer.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
This commit is contained in:
Iago Toral Quiroga 2022-07-27 09:53:45 +02:00 committed by Marge Bot
parent 5da4f5fe8d
commit 3ab6eceac0

View file

@ -446,7 +446,7 @@ v3dv_job_start_frame(struct v3dv_job *job,
/* The PTB will request the tile alloc initial size per tile at start
* of tile binning.
*/
uint32_t tile_alloc_size = 64 * tiling->layers *
uint32_t tile_alloc_size = 64 * layers *
tiling->draw_tiles_x *
tiling->draw_tiles_y;
@ -475,7 +475,7 @@ v3dv_job_start_frame(struct v3dv_job *job,
v3dv_job_add_bo_unchecked(job, job->tile_alloc);
const uint32_t tsda_per_tile_size = 256;
const uint32_t tile_state_size = tiling->layers *
const uint32_t tile_state_size = layers *
tiling->draw_tiles_x *
tiling->draw_tiles_y *
tsda_per_tile_size;