mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 10:38:58 +02:00
[tools] add separate maxwell disassembler and spirv translator
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
d0a054270e
commit
b8805bc561
9 changed files with 1087 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 ReferenceImpl(int argc, char *argv[]);
|
||||
int ShaderRecompilerImpl(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 ReferenceImpl(argc, argv);
|
||||
}
|
||||
}
|
||||
return ShaderRecompilerImpl(argc, argv);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue