mesa: Avoid short-circuiting realloc of renderbuffers to new sample count.
authorEric Anholt <eric@anholt.net>
Wed, 11 Jan 2012 21:46:43 +0000 (13:46 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 12 Jan 2012 20:34:13 +0000 (12:34 -0800)
Fixes piglit EXT_framebuffer_multisample/renderbuffer-samples.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.

src/mesa/main/fbobject.c

index de94da6df07c407c6b96b5937339cabd8f60c566..0524959075fdde6d202d492d82e42166e7f2862f 100644 (file)
@@ -1375,7 +1375,8 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
 
    if (rb->InternalFormat == internalFormat &&
        rb->Width == (GLuint) width &&
-       rb->Height == (GLuint) height) {
+       rb->Height == (GLuint) height &&
+       rb->NumSamples == samples) {
       /* no change in allocation needed */
       return;
    }