mesa/src/compiler
Alyssa Rosenzweig 2504e7951b treewide: use nir_shader_tex_pass
Adapted the Coccinelle rules from the nir_shader_intrinsics_pass commit a while
ago, which was buggy then and buggy now, so then I fixed stuff up manually
(including formatting).

Via Coccinelle patch:

    @def@
    typedef bool;
    typedef nir_builder;
    typedef nir_instr;
    typedef nir_def;
    identifier fn, instr, intr, x, builder, data;
    @@

    static fn(nir_builder* builder,
    -nir_instr *instr,
    +nir_tex_instr *intr,
    ...)
    {
    (
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    |
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    )

    <...
    (
    -instr->x
    +intr->instr.x
    |
    -instr
    +&intr->instr
    )
    ...>

    }

    @pass depends on def@
    identifier def.fn;
    expression shader, progress;
    @@

    (
    -nir_shader_instructions_pass(shader, fn,
    +nir_shader_tex_pass(shader, fn,
    ...)
    |
    -NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
    +NIR_PASS_V(shader, nir_shader_tex_pass, fn,
    ...)
    |
    -NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
    +NIR_PASS(progress, shader, nir_shader_tex_pass, fn,
    ...)
    )

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v3d]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
..
clc compiler/clc: Stop using deprecated NIR_PASS_V macro. 2025-02-22 08:54:23 +01:00
glsl glsl: Don't use deprecated NIR_PASS_V macro anymore. 2025-02-22 08:54:39 +01:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
libcl libcl/vk: add common query copy write routine 2025-02-13 11:50:06 +00:00
nir treewide: use nir_shader_tex_pass 2025-02-24 19:33:26 +00:00
rust compiler/rust/bitset: Test next_unset() 2025-01-02 20:52:48 +00:00
spirv vtn_bindgen2: keep the printf blob local to avoid LTO issues 2025-02-23 01:25:23 +00:00
builtin_types.py compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c glsl: fix glsl_get_word_size_align_bytes 2025-01-06 22:09:49 +00:00
glsl_types.h docs,src: replace doc and comments for PIPE_CAP with pipe_caps 2025-01-17 04:39:47 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add load_front_face_fsign 2024-12-30 22:31:34 +00:00
shader_enums.h nir: Rename in-bounds-agx to in-bounds 2025-02-19 09:54:11 +00:00
shader_info.h nir: track lowered image intrinsics to globals 2025-02-23 15:16:50 +00:00