mesa/src/vulkan/runtime
Antonio Ospite b4c7d3a08e build: stop calling unreachable() without arguments
The unreachable(str) macro defined in src/util/macros.h is defined to
accept a literal string as an argument.

However the way it checks that the argument is a string literal, by
prepending an empty string where the argument is used, i.e.:

  #define unreachabel(str) assert(!"" str)

still allows users to call the macro with no arguments.

This is confusing, so pass an empty string to all invocations of
unreachable() for consistency.

This is done with the following command:

  git grep -l '[^_]unreachable();' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable();/\1unreachable("");/g' -i "$file";
  done

This should not change the behaviour of the callers of unreachable() in
a meaningful way, but there will be some cosmetic consequence.

The changed invocations will now print:

  Assertion `!"" ""' failed.

instead of

  Assertion `!""' failed.

But this is also what happens for the invocations that do pass an
argument, for instance `unreachable("Invalid type")` currently prints:

  Assertion `!"" "Invalid type"' failed.

So all invocations now also have the same output style.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
2025-07-31 17:49:40 +00:00
..
bvh vulkan/runtime/bvh: Propagate opaqueness information through the BVH 2025-06-28 10:31:37 +00:00
radix_sort vulkan/radix_sort: Stop force-unrolling loops 2025-02-15 09:55:52 +00:00
rmv vulkan/rmv: Correctly set heap size 2024-11-14 09:11:25 +00:00
meson.build android: moving HMI symbol to separate file 2025-07-31 17:11:51 +00:00
vk_acceleration_structure.c vulkan/runtime/bvh: Propagate opaqueness information through the BVH 2025-06-28 10:31:37 +00:00
vk_acceleration_structure.h vulkan/runtime/bvh: Propagate opaqueness information through the BVH 2025-06-28 10:31:37 +00:00
vk_android.c android: moving HMI symbol to separate file 2025-07-31 17:11:51 +00:00
vk_android.h vulkan/android: make vk_ahb_probe_format private to android runtime 2025-07-17 20:12:23 +00:00
vk_android_hal.c android: moving HMI symbol to separate file 2025-07-31 17:11:51 +00:00
vk_blend.c treewide: Stop putting enum in front of Vulkan enum types 2024-12-02 17:22:49 +00:00
vk_blend.h
vk_buffer.c vulkan: Add device address helpers to vk_buffer 2025-03-06 09:46:00 +00:00
vk_buffer.h vulkan: Relax bda assert for zero-size buffers 2025-03-12 01:09:54 +00:00
vk_buffer_view.c
vk_buffer_view.h
vk_cmd_copy.c
vk_cmd_enqueue.c vulkan/cmd_queue: Do not free if driver_free_cb is provided 2025-07-31 08:13:58 +00:00
vk_command_buffer.c vulkan: don't leak debug utils label name 2025-02-19 11:03:39 +00:00
vk_command_buffer.h vulkan/runtime: introduce vk_meta_object_list 2024-07-25 19:14:31 +00:00
vk_command_pool.c vulkan/runtime: return same cmdbuf level from the command pool freelist 2024-11-08 17:20:43 +00:00
vk_command_pool.h vulkan/runtime: return same cmdbuf level from the command pool freelist 2024-11-08 17:20:43 +00:00
vk_debug_report.c
vk_debug_report.h
vk_debug_utils.c vulkan/runtime: Add object type to DMR API 2025-03-04 15:24:39 +00:00
vk_debug_utils.h vulkan/runtime: Add object type to DMR API 2025-03-04 15:24:39 +00:00
vk_deferred_operation.c
vk_deferred_operation.h
vk_descriptor_set_layout.c vulkan/runtime: store flags on descriptor set layouts 2025-02-27 13:26:58 +02:00
vk_descriptor_set_layout.h vulkan/runtime: track dynamics descriptor in a set layout 2025-05-08 11:22:55 +00:00
vk_descriptor_update_template.c vulkan: reference count vk_descriptor_update_template 2024-06-20 16:43:55 +00:00
vk_descriptor_update_template.h vulkan: reference count vk_descriptor_update_template 2024-06-20 16:43:55 +00:00
vk_descriptors.c
vk_descriptors.h
vk_device.c vulkan: add missing include for FALLTHROUGH 2025-06-02 17:51:56 +00:00
vk_device.h vulkan: fix random tabs to spaces 2025-05-16 03:57:31 +00:00
vk_device_generated_commands.c runtime: sort push constant layouts 2025-02-17 18:39:53 +00:00
vk_device_generated_commands.h vk/runtime: add EXT DGC layout handling 2024-09-27 18:41:41 +00:00
vk_device_memory.c
vk_device_memory.h
vk_drm_syncobj.c vulkan: Use syncobj shim 2025-04-08 15:38:39 +00:00
vk_drm_syncobj.h vulkan: Use syncobj shim 2025-04-08 15:38:39 +00:00
vk_fence.c
vk_fence.h
vk_format_info_gen.py
vk_framebuffer.c
vk_framebuffer.h
vk_graphics_state.c vk/runtime: Handle VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE 2025-07-11 22:05:18 +00:00
vk_graphics_state.h vulkan: rename depth bias graphics states 2024-12-06 13:48:26 -05:00
vk_image.c vulkan: dump headers/registry to 1.4.317 2025-06-06 14:38:17 +00:00
vk_image.h vk/image: Add vk_image_can_be_aliased_to_yuv_plane() helper 2025-02-15 05:39:33 +00:00
vk_instance.c vulkan: Add utilities for triggering renderdoc captures 2025-02-28 12:40:43 +01:00
vk_instance.h vulkan: Add utilities for triggering renderdoc captures 2025-02-28 12:40:43 +01:00
vk_limits.h
vk_log.c vulkan: Add a comment explainint SEVERITY_WARNING_BIT for vk_error*() 2024-10-01 00:48:36 +00:00
vk_log.h vulkan: add vk_debug_ignored_stype helper 2024-05-10 18:49:38 +00:00
vk_meta.c vulkan/meta: Supply image view usage in vk_meta_clear_*_image() 2025-07-23 17:00:02 +00:00
vk_meta.h build: stop calling unreachable() without arguments 2025-07-31 17:49:40 +00:00
vk_meta_blit_resolve.c treewide: use SWAP macro 2025-07-23 19:49:47 +00:00
vk_meta_clear.c vulkan/meta: Supply image view usage in vk_meta_clear_*_image() 2025-07-23 17:00:02 +00:00
vk_meta_copy_fill_update.c nir: introduce ergonomic tex builder 2025-07-21 12:11:41 +00:00
vk_meta_draw_rects.c vulkan/runtime: implementaiton -> implementation 2024-06-26 12:31:00 +00:00
vk_meta_object_list.c vk/meta: Support VkShaderExt objects to allow tracking internal shaders 2024-10-03 09:53:34 +00:00
vk_meta_object_list.h vulkan: fix random tabs to spaces 2025-05-16 03:57:31 +00:00
vk_meta_private.h vk/meta: Make some helpers public 2024-10-03 09:53:34 +00:00
vk_nir.c nir: rename nir_lower_clip_cull_distance_arrays -> nir_lower_clip_cull_distance_array_vars 2025-06-26 18:20:53 +00:00
vk_nir.h vk: Don't include full nir.h in headers. 2025-02-12 22:33:07 +01:00
vk_nir_convert_ycbcr.c vulkan/nir_convert_ycbcr: use more effective nir 2025-07-21 12:11:42 +00:00
vk_nir_convert_ycbcr.h vk: Don't include full nir.h in headers. 2025-02-12 22:33:07 +01:00
vk_object.c vulkan: reduce struct vk_object_base by 8 bytes 2024-04-15 22:12:52 +00:00
vk_object.h anv: Implement VK_EXT_device_memory_report 2025-03-04 15:24:39 +00:00
vk_physical_device.c vulkan: add common GetPhysicalDeviceCalibrateableTimeDomainsKHR 2025-01-07 03:39:28 +00:00
vk_physical_device.h vulkan: Set SPIR-V caps from supported features 2024-05-09 01:14:23 +00:00
vk_pipeline.c vulkan: fix shader linking with common pipelines 2025-07-23 14:15:57 +00:00
vk_pipeline.h vulkan/runtime: add a multialloc variant for pipeline create 2025-05-08 11:22:55 +00:00
vk_pipeline_cache.c vulkan/runtime: allow to use a different disk cache 2025-02-05 16:30:27 +00:00
vk_pipeline_cache.h vulkan/runtime: allow to use a different disk cache 2025-02-05 16:30:27 +00:00
vk_pipeline_layout.c vulkan/runtime: track dynamics descriptor in a set layout 2025-05-08 11:22:55 +00:00
vk_pipeline_layout.h vulkan/runtime: track dynamics descriptor in a set layout 2025-05-08 11:22:55 +00:00
vk_query_pool.c
vk_query_pool.h
vk_queue.c vulkan: Hold a reference to pending vk_sync_timeline_points 2025-07-24 18:49:02 -03:00
vk_queue.h vulkan/queue: Use a builder pattern for vk_queue_submit 2024-10-03 22:11:39 +00:00
vk_render_pass.c vk/pass: Add input attachment location info 2025-04-10 13:17:53 +00:00
vk_render_pass.h vk/pass: Add input attachment location info 2025-04-10 13:17:53 +00:00
vk_sampler.c vulkan/runtime: add vk_sampler_{init,finish}() helpers 2025-07-01 08:54:04 +02:00
vk_sampler.h vulkan/runtime: add vk_sampler_{init,finish}() helpers 2025-07-01 08:54:04 +02:00
vk_semaphore.c
vk_semaphore.h
vk_shader.c vulkan: pass enabled features to drivers 2025-05-27 13:23:12 +00:00
vk_shader.h vulkan: fix shader linking with common pipelines 2025-07-23 14:15:57 +00:00
vk_shader_module.c dzn: Use vk_pipeline_shader_stage_to_nir() 2024-08-29 03:30:31 +00:00
vk_shader_module.h dzn: Use vk_pipeline_shader_stage_to_nir() 2024-08-29 03:30:31 +00:00
vk_standard_sample_locations.c
vk_standard_sample_locations.h
vk_sync.c
vk_sync.h
vk_sync_binary.c vulkan: don't zero-initialize STACK_ARRAY()'s stack array 2024-04-08 17:23:25 +00:00
vk_sync_binary.h
vk_sync_dummy.c
vk_sync_dummy.h
vk_sync_timeline.c vulkan: don't destroy vk_sync_timeline if a point is still pending 2025-07-24 18:49:02 -03:00
vk_sync_timeline.h vulkan: don't destroy vk_sync_timeline if a point is still pending 2025-07-24 18:49:02 -03:00
vk_synchronization.c vk/sync: Pass dependencyFlags in vk_common_CmdPipelineBarrier 2025-07-29 11:11:29 +00:00
vk_synchronization.h vulkan: Add vk_expand_(dst|src)_access_flags2 2024-06-28 10:41:49 +00:00
vk_texcompress_astc.c vulkan: add descriptor buffer support to compute astc decoder 2025-02-17 15:03:43 +01:00
vk_texcompress_astc.h vulkan: add descriptor buffer support to compute astc decoder 2025-02-17 15:03:43 +01:00
vk_texcompress_etc2.c nir: introduce ergonomic tex builder 2025-07-21 12:11:41 +00:00
vk_texcompress_etc2.h
vk_video.c vulkan/video: Fix h265 level values 2025-07-31 10:08:05 +00:00
vk_video.h vulkan/video: add support for AV1 encoding to runtime 2025-06-26 15:41:01 +00:00
vk_ycbcr_conversion.c
vk_ycbcr_conversion.h vulkan: Add a vk_sampler_state struct 2025-06-19 15:45:08 +00:00