diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-21 11:18:50 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-21 19:34:15 +0200 |
commit | a7bc51aef8ef7e3374e034bfbe33096e985ffb0b (patch) | |
tree | d37cd02757c0c56cf0928a871123b631be4a2017 /src/compiler/glsl/ast_function.cpp | |
parent | cacc823c39044307e6befe12c3f51317f09973e2 (diff) |
glsl: make use of glsl_type::is_float()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 5 |
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; |