From f15bf8079208982a5490308d9c739008adf0088c Mon Sep 17 00:00:00 2001 From: NiiRoZz Date: Wed, 25 Nov 2026 07:26:47 +0100 Subject: [PATCH] startup: test the compiled done rule for slot 67 compute requests With compilation on, pending_keys keeps a compute request pending with a manifest alone, with graphics .vs.cso/.ps.cso, or with an empty .cs.cso, and treats it as done with a manifest and a non-empty .cs.cso. Changing the compute stage tuple to ('.vs.cso',) or () now fails the check. Co-Authored-By: Claude Fable 5.2 --- tests/startup_compute_translate_check.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/startup_compute_translate_check.py b/tests/startup_compute_translate_check.py index 43646a125b..1389b32c31 100644 --- a/tests/startup_compute_translate_check.py +++ b/tests/startup_compute_translate_check.py @@ -101,8 +101,21 @@ def check_requests(directory): assert (cache / ('%016x.fail' % key)).read_text().startswith('dxc cs: '), (cache / ('%016x.fail' % key)).read_text() assert not (cache / ('%016x.txt' % key)).exists(), 'a manifest was left next to the failure' assert key in G.pending_keys(str(cache), skip_failed=False) + # With compilation on (X2W_FXC unset), a compute request is done only with its manifest and non-empty + # .cs.cso; graphics bytecode names do not count. + (cache / ('%016x.fail' % key)).unlink() + (cache / ('%016x.txt' % key)).write_text('x2w-manifest 2\nstage cs\n') + assert key in G.pending_keys(str(cache), skip_failed=False), 'a manifest alone made the request done' + for stage in ('vs', 'ps'): + (cache / ('%016x.%s.cso' % (key, stage))).write_bytes(b'DXBC') + assert key in G.pending_keys(str(cache), skip_failed=False), 'graphics bytecode made a compute request done' + (cache / ('%016x.cs.cso' % key)).write_bytes(b'') + assert key in G.pending_keys(str(cache), skip_failed=False), 'an empty .cs.cso made the request done' + (cache / ('%016x.cs.cso' % key)).write_bytes(b'DXBC') + assert key not in G.pending_keys(str(cache), skip_failed=False), 'manifest and .cs.cso did not make it done' print('compute request translation: case A manifest, %d malformed requests refused with no manifest, ' - 'renamed and incomplete requests refused, done test, failed compile withdraws the manifest' % len(cases)) + 'renamed and incomplete requests refused, done test, failed compile withdraws the manifest, ' + 'compiled done test' % len(cases)) def check_e2e(directory, consumer, dxc, runner, adapter, wrong_group):