1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-04 16:24:29 +01:00

[d3d9] Fix CS thread synchronization for directly mapped buffers

This commit is contained in:
Robin Kertels 2022-03-11 22:24:58 +01:00 committed by Joshie
parent 9eb2393d44
commit a6357a254d

View File

@ -1,6 +1,7 @@
#pragma once
#include "../dxvk/dxvk_device.h"
#include "../dxvk/dxvk_cs.h"
#include "d3d9_device_child.h"
#include "d3d9_format.h"
@ -194,6 +195,10 @@ namespace dxvk {
void PreLoad();
bool HasSequenceNumber() const {
return m_mapMode != D3D9_COMMON_BUFFER_MAP_MODE_DIRECT;
}
/**
* \brief Tracks sequence number
*
@ -213,7 +218,8 @@ namespace dxvk {
* \returns Sequence number for the given subresource
*/
uint64_t GetMappingBufferSequenceNumber() const {
return m_seq;
return HasSequenceNumber() ? m_seq
: DxvkCsThread::SynchronizeAll;
}
private: