From 6d1a7bdba38583efb7abf2fb793f347c250d0fc6 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Thu, 31 Jan 2019 15:00:34 -0800 Subject: [PATCH] freedreno/a6xx: Use the right resource for separate stencil stride Reviewed-by: Rob Clark Signed-off-by: Kristian H. Kristensen --- src/gallium/drivers/freedreno/a6xx/fd6_gmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c index cb5c582476f..3c9df929655 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c @@ -200,7 +200,7 @@ emit_zs(struct fd_ringbuffer *ring, struct pipe_surface *zsbuf, if (rsc->stencil) { struct fd_resource_slice *slice = fd_resource_slice(rsc->stencil, 0); - stride = slice->pitch * rsc->cpp; + stride = slice->pitch * rsc->stencil->cpp; size = slice->size0; uint32_t base = gmem ? gmem->zsbuf_base[1] : 0; -- 2.30.2