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

[dxvk] Don't use spinlocks for CS chunk pool

No reason to anymore since SRWLocks are fast enough here.
This commit is contained in:
Philip Rebohle 2022-02-19 16:57:09 +01:00
parent 520d62903a
commit c9750f6657
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ namespace dxvk {
DxvkCsChunk* DxvkCsChunkPool::allocChunk(DxvkCsChunkFlags flags) {
DxvkCsChunk* chunk = nullptr;
{ std::lock_guard<sync::Spinlock> lock(m_mutex);
{ std::lock_guard<dxvk::mutex> lock(m_mutex);
if (m_chunks.size() != 0) {
chunk = m_chunks.back();
@ -90,7 +90,7 @@ namespace dxvk {
void DxvkCsChunkPool::freeChunk(DxvkCsChunk* chunk) {
chunk->reset();
std::lock_guard<sync::Spinlock> lock(m_mutex);
std::lock_guard<dxvk::mutex> lock(m_mutex);
m_chunks.push_back(chunk);
}

View File

@ -286,7 +286,7 @@ namespace dxvk {
private:
sync::Spinlock m_mutex;
dxvk::mutex m_mutex;
std::vector<DxvkCsChunk*> m_chunks;
};