This was stale code that was causing a SIGSEGV when using SFBD, as we stopped creating the corresponding BO.
Signed-off-by: Tomeu Vizoso <tomeu.viz...@collabora.com> --- src/gallium/drivers/panfrost/pan_context.h | 1 - src/gallium/drivers/panfrost/pan_sfbd.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index a913c8581ef5..b26abea369d3 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -134,7 +134,6 @@ struct panfrost_context { struct panfrost_memory varying_mem; struct panfrost_memory tiler_polygon_list; struct panfrost_memory tiler_dummy; - struct panfrost_memory depth_stencil_buffer; struct panfrost_query *occlusion_query; diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c index 76267b746ac0..b8c314d222f0 100644 --- a/src/gallium/drivers/panfrost/pan_sfbd.c +++ b/src/gallium/drivers/panfrost/pan_sfbd.c @@ -55,14 +55,18 @@ panfrost_sfbd_clear( sfbd->clear_depth_3 = job->clear_depth; sfbd->clear_depth_4 = job->clear_depth; - sfbd->depth_buffer = ctx->depth_stencil_buffer.bo->gpu; + struct pipe_surface *surf = ctx->pipe_framebuffer.zsbuf; + struct panfrost_resource *rsrc = pan_resource(surf->texture); + sfbd->depth_buffer = rsrc->bo->gpu; sfbd->depth_buffer_enable = MALI_DEPTH_STENCIL_ENABLE; } if (job->clear & PIPE_CLEAR_STENCIL) { sfbd->clear_stencil = job->clear_stencil; - sfbd->stencil_buffer = ctx->depth_stencil_buffer.bo->gpu; + struct pipe_surface *surf = ctx->pipe_framebuffer.zsbuf; + struct panfrost_resource *rsrc = pan_resource(surf->texture); + sfbd->stencil_buffer = rsrc->bo->gpu; sfbd->stencil_buffer_enable = MALI_DEPTH_STENCIL_ENABLE; } -- 2.20.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev