Module: wine Branch: master Commit: 84e462070658464576e73c8a836ccab8fb296734 URL: https://gitlab.winehq.org/wine/wine/-/commit/84e462070658464576e73c8a836ccab...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Feb 21 14:28:49 2024 +0100
winevulkan: Rename wine_device_memory mapping to vm_map.
To avoid conflict with handle mapping macros.
---
dlls/winevulkan/vulkan.c | 12 ++++++------ dlls/winevulkan/vulkan_private.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 01d2a0c20a0..9d7498d8803 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1703,7 +1703,7 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo return result; }
- memory->mapping = mapping; + memory->vm_map = mapping; *ret = (VkDeviceMemory)(uintptr_t)memory; return VK_SUCCESS; } @@ -1719,10 +1719,10 @@ void wine_vkFreeMemory(VkDevice handle, VkDeviceMemory memory_handle, const VkAl
device->funcs.p_vkFreeMemory(device->host_device, memory->host_memory, NULL);
- if (memory->mapping) + if (memory->vm_map) { SIZE_T alloc_size = 0; - NtFreeVirtualMemory(GetCurrentProcess(), &memory->mapping, &alloc_size, MEM_RELEASE); + NtFreeVirtualMemory(GetCurrentProcess(), &memory->vm_map, &alloc_size, MEM_RELEASE); }
free(memory); @@ -1751,9 +1751,9 @@ VkResult wine_vkMapMemory2KHR(VkDevice handle, const VkMemoryMapInfoKHR *map_inf VkResult result;
info.memory = memory->host_memory; - if (memory->mapping) + if (memory->vm_map) { - *data = (char *)memory->mapping + info.offset; + *data = (char *)memory->vm_map + info.offset; TRACE("returning %p\n", *data); return VK_SUCCESS; } @@ -1799,7 +1799,7 @@ VkResult wine_vkUnmapMemory2KHR(VkDevice handle, const VkMemoryUnmapInfoKHR *unm struct wine_device_memory *memory = wine_device_memory_from_handle(unmap_info->memory); VkMemoryUnmapInfoKHR info;
- if (memory->mapping) + if (memory->vm_map) return VK_SUCCESS;
if (!device->funcs.p_vkUnmapMemory2KHR) diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 4e4d665299f..8ef065ac514 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -175,7 +175,7 @@ static inline struct wine_cmd_pool *wine_cmd_pool_from_handle(VkCommandPool hand struct wine_device_memory { VkDeviceMemory host_memory; - void *mapping; + void *vm_map; };
static inline struct wine_device_memory *wine_device_memory_from_handle(VkDeviceMemory handle)