aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-12-19 09:37:03 -0800
committerNanley Chery <[email protected]>2017-01-11 17:35:59 -0800
commit61992e0afe5f717aad7321d9748588b2cd27f8ee (patch)
treec01de9e43fa35916f5c47efb9a543f435639a85d
parent4e0d171d7eb6accbf8f381530eedbc9ff86b54fb (diff)
anv/cmd_buffer: Fix arrayed depth/stencil attachments
Enable multiple layers of the depth/stencil buffers to be accessible. Fixes the crucible test, func.depthstencil.arrayed_clear. Cc: [email protected] Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 0c638d6b02d..a2782dcc4b6 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2123,14 +2123,17 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
db.Height = image->extent.height - 1;
db.Width = image->extent.width - 1;
db.LOD = iview->isl.base_level;
- db.Depth = image->array_size - 1; /* FIXME: 3-D */
db.MinimumArrayElement = iview->isl.base_array_layer;
+ assert(image->depth_surface.isl.dim != ISL_SURF_DIM_3D);
+ db.Depth =
+ db.RenderTargetViewExtent =
+ iview->isl.array_len - iview->isl.base_array_layer - 1;
+
#if GEN_GEN >= 8
db.SurfaceQPitch =
isl_surf_get_array_pitch_el_rows(&image->depth_surface.isl) >> 2;
#endif
- db.RenderTargetViewExtent = 1 - 1;
}
} else {
/* Even when no depth buffer is present, the hardware requires that