mesa: call FLUSH_CURRENT() for GL_CURRENT_TEXTURE_COORDS query
authorBrian Paul <brianp@vmware.com>
Tue, 18 Aug 2009 15:42:38 +0000 (09:42 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 18 Aug 2009 23:09:32 +0000 (17:09 -0600)
src/mesa/main/get.c
src/mesa/main/get_gen.py

index 79f06a3c40431185573e03054296f6a97fa23c9a..d0c9cea00c78a28c200a4eed862c35663c1f9d1c 100644 (file)
@@ -276,6 +276,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
       case GL_CURRENT_TEXTURE_COORDS:
          {
          const GLuint texUnit = ctx->Texture.CurrentUnit;
+         FLUSH_CURRENT(ctx, 0);
          params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
          params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
          params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
@@ -2102,6 +2103,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
       case GL_CURRENT_TEXTURE_COORDS:
          {
          const GLuint texUnit = ctx->Texture.CurrentUnit;
+         FLUSH_CURRENT(ctx, 0);
          params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
          params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
          params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
@@ -3928,6 +3930,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
       case GL_CURRENT_TEXTURE_COORDS:
          {
          const GLuint texUnit = ctx->Texture.CurrentUnit;
+         FLUSH_CURRENT(ctx, 0);
          params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
          params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
          params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
index e9c8226d08d572c352834dfa8bc6a75992af64d9..97dc78502016e011145ac141eda69f424f5e1c00 100644 (file)
@@ -176,7 +176,8 @@ StateVars = [
           "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]",
           "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]",
           "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]"],
-         "const GLuint texUnit = ctx->Texture.CurrentUnit;", None ),
+         """const GLuint texUnit = ctx->Texture.CurrentUnit;
+         FLUSH_CURRENT(ctx, 0);""", None ),
        ( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ),
        ( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"],
          "", None ),