Browse Source

Meow gidolio 2.0

temporary-branch
CamilleLaVey 2 days ago
parent
commit
dcbfa3c2d3
  1. 4
      src/shader_recompiler/frontend/ir/opcodes.cpp
  2. 4
      src/shader_recompiler/frontend/ir/opcodes.h

4
src/shader_recompiler/frontend/ir/opcodes.cpp

@ -10,7 +10,7 @@ namespace Shader::IR {
namespace Detail {
OpcodeMeta META_TABLE[532] = {
OpcodeMeta META_TABLE[] = {
#define OPCODE(name_token, type_token, ...) \
{ \
.name{#name_token}, \
@ -21,7 +21,7 @@ OpcodeMeta META_TABLE[532] = {
#undef OPCODE
};
u8 NUM_ARGS[532] = {
u8 NUM_ARGS[] = {
#define OPCODE(name_token, type_token, ...) u8(CalculateNumArgsOf(Opcode::name_token)),
#include "opcodes.inc"
#undef OPCODE

4
src/shader_recompiler/frontend/ir/opcodes.h

@ -57,12 +57,12 @@ static constexpr Type F64x2{Type::F64x2};
static constexpr Type F64x3{Type::F64x3};
static constexpr Type F64x4{Type::F64x4};
extern OpcodeMeta META_TABLE[532];
extern OpcodeMeta META_TABLE[];
constexpr size_t CalculateNumArgsOf(Opcode op) noexcept {
const auto& arg_types = META_TABLE[size_t(op)].arg_types;
return size_t(std::distance(arg_types.begin(), std::ranges::find(arg_types, Type::Void)));
}
extern u8 NUM_ARGS[532];
extern u8 NUM_ARGS[];
} // namespace Detail
/// Get return type of an opcode

Loading…
Cancel
Save