T4: Run real shaders #379

Open
opened 2026-11-28 07:41:27 +00:00 by NathansDomainSolutions · 0 comments
NathansDomainSolutions commented 2026-11-28 07:41:27 +00:00 (Migrated from github.com)
Contributor

Imported from brcly/TuxBox. Originally posted by NathansDomainSolutions on 2026-11-28T07:41:27Z.


I'm taking T4 from the roadmap: run recorded compute shaders on the GPU and compare their outputs.

Plan for a first PR:

  • A new execute stage in tools/shader_harness.py. It takes a sample of recorded compute requests, translates each with the baseline and the working tree, and builds a compute pipeline for each translation under Proton through a small D3D12 runner.
  • Each root parameter and table range is bound to deterministic generated contents, seeded from the request key: buffers, typed buffers, textures and constants. The runner dispatches a fixed small grid, reads every UAV back and hashes the result.
  • The stage blocks when a request's output hash changes between the baseline and the working tree, unless the translation is byte-identical. It also blocks when a program that ran on the baseline stops running.
  • With two adapters configured, the same hashes are compared between the cards. Differences are reported, but they don't block until we know how much float variance is normal.
  • Like the rest of the harness, reports hold no shader bytes or HLSL. They list request names, binding shapes and hash changes.

Programs that need state the runner can't generate will be skipped with a stated reason, not guessed. That covers indirect arguments that drive their own dispatch, heap-indexed resources beyond a bounded heap, and ray tracing scenes. Graphics stages come later, as the roadmap says.

Tested on an RTX 4070 first. I'll need someone with an AMD card for the cross-vendor half.

AI-assisted: I'm working on this with Claude Code.

<!-- greyfinch-sync:brcly/TuxBox:issue:6661327175 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/379). Originally posted by [NathansDomainSolutions](https://github.com/NathansDomainSolutions) on 2026-11-28T07:41:27Z. --- I'm taking T4 from the roadmap: run recorded compute shaders on the GPU and compare their outputs. Plan for a first PR: - A new `execute` stage in `tools/shader_harness.py`. It takes a sample of recorded compute requests, translates each with the baseline and the working tree, and builds a compute pipeline for each translation under Proton through a small D3D12 runner. - Each root parameter and table range is bound to deterministic generated contents, seeded from the request key: buffers, typed buffers, textures and constants. The runner dispatches a fixed small grid, reads every UAV back and hashes the result. - The stage blocks when a request's output hash changes between the baseline and the working tree, unless the translation is byte-identical. It also blocks when a program that ran on the baseline stops running. - With two adapters configured, the same hashes are compared between the cards. Differences are reported, but they don't block until we know how much float variance is normal. - Like the rest of the harness, reports hold no shader bytes or HLSL. They list request names, binding shapes and hash changes. Programs that need state the runner can't generate will be skipped with a stated reason, not guessed. That covers indirect arguments that drive their own dispatch, heap-indexed resources beyond a bounded heap, and ray tracing scenes. Graphics stages come later, as the roadmap says. Tested on an RTX 4070 first. I'll need someone with an AMD card for the cross-vendor half. AI-assisted: I'm working on this with Claude Code.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox#379
No description provided.