summaryrefslogtreecommitdiff
path: root/src/video_core/shader/ast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader/ast.cpp')
-rw-r--r--src/video_core/shader/ast.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp
index 3f96d9076..db11144c7 100644
--- a/src/video_core/shader/ast.cpp
+++ b/src/video_core/shader/ast.cpp
@@ -212,16 +212,15 @@ public:
212 } 212 }
213 213
214 void operator()(const ExprPredicate& expr) { 214 void operator()(const ExprPredicate& expr) {
215 inner += "P" + std::to_string(expr.predicate); 215 inner += fmt::format("P{}", expr.predicate);
216 } 216 }
217 217
218 void operator()(const ExprCondCode& expr) { 218 void operator()(const ExprCondCode& expr) {
219 u32 cc = static_cast<u32>(expr.cc); 219 inner += fmt::format("CC{}", expr.cc);
220 inner += "CC" + std::to_string(cc);
221 } 220 }
222 221
223 void operator()(const ExprVar& expr) { 222 void operator()(const ExprVar& expr) {
224 inner += "V" + std::to_string(expr.var_index); 223 inner += fmt::format("V{}", expr.var_index);
225 } 224 }
226 225
227 void operator()(const ExprBoolean& expr) { 226 void operator()(const ExprBoolean& expr) {
@@ -229,7 +228,7 @@ public:
229 } 228 }
230 229
231 void operator()(const ExprGprEqual& expr) { 230 void operator()(const ExprGprEqual& expr) {
232 inner += "( gpr_" + std::to_string(expr.gpr) + " == " + std::to_string(expr.value) + ')'; 231 inner += fmt::format("(gpr_{} == {})", expr.gpr, expr.value);
233 } 232 }
234 233
235 const std::string& GetResult() const { 234 const std::string& GetResult() const {
@@ -374,8 +373,8 @@ std::string ASTManager::Print() const {
374 return printer.GetResult(); 373 return printer.GetResult();
375} 374}
376 375
377ASTManager::ASTManager(bool full_decompile, bool disable_else_derivation) 376ASTManager::ASTManager(bool do_full_decompile, bool disable_else_derivation_)
378 : full_decompile{full_decompile}, disable_else_derivation{disable_else_derivation} {}; 377 : full_decompile{do_full_decompile}, disable_else_derivation{disable_else_derivation_} {}
379 378
380ASTManager::~ASTManager() { 379ASTManager::~ASTManager() {
381 Clear(); 380 Clear();