[Mesa-dev] [PATCH 1/3] anv/cmd_buffer: Fix arrayed depth/stencil attachments

Jason Ekstrand jason at jlekstrand.net
Fri Jan 6 23:03:59 UTC 2017


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Fri, Jan 6, 2017 at 2:46 PM, Nanley Chery <nanleychery at gmail.com> wrote:

> Enable multiple layers of the depth/stencil buffers to be accessible.
>
> Fixes the crucible test, func.depthstencil.arrayed_clear.
>
> Cc: mesa-stable at lists.freedesktop.org
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/intel/vulkan/genX_cmd_buffer.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> b/src/intel/vulkan/genX_cmd_buffer.c
> index 9c6349a745..0d24aeaed6 100644
> --- a/src/intel/vulkan/genX_cmd_buffer.c
> +++ b/src/intel/vulkan/genX_cmd_buffer.c
> @@ -2122,14 +2122,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
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170106/682795ea/attachment.html>


More information about the mesa-dev mailing list