mesa/src/microsoft/compiler
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
..
dxcapi.h dxil: Fixes compiling dxcapi.h with mingw. 2022-06-15 11:38:24 +00:00
dxil_buffer.c
dxil_buffer.h d3d12: Fix GCC warnings for missing function prototypes 2020-12-01 17:10:47 +00:00
dxil_buffer_test.c
dxil_container.c microsoft/compiler: Allocate space for I/O and viewID dependency tables before instruction processing 2023-05-10 21:42:34 +00:00
dxil_container.h microsoft/compiler: Support DXIL validator 1.7 2022-07-23 14:48:17 +00:00
dxil_dump.c microsoft/compiler: Handle struct consts in DXIL module dumper 2023-02-11 06:12:23 +00:00
dxil_dump.h
dxil_dump_decls.h microsoft/compiler: Misc fixes caught by GCC 2020-12-01 17:10:47 +00:00
dxil_enums.c compiler: Rename shader_prim to mesa_prim and replace all usage of pipe_prim_type with mesa_prim 2023-06-03 03:29:03 +00:00
dxil_enums.h microsoft/compiler: Refactor type -> resource kind helper 2023-03-23 21:48:43 +00:00
dxil_function.c microsoft/compiler: Enable packed dot product intrinsics for SM6.4+ 2023-05-11 21:56:31 +00:00
dxil_function.h microsoft/compiler: Implement more wave/quad ops 2023-01-24 11:00:05 -08:00
dxil_internal.h microsoft/compiler: Support vec/struct const vals 2023-06-13 00:43:36 +00:00
dxil_module.c microsoft/compiler: Support load_ubo_vec4 2023-06-13 00:43:36 +00:00
dxil_module.h microsoft/compiler: Un-lower shared/scratch to derefs 2023-06-13 00:43:36 +00:00
dxil_nir.c treewide: Use nir_shader_intrinsic_pass sometimes 2023-08-24 15:48:02 +00:00
dxil_nir.h dxil: Delete load_ubo_dxil intrinsic 2023-06-13 00:43:36 +00:00
dxil_nir_algebraic.py microsoft/compiler: Enable packed dot product intrinsics for SM6.4+ 2023-05-11 21:56:31 +00:00
dxil_nir_lower_int_cubemaps.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
dxil_nir_lower_int_cubemaps.h microsoft/compiler: make sampler-lowering optional 2022-06-10 22:14:14 +00:00
dxil_nir_lower_int_samplers.c nir: Take a nir_def * in nir_tex_instr_add_src() 2023-08-18 01:00:14 +00:00
dxil_nir_lower_int_samplers.h d3d12: Don't clear d3d12_shader_key 2023-02-13 22:57:03 +00:00
dxil_nir_lower_vs_vertex_conversion.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
dxil_nir_tess.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
dxil_signature.c microsoft/compiler: Fix usage of type var in semantic asserts 2023-06-01 23:39:41 +00:00
dxil_signature.h microsoft/compiler: DXIL validator 1.6 uses a new PSV struct version 2022-07-23 14:48:17 +00:00
dxil_validator.cpp Add checks for NULL dxil_validator 2023-05-17 15:33:17 +00:00
dxil_validator.h microsoft/spirv2dxil: Refactor to make SM and validator versions public 2022-10-24 16:15:31 +00:00
dxil_versions.h microsoft/spirv2dxil: Refactor to make SM and validator versions public 2022-10-24 16:15:31 +00:00
meson.build meson: add dep_valgrind dependency for 'dxil_compiler' 2022-10-20 01:32:47 +00:00
nir_to_dxil.c nir: unify lower_find_msb with has_{find_msb_rev,uclz} 2023-08-22 12:08:37 +00:00
nir_to_dxil.h microsoft/compiler: Take inputs from callers before providing nir options 2023-05-11 21:56:31 +00:00