From 1ae9b74800b2d5c75dbd6de9adb8b0d8f44092d5 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Sat, 22 Mar 2025 23:14:00 +0200 Subject: [PATCH] clang format --- src/shader_recompiler/frontend/control_flow_graph.cpp | 9 ++++++--- .../ir/passes/hull_shader_transform.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shader_recompiler/frontend/control_flow_graph.cpp b/src/shader_recompiler/frontend/control_flow_graph.cpp index cf9de99d4..ca71efe9b 100644 --- a/src/shader_recompiler/frontend/control_flow_graph.cpp +++ b/src/shader_recompiler/frontend/control_flow_graph.cpp @@ -92,7 +92,8 @@ CFG::CFG(Common::ObjectPool& block_pool_, std::span inst_l } else if (block.cond == IR::Condition::False) { ASSERT(local_labels.contains(block.branch_false)); } else { - ASSERT(local_labels.contains(block.branch_true) && local_labels.contains(block.branch_false)); + ASSERT(local_labels.contains(block.branch_true) && + local_labels.contains(block.branch_false)); } } } @@ -165,7 +166,8 @@ void CFG::SplitDivergenceScopes() { curr_begin = -1; continue; } - // If all instructions in the scope ignore exec masking, we shouldn't insert a scope. + // If all instructions in the scope ignore exec masking, we shouldn't insert a + // scope. const auto start = inst_list.begin() + curr_begin + 1; if (!std::ranges::all_of(start, inst_list.begin() + index, IgnoresExecMask)) { // Determine the first instruction affected by the exec mask. @@ -207,7 +209,8 @@ void CFG::SplitDivergenceScopes() { block->branch_true = epi_block; block->branch_false = nullptr; - // If the parent block fails to enter divergence block make it jump to epilogue too + // If the parent block fails to enter divergence block make it jump to + // epilogue too blk->branch_false = epi_block; } else { // No epilogue block is needed since the divergence block diff --git a/src/shader_recompiler/ir/passes/hull_shader_transform.cpp b/src/shader_recompiler/ir/passes/hull_shader_transform.cpp index e7ad9c8f5..5cf8a1525 100644 --- a/src/shader_recompiler/ir/passes/hull_shader_transform.cpp +++ b/src/shader_recompiler/ir/passes/hull_shader_transform.cpp @@ -7,9 +7,9 @@ #include "shader_recompiler/ir/breadth_first_search.h" #include "shader_recompiler/ir/ir_emitter.h" #include "shader_recompiler/ir/opcodes.h" +#include "shader_recompiler/ir/passes/ir_passes.h" #include "shader_recompiler/ir/pattern_matching.h" #include "shader_recompiler/ir/program.h" -#include "shader_recompiler/ir/passes/ir_passes.h" #include "shader_recompiler/runtime_info.h" namespace Shader::Optimization {