"""Check the root-argument table hypothesis on all builder shaders: user SGPRs s[0:1] point to the root arguments packed in order (constant = 4 B, root descriptor = 8 B, no padding). Every scalar load from the table (s_load from the register pair holding s0/s1) must start at a descriptor boundary or inside the constants. usage: python check_layout.py (needs target/debug/xcl.exe)""" import os, re, struct, subprocess, sys XCL = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'target', 'debug', 'xcl.exe') D = sys.argv[1] def parts(blob): n = struct.unpack_from('