diff options
author | Dave Airlie <[email protected]> | 2019-05-03 12:53:56 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-05-03 15:22:57 +1000 |
commit | 2774d39366d08f1d16d2071eaeabcfe7900e7021 (patch) | |
tree | 920a18df16fc0f581fa4f4f008ea9c59fdd6726d /src/compiler | |
parent | 5ff5d0a89531474ad181f5b1f5bd018e2e354999 (diff) |
spirv: fix SpvOpBitSize return value.
The spir-v spec says this returns a bool.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/vtn_alu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c index d8ffc18d495..6d4347887cd 100644 --- a/src/compiler/spirv/vtn_alu.c +++ b/src/compiler/spirv/vtn_alu.c @@ -646,9 +646,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, val->ssa->def = nir_ishr(&b->nb, src[0], nir_imm_int(&b->nb, src_bit_size - 1)); - if (src_bit_size != 32) - val->ssa->def = nir_u2u32(&b->nb, val->ssa->def); - + val->ssa->def = nir_i2b(&b->nb, val->ssa->def); break; } |