[Mesa-dev] [PATCH] anv: ensure that we do not emit negative Depth in 3DSTATE_DEPTH_BUFFER

Lionel Landwerlin lionel.g.landwerlin at intel.com
Wed Feb 22 15:11:44 UTC 2017


I can't reproduce on the vulkan-cts-next-dev (I just pull -r, so I 
shouldn't miss anything right?).

On 22/02/17 14:45, Iago Toral Quiroga wrote:
> This fixes a number of new CTS tests that would crash otherwise:
> dEQP-VK.pipeline.render_to_image.*
> ---
>   src/intel/vulkan/genX_cmd_buffer.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
> index 40a72f4..cdd4501 100644
> --- a/src/intel/vulkan/genX_cmd_buffer.c
> +++ b/src/intel/vulkan/genX_cmd_buffer.c
> @@ -2270,7 +2270,8 @@ 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;
> +            iview->isl.array_len <= iview->isl.base_array_layer
> +               ? 0 : iview->isl.array_len - iview->isl.base_array_layer - 1;
>   
>   #if GEN_GEN >= 8
>            db.SurfaceQPitch =




More information about the mesa-dev mailing list