Mesa (master): meta: Avoid FBO resizing/ reallocating in decompress_texture_image

Anuj Phogat aphogat at kemper.freedesktop.org
Wed Feb 15 17:26:05 UTC 2012


Module: Mesa
Branch: master
Commit: 66bf25f1a2cc8343640cdfc4242d882bc00b9e3b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66bf25f1a2cc8343640cdfc4242d882bc00b9e3b

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Mon Feb 13 10:48:45 2012 -0800

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 <anuj.phogat at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/drivers/common/meta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8f5b036..6c8495d 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;




More information about the mesa-commit mailing list