spirv: Implement NoSignedWrap and NoUnsignedWrap decorations
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 18 May 2019 05:52:42 +0000 (22:52 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 26 Jun 2019 21:13:02 +0000 (14:13 -0700)
commit5a143965b8f4119501e973d15f7f72673b3ce416
treecb6798b9ddac0d52975a3fe3a28a567b6563ceef
parentae37237713681121d7fa83489ef9370e3fdcce2a
spirv: Implement NoSignedWrap and NoUnsignedWrap decorations

When handling the specified ALU operations, check for the decorations
and set nir_alu_instr no_signed_wrap and no_unsigned_wrap flags accordingly.

v2: Add a glsl_base_type_is_unsigned_integer() helper.  (Karol)

v3: Rename helper to glsl_base_type_is_uint().

v4: Use two flags, so we don't need the helper anymore.  (Connor)

v5: Pass alu directly to handle function.  (Jason)

Reviewed-by: Karol Herbst <kherbst@redhat.com> [v3]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/vtn_alu.c