"""Compare preparation request sharing with independent jobs using six synthetic shaders. Pass the candidate executable, the translator, and --reference-exe for a paired build. No game data or installed cache is used. All output stays in build/. """ import argparse import hashlib import json import os from pathlib import Path import re import struct import subprocess import tempfile import time ROOT = Path(__file__).resolve().parents[1] def seed(directory): programs = bytearray(struct.pack('<8sII', b'NX2NSPRG', 1, 0)) answers = bytearray(struct.pack('<8sII', b'NX2NSANS', 1, 216)) exit_op = struct.pack('<4I', 0x794d, 0, 0x03800000, 0x000fea00) for tag, group, code, c1 in [(0, 1, exit_op, b''), (1, 1, exit_op, b''), (2, 1, exit_op, b''), (0, 2, exit_op, b''), (0, 1, 2 * exit_op, b''), (0, 1, exit_op, bytes(16))]: control = bytearray(0x880) struct.pack_into('