glsl: add capability to lower mediump array types
[mesa.git] / src / compiler / glsl / ir_reader.cpp
index d67d1436a4e8a7bd25d9b2910ece2dc47cfe1eae..d4f0e58b155cbe5edc70508b2f49cf3fb05a4660 100644 (file)
@@ -419,8 +419,10 @@ ir_reader::read_declaration(s_expression *expr)
          var->data.sample = 1;
       } else if (strcmp(qualifier->value(), "patch") == 0) {
          var->data.patch = 1;
+      } else if (strcmp(qualifier->value(), "explicit_invariant") == 0) {
+         var->data.explicit_invariant = true;
       } else if (strcmp(qualifier->value(), "invariant") == 0) {
-        var->data.invariant = 1;
+         var->data.invariant = true;
       } else if (strcmp(qualifier->value(), "uniform") == 0) {
         var->data.mode = ir_var_uniform;
       } else if (strcmp(qualifier->value(), "shader_storage") == 0) {
@@ -833,7 +835,7 @@ ir_reader::read_constant(s_expression *expr)
         return NULL;
       }
 
-      if (type->base_type == GLSL_TYPE_FLOAT) {
+      if (type->is_float()) {
         s_number *value = SX_AS_NUMBER(expr);
         if (value == NULL) {
            ir_read_error(values, "expected numbers");
@@ -1047,11 +1049,11 @@ ir_reader::read_texture(s_expression *expr)
       }
 
       if (s_shadow->subexpressions.is_empty()) {
-        tex->shadow_comparitor = NULL;
+        tex->shadow_comparator = NULL;
       } else {
-        tex->shadow_comparitor = read_rvalue(s_shadow);
-        if (tex->shadow_comparitor == NULL) {
-           ir_read_error(NULL, "when reading shadow comparitor in (%s ..)",
+        tex->shadow_comparator = read_rvalue(s_shadow);
+        if (tex->shadow_comparator == NULL) {
+           ir_read_error(NULL, "when reading shadow comparator in (%s ..)",
                          tex->opcode_string());
            return NULL;
         }