Handle stale & unreferenced resource handles in descriptor sets

* It's possible to replay with descriptor set slots (and updates)
  referring to resources that don't exist at replay time, if those sets
  are never actually used in a queue that's submitted and the resource
  isn't referenced otherwise. For this reason we need to be able to
  skip initial contents or descriptor updates that refer to these
  unused resources.
This commit is contained in:
baldurk
2016-02-07 18:41:19 +01:00
parent 12fc8e9935
commit 26d99bf7bb
7 changed files with 149 additions and 21 deletions
+3 -2
View File
@@ -41,7 +41,7 @@ template<class T> class GetTypeName { public: static const char *Name(); };
template<class C> class FriendMaker { public: typedef C Type; };
// allocate each class in its own pool so we can identify the type by the pointer
template<typename WrapType, int PoolCount = 8192, int MaxPoolByteSize = 1024*1024>
template<typename WrapType, int PoolCount = 8192, int MaxPoolByteSize = 1024*1024, bool DebugClear = true>
class WrappingPool
{
public:
@@ -215,7 +215,8 @@ class WrappingPool
allocated[idx] = false;
#if !defined(RELEASE)
memset(p, 0xfe, AllocByteSize);
if(DebugClear)
memset(p, 0xfe, AllocByteSize);
#endif
}