spirv: Deal with glslang not setting NonUniform on constructors.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 31 Aug 2020 19:58:12 +0000 (21:58 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 2 Sep 2020 19:17:02 +0000 (21:17 +0200)
commit191f8a4b9fcdf71c4edaa523e10b744b354fb5e4
treed9d0b0b37d7056a5a20b3162bea70ae3e56049d0
parent965b8441fe01645613188bfa463ef6143dd66450
spirv: Deal with glslang not setting NonUniform on constructors.

Especially a problem for OpImage/OpSampledImage. Note that the problem
doesn't seem to be propagation through glslang, but only in emitting
the SPIR-V. So it is fine if we are somewhat lossy in handling this, as
long as direct Op(Sampled)Image -> texture op chains work.

Fixes: af81486a8cd "spirv: Simplify our handling of NonUniform"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3406
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6451>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h