From b0b74243af97bc71a5681c279f738608dc5c6ebe Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 19 Dec 2024 10:25:03 +0200 Subject: [PATCH] clang-fix --- src/core/libraries/kernel/threads/pthread.cpp | 3 ++- .../ir/passes/shared_memory_barrier_pass.cpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/core/libraries/kernel/threads/pthread.cpp b/src/core/libraries/kernel/threads/pthread.cpp index 372f05bf..610e6123 100644 --- a/src/core/libraries/kernel/threads/pthread.cpp +++ b/src/core/libraries/kernel/threads/pthread.cpp @@ -327,7 +327,8 @@ void PS4_SYSV_ABI sched_yield() { std::this_thread::yield(); } -int PS4_SYSV_ABI posix_pthread_once(PthreadOnce* once_control, void PS4_SYSV_ABI (*init_routine)()) { +int PS4_SYSV_ABI posix_pthread_once(PthreadOnce* once_control, + void PS4_SYSV_ABI (*init_routine)()) { for (;;) { auto state = once_control->state.load(); if (state == PthreadOnceState::Done) { diff --git a/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp b/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp index cae001e9..aad8fb14 100644 --- a/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp +++ b/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp @@ -27,13 +27,14 @@ void SharedMemoryBarrierPass(IR::Program& program, const Profile& profile) { continue; } const IR::U1 cond = node.data.if_node.cond; - const auto insert_barrier = IR::BreadthFirstSearch(cond, [](IR::Inst* inst) -> std::optional { - if (inst->GetOpcode() == IR::Opcode::GetAttributeU32 && - inst->Arg(0).Attribute() == IR::Attribute::LocalInvocationId) { - return true; - } - return std::nullopt; - }); + const auto insert_barrier = + IR::BreadthFirstSearch(cond, [](IR::Inst* inst) -> std::optional { + if (inst->GetOpcode() == IR::Opcode::GetAttributeU32 && + inst->Arg(0).Attribute() == IR::Attribute::LocalInvocationId) { + return true; + } + return std::nullopt; + }); if (insert_barrier) { IR::Block* const merge = node.data.if_node.merge; auto insert_point = std::ranges::find_if_not(merge->Instructions(), IR::IsPhi);