From: Ian Romanick Date: Sun, 27 Apr 2014 21:16:48 +0000 (-0700) Subject: linker: Make lower_packed_varyings work with explicit locations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5998fd536a1bb1d13218c995aa69723c6767cf04;p=mesa.git 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 Reviewed-by: Eric Anholt --- 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());