mesa/src/compiler
Alyssa Rosenzweig 17355f716b treewide: use UTIL_DYNARRAY_INIT
Instead of util_dynarray_init(&dynarray, NULL), just use
UTIL_DYNARRAY_INIT instead. This is more ergonomic.

Via Coccinelle patch:

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray = {0};
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray;
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(&(dynarray), NULL);
    +dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(dynarray, NULL);
    +(*dynarray) = UTIL_DYNARRAY_INIT;

Followed by sed:

    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(&\(.*\), NULL)/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init( &\(.*\), NULL )/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(\(.*\), NULL)/*\1 = UTIL_DYNARRAY_INIT/g' \{} \;"

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38189>
2025-11-04 13:39:48 +00:00
..
clc util/dynarray: infer type in append 2025-10-24 18:32:07 +00:00
glsl tree-wide: don't call nir_opt_constant_folding after nir_lower_flrp 2025-10-30 19:28:07 +00:00
isaspec meson: do not compile libisaspec unless used 2025-03-25 08:32:47 +00:00
libcl libcl: avoid calling UNREACHABLE(str) macro without arguments 2025-08-04 23:15:18 +02:00
nir treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
rust nak/dataflow: Fix typo in comments 2025-10-30 12:49:11 +00:00
spirv nir: guard nir_def_as_alu() 2025-10-30 19:28:06 +00:00
builtin_types.py compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py compiler: Generate files with newline at end 2025-06-24 14:01:04 +00:00
glsl_types.c glsl: handle PerPrimitiveEXT qualifier 2025-09-22 02:19:37 +00:00
glsl_types.h glsl: handle PerPrimitiveEXT qualifier 2025-09-22 02:19:37 +00:00
list.h nir: remove unused stuff from list.h 2025-07-31 20:23:04 +00:00
meson.build nir: move list.h outside the glsl directory 2025-07-31 20:23:02 +00:00
shader_enums.c compiler: auto-stage file ext for SPIR-V capture 2025-09-22 19:06:07 +00:00
shader_enums.h nir: Add KosmicKrisp required utilities 2025-10-20 16:22:00 +00:00
shader_info.h compiler: rename vs.tes_agx bit to vs.tes_poly 2025-10-16 19:25:35 +00:00