Mesa (master): glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 5 19:55:31 UTC 2020


Module: Mesa
Branch: master
Commit: 8d07d66180b1523d7e70681ca142955f896ebda9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d07d66180b1523d7e70681ca142955f896ebda9

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 10 14:09:43 2020 -0800

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 at amd.com>
Reviewed-by: Iago Toral Quiroga <itoral at 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>

---

 .../compiler/v3d_nir_lower_image_load_store.c      | 283 +++++----------------
 src/compiler/glsl/ast.h                            |   2 +-
 src/compiler/glsl/ast_to_hir.cpp                   |  56 +++-
 src/compiler/glsl/builtin_variables.cpp            |   2 +-
 src/compiler/glsl/glsl_parser.yy                   |  91 +++----
 src/compiler/glsl/ir.cpp                           |   2 +-
 src/compiler/glsl/ir.h                             |   8 +-
 src/compiler/glsl_types.h                          |   6 +-
 src/compiler/nir/nir.h                             |   7 +-
 src/compiler/nir/nir_print.c                       |  47 +---
 src/compiler/spirv/spirv_to_nir.c                  |  81 +++---
 src/freedreno/ir3/ir3_a4xx.c                       |   2 +-
 src/freedreno/ir3/ir3_a6xx.c                       |   2 +-
 src/freedreno/ir3/ir3_image.c                      |  67 +----
 src/freedreno/ir3/ir3_image.h                      |   2 +-
 src/gallium/auxiliary/nir/tgsi_to_nir.c            | 102 +-------
 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp    |  62 +++++
 src/gallium/drivers/nouveau/codegen/nv50_ir.h      |   2 +
 .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp   |  68 +----
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  |  64 +----
 .../compiler/brw_nir_lower_image_load_store.c      |  60 +----
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp         |   7 +-
 22 files changed, 298 insertions(+), 725 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=8d07d66180b1523d7e70681ca142955f896ebda9


More information about the mesa-commit mailing list