Reuse the D3D12 device across e64 pixel cases and retain per-case failure attribution #508

Manually merged
github merged 1 commit from gh-pr/508/head into gh-pr/508/base 2026-11-26 21:57:38 +00:00
Owner

@⁠descent81 on GitHub · 2026-11-22 08:32 UTC · original
descent81:gpu/pixel-batch → main · +59 −16 · 5 files · 1 commits · merged 2026-11-22 09:31 UTC

Related to #448. Its measurements identified repeated D3D12 device creation as a major cost. This PR implements a bounded first consumer on main at a46dac3: the e64 pixel suite has six compiled shaders and many reference inputs per shader.

Execution and isolation

offscreen_check <backend> --check-pixel-batch <shader> <case> [<case> ...] opens one device and runs the existing readback path once per input. Each case keeps its own draw resources. The output associates the reference path with an index and reports an ordered pass, pixel mismatch or error. The aggregate exit code is 1 if any case fails. The fixture validates every status, including expected failures. Each arithmetic batch also repeats a correct reference after its negative controls. The debug queue is reported and cleared per case, and the runner checks device health before and after each draw.

Measured wall time

Three alternating baseline/changed runs per backend, same renderer binary and DXC, debug layer enabled. Times include shader compilation and readback. Baseline uses the parent Python fixture. The updated fixture performs two extra recovery draws.

Backend Individual draws (s) Batched (s) Median before → after
RTX 4060 11.37, 11.38, 12.46 3.74, 3.86, 3.90 11.38 → 3.86 s
Microsoft WARP 2.83, 3.83, 3.04 1.11, 1.08, 1.07 3.04 → 1.08 s

Renderer launches for the e64 suite fall from 35 to 6. Existing single-case commands remain available. Other pixel suites can be migrated independently.

Failure controls and verification

  • Both backends passed the e64 fixture, including matching references after intentional mismatches.
  • In a local WARP control build, injecting a D3D12 debug error during the middle of three matching draws gave pass/error/pass, debug error counts 0/1/0, and exit 1.
  • In a separate WARP control build, calling ID3D12Device5::RemoveDevice before case two gave pass/error/error and exit 1. Both remaining cases reported HRESULT 0x887a0005.
  • The control injections were removed. The four local hardware/WARP core and e64 CTest entries passed, and both e64 entries passed again after rebuilding the final source.

This measures the e64 suite on one PC. The rest of #448 remains open.

**@⁠descent81** on GitHub · 2026-11-22 08:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/508) `descent81:gpu/pixel-batch` → `main` · +59 −16 · 5 files · 1 commits · merged 2026-11-22 09:31 UTC Related to #448. Its measurements identified repeated D3D12 device creation as a major cost. This PR implements a bounded first consumer on main at `a46dac3`: the e64 pixel suite has six compiled shaders and many reference inputs per shader. ## Execution and isolation `offscreen_check <backend> --check-pixel-batch <shader> <case> [<case> ...]` opens one device and runs the existing readback path once per input. Each case keeps its own draw resources. The output associates the reference path with an index and reports an ordered pass, pixel mismatch or error. The aggregate exit code is 1 if any case fails. The fixture validates every status, including expected failures. Each arithmetic batch also repeats a correct reference after its negative controls. The debug queue is reported and cleared per case, and the runner checks device health before and after each draw. ## Measured wall time Three alternating baseline/changed runs per backend, same renderer binary and DXC, debug layer enabled. Times include shader compilation and readback. Baseline uses the parent Python fixture. The updated fixture performs two extra recovery draws. | Backend | Individual draws (s) | Batched (s) | Median before → after | | --- | --- | --- | --- | | RTX 4060 | 11.37, 11.38, 12.46 | 3.74, 3.86, 3.90 | 11.38 → 3.86 s | | Microsoft WARP | 2.83, 3.83, 3.04 | 1.11, 1.08, 1.07 | 3.04 → 1.08 s | Renderer launches for the e64 suite fall from 35 to 6. Existing single-case commands remain available. Other pixel suites can be migrated independently. ## Failure controls and verification - Both backends passed the e64 fixture, including matching references after intentional mismatches. - In a local WARP control build, injecting a D3D12 debug error during the middle of three matching draws gave pass/error/pass, debug error counts 0/1/0, and exit 1. - In a separate WARP control build, calling `ID3D12Device5::RemoveDevice` before case two gave pass/error/error and exit 1. Both remaining cases reported HRESULT 0x887a0005. - The control injections were removed. The four local hardware/WARP core and e64 CTest entries passed, and both e64 entries passed again after rebuilding the final source. This measures the e64 suite on one PC. The rest of #448 remains open.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:57:36 +00:00
github manually merged commit 7c75b4335e into gh-pr/508/base 2026-11-26 21:57:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.