mesa/src/gallium/drivers/panfrost
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
..
.clang-format panfrost: Symlink gallium .clang-format to common 2023-04-10 21:56:04 +00:00
.editorconfig
meson.build panfrost: Add NIR-based sysval lowering pass 2023-03-23 23:53:46 +00:00
pan_blend_cso.h panfrost: Check blend enabled state in pan_allow_forward_pixel_to_kill() 2023-05-03 19:02:21 +00:00
pan_blit.c panfrost: fix refcnt imbalance related to blitter 2023-07-10 00:26:01 +00:00
pan_cmdstream.c panfrost: Pack stride at CSO create time on v9 2023-08-15 13:27:58 +00:00
pan_context.c pan/decode: handle more than one panfrost_device 2023-08-14 22:41:10 +00:00
pan_context.h util: include "util/compiler.h" instead of "pipe/p_compiler.h" 2023-06-27 18:18:30 +08:00
pan_disk_cache.c panfrost: Move sysvals to GL driver struct 2023-03-23 23:53:46 +00:00
pan_fence.c panfrost: clang-format the tree 2022-12-24 02:22:57 +00:00
pan_fence.h panfrost: clang-format the tree 2022-12-24 02:22:57 +00:00
pan_helpers.c panfrost: Move sysvals to GL driver struct 2023-03-23 23:53:46 +00:00
pan_job.c pan/decode: handle more than one panfrost_device 2023-08-14 22:41:10 +00:00
pan_job.h panfrost: Add missing inline 2023-08-01 23:18:29 +00:00
pan_mempool.c panfrost: clang-format the tree 2022-12-24 02:22:57 +00:00
pan_mempool.h panfrost: clang-format the tree 2022-12-24 02:22:57 +00:00
pan_nir_lower_sysvals.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
pan_nir_remove_fragcolor_stores.c treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
pan_public.h panfrost: Re-run clang-format 2023-04-10 21:56:04 +00:00
pan_resource.c pan/decode: handle more than one panfrost_device 2023-08-14 22:41:10 +00:00
pan_resource.h panfrost: prepare pan_image_view for multiplanar formats 2023-08-07 19:35:12 +00:00
pan_screen.c panfrost: add PAN_MESA_DEBUG=yuv for debugging yuv sampler 2023-08-07 19:35:13 +00:00
pan_screen.h panfrost: clang-format the tree 2022-12-24 02:22:57 +00:00
pan_shader.c gallium: add simd_sizes to pipe_compute_state_object_info 2023-07-07 12:27:35 +00:00