"""The shader census finds the game's compute programs: Effect/*.vsetb, the agl shader archives (.sharcb), agl's networks (NDSR) and where they are. Without them the seed had no compute program at all, and each was translated and built the first time the game met it, 2-18 s with the picture frozen on an RX 7700S. Synthetic data only, no game files. python -I -B tests/test_shader_census.py """ import os import struct import sys import tempfile from pathlib import Path ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(ROOT / "nx2")) import shader_census as sc # noqa: E402 CONTROL_SIZE = 0xD8 def control(stage, end=0x100): c = bytearray(CONTROL_SIZE) c[0:4] = sc.CONTROL_MAGIC struct.pack_into("