[Mesa-dev] [PATCH] spirv: fix SpvOpBitSize return value.
Jason Ekstrand
jason at jlekstrand.net
Fri May 3 03:31:23 UTC 2019
Drp...
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Thu, May 2, 2019 at 10:25 PM Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> The spir-v spec says this returns a bool.
> ---
> src/compiler/spirv/vtn_alu.c | 4 +---
> 1 file changed, 1 insertion(+), 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;
> }
>
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190502/6f1812fd/attachment.html>
More information about the mesa-dev
mailing list