[Mesa-dev] [PATCH 4/8] glsl: Use count_attribute_slots() in ir_set_program_inouts.
Paul Berry
stereotype441 at gmail.com
Wed Jul 31 14:17:56 PDT 2013
---
src/glsl/ir_set_program_inouts.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index ef95cbe..351f65b 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -110,14 +110,8 @@ ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
if (!is_shader_inout(ir->var))
return visit_continue;
- if (ir->type->is_array()) {
- mark(this->prog, ir->var, 0,
- ir->type->length * ir->type->fields.array->matrix_columns,
- this->shader_type == GL_FRAGMENT_SHADER);
- } else {
- mark(this->prog, ir->var, 0, ir->type->matrix_columns,
- this->shader_type == GL_FRAGMENT_SHADER);
- }
+ mark(this->prog, ir->var, 0, ir->type->count_attribute_slots(),
+ this->shader_type == GL_FRAGMENT_SHADER);
return visit_continue;
}
--
1.8.3.4
More information about the mesa-dev
mailing list