mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Rewrap enumerated physical devices every time. Refs #234
This commit is contained in:
@@ -162,6 +162,10 @@ struct WrappedVkDispRes : public WrappedVkRes
|
||||
WrappedVkDispRes(VkCommandBuffer obj, ResourceId objId) : table(0), real((void *)obj), id(objId), record(NULL), core(NULL)
|
||||
{ loaderTable = *(uintptr_t*)obj; }
|
||||
|
||||
template<typename realtype>
|
||||
void RewrapObject(realtype obj)
|
||||
{ real = (void *)obj; loaderTable = *(uintptr_t*)obj; }
|
||||
|
||||
// preserve dispatch table pointer in dispatchable objects
|
||||
uintptr_t loaderTable, table;
|
||||
RealVkRes real;
|
||||
|
||||
@@ -376,6 +376,7 @@ VkResult WrappedVulkan::vkEnumeratePhysicalDevices(
|
||||
// return the wrapped object to the user and do nothing else
|
||||
if(m_PhysicalDevices[i] != VK_NULL_HANDLE)
|
||||
{
|
||||
GetWrapped(m_PhysicalDevices[i])->RewrapObject(devices[i]);
|
||||
devices[i] = m_PhysicalDevices[i];
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user