summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/ir_set_program_inouts.cpp')
-rw-r--r--src/compiler/glsl/ir_set_program_inouts.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index 90b06b9f417..66f0c1ebf08 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -149,7 +149,7 @@ void
ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var)
{
const glsl_type *type = var->type;
- bool is_vertex_input = false;
+
if (this->shader_stage == MESA_SHADER_GEOMETRY &&
var->data.mode == ir_var_shader_in && type->is_array()) {
type = type->fields.array;
@@ -173,11 +173,8 @@ ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var)
type = type->fields.array;
}
- if (this->shader_stage == MESA_SHADER_VERTEX &&
- var->data.mode == ir_var_shader_in)
- is_vertex_input = true;
-
- mark(this->prog, var, 0, type->count_attribute_slots(is_vertex_input),
+ mark(this->prog, var, 0,
+ var->count_attribute_slots(this->shader_stage == MESA_SHADER_VERTEX),
this->shader_stage);
}