mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 09:10:40 +02:00
lavapipe: KHR_map_memory2
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25181>
This commit is contained in:
parent
f423d91790
commit
3802be6bac
1 changed files with 13 additions and 14 deletions
|
|
@ -123,6 +123,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported =
|
|||
.KHR_maintenance3 = true,
|
||||
.KHR_maintenance4 = true,
|
||||
.KHR_maintenance5 = true,
|
||||
.KHR_map_memory2 = true,
|
||||
.KHR_multiview = true,
|
||||
.KHR_push_descriptor = true,
|
||||
.KHR_pipeline_library = true,
|
||||
|
|
@ -1793,16 +1794,13 @@ VKAPI_ATTR void VKAPI_CALL lvp_FreeMemory(
|
|||
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL lvp_MapMemory(
|
||||
VkDevice _device,
|
||||
VkDeviceMemory _memory,
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize size,
|
||||
VkMemoryMapFlags flags,
|
||||
void** ppData)
|
||||
VKAPI_ATTR VkResult VKAPI_CALL lvp_MapMemory2KHR(
|
||||
VkDevice _device,
|
||||
const VkMemoryMapInfoKHR* pMemoryMapInfo,
|
||||
void** ppData)
|
||||
{
|
||||
LVP_FROM_HANDLE(lvp_device, device, _device);
|
||||
LVP_FROM_HANDLE(lvp_device_memory, mem, _memory);
|
||||
LVP_FROM_HANDLE(lvp_device_memory, mem, pMemoryMapInfo->memory);
|
||||
void *map;
|
||||
if (mem == NULL) {
|
||||
*ppData = NULL;
|
||||
|
|
@ -1811,21 +1809,22 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_MapMemory(
|
|||
|
||||
map = device->pscreen->map_memory(device->pscreen, mem->pmem);
|
||||
|
||||
*ppData = (char *)map + offset;
|
||||
*ppData = (char *)map + pMemoryMapInfo->offset;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL lvp_UnmapMemory(
|
||||
VkDevice _device,
|
||||
VkDeviceMemory _memory)
|
||||
VKAPI_ATTR VkResult VKAPI_CALL lvp_UnmapMemory2KHR(
|
||||
VkDevice _device,
|
||||
const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo)
|
||||
{
|
||||
LVP_FROM_HANDLE(lvp_device, device, _device);
|
||||
LVP_FROM_HANDLE(lvp_device_memory, mem, _memory);
|
||||
LVP_FROM_HANDLE(lvp_device_memory, mem, pMemoryUnmapInfo->memory);
|
||||
|
||||
if (mem == NULL)
|
||||
return;
|
||||
return VK_SUCCESS;
|
||||
|
||||
device->pscreen->unmap_memory(device->pscreen, mem->pmem);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL lvp_FlushMappedMemoryRanges(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue