diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-05 23:11:23 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:21 -0400 |
commit | 16cb00c521cae6e93ec49d10e15b575b7bc4857e (patch) | |
tree | 3b283895510af56fced7e62031c6beda999c0a1c /src/shader_recompiler/frontend/maxwell/opcodes.h | |
parent | be94ee88d227d0d3dbeabe9ade98bacd910c7a7e (diff) |
shader: Add pools and rename files
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/opcodes.h')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/opcodes.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/opcodes.h b/src/shader_recompiler/frontend/maxwell/opcodes.h new file mode 100644 index 0000000000..cd574f29d0 --- /dev/null +++ b/src/shader_recompiler/frontend/maxwell/opcodes.h @@ -0,0 +1,30 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <fmt/format.h> + +namespace Shader::Maxwell { + +enum class Opcode { +#define INST(name, cute, encode) name, +#include "maxwell.inc" +#undef INST +}; + +const char* NameOf(Opcode opcode); + +} // namespace Shader::Maxwell + +template <> +struct fmt::formatter<Shader::Maxwell::Opcode> { + constexpr auto parse(format_parse_context& ctx) { + return ctx.begin(); + } + template <typename FormatContext> + auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) { + return format_to(ctx.out(), "{}", NameOf(opcode)); + } +}; |