case GLSL_TYPE_INT:
case GLSL_TYPE_BOOL:
for (unsigned int i = 0; i < type->vector_elements; i++) {
- unsigned int param = c->prog_data.nr_params++;
-
- this->param_index[param] = loc;
- this->param_offset[param] = i;
+ c->prog_data.param[c->prog_data.nr_params++] =
+ &fp->Base.Parameters->ParameterValues[loc][i].f;
}
return 1;
break;
last_swiz = swiz;
- this->param_index[c->prog_data.nr_params] = index;
- this->param_offset[c->prog_data.nr_params] = swiz;
- c->prog_data.nr_params++;
+ c->prog_data.param[c->prog_data.nr_params++] =
+ &fp->Base.Parameters->ParameterValues[index][swiz].f;
}
}
}
return inst;
}
-/**
- * To be called after the last _mesa_add_state_reference() call, to
- * set up prog_data.param[] for assign_curb_setup() and
- * setup_pull_constants().
- */
-void
-fs_visitor::setup_paramvalues_refs()
-{
- if (dispatch_width != 8)
- return;
-
- /* 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] =
- (const float *)fp->Base.Parameters->ParameterValues[this->param_index[i]] +
- this->param_offset[i];
- }
-}
-
void
fs_visitor::assign_curb_setup()
{
if (remapped == -1)
continue;
- /* We've already done setup_paramvalues_refs() so no need to worry
- * about param_index and param_offset.
- */
c->prog_data.param[remapped] = c->prog_data.param[i];
}
split_virtual_grfs();
- setup_paramvalues_refs();
move_uniform_array_access_to_pull_constants();
setup_pull_constants();
bool run();
void setup_payload_gen4();
void setup_payload_gen6();
- void setup_paramvalues_refs();
void assign_curb_setup();
void calculate_urb_setup();
void assign_urb_setup();
struct brw_wm_compile *c;
unsigned int sanity_param_count;
- /* Delayed setup of c->prog_data.params[] due to realloc of
- * ParamValues[] during compile.
- */
- int param_index[MAX_UNIFORMS * 4];
- int param_offset[MAX_UNIFORMS * 4];
int param_size[MAX_UNIFORMS * 4];
int *virtual_grf_sizes;
for (unsigned p = 0;
p < fp->Base.Parameters->NumParameters; p++) {
for (unsigned int i = 0; i < 4; i++) {
- this->param_index[c->prog_data.nr_params] = p;
- this->param_offset[c->prog_data.nr_params] = i;
- c->prog_data.nr_params++;
+ c->prog_data.param[c->prog_data.nr_params++] =
+ &fp->Base.Parameters->ParameterValues[p][i].f;
}
}
}
GLuint index = _mesa_add_state_reference(params,
(gl_state_index *)tokens);
-
- this->param_index[c->prog_data.nr_params] = index;
- this->param_offset[c->prog_data.nr_params] = 0;
- c->prog_data.nr_params++;
- this->param_index[c->prog_data.nr_params] = index;
- this->param_offset[c->prog_data.nr_params] = 1;
- c->prog_data.nr_params++;
+ c->prog_data.param[c->prog_data.nr_params++] =
+ &fp->Base.Parameters->ParameterValues[index][0].f;
+ c->prog_data.param[c->prog_data.nr_params++] =
+ &fp->Base.Parameters->ParameterValues[index][1].f;
}
/* The 965 requires the EU to do the normalization of GL rectangle