summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-05 08:01:05 -0600
committerBrian Paul <[email protected]>2010-04-05 08:01:05 -0600
commit557c8bb748f0b23dcc7c02ca9c594add4a42638d (patch)
tree9125c812bfb4f8712d17ec41e7bfd4f6e896230d
parent3258058d3b3fe0412007bfa699918bbe1665939d (diff)
mesa: check for _NEW_BUFFERS for color read format queries
-rw-r--r--src/mesa/main/get.c16
-rw-r--r--src/mesa/main/get_gen.py4
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index eaa6d7f7307..6f38658cc10 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1791,10 +1791,14 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetBooleanv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = INT_TO_BOOLEAN(_mesa_get_color_read_type(ctx));
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetBooleanv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = INT_TO_BOOLEAN(_mesa_get_color_read_format(ctx));
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
@@ -3682,10 +3686,14 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetFloatv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = (GLfloat)(_mesa_get_color_read_type(ctx));
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetFloatv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = (GLfloat)(_mesa_get_color_read_format(ctx));
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
@@ -5573,10 +5581,14 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetIntegerv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = _mesa_get_color_read_type(ctx);
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetIntegerv");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = _mesa_get_color_read_format(ctx);
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
@@ -7465,10 +7477,14 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = (GLint64)(_mesa_get_color_read_type(ctx));
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
params[0] = (GLint64)(_mesa_get_color_read_format(ctx));
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index bfaca1536d1..d6a6d0b18fa 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -1015,9 +1015,9 @@ StateVars = [
# GL_OES_read_format
( "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES", GLint,
- ["_mesa_get_color_read_type(ctx)"], "", NoState, ["OES_read_format"] ),
+ ["_mesa_get_color_read_type(ctx)"], "", "_NEW_BUFFERS", ["OES_read_format"] ),
( "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES", GLint,
- ["_mesa_get_color_read_format(ctx)"], "", NoState, ["OES_read_format"] ),
+ ["_mesa_get_color_read_format(ctx)"], "", "_NEW_BUFFERS", ["OES_read_format"] ),
# GL_ATI_fragment_shader
( "GL_NUM_FRAGMENT_REGISTERS_ATI", GLint, ["6"],