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 7c73a8fbf024b34ae9c5eaab5f2d67211224fb36..31f76f8c939198d766e99ae2b031abdbab8ce0c6 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 b6c9e5a1ceb610496d803f4e6184951d646ad3f5..2fa04a15a3436f0cd5f887a76968da8f449d308d 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 63e03b0e0c725c457718f8813516afe630cb4b63..cf44d7f459c6dbab5a764569b599a59aa26577b6 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 e527c379b6203448818a6e3a33608ae67abd3016..cc584ca2b35fcf839c64b985878e297d32fece0a 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 018869b9996a9f0fbc524d40be263d49a75260a8..117916ac78f512e6998353dcc642b1c33f161922 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 40494cd6af087f9297de0c532b7779147e9c0ad0..6f9834e68fec3b3201e3b535ea3a1bfcfc5a96a8 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 7d4be9180a090fc728ed455450571e81765e497f..b1e2742b27d70d98557edd90fb13f31b79d4a1fc 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;
             }
            }