Mesa (master): st/dri: fix postprocessing crash when there' s no depth buffer

Marek Olšák mareko at kemper.freedesktop.org
Fri May 29 09:53:42 UTC 2015


Module: Mesa
Branch: master
Commit: 25e9ae2b79f32631e7255807a242e5fc4e39984c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=25e9ae2b79f32631e7255807a242e5fc4e39984c

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue May 26 19:32:36 2015 +0200

st/dri: fix postprocessing crash when there's no depth buffer

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89131

Cc: 10.6 10.5 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/state_trackers/dri/dri_context.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index 9f11b15..3d8af65 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -244,11 +244,10 @@ dri_make_current(__DRIcontext * cPriv,
 
    ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
 
-   // This is ok to call here. If they are already init, it's a no-op.
-   if (draw->textures[ST_ATTACHMENT_BACK_LEFT] && draw->textures[ST_ATTACHMENT_DEPTH_STENCIL]
-      && ctx->pp)
-         pp_init_fbos(ctx->pp, draw->textures[ST_ATTACHMENT_BACK_LEFT]->width0,
-            draw->textures[ST_ATTACHMENT_BACK_LEFT]->height0);
+   /* This is ok to call here. If they are already init, it's a no-op. */
+   if (ctx->pp && draw->textures[ST_ATTACHMENT_BACK_LEFT])
+      pp_init_fbos(ctx->pp, draw->textures[ST_ATTACHMENT_BACK_LEFT]->width0,
+                   draw->textures[ST_ATTACHMENT_BACK_LEFT]->height0);
 
    return GL_TRUE;
 }




More information about the mesa-commit mailing list