diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp | 1 |
5 files changed, 5 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 057537ecae3..6aaf764a67a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1666,7 +1666,6 @@ vec4_visitor::setup_uniforms(int reg) */ 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); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 341897e9f07..76b13a6f0d4 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -124,8 +124,7 @@ public: 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; diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index 2555038f221..b0abfc10dc9 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -166,16 +166,14 @@ vec4_visitor::nir_setup_uniforms(nir_shader *shader) 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++) { @@ -218,10 +216,9 @@ vec4_visitor::nir_setup_uniform(nir_variable *var) 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++; } @@ -258,10 +255,6 @@ vec4_visitor::nir_setup_builtin_uniform(nir_variable *var) 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++; } } diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index f3030808f86..af01d8eed96 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -702,8 +702,6 @@ vec4_visitor::setup_vec4_uniform_value(unsigned param_offset, for (unsigned i = n; i < 4; ++i) stage_prog_data->param[param_offset + i] = &zero; - - uniform_vector_size[param_offset / 4] = n; } vec4_instruction * @@ -1886,7 +1884,6 @@ vec4_visitor::vec4_visitor(const struct brw_compiler *compiler, } 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() diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp index f4b50ba9d9f..3a267d80b5a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp @@ -262,7 +262,6 @@ vec4_vs_visitor::setup_uniform_clipplane_values() { 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) { |