diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-21 10:36:05 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-21 19:33:38 +0200 |
commit | 60caca30197577a910777f754f03fc5df9dbc2d2 (patch) | |
tree | 809d15bd081f432bb64404f5094cddecc3eb2b62 /src/compiler/glsl/glsl_to_nir.cpp | |
parent | 64db02b5fabcf740b353904b05bd9b9e8c713b76 (diff) |
glsl: make use of glsl_type::is_boolean()
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/glsl_to_nir.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 870d4576818..b98d6cb4ac2 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -985,7 +985,7 @@ nir_visitor::visit(ir_call *ir) * consider a true boolean to be ~0. Fix this up with a != 0 * comparison. */ - if (type->base_type == GLSL_TYPE_BOOL) { + if (type->is_boolean()) { nir_alu_instr *load_ssbo_compare = nir_alu_instr_create(shader, nir_op_ine); load_ssbo_compare->src[0].src.is_ssa = true; @@ -1334,7 +1334,7 @@ nir_visitor::visit(ir_expression *ir) * a true boolean to be ~0. Fix this up with a != 0 comparison. */ - if (ir->type->base_type == GLSL_TYPE_BOOL) + if (ir->type->is_boolean()) this->result = nir_ine(&b, &load->dest.ssa, nir_imm_int(&b, 0)); return; |