VK_EXT_pipeline_library_group_handles on RADV
VK_EXT_image_sliced_view_of_3d on RADV/GFX10+
-VK_KHR_map_memory2 on ANV
+VK_KHR_map_memory2 on ANV and RADV
fullyCoveredFragmentShaderInputVariable on RADV/GFX9+
return result;
void *data;
- result = radv_MapMemory(_device, memory, 0, size, 0, &data);
+ result = vk_common_MapMemory(_device, memory, 0, size, 0, &data);
if (result != VK_SUCCESS)
return result;
memcpy((uint8_t *)data + bvh_offset, &root, sizeof(struct radv_bvh_box32_node));
- radv_UnmapMemory(_device, memory);
+ vk_common_UnmapMemory(_device, memory);
VkAccelerationStructureCreateInfoKHR create_info = {
.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR,
}
VKAPI_ATTR VkResult VKAPI_CALL
-radv_MapMemory(VkDevice _device, VkDeviceMemory _memory, VkDeviceSize offset, VkDeviceSize size,
- VkMemoryMapFlags flags, void **ppData)
+radv_MapMemory2KHR(VkDevice _device, const VkMemoryMapInfoKHR *pMemoryMapInfo, void **ppData)
{
RADV_FROM_HANDLE(radv_device, device, _device);
- RADV_FROM_HANDLE(radv_device_memory, mem, _memory);
+ RADV_FROM_HANDLE(radv_device_memory, mem, pMemoryMapInfo->memory);
if (mem->user_ptr)
*ppData = mem->user_ptr;
if (*ppData) {
vk_rmv_log_cpu_map(&device->vk, mem->bo->va, false);
- *ppData = (uint8_t *)*ppData + offset;
+ *ppData = (uint8_t *)*ppData + pMemoryMapInfo->offset;
return VK_SUCCESS;
}
return vk_error(device, VK_ERROR_MEMORY_MAP_FAILED);
}
-VKAPI_ATTR void VKAPI_CALL
-radv_UnmapMemory(VkDevice _device, VkDeviceMemory _memory)
+VKAPI_ATTR VkResult VKAPI_CALL
+radv_UnmapMemory2KHR(VkDevice _device, const VkMemoryUnmapInfoKHR *pMemoryUnmapInfo)
{
RADV_FROM_HANDLE(radv_device, device, _device);
- RADV_FROM_HANDLE(radv_device_memory, mem, _memory);
+ RADV_FROM_HANDLE(radv_device_memory, mem, pMemoryUnmapInfo->memory);
vk_rmv_log_cpu_map(&device->vk, mem->bo->va, true);
if (mem->user_ptr == NULL)
device->ws->buffer_unmap(mem->bo);
+
+ return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL
.KHR_maintenance2 = true,
.KHR_maintenance3 = true,
.KHR_maintenance4 = true,
+ .KHR_map_memory2 = true,
.KHR_multiview = true,
.KHR_performance_query = radv_perf_query_supported(device),
.KHR_pipeline_executable_properties = true,
goto fail_buffer;
result =
- radv_MapMemory(ctx->device, ctx->memory, 0, VK_WHOLE_SIZE, 0, (void **)&ctx->mapped_data);
+ vk_common_MapMemory(ctx->device, ctx->memory, 0, VK_WHOLE_SIZE, 0, (void **)&ctx->mapped_data);
if (result != VK_SUCCESS)
goto fail_memory;
vk_common_DestroyCommandPool(ctx->device, ctx->pool, NULL);
radv_DestroyBuffer(ctx->device, ctx->buffer, NULL);
- radv_UnmapMemory(ctx->device, ctx->memory);
+ vk_common_UnmapMemory(ctx->device, ctx->memory);
radv_FreeMemory(ctx->device, ctx->memory, NULL);
}
if (data->memory) {
void *mapped_data;
- radv_MapMemory(ctx->device, data->memory, 0, VK_WHOLE_SIZE, 0, &mapped_data);
+ vk_common_MapMemory(ctx->device, data->memory, 0, VK_WHOLE_SIZE, 0, &mapped_data);
return mapped_data;
}
struct radv_rra_accel_struct_data *data = ctx->entries[i]->data;
if (data->memory)
- radv_UnmapMemory(ctx->device, data->memory);
+ vk_common_UnmapMemory(ctx->device, data->memory);
}
VkResult