diff options
author | Paul Berry <stereotype441@gmail.com> | 2013-01-11 13:34:40 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2013-01-24 16:30:37 -0800 |
commit | 3680864c0b2ed4019b952c067205ca16b652cd93 (patch) | |
tree | 05eb68451b2688514ae6cee484682470e8c6c5f4 /src/glsl/opt_structure_splitting.cpp | |
parent | 42a29d89fd85c86387f0d119950e243b6de76d79 (diff) | |
download | external_mesa3d-3680864c0b2ed4019b952c067205ca16b652cd93.zip external_mesa3d-3680864c0b2ed4019b952c067205ca16b652cd93.tar.gz external_mesa3d-3680864c0b2ed4019b952c067205ca16b652cd93.tar.bz2 |
glsl: Disable structure splitting for shader ins/outs.
Previously, it didn't matter whether structure splitting tried to
split shader ins/outs, because structs were prohibited from being used
for shader ins/outs. However, GLSL 3.00 ES supports varying structs.
In order for varying structs to work, we need to make sure that
structure splitting doesn't get applied to them, because if it does,
then the linker won't be able to match up varyings properly.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/glsl/opt_structure_splitting.cpp')
-rw-r--r-- | src/glsl/opt_structure_splitting.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp index 9b3f048..806c079 100644 --- a/src/glsl/opt_structure_splitting.cpp +++ b/src/glsl/opt_structure_splitting.cpp @@ -104,7 +104,8 @@ ir_structure_reference_visitor::get_variable_entry(ir_variable *var) { assert(var); - if (!var->type->is_record() || var->mode == ir_var_uniform) + if (!var->type->is_record() || var->mode == ir_var_uniform + || var->mode == ir_var_shader_in || var->mode == ir_var_shader_out) return NULL; foreach_iter(exec_list_iterator, iter, this->variable_list) { |