mesa/src/broadcom/simulator
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
..
meson.build broadcom: do not include simulator if not available 2024-09-26 06:12:23 +00:00
v3d_simulator.c treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
v3d_simulator.h broadcom/simulator: add helper to get stride alignment 2025-10-28 11:03:55 +00:00
v3d_simulator_wrapper.cpp broadcom/simulator: Expose V3D revision number in the simulator interface 2025-04-14 12:13:30 +00:00
v3d_simulator_wrapper.h broadcom/simulator: Expose V3D revision number in the simulator interface 2025-04-14 12:13:30 +00:00
v3dx_simulator.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
v3dx_simulator.h broadcom/simulator: Add DRM_IOCTL_V3D_GET_COUNTER to simulator 2024-05-22 05:37:48 +00:00