Use std::binary_semaphore

This commit is contained in:
Attila Uygun 2023-11-02 22:02:53 +01:00
parent 8b149bf8f4
commit b86a27531b
2 changed files with 3 additions and 1 deletions

View File

@ -1294,6 +1294,8 @@ bool RendererVulkan::AllocateStagingBuffer(uint32_t amount,
uint32_t segment, uint32_t segment,
uint32_t& alloc_offset, uint32_t& alloc_offset,
uint32_t& alloc_size) { uint32_t& alloc_size) {
DCHECK(std::this_thread::get_id() == setup_thread_.get_id());
alloc_size = amount; alloc_size = amount;
while (true) { while (true) {

View File

@ -202,7 +202,7 @@ class RendererVulkan final : public Renderer {
std::thread setup_thread_; std::thread setup_thread_;
base::TaskRunner task_runner_; base::TaskRunner task_runner_;
std::counting_semaphore<> semaphore_{0}; std::binary_semaphore semaphore_{0};
std::atomic<bool> quit_{false}; std::atomic<bool> quit_{false};
bool InitializeInternal(); bool InitializeInternal();