st/dri: Make depth buffer optional for postprocessing
authorPark, Jeongmin <pjm0616@gmail.com>
Sat, 7 Feb 2015 08:53:48 +0000 (17:53 +0900)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 7 Feb 2015 11:12:00 +0000 (12:12 +0100)
Since only pp_jimenezmlaa uses depth buffer, we can make it optional.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_drawable.c
src/gallium/state_trackers/dri/drisw.c

index eda2d5232c5b32d482fc5d06a7ba936207c2b4b6..b8afe6c4d230c9f57959b2b8a5b74dd6d8d6c4d6 100644 (file)
@@ -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);
 }
 
index 8d9acd6af510d901ff806064a9b4e3aea5904555..5f69a2d670e744c9ab6c3ceab7896b3d8c041a18 100644 (file)
@@ -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);