Module: Mesa Branch: master Commit: cbe57963dc685d0939a6356820c42b394b39467f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbe57963dc685d0939a6356820c42b394b39467f
Author: Chia-I Wu <olva...@gmail.com> Date: Sat Apr 17 11:01:17 2021 -0700 venus: change SpaceBeforeParens style option This requires clang-format 11 however. Signed-off-by: Chia-I Wu <olva...@gmail.com> Reviewed-by: Yiwei Zhang <zzyi...@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10326> --- src/virtio/vulkan/.clang-format | 1 + src/virtio/vulkan/vn_command_buffer.c | 8 ++++---- src/virtio/vulkan/vn_descriptor_set.c | 8 ++++---- src/virtio/vulkan/vn_device.c | 8 ++++---- src/virtio/vulkan/vn_ring.c | 8 ++++---- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/virtio/vulkan/.clang-format b/src/virtio/vulkan/.clang-format index ecf6925ba98..f33c95de85d 100644 --- a/src/virtio/vulkan/.clang-format +++ b/src/virtio/vulkan/.clang-format @@ -35,3 +35,4 @@ PenaltyBreakBeforeFirstCallParameter: 1 PenaltyExcessCharacter: 100 SpaceAfterCStyleCast: false SpaceBeforeCpp11BracedList: false +SpaceBeforeParens: ControlStatementsExceptForEachMacros diff --git a/src/virtio/vulkan/vn_command_buffer.c b/src/virtio/vulkan/vn_command_buffer.c index dd069bfbf67..63962f64107 100644 --- a/src/virtio/vulkan/vn_command_buffer.c +++ b/src/virtio/vulkan/vn_command_buffer.c @@ -63,8 +63,8 @@ vn_DestroyCommandPool(VkDevice device, vn_async_vkDestroyCommandPool(dev->instance, device, commandPool, NULL); - list_for_each_entry_safe (struct vn_command_buffer, cmd, - &pool->command_buffers, head) { + list_for_each_entry_safe(struct vn_command_buffer, cmd, + &pool->command_buffers, head) { vn_cs_encoder_fini(&cmd->cs); vn_object_base_fini(&cmd->base); vk_free(alloc, cmd); @@ -82,8 +82,8 @@ vn_ResetCommandPool(VkDevice device, struct vn_device *dev = vn_device_from_handle(device); struct vn_command_pool *pool = vn_command_pool_from_handle(commandPool); - list_for_each_entry_safe (struct vn_command_buffer, cmd, - &pool->command_buffers, head) { + list_for_each_entry_safe(struct vn_command_buffer, cmd, + &pool->command_buffers, head) { vn_cs_encoder_reset(&cmd->cs); cmd->state = VN_COMMAND_BUFFER_STATE_INITIAL; } diff --git a/src/virtio/vulkan/vn_descriptor_set.c b/src/virtio/vulkan/vn_descriptor_set.c index 6d0c636ec97..1f6376e8f32 100644 --- a/src/virtio/vulkan/vn_descriptor_set.c +++ b/src/virtio/vulkan/vn_descriptor_set.c @@ -192,8 +192,8 @@ vn_DestroyDescriptorPool(VkDevice device, vn_async_vkDestroyDescriptorPool(dev->instance, device, descriptorPool, NULL); - list_for_each_entry_safe (struct vn_descriptor_set, set, - &pool->descriptor_sets, head) { + list_for_each_entry_safe(struct vn_descriptor_set, set, + &pool->descriptor_sets, head) { list_del(&set->head); vn_object_base_fini(&set->base); @@ -217,8 +217,8 @@ vn_ResetDescriptorPool(VkDevice device, vn_async_vkResetDescriptorPool(dev->instance, device, descriptorPool, flags); - list_for_each_entry_safe (struct vn_descriptor_set, set, - &pool->descriptor_sets, head) { + list_for_each_entry_safe(struct vn_descriptor_set, set, + &pool->descriptor_sets, head) { list_del(&set->head); vn_object_base_fini(&set->base); diff --git a/src/virtio/vulkan/vn_device.c b/src/virtio/vulkan/vn_device.c index a94dcf8cefa..ba57cadad5a 100644 --- a/src/virtio/vulkan/vn_device.c +++ b/src/virtio/vulkan/vn_device.c @@ -1957,7 +1957,7 @@ vn_EnumeratePhysicalDevices(VkInstance _instance, VK_OUTARRAY_MAKE(out, pPhysicalDevices, pPhysicalDeviceCount); for (uint32_t i = 0; i < instance->physical_device_count; i++) { - vk_outarray_append (&out, physical_dev) { + vk_outarray_append(&out, physical_dev) { *physical_dev = vn_physical_device_to_handle(&instance->physical_devices[i]); } @@ -2067,7 +2067,7 @@ vn_GetPhysicalDeviceQueueFamilyProperties( VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount); for (uint32_t i = 0; i < physical_dev->queue_family_count; i++) { - vk_outarray_append (&out, props) { + vk_outarray_append(&out, props) { *props = physical_dev->queue_family_properties[i].queueFamilyProperties; } @@ -2596,7 +2596,7 @@ vn_GetPhysicalDeviceQueueFamilyProperties2( VK_OUTARRAY_MAKE(out, pQueueFamilyProperties, pQueueFamilyPropertyCount); for (uint32_t i = 0; i < physical_dev->queue_family_count; i++) { - vk_outarray_append (&out, props) { + vk_outarray_append(&out, props) { *props = physical_dev->queue_family_properties[i]; } } @@ -2787,7 +2787,7 @@ vn_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount); for (uint32_t i = 0; i < VK_DEVICE_EXTENSION_COUNT; i++) { if (physical_dev->base.base.supported_extensions.extensions[i]) { - vk_outarray_append (&out, prop) { + vk_outarray_append(&out, prop) { *prop = vk_device_extensions[i]; prop->specVersion = physical_dev->extension_spec_versions[i]; } diff --git a/src/virtio/vulkan/vn_ring.c b/src/virtio/vulkan/vn_ring.c index 80588b7c38c..a69f3ef2c1f 100644 --- a/src/virtio/vulkan/vn_ring.c +++ b/src/virtio/vulkan/vn_ring.c @@ -76,8 +76,8 @@ vn_ring_ge_seqno(const struct vn_ring *ring, uint32_t a, uint32_t b) static void vn_ring_retire_submits(struct vn_ring *ring, uint32_t seqno) { - list_for_each_entry_safe (struct vn_ring_submit, submit, &ring->submits, - head) { + list_for_each_entry_safe(struct vn_ring_submit, submit, &ring->submits, + head) { if (!vn_ring_ge_seqno(ring, seqno, submit->seqno)) break; @@ -171,8 +171,8 @@ vn_ring_fini(struct vn_ring *ring) vn_ring_retire_submits(ring, ring->cur); assert(list_is_empty(&ring->submits)); - list_for_each_entry_safe (struct vn_ring_submit, submit, - &ring->free_submits, head) + list_for_each_entry_safe(struct vn_ring_submit, submit, + &ring->free_submits, head) free(submit); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit