summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5/vc5_rcl.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-12-05 18:58:41 -0800
committerEric Anholt <[email protected]>2017-12-19 13:40:30 -0800
commit7a30517cce8f3acce4cc22e510068da7fc89b4a1 (patch)
tree84798d3ba673e97c08667580d70a0ba1bd706c2a /src/gallium/drivers/vc5/vc5_rcl.c
parent308076fd55a44f8defedd80d75e256e51bdff0a2 (diff)
broadcom/vc5: Start adding support for rendering to Z32F_S8X24_UINT.
There may be some more RCL work to be done (I think I need to split my Z/S stores when doing separate stencil), but this gets piglit's "texwrap GL_ARB_depth_buffer_float" working. v2: Unwrap the z32f_wrapper before calling the helper, rather than having the helper have a callback. v3: Rebase on Rob Clark's u_transfer_helper instead
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_rcl.c')
-rw-r--r--src/gallium/drivers/vc5/vc5_rcl.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c
index f27f7b3837b..afb764c0a80 100644
--- a/src/gallium/drivers/vc5/vc5_rcl.c
+++ b/src/gallium/drivers/vc5/vc5_rcl.c
@@ -369,6 +369,28 @@ vc5_emit_rcl(struct vc5_job *job)
if (job->resolve & PIPE_CLEAR_DEPTHSTENCIL)
rsc->writes++;
+
+ /* Emit the separate stencil packet if we have a resource for
+ * it. The HW will only load/store this buffer if the
+ * Z/Stencil config doesn't have stencil in its format.
+ */
+ if (rsc->separate_stencil) {
+ cl_emit(&job->rcl,
+ TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CONFIG,
+ zs) {
+ zs.address =
+ cl_address(rsc->separate_stencil->bo,
+ surf->separate_stencil_offset);
+
+ zs.z_stencil_id = 1; /* Separate stencil */
+
+ zs.padded_height_of_output_image_in_uif_blocks =
+ surf->separate_stencil_padded_height_of_output_image_in_uif_blocks;
+
+ assert(surf->tiling != VC5_TILING_RASTER);
+ zs.memory_format = surf->separate_stencil_tiling;
+ }
+ }
}
/* Ends rendering mode config. */