glsl: Handle packed_type == ivec4[] in lower_packed_varyings().
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 11 Feb 2017 08:25:57 +0000 (00:25 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 14 Feb 2017 22:47:40 +0000 (14:47 -0800)
For GS input arrays, we may turn a packed_type of ivec4 into an
array of ivec4s.  We still want flat qualification.

Found by inspection.  Not known to help anything.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/glsl/lower_packed_varyings.cpp

index 1e9bdda12b1ecb43429ca7ef3cc1acee32db8643..13f7e5b52da2c39782cc572ab91adf21d5615850 100644 (file)
@@ -704,7 +704,8 @@ lower_packed_varyings_visitor::get_packed_varying_deref(
       packed_var->data.centroid = unpacked_var->data.centroid;
       packed_var->data.sample = unpacked_var->data.sample;
       packed_var->data.patch = unpacked_var->data.patch;
-      packed_var->data.interpolation = packed_type == glsl_type::ivec4_type
+      packed_var->data.interpolation =
+         packed_type->without_array() == glsl_type::ivec4_type
          ? unsigned(INTERP_MODE_FLAT) : unpacked_var->data.interpolation;
       packed_var->data.location = location;
       packed_var->data.precision = unpacked_var->data.precision;