mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Get rid of spinlock when allocating GPU events
This is not performance-critical
This commit is contained in:
parent
0ade12dc83
commit
80f744549f
@ -49,7 +49,7 @@ namespace dxvk {
|
||||
DxvkGpuEventHandle DxvkGpuEventPool::allocEvent() {
|
||||
VkEvent event = VK_NULL_HANDLE;
|
||||
|
||||
{ std::lock_guard<sync::Spinlock> lock(m_mutex);
|
||||
{ std::lock_guard<dxvk::mutex> lock(m_mutex);
|
||||
|
||||
if (m_events.size() > 0) {
|
||||
event = m_events.back();
|
||||
@ -77,7 +77,7 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxvkGpuEventPool::freeEvent(VkEvent event) {
|
||||
std::lock_guard<sync::Spinlock> lock(m_mutex);
|
||||
std::lock_guard<dxvk::mutex> lock(m_mutex);
|
||||
m_events.push_back(event);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ namespace dxvk {
|
||||
private:
|
||||
|
||||
Rc<vk::DeviceFn> m_vkd;
|
||||
sync::Spinlock m_mutex;
|
||||
dxvk::mutex m_mutex;
|
||||
std::vector<VkEvent> m_events;
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user