glsl/ast: Don't perform GS input array checks on non-inputs.
authorPaul Berry <stereotype441@gmail.com>
Mon, 12 Aug 2013 13:39:23 +0000 (06:39 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 14 Aug 2013 03:02:55 +0000 (20:02 -0700)
Previously, we were accidentally calling
handle_geometry_shader_input_decl() on non-input interface block
declarations, resulting in bogus error checking.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp

index 8e1e6e5008ef4183f8b0b266615e76c30114f17e..1bfa887cc36acc0c4af4db1986c2576c1439bd86 100644 (file)
@@ -4600,7 +4600,7 @@ ast_interface_block::hir(exec_list *instructions,
       }
 
       var->interface_type = block_type;
-      if (state->target == geometry_shader)
+      if (state->target == geometry_shader && var_mode == ir_var_shader_in)
          handle_geometry_shader_input_decl(state, loc, var);
       state->symbols->add_variable(var);
       instructions->push_tail(var);