st/mesa: only resolve if number of samples is > 1
authorDave Airlie <airlied@redhat.com>
Wed, 30 Nov 2011 20:10:19 +0000 (20:10 +0000)
committerMarek Olšák <maraeo@gmail.com>
Sun, 12 Feb 2012 20:35:27 +0000 (21:35 +0100)
Marek: this fixes a firefox crash and maybe even:
https://bugs.freedesktop.org/show_bug.cgi?id=45943

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
src/mesa/state_tracker/st_cb_blit.c

index 750f541b5ddf00b9225e49ded714dfe6e32c66d3..27da2c6330acbd7b1a9acdb953e1736a313c3aaa 100644 (file)
@@ -178,7 +178,8 @@ st_BlitFramebuffer(struct gl_context *ctx,
       st->pipe->render_condition(st->pipe, NULL, 0);
    }
 
-   if (readFB->Visual.sampleBuffers > drawFB->Visual.sampleBuffers) {
+   if (readFB->Visual.sampleBuffers > drawFB->Visual.sampleBuffers &&
+       readFB->Visual.samples > 1) {
       struct pipe_resolve_info info;
 
       if (dstX0 < dstX1) {