radv: Drop support for VK_KHX_external_semaphore_*
These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Acked-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -98,10 +98,6 @@ static const VkExtensionProperties instance_extensions[] = {
|
||||
.extensionName = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static const VkExtensionProperties common_device_extensions[] = {
|
||||
@@ -141,14 +137,6 @@ static const VkExtensionProperties common_device_extensions[] = {
|
||||
.extensionName = VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
{
|
||||
.extensionName = VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
|
||||
.specVersion = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static VkResult
|
||||
@@ -735,7 +723,6 @@ void radv_GetPhysicalDeviceProperties2KHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceProperties2KHR *pProperties)
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_physical_device, pdevice, physicalDevice);
|
||||
radv_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
|
||||
|
||||
vk_foreach_struct(ext, pProperties->pNext) {
|
||||
@@ -746,13 +733,6 @@ void radv_GetPhysicalDeviceProperties2KHR(
|
||||
properties->maxPushDescriptors = MAX_PUSH_DESCRIPTORS;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX: {
|
||||
VkPhysicalDeviceIDPropertiesKHX *properties = (VkPhysicalDeviceIDPropertiesKHX*)ext;
|
||||
radv_device_get_cache_uuid(0, properties->driverUUID);
|
||||
memcpy(properties->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE);
|
||||
properties->deviceLUIDValid = false;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2088,9 +2068,6 @@ VkResult radv_AllocateMemory(
|
||||
*pMem = VK_NULL_HANDLE;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
const VkImportMemoryFdInfoKHX *import_info =
|
||||
vk_find_struct_const(pAllocateInfo->pNext, IMPORT_MEMORY_FD_INFO_KHX);
|
||||
const VkDedicatedAllocationMemoryAllocateInfoNV *dedicate_info =
|
||||
vk_find_struct_const(pAllocateInfo->pNext, DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV);
|
||||
|
||||
@@ -2107,18 +2084,6 @@ VkResult radv_AllocateMemory(
|
||||
mem->buffer = NULL;
|
||||
}
|
||||
|
||||
if (import_info) {
|
||||
assert(import_info->handleType ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX);
|
||||
mem->bo = device->ws->buffer_from_fd(device->ws, import_info->fd,
|
||||
NULL, NULL);
|
||||
if (!mem->bo) {
|
||||
result = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX;
|
||||
goto fail;
|
||||
} else
|
||||
goto out_success;
|
||||
}
|
||||
|
||||
uint64_t alloc_size = align_u64(pAllocateInfo->allocationSize, 4096);
|
||||
if (pAllocateInfo->memoryTypeIndex == RADV_MEM_TYPE_GTT_WRITE_COMBINE ||
|
||||
pAllocateInfo->memoryTypeIndex == RADV_MEM_TYPE_GTT_CACHED)
|
||||
@@ -2142,7 +2107,7 @@ VkResult radv_AllocateMemory(
|
||||
goto fail;
|
||||
}
|
||||
mem->type_index = pAllocateInfo->memoryTypeIndex;
|
||||
out_success:
|
||||
|
||||
*pMem = radv_device_memory_to_handle(mem);
|
||||
|
||||
return VK_SUCCESS;
|
||||
@@ -3290,34 +3255,3 @@ vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *pSupportedVersion)
|
||||
*pSupportedVersion = MIN2(*pSupportedVersion, 3u);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult radv_GetMemoryFdKHX(VkDevice _device,
|
||||
VkDeviceMemory _memory,
|
||||
VkExternalMemoryHandleTypeFlagsKHX handleType,
|
||||
int *pFD)
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_device, device, _device);
|
||||
RADV_FROM_HANDLE(radv_device_memory, memory, _memory);
|
||||
|
||||
/* We support only one handle type. */
|
||||
assert(handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX);
|
||||
|
||||
bool ret = radv_get_memory_fd(device, memory, pFD);
|
||||
if (ret == false)
|
||||
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult radv_GetMemoryFdPropertiesKHX(VkDevice _device,
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user