*/
if (devinfo->gen < 6 && this->uniforms == 0) {
assert(this->uniforms < this->uniform_array_size);
- this->uniform_vector_size[this->uniforms] = 1;
stage_prog_data->param =
reralloc(NULL, stage_prog_data->param, const gl_constant_value *, 4);
dst_reg output_reg[BRW_VARYING_SLOT_COUNT];
const char *output_reg_annotation[BRW_VARYING_SLOT_COUNT];
int *uniform_size;
- int *uniform_vector_size;
- int uniform_array_size; /*< Size of uniform_[vector_]size arrays */
+ int uniform_array_size; /*< Size of the uniform_size array */
int uniforms;
src_reg shader_start_time;
struct gl_program_parameter_list *plist = prog->Parameters;
for (unsigned p = 0; p < plist->NumParameters; p++) {
- uniform_vector_size[uniforms] = plist->Parameters[p].Size;
-
/* Parameters should be either vec4 uniforms or single component
* constants; matrices and other larger types should have been broken
* down earlier.
*/
- assert(uniform_vector_size[uniforms] <= 4);
+ assert(plist->Parameters[p].Size <= 4);
- int i;
- for (i = 0; i < uniform_vector_size[uniforms]; i++) {
+ unsigned i;
+ for (i = 0; i < plist->Parameters[p].Size; i++) {
stage_prog_data->param[uniforms * 4 + i] = &plist->ParameterValues[p][i];
}
for (; i < 4; i++) {
for (unsigned s = 0; s < vector_count; s++) {
assert(uniforms < uniform_array_size);
- uniform_vector_size[uniforms] = storage->type->vector_elements;
int i;
- for (i = 0; i < uniform_vector_size[uniforms]; i++) {
+ for (i = 0; i < storage->type->vector_elements; i++) {
stage_prog_data->param[uniforms * 4 + i] = components;
components++;
}
stage_prog_data->param[uniforms * 4 + j] =
&values[GET_SWZ(slots[i].swizzle, j)];
- uniform_vector_size[uniforms] =
- (var->type->is_scalar() || var->type->is_vector() ||
- var->type->is_matrix() ? var->type->vector_elements : 4);
-
uniforms++;
}
}
for (unsigned i = n; i < 4; ++i)
stage_prog_data->param[param_offset + i] = &zero;
-
- uniform_vector_size[param_offset / 4] = n;
}
vec4_instruction *
}
this->uniform_size = rzalloc_array(mem_ctx, int, this->uniform_array_size);
- this->uniform_vector_size = rzalloc_array(mem_ctx, int, this->uniform_array_size);
}
vec4_visitor::~vec4_visitor()
{
for (int i = 0; i < key->nr_userclip_plane_consts; ++i) {
assert(this->uniforms < uniform_array_size);
- this->uniform_vector_size[this->uniforms] = 4;
this->userplane[i] = dst_reg(UNIFORM, this->uniforms);
this->userplane[i].type = BRW_REGISTER_TYPE_F;
for (int j = 0; j < 4; ++j) {