Fixing synchronization problem between descriptor sets and command buffers

This commit is contained in:
Dynamitos committed 2020-11-03 01:18:30 +01:00
1 parent 799ba20d49
commit 65caae9e21
24 files changed
+203 -58

No files matched your search

@@ -93,6 +93,14 @@ public:
virtual void updateSampler(uint32_t binding, Gfx::PSamplerState samplerState);
virtual void updateTexture(uint32_t binding, Gfx::PTexture texture, Gfx::PSamplerState sampler = nullptr);
virtual bool operator<(Gfx::PDescriptorSet other);
void setCurrentlyBound(PCmdBuffer boundBy)
{
currentlyBound = boundBy;
}
void releaseFromCmd()
{
currentlyBound = nullptr;
}
inline VkDescriptorSet getHandle() const
{
return setHandle[Gfx::currentFrameIndex];
@@ -112,6 +120,7 @@ private:
Array<void*> cachedData[Gfx::numFramesBuffered];
VkDescriptorSet setHandle[Gfx::numFramesBuffered];
PDescriptorAllocator owner;
PCmdBuffer currentlyBound;
PGraphics graphics;
friend class DescriptorAllocator;
};