mesa/src/asahi/vulkan
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
..
hk_buffer.c hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_buffer.h hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_buffer_view.c asahi,hk: reenable rgb32 buffer textures 2024-11-24 13:06:08 +00:00
hk_buffer_view.h
hk_cmd_buffer.c hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_cmd_buffer.h hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_cmd_clear.c hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_cmd_dispatch.c hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_cmd_draw.c libagx: fix ia_primitives with tessellation 2025-02-22 02:24:29 +00:00
hk_cmd_meta.c hk: do not clamp txf for copy shaders 2025-02-22 02:24:29 +00:00
hk_cmd_pool.c asahi,hk: mmap BO on first use 2024-12-02 19:26:46 +00:00
hk_cmd_pool.h hk: limit the number of free BOs in each cmd pool 2024-10-30 10:14:07 -04:00
hk_descriptor_set.c hk: emulate EXT_image_view_min_lod 2025-02-05 17:27:18 +00:00
hk_descriptor_set.h hk: emulate EXT_image_view_min_lod 2025-02-05 17:27:18 +00:00
hk_descriptor_set_layout.c asahi: use vk_descriptor_type_is_dynamic 2024-12-19 15:12:58 +00:00
hk_descriptor_set_layout.h
hk_descriptor_table.c asahi,hk: mmap BO on first use 2024-12-02 19:26:46 +00:00
hk_descriptor_table.h
hk_device.c hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_device.h hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_device_memory.c hk: unstub UnmapMemory2KHR 2025-02-22 02:24:28 +00:00
hk_device_memory.h
hk_event.c hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_event.h
hk_format.c hk: don't advertise impossible modifiers 2024-11-11 14:33:02 +00:00
hk_image.c hk: ban sparse RGB32 2025-02-22 02:24:29 +00:00
hk_image.h hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_image_view.c hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_image_view.h
hk_instance.c hk: fake min/max filtering for proton 2025-02-22 02:24:29 +00:00
hk_instance.h hk: fake min/max filtering for proton 2025-02-22 02:24:29 +00:00
hk_nir_lower_descriptors.c hk: implement sparse 2025-02-22 02:24:28 +00:00
hk_nir_passthrough_gs.c
hk_physical_device.c hk: fake min/max filtering for proton 2025-02-22 02:24:29 +00:00
hk_physical_device.h hk: allow overriding sysmem with an env var 2024-10-30 10:14:07 -04:00
hk_private.h hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_query_pool.c hk: pass cmdbuf to perf_debug 2025-02-22 02:24:29 +00:00
hk_query_pool.h hk: implement timestamps 2024-12-02 19:26:47 +00:00
hk_queue.c hk: perf debug sparse binding 2025-02-22 02:24:29 +00:00
hk_queue.h hk: fix timeline value type 2024-12-12 21:16:12 +00:00
hk_sampler.c hk: drop #include 2024-10-05 18:30:13 +00:00
hk_sampler.h
hk_shader.c treewide: use nir_shader_tex_pass 2025-02-24 19:33:26 +00:00
hk_shader.h hk: Don't include full nir.h in hk_shader.h 2025-02-12 22:33:07 +01:00
hk_wsi.c
hk_wsi.h
meson.build asahi,libagx,hk: don't set custom_target names 2025-02-22 02:24:29 +00:00