summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-07-31 09:43:16 -0700
committerPaul Berry <[email protected]>2013-08-01 20:19:26 -0700
commit0b0dc03a31e13aa1cb4e0a6479dbd09cef612d44 (patch)
tree15acdb7d165fd2153e99894bfd125b0ca2f657f2 /src/glsl/ir_set_program_inouts.cpp
parent7d95d2b4c9b39b42ea7f9669c8c0da0b229c327c (diff)
glsl: Use count_attribute_slots() in ir_set_program_inouts.
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_set_program_inouts.cpp')
-rw-r--r--src/glsl/ir_set_program_inouts.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index ef95cbeaeb7..351f65bd59d 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;
}