Read the packed pipeline keys of the current MacNativeGames shader list in prepare_shaders

Since MacNativeGames f024ef04 the R and B rows keep the key as "<vs variant>:<fs variant>:<rest>" instead of plain hex,
and parse_list stopped with a ValueError on a source checkout. The pinned release list parses as before (identical
variants and priorities); the current one gives 58053 variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-30 15:35:10 +03:00
1 parent f930e56825
commit 389a516f8d
1 file changed
+11 -3
+11 -3
View File
@@ -68,6 +68,15 @@ def read_list(path):
return shader_list.history(ROOT / 'refs' / 'MacNativeGames')
def pipeline_variants(key):
"""The vertex and fragment variant names of an R/B row's pipeline key. Since MacNativeGames f024ef04 (2026-10-28) the
TotK list keeps keys packed, "<vs variant>:<fs variant>:<the rest in hex>"; older revisions and contribution files
hold the whole key in hex, "<vs variant>\\0<fs variant>\\0" + a Metal descriptor (docs/shader-list.md there)."""
if ':' in key:
return key.split(':', 2)[:2]
return [n.decode('ascii', 'replace') for n in bytes.fromhex(key).split(b'\0')[:2]]
def parse_list(text):
"""V rows as (key, deps); priority per shader key from the warm rows (variant names start with the key)."""
variants, prio = [], {}
@@ -85,10 +94,9 @@ def parse_list(text):
elif f[0] == 'C' and len(f) == 3:
warm(f[1][:64], f[2])
elif f[0] in ('R', 'B') and len(f) >= 3:
names = bytes.fromhex(f[1]).split(b'\0')[:2] # "<vs variant>\0<fs variant>\0" + a Metal descriptor
for n in names:
for n in pipeline_variants(f[1]):
if len(n) >= 64:
warm(n[:64].decode('ascii', 'replace'), f[-1])
warm(n[:64], f[-1])
return variants, prio