shader: batch the integer and SDWA predicate draws in pixel_aot #558
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/564"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-22T12:46:12Z.
Change
Refs #448. Follows #556, as agreed in https://github.com/R0Y00/Xbox2Windows/issues/448 (the #556 author had no overlapping follow-up).
draw-predicate-roundingstill launchedoffscreen_checkonce per case for three predicate suites. They now userun_pixel_batch()from #556, one--check-pixel-batchprocess per compiled group, with the same references:check_int_predicate_draws)check_int16_predicate_draws)check_sdwa_predicate_draws)draw-predicate-roundingi32e32 group) and the inverted-unordered control of each SDWA group stay inside their batch as expected mismatches, each followed by a passing draw, as #556 does for the finite-instead-of-NaN control.must_mismatchcontrols keep one single-case draw each; two of them compile mutated shaders.docs/experiments.md: one paragraph after the #556 one.Correction to my comment on #448: I wrote 45 single-case 16-bit draws and 102 → 20 for the three suites. The 16-bit suite has 48 (8 groups × 6 word pairs), so it is 105 → 20 without the three controls, or 108 → 23 with them, as in the table.
Verification
Windows 11 (build 26200), RTX 3070 (driver 32.0.16.2101) and WARP 10.0.26100, MSVC Build Tools 2022, DXC from Windows SDK 10.0.26100.0, debug layer enabled, on this branch rebased onto
b1be506(since rebased cleanly ontod3586dd, which only adds CPU translator tests; CPU checks re-run there: exit 0).ctest: 18/18 passed;pixel_aot_predicate_rounding_hardware28.1 s,_warp6.1 s. The machine was loaded by other work, so I only quote the launch counts as the result; the times are indicative.pixel_aot_check.py(CPU checks) anddocs_links_check.py: exit 0.subprocess.runaround the unchanged test entry point, on915a9eeand on this branch before the rebase, on both adapters (same counts on both).b1be506only adds CPU tests and does not touch these files.Negative controls, run against the three changed checks on both the RTX 3070 and WARP. Each mutation must fail with an
AssertionErrorfrom the pixel comparison, and each did, naming the group:i32comparisons emitted asu32i32 e32 first=0i16comparisons emitted asu16i16 e32 group 0nltemitted as orderedgefirst=12pass(int, SDWA)i32 e32 first=0/first=0Evidence and follow-up
No new fixtures: the cases are the existing synthetic inputs and references, grouped per compiled shader.
pixel_aot_hardwareandpixel_aot_blend_scalar_hardwarestay out of scope. @RonLogic offered on #448 to verify this PR on RTX 4070 and WARP.Checklist
AI-assisted: prepared with an AI coding agent and reviewed by a human before posting.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-22T16:32:07Z.
Independent Windows verification for #448 on the submitted head
f608ac54f409ab78199268115c10fd896d3736e1. Windows 11 build 26300.9974, x64 MSVC 19.52.37029.0, Windows SDK 10.0.26100.0, D3D12 debug layer enabled.All four tests passed with no skips. The predicate suite's expected signed/unsigned and inverted-unordered mismatches were detected, and the passing cases after them completed successfully. Times are from this run only.
AI-assisted.