v3d: support rendering to multi-layered framebuffers
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 29 Oct 2019 09:27:23 +0000 (10:27 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 16 Dec 2019 07:42:37 +0000 (08:42 +0100)
commit74a59fdc6e8c4f9c51454a6d1a5b8998083014b5
treeadd466d61fbb718e8f7a34f970cfed4918de52ee
parenta0c94c70ee9aa74c7ff05acffc43c8e92b0c0e1e
v3d: support rendering to multi-layered framebuffers

When doing layered rendering the binning stage will prepare per-tile
lists for each layer in the framebuffer, so we need to make sure
we allocate enough space for them .

We also need to emit the NUMBER_OF_LAYERS packet. This is required
even when the number of layers is only 1, otherwise the simulator
detects buffer overflows in the tile_state BO during some CTS test
cases involving layered FBOs.

When rendering, we need to emit commands for each layer of the
framebuffer separately and make sure we address the correct layers for
each one.

v2: fixed typo in comment (Alejandro)

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/gallium/drivers/v3d/v3d_context.h
src/gallium/drivers/v3d/v3dx_draw.c
src/gallium/drivers/v3d/v3dx_rcl.c