mesa: Always return default value for CURRENT_RASTER_INDEX
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 25 Feb 2010 03:28:04 +0000 (19:28 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 3 Mar 2010 20:37:05 +0000 (12:37 -0800)
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 <ian.d.romanick@intel.com>
src/mesa/main/get.c
src/mesa/main/get_gen.py

index e390d29757c98ed5e8a6acec2ae14520ebde4c2e..edc44009120433cfe139fce0f2346dc297dac749 100644 (file)
@@ -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]);
index 17ea1e4ae64c62f5dff2e2689eaccb886edcbca9..9d5a51d58c53aa86c7166c57bab96c567ee30f3a 100644 (file)
@@ -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]",