OSDN Git Service

st/dri: fix postprocessing crash when there's no depth buffer
authorMarek Olšák <marek.olsak@amd.com>
Tue, 26 May 2015 17:32:36 +0000 (19:32 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 3 Jun 2015 11:06:08 +0000 (12:06 +0100)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89131

Cc: 10.6 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 25e9ae2b79f32631e7255807a242e5fc4e39984c)

src/gallium/state_trackers/dri/dri_context.c

index 8ac81b7..400114e 100644 (file)
@@ -233,11 +233,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;
 }