glsl: use without_array() rather than get_scalar_type()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 26 Apr 2017 03:56:44 +0000 (13:56 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 26 Apr 2017 22:21:21 +0000 (08:21 +1000)
Here get_scalar_type() was just being use to remove the array
after that we converted it back to base_type anyway so just
use the without_array() helper.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/ast_to_hir.cpp

index aeb223db9e72ee4142755316d5dd9ad57926406d..0ae87cb93ea97f86f83aa123dce04b71958b8955 100644 (file)
@@ -3858,7 +3858,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
        * 3.00 spec allows structs as well.  Varying structs are also allowed
        * in GLSL 1.50.
        */
-      switch (var->type->get_scalar_type()->base_type) {
+      switch (var->type->without_array()->base_type) {
       case GLSL_TYPE_FLOAT:
          /* Ok in all GLSL versions */
          break;