From 0467a52dc3f7d51eeb51179ce2f9871758ecacb1 Mon Sep 17 00:00:00 2001 From: "Park, Jeongmin" Date: Sat, 7 Feb 2015 17:53:48 +0900 Subject: [PATCH] st/dri: Make depth buffer optional for postprocessing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since only pp_jimenezmlaa uses depth buffer, we can make it optional. Signed-off-by: Marek Olšák --- src/gallium/state_trackers/dri/dri_drawable.c | 2 +- src/gallium/state_trackers/dri/drisw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index eda2d5232c5..b8afe6c4d23 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -418,7 +418,7 @@ dri_postprocessing(struct dri_context *ctx, struct pipe_resource *src = drawable->textures[att]; struct pipe_resource *zsbuf = drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]; - if (ctx->pp && src && zsbuf) + if (ctx->pp && src) pp_run(ctx->pp, src, src, zsbuf); } diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c index 8d9acd6af51..5f69a2d670e 100644 --- a/src/gallium/state_trackers/dri/drisw.c +++ b/src/gallium/state_trackers/dri/drisw.c @@ -172,7 +172,7 @@ drisw_swap_buffers(__DRIdrawable *dPriv) ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT]; if (ptex) { - if (ctx->pp && drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]) + if (ctx->pp) pp_run(ctx->pp, ptex, ptex, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]); ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL); -- 2.30.2