r300: fix incompatible pointer type warnings
authorBrian Paul <brianp@vmware.com>
Fri, 7 Oct 2011 14:22:35 +0000 (08:22 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 7 Oct 2011 14:23:24 +0000 (08:23 -0600)
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_vertprog.c

index 51d794c9756880dcfa86125df35edd64775e31f4..2f7b7ab8534722a1607b1d78d2eaa417b8db0e2e 100644 (file)
@@ -2001,7 +2001,7 @@ static const GLfloat *get_fragmentprogram_constant(struct gl_context *ctx, GLuin
 
        switch(rcc->Type) {
        case RC_CONSTANT_EXTERNAL:
-               return ctx->FragmentProgram._Current->Base.Parameters->ParameterValues[rcc->u.External];
+               return &ctx->FragmentProgram._Current->Base.Parameters->ParameterValues[rcc->u.External][0].f;
        case RC_CONSTANT_IMMEDIATE:
                return rcc->u.Immediate;
        case RC_CONSTANT_STATE:
index 1daa305e3c4657e72f0097a0d852255c9718fcae..eacc85d02e3450457795dc141905f0cce3acf3a2 100644 (file)
@@ -70,7 +70,7 @@ static int r300VertexProgUpdateParams(struct gl_context * ctx, struct r300_verte
                        if (vp->Base->IsNVProgram) {
                                src = ctx->VertexProgram.Parameters[constant->u.External];
                        } else {
-                               src = vp->Base->Base.Parameters->ParameterValues[constant->u.External];
+                               src = &vp->Base->Base.Parameters->ParameterValues[constant->u.External][0].f;
                        }
                        break;