summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2017-02-22 11:33:13 +0100
committerIago Toral Quiroga <[email protected]>2017-03-02 09:04:03 +0100
commit7ad692d8e2bf619f5855552e3d56aafa9f5f21af (patch)
tree84da15250bf469f990861b7b07297a479e9ad824 /src
parent64bf78270df485fb1ccdf45bd5240fd06f21acac (diff)
anv: do not subtract the base layer to compute depth in 3DSTATE_DEPTH_BUFFER
According to the PRM description of the Depth field: "This field specifies the total number of levels for a volume texture or the number of array elements allowed to be accessed starting at the Minimum Array Element for arrayed surfaces" However, ISL defines array_len as the length of the range [base_array_layer, base_array_layer + array_len], so it already represents a value relative to the base array layer like the hardware expects. v2: Depth is defined as a U11-1 field, so subtract 1 from the actual value (Jason) This fixes a number of new CTS tests that would crash otherwise: dEQP-VK.pipeline.render_to_image.* Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index e3f84e32dcc..2b070355d26 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2268,8 +2268,7 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
assert(image->depth_surface.isl.dim != ISL_SURF_DIM_3D);
db.Depth =
- db.RenderTargetViewExtent =
- iview->isl.array_len - iview->isl.base_array_layer - 1;
+ db.RenderTargetViewExtent = iview->isl.array_len - 1;
#if GEN_GEN >= 8
db.SurfaceQPitch =