mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-28 09:41:36 +00:00
50cb8fd1c9
An experimental approach to introduce an smarter way to use and access QUAD's capabilities on shaders, suggested by @gidoly some months ago, finally came into something usable; current implementation checks GLASM, GLSL and Vulkan on their own way, stablishes proper emitters and receivers for Quads inside our recompiler, which are the introductions for future changes; checks for support and actual feature bit, OpCodes and mask were added within this PR. Meanwhile the expected behavior was to reduce graphical issues (on games with Quad shaders reliant), we encountered a very slight performance increase depending on what game and shader are actually compiled. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4168 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Samuel <lizzie@eden-emu.dev>
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[534] = {
|
|
#define OPCODE(name_token, type_token, ...) \
|
|
{ \
|
|
.name{#name_token}, \
|
|
.type = type_token, \
|
|
.arg_types{__VA_ARGS__}, \
|
|
},
|
|
#include "opcodes.inc"
|
|
#undef OPCODE
|
|
};
|
|
|
|
u8 NUM_ARGS[534] = {
|
|
#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
|