mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Work around broken instance being passed to GetInstanceProcAddr
This commit is contained in:
@@ -258,8 +258,8 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties(
|
||||
}
|
||||
|
||||
#undef CheckExt
|
||||
#define CheckExt(name, ver) \
|
||||
bool name = instDevInfo->ext_##name; \
|
||||
#define CheckExt(name, ver) \
|
||||
bool name = instDevInfo == NULL || instDevInfo->ext_##name; \
|
||||
(void)name;
|
||||
|
||||
#undef HookInit
|
||||
@@ -363,7 +363,15 @@ VK_LAYER_RENDERDOC_CaptureGetInstanceProcAddr(VkInstance instance, const char *p
|
||||
if(instance == VK_NULL_HANDLE)
|
||||
return NULL;
|
||||
|
||||
InstanceDeviceInfo *instDevInfo = GetRecord(instance)->instDevInfo;
|
||||
InstanceDeviceInfo *instDevInfo = NULL;
|
||||
|
||||
if(WrappedVkInstance::IsAlloc(instance))
|
||||
instDevInfo = GetRecord(instance)->instDevInfo;
|
||||
else
|
||||
RDCERR(
|
||||
"GetInstanceProcAddr passed invalid instance for %s! Possibly broken loader. "
|
||||
"Working around by assuming all extensions are enabled - WILL CAUSE SPEC-BROKEN BEHAVIOUR",
|
||||
pName);
|
||||
|
||||
CheckInstanceExts();
|
||||
CheckDeviceExts();
|
||||
|
||||
Reference in New Issue
Block a user