spirv: Use the right bit-size for spec constant ops
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 20 Oct 2018 00:08:58 +0000 (19:08 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Oct 2018 16:45:29 +0000 (11:45 -0500)
commit8fa70cfcfdda1094bc19e9707eb9333477a2d2bf
tree73035379c04b9c177aec57d320d97c2f7e8a5d2d
parent1d2ed694c16b6b4d0b096039c8f61808ba7c624d
spirv: Use the right bit-size for spec constant ops

Previously, we would always pull the bit size from the destination which
is wrong for opcodes like nir_ilt where the sources are variable-sized
but the destination is a fixed size.  We were getting lucky before
because nir_op_ilt returns a 32-bit value and basically everyone who
uses spec constants uses 32-bit ones.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/spirv/spirv_to_nir.c