[Mesa-dev] [PATCH] i965/skl: Implement WaDisable1DDepthStencil

Kenneth Graunke kenneth at whitecape.org
Mon Feb 9 13:15:54 PST 2015


On Monday, February 09, 2015 05:57:20 PM Neil Roberts wrote:
> Skylake+ doesn't support setting a depth buffer to a 1D surface but it
> does allow pretending it's a 2D texture with a height of 1 instead.
> 
> This fixes the GL_DEPTH_COMPONENT_* tests of the copyteximage piglit
> test (and also seems to avoid a subsequent GPU hang).
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89037
> ---
> This probably only makes sense on top of Francisco Jerez's patch here:
> 
> http://lists.freedesktop.org/archives/mesa-dev/2015-February/076392.html
> 
> The copyteximage test is still failing with some other formats such as
> GL_RGB16 and some intensity and luminance formats but I'm just looking
> into that now.
> 
>  src/mesa/drivers/dri/i965/gen8_depth_state.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c
> index e428089..b4eb6e1 100644
> --- a/src/mesa/drivers/dri/i965/gen8_depth_state.c
> +++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c
> @@ -190,6 +190,18 @@ gen8_emit_depth_stencil_hiz(struct brw_context *brw,
>     case GL_TEXTURE_3D:
>        assert(mt);
>        depth = MAX2(mt->logical_depth0, 1);
> +      surftype = translate_tex_target(gl_target);
> +      break;
> +   case GL_TEXTURE_1D_ARRAY:
> +   case GL_TEXTURE_1D:
> +      if (brw->gen >= 9) {
> +         /* WaDisable1DDepthStencil. Skylake+ doesn't support 1D depth
> +          * textures but it does allow pretending it's a 2D texture
> +          * instead.
> +          */
> +         surftype = BRW_SURFACE_2D;
> +         break;
> +      }
>        /* fallthrough */
>     default:
>        surftype = translate_tex_target(gl_target);
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150209/bbe73ece/attachment.sig>


More information about the mesa-dev mailing list