mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-25 19:47:06 +02:00
[tools] add separate maxwell disassembler, ir dumper, and spirv translator (#3453)
why not? Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3453 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
2aa2ac7d9a
commit
d9067d85af
12 changed files with 1137 additions and 1 deletions
26
tools/maxwell-spirv/main.cpp
Normal file
26
tools/maxwell-spirv/main.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
int SpirvReferenceImpl(int argc, char *argv[]);
|
||||
int SpirvShaderRecompilerImpl(int argc, char *argv[]);
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 2) {
|
||||
printf("usage: %s [input file]\n"
|
||||
"Specify -n to use a recompiler that is NOT tied to the shader recompiler\n"
|
||||
"aka. a reference recompiler\n"
|
||||
"RAW SPIRV CODE WILL BE SENT TO STDOUT!\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (argc >= 3) {
|
||||
if (::strcmp(argv[2], "-n") == 0
|
||||
|| ::strcmp(argv[2], "--new") == 0) {
|
||||
return SpirvReferenceImpl(argc, argv);
|
||||
}
|
||||
}
|
||||
return SpirvShaderRecompilerImpl(argc, argv);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue