mesa/src/gallium/auxiliary/nir
Alyssa Rosenzweig c39896b17b nir: Use getters for nir_src::parent_*
First, we need to give the parent_instr field a unique name to be able to
replace with a helper.  We have parent_instr fields for both nir_src and
nir_def, so let's rename nir_src::parent_instr in preparation for rework.

This was done with a combination of sed and manual fix-ups.

Then we use semantic patches plus manual fixups:

    @@
    expression s;
    @@

    -s->renamed_parent_instr
    +nir_src_parent_instr(s)

    @@
    expression s;
    @@

    -s.renamed_parent_instr
    +nir_src_parent_instr(&s)

    @@
    expression s;
    @@

    -s->parent_if
    +nir_src_parent_if(s)

    @@
    expression s;
    @@

    -s.renamed_parent_if
    +nir_src_parent_if(&s)

    @@
    expression s;
    @@

    -s->is_if
    +nir_src_is_if(s)

    @@
    expression s;
    @@

    -s.is_if
    +nir_src_is_if(&s)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24671>
2023-10-10 04:58:05 -04:00
..
nir_draw_helpers.c nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
nir_draw_helpers.h gallium/draw: Enable polygon stipple NIR helpers to generate bool1 or bool32 Booleans 2023-01-28 20:42:32 -08:00
nir_to_tgsi.c nir: Use getters for nir_src::parent_* 2023-10-10 04:58:05 -04:00
nir_to_tgsi.h virgl, nir_to_tgsi: Add a hack for promoting partial memory barriers 2023-09-09 04:41:24 +00:00
nir_to_tgsi_info.c ntt: handle interp intrinsics as derefs 2023-08-15 11:54:05 +00:00
nir_to_tgsi_info.h meson/gallium: Add an option to not use LLVM for gallium draw module 2021-02-25 17:48:16 +00:00
tgsi_to_nir.c treewide: Use nir_before/after_impl for more elaborate cases 2023-08-30 19:30:58 +00:00
tgsi_to_nir.h Revert "nir: make tgsi_varying_semantic_to_slot(..) public" 2022-02-11 08:48:10 +00:00