mesa: added missing glGet query for GL_MAX_ARRAY_TEXTURE_LAYERS_EXT
authorBrian Paul <brianp@vmware.com>
Sat, 20 Mar 2010 17:55:24 +0000 (11:55 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 20 Mar 2010 18:06:36 +0000 (12:06 -0600)
src/mesa/main/get.c
src/mesa/main/get_gen.py

index b91f8db584f9fa9ad53df5dbecec4dc630cc0aa7..523dc2e4f7e1c1d7cd9f159a3bc96043b294443f 100644 (file)
@@ -917,6 +917,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
          CHECK_EXT1(MESA_texture_array, "GetBooleanv");
          params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
          break;
+      case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
+         CHECK_EXT1(MESA_texture_array, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayTextureLayers);
+         break;
       case GL_TEXTURE_GEN_S:
          params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
          break;
@@ -2789,6 +2793,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
          CHECK_EXT1(MESA_texture_array, "GetFloatv");
          params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
          break;
+      case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
+         CHECK_EXT1(MESA_texture_array, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxArrayTextureLayers);
+         break;
       case GL_TEXTURE_GEN_S:
          params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
          break;
@@ -4661,6 +4669,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
          CHECK_EXT1(MESA_texture_array, "GetIntegerv");
          params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name;
          break;
+      case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
+         CHECK_EXT1(MESA_texture_array, "GetIntegerv");
+         params[0] = ctx->Const.MaxArrayTextureLayers;
+         break;
       case GL_TEXTURE_GEN_S:
          params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
          break;
@@ -6534,6 +6546,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
          CHECK_EXT1(MESA_texture_array, "GetInteger64v");
          params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
          break;
+      case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
+         CHECK_EXT1(MESA_texture_array, "GetInteger64v");
+         params[0] = (GLint64)(ctx->Const.MaxArrayTextureLayers);
+         break;
       case GL_TEXTURE_GEN_S:
          params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
          break;
index 3b0a5130f98e18b72e3625c2d89beff731cee925..0ef9d8fe94ede14416fe14e3f5afbd3d7a2b2f69 100644 (file)
@@ -457,6 +457,8 @@ StateVars = [
          ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name"], "", ["MESA_texture_array"] ),
        ( "GL_TEXTURE_BINDING_2D_ARRAY_EXT", GLint,
          ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name"], "", ["MESA_texture_array"] ),
+       ( "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT", GLint,
+         ["ctx->Const.MaxArrayTextureLayers"], "", ["MESA_texture_array"] ),
        ( "GL_TEXTURE_GEN_S", GLboolean,
          ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)"], "", None ),
        ( "GL_TEXTURE_GEN_T", GLboolean,