From c242317aeaf2c7fe8fb077c48da6232e0c68f3b1 Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Thu, 30 Jul 2020 23:15:14 +1000 Subject: [PATCH] ARB Patcher: fix up some info about inlining vars in comments, improve UNUSED_PARAM_REGEX --- source-code/data/amd-tools/ARB Patcher Source/main.py | 2 ++ source-code/data/amd-tools/ARB Patcher Source/rules.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source-code/data/amd-tools/ARB Patcher Source/main.py b/source-code/data/amd-tools/ARB Patcher Source/main.py index 1eeee03..ecc956c 100644 --- a/source-code/data/amd-tools/ARB Patcher Source/main.py +++ b/source-code/data/amd-tools/ARB Patcher Source/main.py @@ -10,6 +10,7 @@ def patch_shader(fname, f_lines, game_settings_module=None, enable_print_warning params = {} for i in range(0, len(f_lines)): + # this inlining stuff is only really needed for vp, but :shrug: no_repl = False m = ATTRIB_REGEX.match(f_lines[i]) @@ -26,6 +27,7 @@ def patch_shader(fname, f_lines, game_settings_module=None, enable_print_warning no_repl = True m = OUTPUT_REGEX.match(f_lines[i]) + # and not needed at all for PARAMs in the end, but :shrug: again m = PARAM_REGEX.match(f_lines[i]) while m: params[m.group(3)] = m.group(4) diff --git a/source-code/data/amd-tools/ARB Patcher Source/rules.py b/source-code/data/amd-tools/ARB Patcher Source/rules.py index 7d8546b..162ecdd 100644 --- a/source-code/data/amd-tools/ARB Patcher Source/rules.py +++ b/source-code/data/amd-tools/ARB Patcher Source/rules.py @@ -1,13 +1,14 @@ # regexes and config info is stored here to reduce clutter in main script from re import compile as recompile -# inline these because... idk exactly +# inline these because... idk +# ATTRIB and OUTPUT must be inlined for vp tho ATTRIB_REGEX = recompile(r"(?