From d3ab612bdc55356ee8fb26c2cbf8f970d35068b2 Mon Sep 17 00:00:00 2001 From: psucien Date: Sun, 16 Jun 2024 23:11:36 +0200 Subject: [PATCH] shader_recompiler: pretty print for missing shader instructions --- src/shader_recompiler/frontend/translate/translate.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shader_recompiler/frontend/translate/translate.cpp b/src/shader_recompiler/frontend/translate/translate.cpp index cf5e68a3..dafd451c 100644 --- a/src/shader_recompiler/frontend/translate/translate.cpp +++ b/src/shader_recompiler/frontend/translate/translate.cpp @@ -7,6 +7,10 @@ #include "shader_recompiler/runtime_info.h" #include "video_core/amdgpu/resource.h" +#define MAGIC_ENUM_RANGE_MIN 0 +#define MAGIC_ENUM_RANGE_MAX 1515 +#include "magic_enum.hpp" + namespace Shader::Gcn { std::array Translator::exec_contexts{}; @@ -666,7 +670,7 @@ void Translate(IR::Block* block, std::span inst_list, Info& info) break; default: const u32 opcode = u32(inst.opcode); - UNREACHABLE_MSG("Unknown opcode {}", opcode); + UNREACHABLE_MSG("Unknown opcode {} ({})", magic_enum::enum_name(inst.opcode), opcode); } } }