r200, r600c, i965: fix build
authorBryan Cain <bryancain3@gmail.com>
Thu, 30 Jun 2011 18:42:37 +0000 (13:42 -0500)
committerBryan Cain <bryancain3@gmail.com>
Mon, 1 Aug 2011 22:59:09 +0000 (17:59 -0500)
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vs_emit.c
src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/drivers/dri/r600/evergreen_fragprog.c
src/mesa/drivers/dri/r600/evergreen_vertprog.c
src/mesa/drivers/dri/r600/r700_fragprog.c
src/mesa/drivers/dri/r600/r700_vertprog.c

index 7c73a8f..31f76f8 100644 (file)
@@ -605,7 +605,7 @@ fs_visitor::setup_paramvalues_refs()
    /* Set up the pointers to ParamValues now that that array is finalized. */
    for (unsigned int i = 0; i < c->prog_data.nr_params; i++) {
       c->prog_data.param[i] =
-        fp->Base.Parameters->ParameterValues[this->param_index[i]] +
+        (const float *)fp->Base.Parameters->ParameterValues[this->param_index[i]] +
         this->param_offset[i];
    }
 }
index b6c9e5a..2fa04a1 100644 (file)
@@ -1359,7 +1359,7 @@ get_src_reg( struct brw_vs_compile *c,
 
         if (component >= 0) {
            params = c->vp->program.Base.Parameters;
-           f = params->ParameterValues[src->Index][component];
+           f = params->ParameterValues[src->Index][component].f;
 
            if (src->Abs)
               f = fabs(f);
index 63e03b0..cf44d7f 100644 (file)
@@ -126,10 +126,10 @@ static GLboolean r200VertexProgUpdateParams(struct gl_context *ctx, struct r200_
       case PROGRAM_NAMED_PARAM:
       //fprintf(stderr, "%s", vp->Parameters->Parameters[pi].Name);
       case PROGRAM_CONSTANT:
-        *fcmd++ = paramList->ParameterValues[pi][0];
-        *fcmd++ = paramList->ParameterValues[pi][1];
-        *fcmd++ = paramList->ParameterValues[pi][2];
-        *fcmd++ = paramList->ParameterValues[pi][3];
+        *fcmd++ = paramList->ParameterValues[pi][0].f;
+        *fcmd++ = paramList->ParameterValues[pi][1].f;
+        *fcmd++ = paramList->ParameterValues[pi][2].f;
+        *fcmd++ = paramList->ParameterValues[pi][3].f;
         break;
       default:
         _mesa_problem(NULL, "Bad param type in %s", __FUNCTION__);
index e527c37..cc584ca 100644 (file)
@@ -752,10 +752,10 @@ GLboolean evergreenSetupFPconstants(struct gl_context * ctx)
            unNumParamData = paramList->NumParameters;
 
            for(ui=0; ui<unNumParamData; ui++) {
-                       evergreen->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
-                       evergreen->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
-                       evergreen->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
-                       evergreen->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+                       evergreen->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0].f;
+                       evergreen->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1].f;
+                       evergreen->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2].f;
+                       evergreen->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3].f;
            }
 
            /* alloc multiple of 16 constants */
index 018869b..117916a 100644 (file)
@@ -684,17 +684,17 @@ GLboolean evergreenSetupVPconstants(struct gl_context * ctx)
            for(ui=0; ui<unNumParamData; ui++) {
             if(paramList->Parameters[ui].Type == PROGRAM_UNIFORM) 
             {
-                evergreen->vs.consts[ui][0].f32All = paramListOrginal->ParameterValues[ui][0];
-                       evergreen->vs.consts[ui][1].f32All = paramListOrginal->ParameterValues[ui][1];
-                       evergreen->vs.consts[ui][2].f32All = paramListOrginal->ParameterValues[ui][2];
-                       evergreen->vs.consts[ui][3].f32All = paramListOrginal->ParameterValues[ui][3];
+                evergreen->vs.consts[ui][0].f32All = paramListOrginal->ParameterValues[ui][0].f;
+                       evergreen->vs.consts[ui][1].f32All = paramListOrginal->ParameterValues[ui][1].f;
+                       evergreen->vs.consts[ui][2].f32All = paramListOrginal->ParameterValues[ui][2].f;
+                       evergreen->vs.consts[ui][3].f32All = paramListOrginal->ParameterValues[ui][3].f;
             }
             else
             {
-                       evergreen->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
-                       evergreen->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
-                       evergreen->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
-                       evergreen->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+                       evergreen->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0].f;
+                       evergreen->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1].f;
+                       evergreen->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2].f;
+                       evergreen->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3].f;
             }
            }
 
index 40494cd..6f9834e 100644 (file)
@@ -778,10 +778,10 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
            unNumParamData = paramList->NumParameters;
 
            for(ui=0; ui<unNumParamData; ui++) {
-                       r700->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
-                       r700->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
-                       r700->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
-                       r700->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+                       r700->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0].f;
+                       r700->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1].f;
+                       r700->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2].f;
+                       r700->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3].f;
            }
 
         /* Load fp constants to gpu */
index 7d4be91..b1e2742 100644 (file)
@@ -720,17 +720,17 @@ GLboolean r700SetupVertexProgram(struct gl_context * ctx)
            for(ui=0; ui<unNumParamData; ui++) {
             if(paramList->Parameters[ui].Type == PROGRAM_UNIFORM) 
             {
-                r700->vs.consts[ui][0].f32All = paramListOrginal->ParameterValues[ui][0];
-                       r700->vs.consts[ui][1].f32All = paramListOrginal->ParameterValues[ui][1];
-                       r700->vs.consts[ui][2].f32All = paramListOrginal->ParameterValues[ui][2];
-                       r700->vs.consts[ui][3].f32All = paramListOrginal->ParameterValues[ui][3];
+              r700->vs.consts[ui][0].f32All = paramListOrginal->ParameterValues[ui][0].f;
+                       r700->vs.consts[ui][1].f32All = paramListOrginal->ParameterValues[ui][1].f;
+                       r700->vs.consts[ui][2].f32All = paramListOrginal->ParameterValues[ui][2].f;
+                       r700->vs.consts[ui][3].f32All = paramListOrginal->ParameterValues[ui][3].f;
             }
             else
             {
-                       r700->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
-                       r700->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
-                       r700->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
-                       r700->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+                       r700->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0].f;
+                       r700->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1].f;
+                       r700->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2].f;
+                       r700->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3].f;
             }
            }