summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r--src/compiler/glsl/ast_function.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index e895228cee4..9f03f321483 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1504,8 +1504,7 @@ emit_inline_matrix_constructor(const glsl_type *type,
* components with zero.
*/
glsl_base_type param_base_type = first_param->type->base_type;
- assert(param_base_type == GLSL_TYPE_FLOAT ||
- first_param->type->is_double());
+ assert(first_param->type->is_float() || first_param->type->is_double());
ir_variable *rhs_var =
new(ctx) ir_variable(glsl_type::get_instance(param_base_type, 4, 1),
"mat_ctor_vec",
@@ -1514,7 +1513,7 @@ emit_inline_matrix_constructor(const glsl_type *type,
ir_constant_data zero;
for (unsigned i = 0; i < 4; i++)
- if (param_base_type == GLSL_TYPE_FLOAT)
+ if (first_param->type->is_float())
zero.f[i] = 0.0;
else
zero.d[i] = 0.0;