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 <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Ian Romanick 2014-04-27 14:16:48 -07:00
parent 7016afe25d
commit 5998fd536a
1 changed files with 6 additions and 1 deletions

View File

@ -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());