From e2d0be7d0840548bfb9a3d10f159960a0392815a Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:12:00 -0600 Subject: [PATCH] nvk: Rework whitespace in nvk_device_memory.c Trying to keep things consistent... Part-of: --- src/nouveau/vulkan/nvk_device_memory.c | 58 ++++++++++++++++------------------ 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/nouveau/vulkan/nvk_device_memory.c b/src/nouveau/vulkan/nvk_device_memory.c index ad7b830..3598398 100644 --- a/src/nouveau/vulkan/nvk_device_memory.c +++ b/src/nouveau/vulkan/nvk_device_memory.c @@ -77,7 +77,8 @@ nvk_allocate_memory(struct nvk_device *device, VkMemoryType *type = &device->pdev->mem_types[pAllocateInfo->memoryTypeIndex]; struct nvk_device_memory *mem; - mem = vk_object_alloc(&device->vk, pAllocator, sizeof(*mem), VK_OBJECT_TYPE_DEVICE_MEMORY); + mem = vk_object_alloc(&device->vk, pAllocator, sizeof(*mem), + VK_OBJECT_TYPE_DEVICE_MEMORY); if (!mem) return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); @@ -157,11 +158,10 @@ nvk_free_memory(struct nvk_device *device, } VKAPI_ATTR VkResult VKAPI_CALL -nvk_AllocateMemory( - VkDevice _device, - const VkMemoryAllocateInfo *pAllocateInfo, - const VkAllocationCallbacks *pAllocator, - VkDeviceMemory *pMem) +nvk_AllocateMemory(VkDevice _device, + const VkMemoryAllocateInfo *pAllocateInfo, + const VkAllocationCallbacks *pAllocator, + VkDeviceMemory *pMem) { VK_FROM_HANDLE(nvk_device, device, _device); struct nvk_device_memory *mem; @@ -191,13 +191,12 @@ nvk_FreeMemory(VkDevice _device, } VKAPI_ATTR VkResult VKAPI_CALL -nvk_MapMemory( - VkDevice _device, - VkDeviceMemory _memory, - VkDeviceSize offset, - VkDeviceSize size, - VkMemoryMapFlags flags, - void **ppData) +nvk_MapMemory(VkDevice _device, + VkDeviceMemory _memory, + VkDeviceSize offset, + VkDeviceSize size, + VkMemoryMapFlags flags, + void **ppData) { VK_FROM_HANDLE(nvk_device, device, _device); VK_FROM_HANDLE(nvk_device_memory, mem, _memory); @@ -231,12 +230,14 @@ nvk_MapMemory( * "memory must not be currently host mapped" */ if (mem->map != NULL) { - return vk_errorf(device, VK_ERROR_MEMORY_MAP_FAILED, "Memory object already mapped."); + return vk_errorf(device, VK_ERROR_MEMORY_MAP_FAILED, + "Memory object already mapped."); } mem->map = nouveau_ws_bo_map(mem->bo, NOUVEAU_WS_BO_RDWR); if (mem->map == NULL) { - return vk_errorf(device, VK_ERROR_MEMORY_MAP_FAILED, "Memory object couldn't be mapped."); + return vk_errorf(device, VK_ERROR_MEMORY_MAP_FAILED, + "Memory object couldn't be mapped."); } *ppData = mem->map + offset; @@ -245,9 +246,8 @@ nvk_MapMemory( } VKAPI_ATTR void VKAPI_CALL -nvk_UnmapMemory( - VkDevice _device, - VkDeviceMemory _memory) +nvk_UnmapMemory(VkDevice _device, + VkDeviceMemory _memory) { VK_FROM_HANDLE(nvk_device_memory, mem, _memory); @@ -259,27 +259,25 @@ nvk_UnmapMemory( } VKAPI_ATTR VkResult VKAPI_CALL -nvk_FlushMappedMemoryRanges( - VkDevice _device, - uint32_t memoryRangeCount, - const VkMappedMemoryRange *pMemoryRanges) +nvk_FlushMappedMemoryRanges(VkDevice _device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange *pMemoryRanges) { return VK_SUCCESS; } VKAPI_ATTR VkResult VKAPI_CALL -nvk_InvalidateMappedMemoryRanges( - VkDevice _device, - uint32_t memoryRangeCount, - const VkMappedMemoryRange *pMemoryRanges) +nvk_InvalidateMappedMemoryRanges(VkDevice _device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange *pMemoryRanges) { return VK_SUCCESS; } -VKAPI_ATTR void VKAPI_CALL nvk_GetDeviceMemoryCommitment( - VkDevice device, - VkDeviceMemory _mem, - VkDeviceSize* pCommittedMemoryInBytes) +VKAPI_ATTR void VKAPI_CALL +nvk_GetDeviceMemoryCommitment(VkDevice device, + VkDeviceMemory _mem, + VkDeviceSize* pCommittedMemoryInBytes) { VK_FROM_HANDLE(nvk_device_memory, mem, _mem); -- 2.7.4