meta: Avoid FBO resizing/reallocating in decompress_texture_image
authorAnuj Phogat <anuj.phogat@gmail.com>
Mon, 13 Feb 2012 18:48:45 +0000 (10:48 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 15 Feb 2012 17:23:13 +0000 (09:23 -0800)
Reallocate/resize decompress FBO only if texture image width/height is
greater than existing decompress FBO width/height.

This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/common/meta.c

index 8f5b0360966171535913f332f54336ba229a33cf..6c8495ddb413db864dfe7a50d39fcf6c5927c055 100644 (file)
@@ -3292,7 +3292,7 @@ decompress_texture_image(struct gl_context *ctx,
    }
 
    /* alloc dest surface */
-   if (width != decompress->Width || height != decompress->Height) {
+   if (width > decompress->Width || height > decompress->Height) {
       _mesa_RenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA,
                                    width, height);
       decompress->Width = width;