Mutex up SL's report resource

This commit is contained in:
FakeMichau
2025-08-22 14:54:48 +02:00
parent 70cd518423
commit 1ea747ec9f
2 changed files with 3 additions and 0 deletions
@@ -148,6 +148,8 @@ bool Sl_Inputs_Dx12::evaluateState(ID3D12Device* device)
bool Sl_Inputs_Dx12::reportResource(const sl::ResourceTag& tag, ID3D12GraphicsCommandList* cmdBuffer, uint32_t frameId)
{
std::scoped_lock lock(reportResourceMutex);
if (!cmdBuffer)
LOG_TRACE("cmdBuffer is null");
@@ -22,6 +22,7 @@ class Sl_Inputs_Dx12
bool distortionFieldRequired = false;
bool dispatched = false;
std::mutex reportResourceMutex {};
uint32_t lastConstantsFrameId = UINT32_MAX;
uint32_t lastPresentFrameId = 0;