Assign a random pipeline UUID so that applications provide SPIR-V

This commit is contained in:
baldurk
2016-02-07 18:42:36 +01:00
parent 76a50c2469
commit 40bb7ce0d9
@@ -61,7 +61,13 @@ VkResult WrappedVulkan::vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties)
{
return ObjDisp(physicalDevice)->GetPhysicalDeviceProperties(Unwrap(physicalDevice), pProperties);
VkResult ret = ObjDisp(physicalDevice)->GetPhysicalDeviceProperties(Unwrap(physicalDevice), pProperties);
// assign a random UUID, so that we get SPIR-V instead of cached pipeline data.
srand((unsigned int)pProperties);
for(int i=0; i < VK_UUID_LENGTH; i++) pProperties->pipelineCacheUUID[i] = (rand()>>6)&0xff;
return ret;
}
VkResult WrappedVulkan::vkGetPhysicalDeviceQueueCount(