summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_packed_varyings.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2015-02-27 22:43:39 +1100
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-04-27 21:31:01 +1000
commitf00c5f85b82efe9535b18dbf97c4591fb28aeae6 (patch)
treede2d986aa0a3f941fbb35a5e13ddf68b9d208d78 /src/glsl/lower_packed_varyings.cpp
parentfda5f7bb2f23b4adb2f2684162dfb36fe0cb8641 (diff)
downloadexternal_mesa3d-f00c5f85b82efe9535b18dbf97c4591fb28aeae6.zip
external_mesa3d-f00c5f85b82efe9535b18dbf97c4591fb28aeae6.tar.gz
external_mesa3d-f00c5f85b82efe9535b18dbf97c4591fb28aeae6.tar.bz2
glsl: support packing of arrays of arrays
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/glsl/lower_packed_varyings.cpp')
-rw-r--r--src/glsl/lower_packed_varyings.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
index 2c9a1c4..f8e79bd 100644
--- a/src/glsl/lower_packed_varyings.cpp
+++ b/src/glsl/lower_packed_varyings.cpp
@@ -645,14 +645,8 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
if (var->data.explicit_location)
return false;
- const glsl_type *type = var->type;
- if (this->gs_input_vertices != 0) {
- assert(type->is_array());
- type = type->element_type();
- }
- if (type->is_array())
- type = type->fields.array;
- if (type->vector_elements == 4 && !type->is_double())
+ if (var->type->without_array()->vector_elements == 4 &&
+ !var->type->is_double())
return false;
return true;
}