Vulkan: Fixes for object refcounting

This commit is contained in:
Exzap 2026-02-23 03:21:24 +01:00
parent 4ca4d1caed
commit ceb9771a5c
2 changed files with 2 additions and 12 deletions

View File

@ -45,7 +45,7 @@ public:
VKRMoveableRefCounter(VKRMoveableRefCounter&& rhs) noexcept
{
this->refs = std::move(rhs.refs);
this->m_refCount = rhs.m_refCount;
this->m_refCount.store(rhs.m_refCount);
rhs.m_refCount = 0;
this->selfRef = rhs.selfRef;
rhs.selfRef = nullptr;
@ -88,21 +88,13 @@ protected:
// does nothing by default
}
int m_refCount{};
std::atomic_int_least32_t m_refCount{};
private:
VKRMoveableRefCounterRef* selfRef;
std::vector<VKRMoveableRefCounterRef*> refs;
#ifdef CEMU_DEBUG_ASSERT
std::vector<VKRMoveableRefCounterRef*> reverseRefs;
#endif
void moveObj(VKRMoveableRefCounter&& rhs)
{
this->refs = std::move(rhs.refs);
this->m_refCount = rhs.m_refCount;
this->selfRef = rhs.selfRef;
this->selfRef->ref = this;
}
};
class VKRDestructibleObject : public VKRMoveableRefCounter

View File

@ -1177,8 +1177,6 @@ void PipelineCompiler::CompileThreadPool_Stop()
while (!s_pipelineCompileRequests.empty())
{
PipelineCompiler* pipelineCompiler = s_pipelineCompileRequests.pop();
if (!pipelineCompiler)
break;
if (pipelineCompiler)
delete pipelineCompiler;
}