summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp46
1 files changed, 22 insertions, 24 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 8912d4c5e..bc5b92dfb 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -167,7 +167,7 @@ private:
167 return "input_attribute_" + std::to_string(index); 167 return "input_attribute_" + std::to_string(index);
168 } 168 }
169 169
170 LOG_CRITICAL(HW_GPU, "Unhandled input attribute: 0x%02x", index); 170 NGLOG_CRITICAL(HW_GPU, "Unhandled input attribute: {}", index);
171 UNREACHABLE(); 171 UNREACHABLE();
172 } 172 }
173 } 173 }
@@ -185,7 +185,7 @@ private:
185 return "output_attribute_" + std::to_string(index); 185 return "output_attribute_" + std::to_string(index);
186 } 186 }
187 187
188 LOG_CRITICAL(HW_GPU, "Unhandled output attribute: 0x%02x", index); 188 NGLOG_CRITICAL(HW_GPU, "Unhandled output attribute: {}", index);
189 UNREACHABLE(); 189 UNREACHABLE();
190 } 190 }
191 } 191 }
@@ -325,17 +325,17 @@ private:
325 SetDest(0, dest, "min(" + op_a + "," + op_b + ")", 1, 1, instr.alu.abs_d); 325 SetDest(0, dest, "min(" + op_a + "," + op_b + ")", 1, 1, instr.alu.abs_d);
326 break; 326 break;
327 default: 327 default:
328 LOG_ERROR(HW_GPU, "Unhandled sub op: 0x%02x", (int)instr.sub_op.Value()); 328 NGLOG_CRITICAL(HW_GPU, "Unhandled MUFU sub op: {}",
329 throw DecompileFail("Unhandled sub op"); 329 static_cast<unsigned>(instr.sub_op.Value()));
330 UNREACHABLE();
330 } 331 }
331 break; 332 break;
332 } 333 }
333 default: { 334 default: {
334 LOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: 0x%02x (%s): 0x%08x", 335 NGLOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: {} ({}): {}",
335 static_cast<unsigned>(instr.opcode.EffectiveOpCode()), 336 static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
336 OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex); 337 OpCode::GetInfo(instr.opcode).name, instr.hex);
337 throw DecompileFail("Unhandled instruction"); 338 UNREACHABLE();
338 break;
339 } 339 }
340 } 340 }
341 break; 341 break;
@@ -368,11 +368,10 @@ private:
368 break; 368 break;
369 } 369 }
370 default: { 370 default: {
371 LOG_CRITICAL(HW_GPU, "Unhandled arithmetic FFMA instruction: 0x%02x (%s): 0x%08x", 371 NGLOG_CRITICAL(HW_GPU, "Unhandled FFMA instruction: {} ({}): {}",
372 static_cast<unsigned>(instr.opcode.EffectiveOpCode()), 372 static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
373 OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex); 373 OpCode::GetInfo(instr.opcode).name, instr.hex);
374 throw DecompileFail("Unhandled instruction"); 374 UNREACHABLE();
375 break;
376 } 375 }
377 } 376 }
378 377
@@ -407,11 +406,10 @@ private:
407 break; 406 break;
408 } 407 }
409 default: { 408 default: {
410 LOG_CRITICAL(HW_GPU, "Unhandled memory instruction: 0x%02x (%s): 0x%08x", 409 NGLOG_CRITICAL(HW_GPU, "Unhandled memory instruction: {} ({}): {}",
411 static_cast<unsigned>(instr.opcode.EffectiveOpCode()), 410 static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
412 OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex); 411 OpCode::GetInfo(instr.opcode).name, instr.hex);
413 throw DecompileFail("Unhandled instruction"); 412 UNREACHABLE();
414 break;
415 } 413 }
416 } 414 }
417 break; 415 break;
@@ -431,10 +429,10 @@ private:
431 break; 429 break;
432 } 430 }
433 default: { 431 default: {
434 LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", 432 NGLOG_CRITICAL(HW_GPU, "Unhandled instruction: {} ({}): {}",
435 static_cast<unsigned>(instr.opcode.EffectiveOpCode()), 433 static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
436 OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex); 434 OpCode::GetInfo(instr.opcode).name, instr.hex);
437 break; 435 UNREACHABLE();
438 } 436 }
439 } 437 }
440 438
@@ -600,7 +598,7 @@ boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code,
600 GLSLGenerator generator(subroutines, program_code, main_offset, stage); 598 GLSLGenerator generator(subroutines, program_code, main_offset, stage);
601 return ProgramResult{generator.GetShaderCode(), generator.GetEntries()}; 599 return ProgramResult{generator.GetShaderCode(), generator.GetEntries()};
602 } catch (const DecompileFail& exception) { 600 } catch (const DecompileFail& exception) {
603 LOG_ERROR(HW_GPU, "Shader decompilation failed: %s", exception.what()); 601 NGLOG_ERROR(HW_GPU, "Shader decompilation failed: {}", exception.what());
604 } 602 }
605 return boost::none; 603 return boost::none;
606} 604}