From: Anuj Phogat Date: Mon, 13 Feb 2012 18:48:45 +0000 (-0800) Subject: meta: Avoid FBO resizing/reallocating in decompress_texture_image X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66bf25f1a2cc8343640cdfc4242d882bc00b9e3b;p=mesa.git meta: Avoid FBO resizing/reallocating in decompress_texture_image 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 Reviewed-by: Brian Paul --- diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 8f5b0360966..6c8495ddb41 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -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;