Mesa (master): meta: Don't use fixed-function to decompress array textures

Ian Romanick idr at kemper.freedesktop.org
Sun Feb 2 15:50:01 UTC 2014


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Dec 13 13:40:48 2013 -0800

meta: Don't use fixed-function to decompress array textures

Array textures can't be used with fixed-function, so don't.  Instead,
just drop the decompress request on the floor.  This is no worse than
what was done previously because generating the GL error (in
_mesa_set_enable) broke everything anyway.

A later patch will get GL_TEXTURE_2D_ARRAY targets working.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/drivers/common/meta.c |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1d870d2..e6772fc 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -4021,11 +4021,28 @@ decompress_texture_image(struct gl_context *ctx,
              target == GL_TEXTURE_2D_ARRAY);
    }
 
-   if (target == GL_TEXTURE_CUBE_MAP) {
+   switch (target) {
+   case GL_TEXTURE_1D:
+   case GL_TEXTURE_1D_ARRAY:
+      assert(!"No compressed 1D textures.");
+      return;
+
+   case GL_TEXTURE_3D:
+      assert(!"No compressed 3D textures.");
+      return;
+
+   case GL_TEXTURE_2D_ARRAY:
+   case GL_TEXTURE_CUBE_MAP_ARRAY:
+      /* These targets are just broken currently. */
+      return;
+
+   case GL_TEXTURE_CUBE_MAP:
       faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + texImage->Face;
-   }
-   else {
+      break;
+
+   default:
       faceTarget = target;
+      break;
    }
 
    /* save fbo bindings (not saved by _mesa_meta_begin()) */




More information about the mesa-commit mailing list