summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
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 /src/mesa/main/get.c
parent3258058d3b3fe0412007bfa699918bbe1665939d (diff)
mesa: check for _NEW_BUFFERS for color read format queries
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c16
1 files changed, 16 insertions, 0 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: