spirv: Use nir_const_value for spec constants
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 22 Apr 2020 19:05:13 +0000 (14:05 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 09:23:59 +0000 (09:23 +0000)
commitf4addfdde39070879ed8b1f08fe3bd85f2b0e392
tree28b0ba769682558d79f4baff1984d11b9a374ec2
parent6211e79ba5f4be57c088fdf6140854f67c9a37ec
spirv: Use nir_const_value for spec constants

When we originally wrote spirv_to_nir we didn't have a good scalar value
union to handily use so we rolled our own thing for spec constants.  Now
that we have nir_const_value, we can use that and simplify a bunch of
the spec constant logic.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4675>
src/amd/vulkan/radv_shader.c
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c
src/freedreno/vulkan/tu_shader.c
src/intel/vulkan/anv_pipeline.c
src/mesa/main/glspirv.c