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