Store enabled extensions on replay so we can check for them

This commit is contained in:
baldurk
2018-09-05 10:54:50 +01:00
parent 76e2a0f42e
commit 40c3a735a4
2 changed files with 11 additions and 8 deletions
+7
View File
@@ -333,6 +333,13 @@ private:
PFN_vkSetDeviceLoaderData m_SetDeviceLoaderData;
InstanceDeviceInfo m_EnabledExtensions;
const InstanceDeviceInfo &GetExtensions(VkResourceRecord *record)
{
return record ? *record->instDevInfo : m_EnabledExtensions;
}
// the instance corresponding to this WrappedVulkan
VkInstance m_Instance;
// the instance's dbg msg callback handle
@@ -283,14 +283,12 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVer
VkResult ret = GetInstanceDispatchTable(NULL)->CreateInstance(&instinfo, NULL, &m_Instance);
InstanceDeviceInfo extInfo;
#undef CheckExt
#define CheckExt(name, ver) \
if(!strcmp(instinfo.ppEnabledExtensionNames[i], "VK_" #name) || \
(int)renderdocAppInfo.apiVersion >= ver) \
{ \
extInfo.ext_##name = true; \
m_EnabledExtensions.ext_##name = true; \
}
for(uint32_t i = 0; i < instinfo.enabledExtensionCount; i++)
@@ -313,7 +311,7 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVer
AddResource(params.InstanceID, ResourceType::Device, "Instance");
GetReplay()->GetResourceDesc(params.InstanceID).initialisationChunks.clear();
InitInstanceExtensionTables(m_Instance, &extInfo);
InitInstanceExtensionTables(m_Instance, &m_EnabledExtensions);
m_DbgMsgCallback = VK_NULL_HANDLE;
m_PhysicalDevice = VK_NULL_HANDLE;
@@ -1577,14 +1575,12 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
AddResource(Device, ResourceType::Device, "Device");
DerivedResource(origPhysDevice, Device);
InstanceDeviceInfo extInfo;
#undef CheckExt
#define CheckExt(name, ver) \
if(!strcmp(createInfo.ppEnabledExtensionNames[i], "VK_" #name) || \
(int)renderdocAppInfo.apiVersion >= ver) \
{ \
extInfo.ext_##name = true; \
m_EnabledExtensions.ext_##name = true; \
}
for(uint32_t i = 0; i < createInfo.enabledExtensionCount; i++)
@@ -1592,7 +1588,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
CheckDeviceExts();
}
InitDeviceExtensionTables(device, &extInfo);
InitDeviceExtensionTables(device, &m_EnabledExtensions);
RDCASSERT(m_Device == VK_NULL_HANDLE); // MULTIDEVICE