mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 09:30:11 +01:00
Adapted the Coccinelle rules from the nir_shader_intrinsics_pass commit a while
ago, which was buggy then and buggy now, so then I fixed stuff up manually
(including formatting).
Via Coccinelle patch:
@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_tex_instr *intr,
...)
{
(
- if (instr->type != nir_instr_type_tex)
- return false;
- nir_tex_instr *intr = nir_instr_as_tex(instr);
|
- nir_tex_instr *intr = nir_instr_as_tex(instr);
- if (instr->type != nir_instr_type_tex)
- 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_tex_pass(shader, fn,
...)
|
-NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
+NIR_PASS_V(shader, nir_shader_tex_pass, fn,
...)
|
-NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
+NIR_PASS(progress, shader, nir_shader_tex_pass, fn,
...)
)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v3d]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
|
||
|---|---|---|
| .. | ||
| clc | ||
| glsl | ||
| isaspec | ||
| libcl | ||
| nir | ||
| rust | ||
| spirv | ||
| builtin_types.py | ||
| builtin_types_c.py | ||
| builtin_types_h.py | ||
| glsl_types.c | ||
| glsl_types.h | ||
| meson.build | ||
| shader_enums.c | ||
| shader_enums.h | ||
| shader_info.h | ||