dzn: Don't hash adapter LUID as part of device UUID

Per the Vulkan spec, the device UUID should be identical between reboots.
It should also uniquely identify different instances of the same device,
e.g. 2 identical GPUs connected to different PCI ports, but D3D doesn't
currently expose a way to do both of these things. Prefer persistence
over uniqueness here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
This commit is contained in:
Jesse Natalie 2022-07-05 13:43:17 -07:00 committed by Marge Bot
parent 236282559e
commit 9a2ab661b7
1 changed files with 0 additions and 1 deletions

View File

@ -287,7 +287,6 @@ dzn_physical_device_init_uuids(struct dzn_physical_device *pdev)
_mesa_sha1_update(&sha1_ctx, &pdev->adapter_desc.DeviceId, sizeof(pdev->adapter_desc.DeviceId));
_mesa_sha1_update(&sha1_ctx, &pdev->adapter_desc.SubSysId, sizeof(pdev->adapter_desc.SubSysId));
_mesa_sha1_update(&sha1_ctx, &pdev->adapter_desc.Revision, sizeof(pdev->adapter_desc.Revision));
_mesa_sha1_update(&sha1_ctx, &pdev->adapter_desc.AdapterLuid, sizeof(pdev->adapter_desc.AdapterLuid));
_mesa_sha1_final(&sha1_ctx, sha1);
memcpy(pdev->device_uuid, sha1, VK_UUID_SIZE);
}