From 5c52b4292ff1aa37f38b20f33ff1642e1c20f894 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 24 Feb 2010 19:28:04 -0800 Subject: mesa: Always return default value for CURRENT_RASTER_INDEX Since there is no color-index rendering, it is impossible to update this value. Just return the initial setting and be happy. Signed-off-by: Ian Romanick --- src/mesa/main/get.c | 8 ++++---- src/mesa/main/get_gen.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index e390d29757c..edc44009120 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -253,7 +253,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex); + params[0] = FLOAT_TO_BOOLEAN(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]); @@ -2122,7 +2122,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = ctx->Current.RasterDistance; break; case GL_CURRENT_RASTER_INDEX: - params[0] = ctx->Current.RasterIndex; + params[0] = 1.0; break; case GL_CURRENT_RASTER_POSITION: params[0] = ctx->Current.RasterPos[0]; @@ -3991,7 +3991,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = IROUND(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = IROUND(ctx->Current.RasterIndex); + params[0] = IROUND(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = IROUND(ctx->Current.RasterPos[0]); @@ -5861,7 +5861,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = IROUND64(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = IROUND64(ctx->Current.RasterIndex); + params[0] = IROUND64(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = IROUND64(ctx->Current.RasterPos[0]); diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 17ea1e4ae64..9d5a51d58c5 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -155,7 +155,7 @@ StateVars = [ ( "GL_CURRENT_RASTER_DISTANCE", GLfloat, ["ctx->Current.RasterDistance"], "", None ), ( "GL_CURRENT_RASTER_INDEX", GLfloat, - ["ctx->Current.RasterIndex"], "", None ), + ["1.0"], "", None ), ( "GL_CURRENT_RASTER_POSITION", GLfloat, ["ctx->Current.RasterPos[0]", "ctx->Current.RasterPos[1]", -- cgit v1.2.3