mesa/src/gallium/drivers
Alyssa Rosenzweig 465b138f01 treewide: Use nir_shader_intrinsic_pass sometimes
This converts a lot of trivial passes. Nice boilerplate deletion. Via Coccinelle
patch (with a small manual fix-up for panfrost where coccinelle got confused by
genxml + ninja clang-format squashed in, and for Zink because my semantic patch
was slightly buggy).

    @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_intrinsic_instr *intr,
    ...)
    {
    (
    -   if (instr->type != nir_instr_type_intrinsic)
    -      return false;
    -   nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
    |
    -   nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
    -   if (instr->type != nir_instr_type_intrinsic)
    -      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_intrinsics_pass(shader, fn,
    ...)
    |
    -NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
    +NIR_PASS_V(shader, nir_shader_intrinsics_pass, fn,
    ...)
    |
    -NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
    +NIR_PASS(progress, shader, nir_shader_intrinsics_pass, fn,
    ...)
    )

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24852>
2023-08-24 15:48:02 +00:00
..
asahi treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
crocus nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
d3d12 treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
etnaviv nir: unify lower_find_msb with has_{find_msb_rev,uclz} 2023-08-22 12:08:37 +00:00
freedreno egl,venus,vulkan,turnip,freedreno: Update CPU trace init to init more than perfetto. 2023-08-19 23:09:45 +02:00
i915 nir: unify lower_bitfield_extract with has_bfe 2023-08-22 12:08:37 +00:00
iris iris: implement a dummy depth flush for Wa_14016712196 2023-08-22 12:49:37 +00:00
lima nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
llvmpipe ci/deqp: backport fix for dEQP-EGL.functional.wide_color.*_888_colorspace_* 2023-08-22 18:12:08 +00:00
nouveau nouveau/codegen: Add a 4th optimization level for MemoryOpts 2023-08-21 14:26:34 +00:00
panfrost treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
r300 r300: remove the nrt main optimization loop 2023-08-21 20:10:40 +00:00
r600 treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
radeonsi treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
softpipe gallium: remove start_slot parameter from pipe_context::set_vertex_buffers 2023-08-11 06:37:22 +00:00
svga svga: fix stride used in vertex declaration 2023-08-23 09:37:38 -07:00
tegra gallium: remove start_slot parameter from pipe_context::set_vertex_buffers 2023-08-11 06:37:22 +00:00
v3d treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
vc4 vc4: drop duplicate .lower_ldexp 2023-08-19 07:23:32 +00:00
virgl ci: disable Material Testers.x86_64_2020.04.08_13.38_frame799.rdc trace 2023-08-21 22:31:21 +00:00
zink treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00