Mesa (9.2): mesa: fix proxy textures becoming immutable and unusable

Ian Romanick idr at kemper.freedesktop.org
Tue Aug 6 16:22:50 UTC 2013


Module: Mesa
Branch: 9.2
Commit: b61036fa2d4e79e7507e671f18766400502be9a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b61036fa2d4e79e7507e671f18766400502be9a7

Author: Mikko Juola <mikjuo at gmail.com>
Date:   Tue Jul 30 06:36:43 2013 +0300

mesa: fix proxy textures becoming immutable and unusable

glTexStorage*() functions make textures immutable.  This carries on to
proxy textures.  Error checking in texture storage functions prevents
proxy textures from working after first time because internally, they
became immutable.

This commit makes the error checking ignore the immutability flag when
working with proxy textures.

Reviewed-by: Brian Paul <brianp at vmware.com>

Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit e404105e7dc192ddfb88b80df4238a97caedf32e)

---

 src/mesa/main/texstorage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 7798897..7bd8652 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -342,7 +342,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,
    }
 
    /* Check if texObj->Immutable is set */
-   if (texObj->Immutable) {
+   if (!_mesa_is_proxy_texture(target) && texObj->Immutable) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glTexStorage%uD(immutable)",
                   dims);
       return GL_TRUE;




More information about the mesa-commit mailing list