mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "shader_recompiler/frontend/ir/opcodes.h"
|
|
|
|
namespace Shader::IR {
|
|
|
|
namespace Detail {
|
|
|
|
OpcodeMeta META_TABLE[542] = {
|
|
#define OPCODE(name_token, type_token, ...) \
|
|
{ \
|
|
.name{#name_token}, \
|
|
.type = type_token, \
|
|
.arg_types{__VA_ARGS__}, \
|
|
},
|
|
#include "opcodes.inc"
|
|
#undef OPCODE
|
|
};
|
|
|
|
u8 NUM_ARGS[542] = {
|
|
#define OPCODE(name_token, type_token, ...) u8(CalculateNumArgsOf(Opcode::name_token)),
|
|
#include "opcodes.inc"
|
|
#undef OPCODE
|
|
};
|
|
|
|
}
|
|
|
|
std::string_view NameOf(Opcode op) {
|
|
return Detail::META_TABLE[static_cast<size_t>(op)].name;
|
|
}
|
|
|
|
} // namespace Shader::IR
|