glsl: make use of glsl_type::is_double()
[mesa.git] / src / compiler / glsl / ir.cpp
index b5c1fa3391923e3016237b82293cb75782e08dde..8c0ae833ebbb101947fbf95d95835c65f2167d20 100644 (file)
@@ -784,7 +784,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
       if (type->is_matrix()) {
         /* Matrix - fill diagonal (rest is already set to 0) */
          assert(type->base_type == GLSL_TYPE_FLOAT ||
-                type->base_type == GLSL_TYPE_DOUBLE);
+                type->is_double());
          for (unsigned i = 0; i < type->matrix_columns; i++) {
             if (type->base_type == GLSL_TYPE_FLOAT)
                this->value.f[i * type->vector_elements + i] =