From b062a119ff5fa06fe7b2e40262829f93cde63a96 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 18 Aug 2009 09:42:38 -0600 Subject: mesa: call FLUSH_CURRENT() for GL_CURRENT_TEXTURE_COORDS query --- src/mesa/main/get.c | 3 +++ src/mesa/main/get_gen.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 79f06a3c404..d0c9cea00c7 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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]); diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index e9c8226d08d..97dc7850201 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -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 ), -- cgit v1.2.3