summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_named_interface_blocks.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-10-23 07:55:09 -0700
committerPaul Berry <stereotype441@gmail.com>2013-10-24 22:00:32 -0700
commit172aec281d3d4eb0709977e0748d137e56aacd90 (patch)
treeeeee9b54e746c9ecb90289f9d808fff22f45ff21 /src/glsl/lower_named_interface_blocks.cpp
parent85db1326a2f0413a0f55e416791c64732b0af88a (diff)
downloadexternal_mesa3d-172aec281d3d4eb0709977e0748d137e56aacd90.zip
external_mesa3d-172aec281d3d4eb0709977e0748d137e56aacd90.tar.gz
external_mesa3d-172aec281d3d4eb0709977e0748d137e56aacd90.tar.bz2
glsl: set explicit_location correctly in lower_named_interface_blocks.
When lower_named_interface_blocks lowers a built-in interface block member to an ir_variable, it needs to set explicit_location in the ir_variable. Otherwise the linker gets confused and treats the variable as a generic varying. Fixes the following piglit tests, which were regressed by commit 63974c0 (glsl: Simplify the interface to link_invalidate_variable_locations): - clip-distance-bulk-copy - clip-distance-in-bulk-read - clip-distance-in-explicitly-sized - clip-distance-in-param - clip-distance-in-values - core-inputs - gs-redeclares-both-pervertex-blocks - gs-redeclares-pervertex-in-only - redeclare-pervertex-subset-vs-to-gs - unsized-in-named-interface-block-gs - unsized-in-named-interface-block-multiple - unsized-in-unnamed-interface-block-gs - unsized-in-unnamed-interface-block-multiple Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70820 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/lower_named_interface_blocks.cpp')
-rw-r--r--src/glsl/lower_named_interface_blocks.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/lower_named_interface_blocks.cpp b/src/glsl/lower_named_interface_blocks.cpp
index f415252..726ffdc 100644
--- a/src/glsl/lower_named_interface_blocks.cpp
+++ b/src/glsl/lower_named_interface_blocks.cpp
@@ -151,6 +151,7 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions)
(ir_variable_mode) var->mode);
}
new_var->location = iface_t->fields.structure[i].location;
+ new_var->explicit_location = (new_var->location >= 0);
new_var->init_interface_type(iface_t);
hash_table_insert(interface_namespace, new_var,