radv: generate the same driver UUID as radeonsi

These need to match for interop compatibility queries.

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Andres Rodriguez 2017-07-12 18:45:31 -04:00 committed by Timothy Arceri
parent f8ea71f047
commit 14cad8786a
2 changed files with 9 additions and 1 deletions

View file

@ -62,6 +62,12 @@ radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
return 0; return 0;
} }
static void
radv_get_driver_uuid(void *uuid)
{
ac_compute_driver_uuid(uuid, VK_UUID_SIZE);
}
static void static void
radv_get_device_uuid(struct radeon_info *info, void *uuid) radv_get_device_uuid(struct radeon_info *info, void *uuid)
{ {
@ -335,6 +341,7 @@ radv_physical_device_init(struct radv_physical_device *device,
fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n"); fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
device->name = get_chip_name(device->rad_info.family); device->name = get_chip_name(device->rad_info.family);
radv_get_driver_uuid(&device->device_uuid);
radv_get_device_uuid(&device->rad_info, &device->device_uuid); radv_get_device_uuid(&device->rad_info, &device->device_uuid);
if (device->rad_info.family == CHIP_STONEY || if (device->rad_info.family == CHIP_STONEY ||
@ -792,7 +799,7 @@ void radv_GetPhysicalDeviceProperties2KHR(
} }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR: { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR: {
VkPhysicalDeviceIDPropertiesKHR *properties = (VkPhysicalDeviceIDPropertiesKHR*)ext; VkPhysicalDeviceIDPropertiesKHR *properties = (VkPhysicalDeviceIDPropertiesKHR*)ext;
radv_device_get_cache_uuid(0, properties->driverUUID); memcpy(properties->driverUUID, pdevice->driver_uuid, VK_UUID_SIZE);
memcpy(properties->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE); memcpy(properties->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE);
properties->deviceLUIDValid = false; properties->deviceLUIDValid = false;
break; break;

View file

@ -267,6 +267,7 @@ struct radv_physical_device {
struct radeon_info rad_info; struct radeon_info rad_info;
char path[20]; char path[20];
const char * name; const char * name;
uint8_t driver_uuid[VK_UUID_SIZE];
uint8_t device_uuid[VK_UUID_SIZE]; uint8_t device_uuid[VK_UUID_SIZE];
uint8_t cache_uuid[VK_UUID_SIZE]; uint8_t cache_uuid[VK_UUID_SIZE];