anv: Drop support for VK_KHX_external_memory_*
These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
@@ -437,10 +437,6 @@ static const VkExtensionProperties global_extensions[] = {
|
||||
.specVersion = 6,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
@@ -476,14 +472,6 @@ static const VkExtensionProperties device_extensions[] = {
|
||||
.extensionName = VK_KHR_SWAPCHAIN_EXTENSION_NAME,
|
||||
.specVersion = 68,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
@@ -905,8 +893,6 @@ void anv_GetPhysicalDeviceProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceProperties2KHR* pProperties)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
|
||||
|
||||
anv_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
|
||||
|
||||
vk_foreach_struct(ext, pProperties->pNext) {
|
||||
@@ -919,16 +905,6 @@ void anv_GetPhysicalDeviceProperties2KHR(
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX: {
|
||||
VkPhysicalDeviceIDPropertiesKHX *id_props =
|
||||
(VkPhysicalDeviceIDPropertiesKHX *)ext;
|
||||
memcpy(id_props->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE);
|
||||
memcpy(id_props->driverUUID, pdevice->driver_uuid, VK_UUID_SIZE);
|
||||
/* The LUID is for Windows. */
|
||||
id_props->deviceLUIDValid = false;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX: {
|
||||
VkPhysicalDeviceMultiviewPropertiesKHX *properties =
|
||||
(VkPhysicalDeviceMultiviewPropertiesKHX *)ext;
|
||||
@@ -1572,31 +1548,11 @@ VkResult anv_AllocateMemory(
|
||||
mem->map = NULL;
|
||||
mem->map_size = 0;
|
||||
|
||||
const VkImportMemoryFdInfoKHX *fd_info =
|
||||
vk_find_struct_const(pAllocateInfo->pNext, IMPORT_MEMORY_FD_INFO_KHX);
|
||||
|
||||
/* The Vulkan spec permits handleType to be 0, in which case the struct is
|
||||
* ignored.
|
||||
*/
|
||||
if (fd_info && fd_info->handleType) {
|
||||
/* At the moment, we only support the OPAQUE_FD memory type which is
|
||||
* just a GEM buffer.
|
||||
*/
|
||||
assert(fd_info->handleType ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX);
|
||||
|
||||
result = anv_bo_cache_import(device, &device->bo_cache,
|
||||
fd_info->fd, pAllocateInfo->allocationSize,
|
||||
&mem->bo);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
} else {
|
||||
result = anv_bo_cache_alloc(device, &device->bo_cache,
|
||||
pAllocateInfo->allocationSize,
|
||||
&mem->bo);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
}
|
||||
result = anv_bo_cache_alloc(device, &device->bo_cache,
|
||||
pAllocateInfo->allocationSize,
|
||||
&mem->bo);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
assert(mem->type->heapIndex < pdevice->memory.heap_count);
|
||||
if (pdevice->memory.heaps[mem->type->heapIndex].supports_48bit_addresses)
|
||||
@@ -1615,36 +1571,6 @@ VkResult anv_AllocateMemory(
|
||||
return result;
|
||||
}
|
||||
|
||||
VkResult anv_GetMemoryFdKHX(
|
||||
VkDevice device_h,
|
||||
VkDeviceMemory memory_h,
|
||||
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
|
||||
int* pFd)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_device, dev, device_h);
|
||||
ANV_FROM_HANDLE(anv_device_memory, mem, memory_h);
|
||||
|
||||
/* We support only one handle type. */
|
||||
assert(handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX);
|
||||
|
||||
return anv_bo_cache_export(dev, &dev->bo_cache, mem->bo, pFd);
|
||||
}
|
||||
|
||||
VkResult anv_GetMemoryFdPropertiesKHX(
|
||||
VkDevice device_h,
|
||||
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
|
||||
int fd,
|
||||
VkMemoryFdPropertiesKHX* pMemoryFdProperties)
|
||||
{
|
||||
/* The valid usage section for this function says:
|
||||
*
|
||||
* "handleType must not be one of the handle types defined as opaque."
|
||||
*
|
||||
* Since we only handle opaque handles for now, there are no FD properties.
|
||||
*/
|
||||
return VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX;
|
||||
}
|
||||
|
||||
void anv_FreeMemory(
|
||||
VkDevice _device,
|
||||
VkDeviceMemory _mem,
|
||||
|
Reference in New Issue
Block a user