Triforce v0.8.0

Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -0,0 +1,50 @@
"""gpu/vk/spirv_operands.h from SPIR-V's core grammar (SPIRV-Headers, spirv.core.grammar.json): for each opcode, its
operands as one letter each, for code that renames ids in SPIR-V it did not write (gpu/vk/fsr4_tune.h).
python -I scripts/gen_spirv_operands.py <spirv.core.grammar.json> gpu/vk/spirv_operands.h
Letters: T result type, R result, i an id (IdRef, IdScope, IdMemorySemantics), l a literal word, s a literal string,
c a literal number of the instruction's type (the rest of the words), P / Q / q pairs (id id, literal id, id literal),
M MemoryAccess, G ImageOperands, L LoopControl (masks whose parameters are read by their bits), e an enum of one word with no
parameters, X anything else (an instruction with one is not renamed). After a letter: * repeated to the end, ? optional.
"""
import json
import sys
g = json.load(open(sys.argv[1], encoding="utf-8"))
kinds = {k["kind"]: k for k in g["operand_kinds"]}
def letter(kind):
fixed = {"IdResultType": "T", "IdResult": "R", "IdRef": "i", "IdScope": "i", "IdMemorySemantics": "i",
"LiteralInteger": "l", "LiteralExtInstInteger": "l", "LiteralSpecConstantOpInteger": "l", "LiteralFloat": "l",
"LiteralString": "s", "LiteralContextDependentNumber": "c", "PairIdRefIdRef": "P",
"PairLiteralIntegerIdRef": "Q", "PairIdRefLiteralInteger": "q", "MemoryAccess": "M", "ImageOperands": "G",
"LoopControl": "L"}
if kind in fixed:
return fixed[kind]
k = kinds.get(kind)
if k and k.get("category") in ("ValueEnum", "BitEnum"):
if not any(e.get("parameters") for e in k.get("enumerants", [])):
return "e"
return "X"
rows = {}
for ins in g["instructions"]:
s = ""
for o in ins.get("operands", []):
s += letter(o["kind"]) + {"*": "*", "?": "?"}.get(o.get("quantifier", ""), "")
rows[ins["opcode"]] = (ins["opname"], s)
with open(sys.argv[2], "w", encoding="utf-8", newline="\n") as f:
f.write("// Generated by scripts/gen_spirv_operands.py from SPIR-V's core grammar (SPIRV-Headers %s.%s, revision %s): do not edit.\n"
% (g.get("major_version"), g.get("minor_version"), g.get("revision")))
f.write("// Each opcode's operands, one letter each (the script says what they mean); nullptr: an opcode not in the grammar.\n")
f.write("#pragma once\n\n#include <cstdint>\n\nnamespace spirv_operands {\n\n")
f.write("inline const char* of(uint32_t op) {\n switch (op) {\n")
for op in sorted(rows):
name, s = rows[op]
f.write(f' case {op}: return "{s}"; // {name}\n')
f.write(" default: return nullptr;\n }\n}\n\n} // namespace spirv_operands\n")
print(len(rows), "opcodes")