Merge branch 'mesa_7_7_branch'
[mesa.git] / src / mesa / drivers / dri / r300 / r300_state.c
index 66b57e58a71777f8cf6061450b7cf6cb42d0d4d6..017d45a5039ccf01646e78856a79b2d1efafe4cf 100644 (file)
@@ -994,7 +994,7 @@ static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
 static void r300UpdateWindow(GLcontext * ctx)
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
-       __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+       __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
        GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
        GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
        const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1047,7 +1047,7 @@ static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
 void r300UpdateViewportOffset(GLcontext * ctx)
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
-       __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+       __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
        GLfloat xoffset = (GLfloat) dPriv->x;
        GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h;
        const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1308,7 +1308,7 @@ static void r300SetupTextures(GLcontext * ctx)
                fprintf(stderr,
                        "Aiiee ! mtu=%d is greater than R300_MAX_TEXTURE_UNITS=%d\n",
                        mtu, R300_MAX_TEXTURE_UNITS);
-               _mesa_exit(-1);
+               exit(-1);
        }
 
        /* We cannot let disabled tmu offsets pass DRM */
@@ -1765,9 +1765,10 @@ static void r300ResetHwState(r300ContextPtr r300)
        radeon_firevertices(&r300->radeon);
 
        r300ColorMask(ctx,
-                     ctx->Color.ColorMask[RCOMP],
-                     ctx->Color.ColorMask[GCOMP],
-                     ctx->Color.ColorMask[BCOMP], ctx->Color.ColorMask[ACOMP]);
+                     ctx->Color.ColorMask[0][RCOMP],
+                     ctx->Color.ColorMask[0][GCOMP],
+                     ctx->Color.ColorMask[0][BCOMP],
+                      ctx->Color.ColorMask[0][ACOMP]);
 
        r300Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test);
        r300DepthMask(ctx, ctx->Depth.Mask);
@@ -2036,7 +2037,7 @@ static const GLfloat *get_fragmentprogram_constant(GLcontext *ctx, GLuint index,
                }
 
                case RC_STATE_R300_WINDOW_DIMENSION: {
-                       __DRIdrawablePrivate * drawable = radeon_get_drawable(&rmesa->radeon);
+                       __DRIdrawable * drawable = radeon_get_drawable(&rmesa->radeon);
                        buffer[0] = drawable->w * 0.5f; /* width*0.5 */
                        buffer[1] = drawable->h * 0.5f; /* height*0.5 */
                        buffer[2] = 0.5F;       /* for moving range [-1 1] -> [0 1] */