glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.
authorEric Anholt <eric@anholt.net>
Fri, 10 Jan 2020 22:09:43 +0000 (14:09 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 5 Feb 2020 18:31:14 +0000 (10:31 -0800)
commit8d07d66180b1523d7e70681ca142955f896ebda9
tree266be7d8ee1e804f87ab36698c8b4b90f422dece
parent5bea0cf77956d748ea929e12d12756692f04a33f
glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.

This means you can directly use format utils on it without having to have
your own GL enum to number-of-components switch statement (or whatever) in
your vulkan backend.

Thanks to imirkin for fixing up the nouveau driver (and a couple of core
details).

This fixes the computed qualifiers for EXT_shader_image_load_store's
non-integer sizeNxM qualifiers, which we don't have tests for.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (v3d)
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355>
22 files changed:
src/broadcom/compiler/v3d_nir_lower_image_load_store.c
src/compiler/glsl/ast.h
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/builtin_variables.cpp
src/compiler/glsl/glsl_parser.yy
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl_types.h
src/compiler/nir/nir.h
src/compiler/nir/nir_print.c
src/compiler/spirv/spirv_to_nir.c
src/freedreno/ir3/ir3_a4xx.c
src/freedreno/ir3/ir3_a6xx.c
src/freedreno/ir3/ir3_image.c
src/freedreno/ir3/ir3_image.h
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir.h
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
src/intel/compiler/brw_nir_lower_image_load_store.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp