Don't add wrappers while capturing - allows duplicate handles in capture

* If we don't add objects into the real->wrapper map, then duplicate
  objects returned from the driver are fine. We will naturally create a
  unique handle for each and we don't have to worry about clashes, as
  the application will see each unique handle and free them separately
  since it's not allowed to *rely* on duplicate handles. Then when they
  destroy the unique handles, we'll end up destroying the duplicates
  multiple times.
This commit is contained in:
baldurk
2015-12-17 12:57:37 +01:00
parent 506c38bcbb
commit 0156f641dd
+2 -1
View File
@@ -140,7 +140,8 @@ class VulkanResourceManager : public ResourceManager<WrappedVkRes*, TypedRealHan
AddCurrentResource(id, wrapped);
AddWrapper(wrapped, ToTypedHandle(obj));
if(m_State < WRITING)
AddWrapper(wrapped, ToTypedHandle(obj));
obj = realtype((uint64_t)wrapped);