Skip to content

Commit 84e4620

Browse files
cjacekjulliard
authored andcommitted
winevulkan: Rename wine_device_memory mapping to vm_map.
To avoid conflict with handle mapping macros.
1 parent 7995f38 commit 84e4620

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dlls/winevulkan/vulkan.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo
17031703
return result;
17041704
}
17051705

1706-
memory->mapping = mapping;
1706+
memory->vm_map = mapping;
17071707
*ret = (VkDeviceMemory)(uintptr_t)memory;
17081708
return VK_SUCCESS;
17091709
}
@@ -1719,10 +1719,10 @@ void wine_vkFreeMemory(VkDevice handle, VkDeviceMemory memory_handle, const VkAl
17191719

17201720
device->funcs.p_vkFreeMemory(device->host_device, memory->host_memory, NULL);
17211721

1722-
if (memory->mapping)
1722+
if (memory->vm_map)
17231723
{
17241724
SIZE_T alloc_size = 0;
1725-
NtFreeVirtualMemory(GetCurrentProcess(), &memory->mapping, &alloc_size, MEM_RELEASE);
1725+
NtFreeVirtualMemory(GetCurrentProcess(), &memory->vm_map, &alloc_size, MEM_RELEASE);
17261726
}
17271727

17281728
free(memory);
@@ -1751,9 +1751,9 @@ VkResult wine_vkMapMemory2KHR(VkDevice handle, const VkMemoryMapInfoKHR *map_inf
17511751
VkResult result;
17521752

17531753
info.memory = memory->host_memory;
1754-
if (memory->mapping)
1754+
if (memory->vm_map)
17551755
{
1756-
*data = (char *)memory->mapping + info.offset;
1756+
*data = (char *)memory->vm_map + info.offset;
17571757
TRACE("returning %p\n", *data);
17581758
return VK_SUCCESS;
17591759
}
@@ -1799,7 +1799,7 @@ VkResult wine_vkUnmapMemory2KHR(VkDevice handle, const VkMemoryUnmapInfoKHR *unm
17991799
struct wine_device_memory *memory = wine_device_memory_from_handle(unmap_info->memory);
18001800
VkMemoryUnmapInfoKHR info;
18011801

1802-
if (memory->mapping)
1802+
if (memory->vm_map)
18031803
return VK_SUCCESS;
18041804

18051805
if (!device->funcs.p_vkUnmapMemory2KHR)

dlls/winevulkan/vulkan_private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static inline struct wine_cmd_pool *wine_cmd_pool_from_handle(VkCommandPool hand
175175
struct wine_device_memory
176176
{
177177
VkDeviceMemory host_memory;
178-
void *mapping;
178+
void *vm_map;
179179
};
180180

181181
static inline struct wine_device_memory *wine_device_memory_from_handle(VkDeviceMemory handle)

0 commit comments

Comments
 (0)