mesa/src/imagination/vulkan
Alyssa Rosenzweig b824ef83ab util/dynarray: infer type in append
Most of the time, we can infer the type to append in
util_dynarray_append using __typeof__, which is standardized in C23 and
support in Jesse's MSMSVCV. This patch drops the type argument most of
the time, making util_dynarray a little more ergonomic to use.

This is done in four steps.

First, rename util_dynarray_append -> util_dynarray_append_typed

    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_append(/util_dynarray_append_typed(/g' \{} \;"

Then, add a new append that infers the type. This is much more ergonomic
for what you want most of the time.

Next, use type-inferred append as much as possible, via Coccinelle
patch (plus manual fixup):

    @@
    expression dynarray, element;
    type type;
    @@

    -util_dynarray_append_typed(dynarray, type, element);
    +util_dynarray_append(dynarray, element);

Finally, hand fixup cases that Coccinelle missed or incorrectly
translated, of which there were several because we can't used the
untyped append with a literal (since the sizeof won't do what you want).

All four steps are squashed to produce a single patch changing every
util_dynarray_append call site in tree to either drop a type parameter
(if possible) or insert a _typed suffix (if we can't infer). As such,
the final patch is best reviewed by hand even though it was
tool-assisted.

No Long Linguine Meals were involved in the making of this patch.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38038>
2025-10-24 18:32:07 +00:00
..
pds pvr: add view index support for vertex shaders 2025-09-30 12:15:46 +00:00
winsys pvr: support VK_EXT_map_memory_placed.memoryUnmapReserve 2025-10-14 17:21:59 +00:00
meson.build vulkan: Compute path to write into JSON manifests once, use it everywhere 2025-09-26 10:47:31 +00:00
pvr_blit.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_blit.h pvr: add support for VK_KHR_depth_stencil_resolve 2025-09-30 12:15:51 +00:00
pvr_bo.c pvr: support VK_EXT_map_memory_placed.memoryUnmapReserve 2025-10-14 17:21:59 +00:00
pvr_bo.h pvr: Remove PVR_WINSYS_BO_FLAG_ZERO_ON_ALLOC flag 2023-09-06 12:19:46 +00:00
pvr_border.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_border.h pvr: break out instance/device to separate header 2025-10-02 05:34:05 +00:00
pvr_buffer.h pvr: break out buffer to separate header 2025-10-02 05:34:06 +00:00
pvr_clear.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_clear.h pvr: drop PVRX macro 2024-11-29 15:14:11 +00:00
pvr_cmd_buffer.c util/dynarray: infer type in append 2025-10-24 18:32:07 +00:00
pvr_cmd_buffer.h pvr: break out cmd-buffer to separate header 2025-10-02 05:34:07 +00:00
pvr_common.h pvr: break out descriptor sets to separate header 2025-10-02 05:34:08 +00:00
pvr_csb.c pvr: include pvr_csb.h first in implementation 2025-10-06 11:01:28 +02:00
pvr_csb.h pvr: split out rogue hw-defs to separate folder 2025-10-06 11:02:04 +02:00
pvr_csb_enum_helpers.h pvr: include pvr_common.h instead of pvr_private.h 2025-09-26 08:15:59 +00:00
pvr_descriptor_set.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_descriptor_set.h pvr: break out descriptor sets to separate header 2025-10-02 05:34:08 +00:00
pvr_device.c pvr: Advertise VK_KHR_storage_buffer_storage_class 2025-10-17 08:11:11 +00:00
pvr_device.h pvr: enable KHR_wayland_surface 2025-10-15 08:58:03 +00:00
pvr_dump_bo.c pvr: Return VkResult from winsys buffer_map operation 2023-05-18 15:56:59 +00:00
pvr_dump_bo.h pvr: debug: Add "cs" debug option to dump control stream on job submit 2022-11-25 16:42:55 +00:00
pvr_dump_csb.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_formats.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_formats.h pvr: Add support for custom border colors 2025-09-16 18:26:23 +00:00
pvr_framebuffer.h pvr: break out render-pass to separate headers 2025-10-02 05:34:06 +00:00
pvr_hw_pass.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_hw_pass.h pvr: break out render-pass to separate headers 2025-10-02 05:34:06 +00:00
pvr_image.c pvr: support VK_KHR_device_group 2025-10-14 17:22:00 +00:00
pvr_image.h pvr: break out image to separate header 2025-10-02 05:34:05 +00:00
pvr_job_common.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_job_common.h pvr: avoid including pvr_private.h from headers 2025-10-02 05:34:09 +00:00
pvr_job_compute.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_job_compute.h pvr: Use common queue submit implementation 2023-02-28 21:39:49 +00:00
pvr_job_context.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_job_context.h pvr: avoid including pvr_private.h from headers 2025-10-02 05:34:09 +00:00
pvr_job_render.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_job_render.h pvr: add initial driver support for VK_KHR_multiview 2025-09-30 12:15:45 +00:00
pvr_job_transfer.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_job_transfer.h pvr: Add support to process transfer and blit cmds 2023-04-19 11:01:05 +00:00
pvr_macros.h pvr: break out macros to separate header 2025-10-02 05:34:09 +00:00
pvr_pass.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_pass.h pvr: break out render-pass to separate headers 2025-10-02 05:34:06 +00:00
pvr_pipeline.c treewide: don't check before free 2025-10-15 23:01:33 +00:00
pvr_pipeline.h pvr: avoid including pvr_private.h from headers 2025-10-02 05:34:09 +00:00
pvr_query.c util/dynarray: infer type in append 2025-10-24 18:32:07 +00:00
pvr_query.h pvr: break out queries to separate header 2025-10-02 05:34:07 +00:00
pvr_query_compute.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_queue.c pvr: break out pipelines to separate header 2025-10-02 05:34:08 +00:00
pvr_queue.h pvr: break out queue to separate header 2025-10-02 05:34:04 +00:00
pvr_robustness.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_robustness.h pvr: Add robustness buffer support 2023-03-27 18:36:32 +00:00
pvr_spm.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_spm.h pvr: remove stale comment about pvr_pds_upload 2025-09-26 08:15:59 +00:00
pvr_tex_state.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_tex_state.h pvr: avoid including pvr_private.h from headers 2025-10-02 05:34:09 +00:00
pvr_transfer_frag_store.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_transfer_frag_store.h pvr: merge legacy uscgen code into pvr_usc 2025-09-22 14:52:05 +01:00
pvr_usc.c pvr: amend tile buffer size calculation for eot 2025-10-11 20:28:16 +01:00
pvr_usc.h pvr: avoid including pvr_private.h from headers 2025-10-02 05:34:09 +00:00
pvr_wsi.c pvr: kill off pvr_private.h 2025-10-02 05:34:09 +00:00
pvr_wsi.h pvr: break out wsi to separate header 2025-10-02 05:34:09 +00:00