mesa: Add error path in compressed_texture_error_check.
[mesa.git] / src / mesa / main / rastpos.c
index be61dc265d16e43c2128c5826be522f7aa7e9a33..75c67f2693e410c32f44c8a7403c11bfbfa985a3 100644 (file)
@@ -34,7 +34,7 @@
 #include "macros.h"
 #include "rastpos.h"
 #include "state.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
 
 
 #if FEATURE_rastpos
@@ -246,28 +246,22 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
       ctx->Current.RasterDistance = 0.0;
 
    /* raster color = current color or index */
-   if (ctx->Visual.rgbMode) {
-      ctx->Current.RasterColor[0]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
-      ctx->Current.RasterColor[1]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
-      ctx->Current.RasterColor[2]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
-      ctx->Current.RasterColor[3]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
-      ctx->Current.RasterSecondaryColor[0]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
-      ctx->Current.RasterSecondaryColor[1]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
-      ctx->Current.RasterSecondaryColor[2]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
-      ctx->Current.RasterSecondaryColor[3]
-         = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
-   }
-   else {
-      ctx->Current.RasterIndex
-         = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
-   }
+   ctx->Current.RasterColor[0]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
+   ctx->Current.RasterColor[1]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
+   ctx->Current.RasterColor[2]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
+   ctx->Current.RasterColor[3]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
+   ctx->Current.RasterSecondaryColor[0]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
+   ctx->Current.RasterSecondaryColor[1]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
+   ctx->Current.RasterSecondaryColor[2]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
+   ctx->Current.RasterSecondaryColor[3]
+      = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
 
    /* raster texcoord = current texcoord */
    {
@@ -562,7 +556,6 @@ void _mesa_init_rastpos( GLcontext * ctx )
    ctx->Current.RasterDistance = 0.0;
    ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
    ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
-   ctx->Current.RasterIndex = 1.0;
    for (i = 0; i < Elements(ctx->Current.RasterTexCoords); i++)
       ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
    ctx->Current.RasterPosValid = GL_TRUE;