summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-04-27 14:16:48 -0700
committerIan Romanick <[email protected]>2014-05-02 07:16:54 -0700
commit5998fd536a1bb1d13218c995aa69723c6767cf04 (patch)
treea038175491ede50b6cd67b644a97b12128a2e514
parent7016afe25d1c8ca652bd712ce130b135220530c5 (diff)
linker: Make lower_packed_varyings work with explicit locations
Don't do anything with variables that have explicitly assigned locations. This is also how built-in varyings are handled. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/glsl/lower_packed_varyings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
index 35f1c5f60cc..e8654748f5b 100644
--- a/src/glsl/lower_packed_varyings.cpp
+++ b/src/glsl/lower_packed_varyings.cpp
@@ -584,7 +584,12 @@ lower_packed_varyings_visitor::get_packed_varying_deref(
bool
lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
{
- /* Things composed of vec4's don't need lowering. Everything else does. */
+ /* Things composed of vec4's and varyings with explicitly assigned
+ * locations don't need lowering. Everything else does.
+ */
+ if (var->data.explicit_location)
+ return false;
+
const glsl_type *type = var->type;
if (this->gs_input_vertices != 0) {
assert(type->is_array());