From 0e8ccf1e992ccef1095e36ed875f361cc1f4526a Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 9 Oct 2022 13:16:50 +0100 Subject: [PATCH] Use memory_order_release for new descriptor set allocations --- app/src/main/cpp/skyline/gpu/descriptor_allocator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/descriptor_allocator.cpp b/app/src/main/cpp/skyline/gpu/descriptor_allocator.cpp index 4b0d3e32..9eee1cb4 100644 --- a/app/src/main/cpp/skyline/gpu/descriptor_allocator.cpp +++ b/app/src/main/cpp/skyline/gpu/descriptor_allocator.cpp @@ -106,7 +106,7 @@ namespace skyline::gpu { auto set{AllocateVkDescriptorSet(layout)}; if (set.result == vk::Result::eSuccess) { auto &slot{slots.emplace_back(set.value)}; - slot.active.test_and_set(std::memory_order_relaxed); + slot.active.test_and_set(std::memory_order_release); return ActiveDescriptorSet{pool, &slot}; } else { lastResult = set.result; @@ -117,7 +117,7 @@ namespace skyline::gpu { if (set.result == vk::Result::eSuccess) { auto &layoutSlots{pool->layoutSlots.try_emplace(layout).first->second}; auto &slot{layoutSlots.emplace_back(set.value)}; - slot.active.test_and_set(std::memory_order_relaxed); + slot.active.test_and_set(std::memory_order_release); return ActiveDescriptorSet{pool, &slot}; } else { lastResult = set.result; @@ -143,8 +143,8 @@ namespace skyline::gpu { if (set.result == vk::Result::eSuccess) { auto &layoutSlots{pool->layoutSlots.try_emplace(layout).first->second}; auto &slot{layoutSlots.emplace_back(set.value)}; - slot.active.test_and_set(std::memory_order_relaxed); - return ActiveDescriptorSet{pool, &layoutSlots.emplace_back(set.value)}; + slot.active.test_and_set(std::memory_order_release); + return ActiveDescriptorSet{pool, &slot}; } else { lastResult = set.result; }