mesa/src/asahi/lib
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
..
tests asahi: Introduce concept of spilled render targets 2023-07-20 15:33:28 +00:00
agx_bo.c asahi: Fix race in BO stats accounting 2023-08-11 20:31:27 +00:00
agx_bo.h asahi: Make bo->writer_syncobj atomic 2023-05-11 23:24:48 +00:00
agx_border.c asahi: Implement custom border colours 2023-02-04 10:37:02 -05:00
agx_device.c asahi: Use os_dupfd_cloexec() instead of dup() 2023-06-07 03:21:49 +00:00
agx_device.h asahi: Add a noshadow debug flag 2023-08-11 20:31:27 +00:00
agx_formats.c asahi: Support more renderable formats 2023-04-07 03:23:03 +00:00
agx_formats.h asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
agx_helpers.h asahi: Move a bunch of helpers to common 2023-08-11 20:31:27 +00:00
agx_iokit.h asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
agx_meta.c asahi: Add missing LOD source for agx_meta's txfs 2023-08-23 15:06:55 +00:00
agx_meta.h asahi: Permit meta shaders to use preambles 2023-07-20 15:33:29 +00:00
agx_nir_format_helpers.h nir: Drop "SSA" from NIR language 2023-08-12 16:44:41 -04:00
agx_nir_lower_alpha.c nir: Drop most uses of nir_instr_rewrite_src_ssa() 2023-08-18 01:00:15 +00:00
agx_nir_lower_msaa.c treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
agx_nir_lower_sample_intrinsics.c treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
agx_nir_lower_tilebuffer.c nir,asahi: Remove texture_base_agx 2023-08-23 15:06:55 +00:00
agx_nir_lower_vbo.c agx/lower_vbo: Handle nonzero component 2023-08-23 15:06:54 +00:00
agx_nir_lower_vbo.h gallium: move vertex stride to CSO 2023-08-14 01:23:25 +00:00
agx_ppp.h asahi: Identify the separate varying count fields 2023-07-05 05:11:49 +00:00
agx_tilebuffer.c asahi: Do not support masking with spilled RTs 2023-07-20 15:33:28 +00:00
agx_tilebuffer.h asahi: Lower tilebuffer access for spilled RTs 2023-07-20 15:33:28 +00:00
agx_usc.h agx: Fix bogus assert 2023-07-20 15:33:28 +00:00
cmdbuf.xml asahi: Pass layer stride in pixels, not elements 2023-08-23 15:06:55 +00:00
decode.c asahi/decode: Turn assert into error 2023-08-23 15:06:55 +00:00
decode.h asahi: Add a shared library interface for decode 2023-07-20 15:33:28 +00:00
dyld_interpose.h asahi: Clang-format the subtree 2022-12-27 22:46:29 +00:00
gen_pack.py asahi: Strip ? in GenXML 2023-07-05 05:11:49 +00:00
meson.build asahi: drop unused include paths 2023-07-22 10:10:03 +00:00
pool.c asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
pool.h asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
wrap.c asahi: wrap: Handle freeing shmems 2023-07-20 15:33:28 +00:00