[Mesa-dev] [PATCH] arb_texture_cube_map_array: fix attrib push/pop

Dave Airlie airlied at gmail.com
Tue Nov 6 18:56:07 PST 2012


From: Dave Airlie <airlied at redhat.com>

fdo9833 piglit test caught this.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/attrib.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 05db35b..92d6a97 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -684,7 +684,10 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
          _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT,
                           !!(unit->Enabled & TEXTURE_2D_ARRAY_BIT));
       }
-
+      if (ctx->Extensions.ARB_texture_cube_map_array) {
+         _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARRAY,
+                          !!(unit->Enabled & TEXTURE_CUBE_ARRAY_BIT));
+      }
       _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode);
       _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor);
       _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode);
@@ -762,7 +765,10 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
                   !ctx->Extensions.MESA_texture_array) {
             continue;
          }
-         else if (obj->Target == GL_TEXTURE_BUFFER)
+         else if (obj->Target == GL_TEXTURE_CUBE_MAP_ARRAY &&
+             !ctx->Extensions.ARB_texture_cube_map_array) {
+            continue;
+         } else if (obj->Target == GL_TEXTURE_BUFFER)
             continue;
          else if (obj->Target == GL_TEXTURE_EXTERNAL_OES)
             continue;
-- 
1.7.12.1



More information about the mesa-dev mailing list