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/ir.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/ir.cpp')
-rw-r--r-- | src/compiler/glsl/ir.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 8c0ae833ebb..3b0cbee3b85 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -783,10 +783,9 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) if (value->type->is_scalar() && value->next->is_tail_sentinel()) { if (type->is_matrix()) { /* Matrix - fill diagonal (rest is already set to 0) */ - assert(type->base_type == GLSL_TYPE_FLOAT || - type->is_double()); + assert(type->is_float() || type->is_double()); for (unsigned i = 0; i < type->matrix_columns; i++) { - if (type->base_type == GLSL_TYPE_FLOAT) + if (type->is_float()) this->value.f[i * type->vector_elements + i] = value->value.f[0]; else @@ -1510,7 +1509,7 @@ ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type) assert(type->base_type == GLSL_TYPE_INT); } else if (this->op == ir_lod) { assert(type->vector_elements == 2); - assert(type->base_type == GLSL_TYPE_FLOAT); + assert(type->is_float()); } else if (this->op == ir_samples_identical) { assert(type == glsl_type::bool_type); assert(sampler->type->is_sampler()); |