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:
parent
520d62903a
commit
c9750f6657
@ -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);
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
sync::Spinlock m_mutex;
|
||||
dxvk::mutex m_mutex;
|
||||
std::vector<DxvkCsChunk*> m_chunks;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user