mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-09 03:20:30 +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)
|
WrappedVkDispRes(VkCommandBuffer obj, ResourceId objId) : table(0), real((void *)obj), id(objId), record(NULL), core(NULL)
|
||||||
{ loaderTable = *(uintptr_t*)obj; }
|
{ 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
|
// preserve dispatch table pointer in dispatchable objects
|
||||||
uintptr_t loaderTable, table;
|
uintptr_t loaderTable, table;
|
||||||
RealVkRes real;
|
RealVkRes real;
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ VkResult WrappedVulkan::vkEnumeratePhysicalDevices(
|
|||||||
// return the wrapped object to the user and do nothing else
|
// return the wrapped object to the user and do nothing else
|
||||||
if(m_PhysicalDevices[i] != VK_NULL_HANDLE)
|
if(m_PhysicalDevices[i] != VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
|
GetWrapped(m_PhysicalDevices[i])->RewrapObject(devices[i]);
|
||||||
devices[i] = m_PhysicalDevices[i];
|
devices[i] = m_PhysicalDevices[i];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user