Do we need to do something similar for specialization constants?

On Mon, Jul 16, 2018 at 7:28 AM Karol Herbst <kher...@redhat.com> wrote:

> Signed-off-by: Karol Herbst <kher...@redhat.com>
> ---
>  src/compiler/spirv/vtn_alu.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
> index 5db6c7f0a87..d6f149d12e9 100644
> --- a/src/compiler/spirv/vtn_alu.c
> +++ b/src/compiler/spirv/vtn_alu.c
> @@ -743,6 +743,16 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
>           src[1] = tmp;
>        }
>
> +      switch (op) {
> +      case nir_op_ishl:
> +      case nir_op_ishr:
> +      case nir_op_ushr:
> +         src[1] = nir_u2u32(&b->nb, src[1]);
> +         break;
> +      default:
> +         break;
> +      }
> +
>        val->ssa->def = nir_build_alu(&b->nb, op, src[0], src[1], src[2],
> src[3]);
>        break;
>     } /* default */
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to