mesa/src/intel/blorp
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
..
blorp.c treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
blorp.h intel/blorp: add a new flag to communicate PSS sync need 2023-08-11 07:15:48 +00:00
blorp_blit.c blorp: Use R8G8_UINT for YCRCB_* formats with CCS 2023-08-14 23:44:19 +00:00
blorp_clear.c blorp: Drop unnecessary assertions in blorp_can_hiz_clear_depth 2023-08-23 00:35:07 +00:00
blorp_genX_exec.h blorp: drop programming of 3DSTATE_(MESH|TASK)_SHADER 2023-08-12 13:49:31 +00:00
blorp_nir_builder.h nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
blorp_priv.h blorp: Make blitter_supports_aux accessible from multiple files. 2022-09-28 08:41:35 +00:00
meson.build intel/compiler,intel/blorp,intel/vulkan: decouple vulkan driver and compiler from gallium 2023-08-03 22:00:15 +00:00