mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
What was merged from NX2navi (DLSS frame generation, AMD FSR 4 in Setup builds, texture detail by video memory, sprint, volume, frame caps, safer saves, the above-60 fixes), the ultrawide HUD at the screen edges, camera speed, movies without the AV1 Video Extension, the 5120x2880 + RenoDX HDR start fix, the renderer work of 11-14 and the first float changes of the lift.
39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
"""Compile and run the check for texture bindings read by texel position (gpu/vk/spv_exact.h; no game/GPU)."""
|
|
import argparse
|
|
import subprocess
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
RUN_ALL_ARGS = ["--cxx", "g++"]
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def check_source():
|
|
"""The shader modules are still scanned, and a draw still asks for a texture whole at such a binding"""
|
|
shader = (ROOT / "gpu/vk/vk_shader.cpp").read_text(encoding="utf-8")
|
|
draw = (ROOT / "gpu/vk/vk_draw.cpp").read_text(encoding="utf-8")
|
|
texture = (ROOT / "gpu/vk/vk_texture.cpp").read_text(encoding="utf-8")
|
|
for src, name, needles in ((shader, "vk_shader.cpp", ('#include "spv_exact.h"', "spv_exact::scan(")),
|
|
(draw, "vk_draw.cpp", ("texture_want_whole(tex)",)),
|
|
(texture, "vk_texture.cpp", ("void texture_want_whole(Texture* tex)", "whole_keys.count(key)"))):
|
|
for needle in needles:
|
|
if needle not in src:
|
|
raise SystemExit(name + " no longer has: " + needle)
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("--cxx", default="g++")
|
|
args = parser.parse_args()
|
|
check_source()
|
|
with tempfile.TemporaryDirectory(prefix="spv-exact-") as tmp:
|
|
exe = Path(tmp) / "spv-exact"
|
|
subprocess.run([args.cxx, "-std=c++20", "-Wall", "-Wextra", "-Werror",
|
|
str(ROOT / "tests/test_spv_exact.cpp"), "-o", str(exe)], check=True)
|
|
subprocess.run([str(exe)], check=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|