d3d12_skip_compute_test: add the GPU regression and skip on 128-byte devices #1419

Open
github-bot wants to merge 2 commits from github-bot/gh-1419 into main AGit
Owner

@⁠whoalin1 on GitHub · 2026-11-24 23:48 UTC · original
whoalin1:pc-tail-skip-guard → main · +316 −0 · 2 files · 2 commits · open

LEONIDA_SKIP_COMPUTE is already implemented in main, but its GPU regression test was never merged with it. This PR adds that test and keeps it honest on 128-byte push-constant devices.

What

  • Adds d3d12_skip_compute_test, Moriz82's synthetic regression test for the diagnostic already documented in main: two counting compute programs exercise unset, one-name and all modes, including direct and indirect dispatches.
  • Registers the three cases in CTest with SKIP_RETURN_CODE 77.
  • On a device whose maxPushConstantsSize is below the test's 144-byte ShaderUserData block (128, the Vulkan minimum — e.g. AMD Radeon iGPUs), checks device_push_constants_need_fallback() and returns 77 instead of failing with E_NOTIMPL. This is the same guard already used by d3d12_msaa_draw_test, d3d12_set0_compute_test and d3d12_fspx_compute_test.

This branch was rebased onto current main; the stale duplicate documentation paragraph and the obsolete dependency on closed #1341 were removed. No game data.

Validation

  • Moriz82's original evidence: cross-built gta6rt and d3d12_skip_compute_test with clang-cl and ran the test under Wine 11.22 on an RTX 4070. Unset: both programs run and nothing is logged. absent,drop: only the named program is dropped. all: both are dropped.
  • Refreshed local evidence on f177f7a03 (Windows 11, MSVC): build succeeds; native NVIDIA RTX 4070 SUPER passes all three ctest entries; AMD Radeon iGPU with validation on and a 128-byte push-constant limit honestly skips all three through return code 77 because the pipelines need 144 bytes. The AMD run directly exercises the new guard.

AI-assisted.

**@⁠whoalin1** on GitHub · 2026-11-24 23:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1419) `whoalin1:pc-tail-skip-guard` → `main` · +316 −0 · 2 files · 2 commits · open `LEONIDA_SKIP_COMPUTE` is already implemented in `main`, but its GPU regression test was never merged with it. This PR adds that test and keeps it honest on 128-byte push-constant devices. ## What - Adds `d3d12_skip_compute_test`, Moriz82's synthetic regression test for the diagnostic already documented in `main`: two counting compute programs exercise unset, one-name and `all` modes, including direct and indirect dispatches. - Registers the three cases in CTest with `SKIP_RETURN_CODE 77`. - On a device whose `maxPushConstantsSize` is below the test's 144-byte `ShaderUserData` block (128, the Vulkan minimum — e.g. AMD Radeon iGPUs), checks `device_push_constants_need_fallback()` and returns 77 instead of failing with `E_NOTIMPL`. This is the same guard already used by `d3d12_msaa_draw_test`, `d3d12_set0_compute_test` and `d3d12_fspx_compute_test`. This branch was rebased onto current `main`; the stale duplicate documentation paragraph and the obsolete dependency on closed #1341 were removed. No game data. ## Validation - Moriz82's original evidence: cross-built `gta6rt` and `d3d12_skip_compute_test` with clang-cl and ran the test under Wine 11.22 on an RTX 4070. Unset: both programs run and nothing is logged. `absent,drop`: only the named program is dropped. `all`: both are dropped. - Refreshed local evidence on `f177f7a03` (Windows 11, MSVC): build succeeds; native NVIDIA RTX 4070 SUPER passes all three ctest entries; AMD Radeon iGPU with validation on and a 128-byte push-constant limit honestly skips all three through return code 77 because the pipelines need 144 bytes. The AMD run directly exercises the new guard. AI-assisted.
A compute program that hangs the GPU or loses the device stops a run at
that dispatch. Nothing after it can be examined until the program or its
input is fixed, and there was no way to take one program out of a run.

LEONIDA_SKIP_COMPUTE=<part of a name>[,<part>...] (all or *: every compute
program) is a diagnostic and is unset by default. A compute program whose
library name contains one of the parts gets no shader module and no
VkPipeline. CreateComputePipelineState still succeeds and logs the name
once. Replay drops each direct and indirect dispatch of the program and
records the rest of the command list. What the program would have written
keeps its previous contents. With the variable unset no pipeline is marked
and no dispatch is dropped.

Cross-built gta6rt and d3d12_skip_compute_test with clang-cl and ran the
test under Wine 11.22 on an RTX 4070. It runs two synthetic counting
programs with direct, indirect and counted indirect dispatches. Unset:
both run and no line is logged. "absent,drop": one program is dropped, the
dispatches before and after it run. "all": both are dropped. With the base
implementation the unset form passes with the same counts and the two set
forms fail.

AI-assisted (Claude Code).

Co-authored-by: Plaaasma <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a device whose maxPushConstantsSize is below the 144-byte ShaderUserData block (128, the Vulkan minimum, as on the AMD Radeon iGPUs), PipelineState::push_constants_fit refuses the pipeline states with E_NOTIMPL and the test failed instead of skipping. Check device_push_constants_need_fallback after create_vulkan_device and return 77, the same guard d3d12_msaa_draw_test, d3d12_set0_compute_test and d3d12_fspx_compute_test already use; the CMake entries already set SKIP_RETURN_CODE 77.

The implementation this test covers is already in main; this branch now carries only its synthetic regression test and the 128-byte-device skip guard.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:50:50 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 04:56 UTC · original

Rebased onto #1341's current head (4c54b8044) — the branch now contains only this PR's own commit on top of it, so the earlier conflict is resolved.

One thing worth flagging for reviewers: #1341's updated head already includes the device_push_constants_need_fallback → return 77 guard in d3d12_skip_compute_test.cpp itself. After the rebase this PR's remaining delta is only the explanatory comment and a clearer skip message (+4/−1). The functional fix therefore lands with #1341; this PR is now just polish on top of it. Maintainer's call whether to keep it for the comment or close once #1341 merges — happy either way.

**@⁠whoalin1** on GitHub · 2026-11-25 04:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1419#issuecomment-7153296041) Rebased onto #1341's current head (`4c54b8044`) — the branch now contains only this PR's own commit on top of it, so the earlier conflict is resolved. One thing worth flagging for reviewers: #1341's updated head already includes the `device_push_constants_need_fallback → return 77` guard in `d3d12_skip_compute_test.cpp` itself. After the rebase this PR's remaining delta is only the explanatory comment and a clearer skip message (+4/−1). The functional fix therefore lands with #1341; this PR is now just polish on top of it. Maintainer's call whether to keep it for the comment or close once #1341 merges — happy either way.
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 20:16 UTC · original

Rebased cleanly onto current main (db1a22d29) as 324ca00cf to refresh the stale CI baseline; no conflicts. The branch is unchanged: the RT-SKIP-COMPUTE-DIAGNOSTIC named-program skip plus the push-constant-limit guard for d3d12_skip_compute_test. AI-assisted with Devin.

**@⁠whoalin1** on GitHub · 2026-11-25 20:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1419#issuecomment-7173434664) Rebased cleanly onto current main (`db1a22d29`) as `324ca00cf` to refresh the stale CI baseline; no conflicts. The branch is unchanged: the RT-SKIP-COMPUTE-DIAGNOSTIC named-program skip plus the push-constant-limit guard for `d3d12_skip_compute_test`. AI-assisted with Devin.
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-26 04:31 UTC · original

Maintenance update: rebased onto current main and removed the stale duplicate documentation paragraph plus the obsolete dependency on closed #1341. The implementation itself is already in main; this PR is now exactly the missing synthetic GPU regression test plus the 128-byte push-constant skip guard. Head f177f7a03.

**@⁠whoalin1** on GitHub · 2026-11-26 04:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1419#issuecomment-7182677190) Maintenance update: rebased onto current main and removed the stale duplicate documentation paragraph plus the obsolete dependency on closed #1341. The implementation itself is already in main; this PR is now exactly the missing synthetic GPU regression test plus the 128-byte push-constant skip guard. Head f177f7a03.
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-26 05:03 UTC · original

Refreshed local validation on f177f7a03 (Windows 11, MSVC, no game data):

  • Build: cmake configure and d3d12_skip_compute_test target succeeded.
  • NVIDIA RTX 4070 SUPER, native Windows: d3d12_skip_compute_unset/one/all all PASS (3/3), with the expected unset/one/all dispatch counts.
  • AMD Radeon iGPU (128-byte maxPushConstantsSize), validation on with LEONIDA_PC_TAIL_UBO=1: all three entries honestly SKIP through return code 77: the pipelines need 144 push-constant bytes and this GPU has 128. This directly exercises the new guard; ctest reports 100% passed with the three tests skipped.

The implementation itself was already in main; this validates the carried synthetic regression and the 128-byte-device behavior.

**@⁠whoalin1** on GitHub · 2026-11-26 05:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1419#issuecomment-7183142680) Refreshed local validation on f177f7a03 (Windows 11, MSVC, no game data): - Build: cmake configure and d3d12_skip_compute_test target succeeded. - NVIDIA RTX 4070 SUPER, native Windows: d3d12_skip_compute_unset/one/all all PASS (3/3), with the expected unset/one/all dispatch counts. - AMD Radeon iGPU (128-byte maxPushConstantsSize), validation on with LEONIDA_PC_TAIL_UBO=1: all three entries honestly SKIP through return code 77: the pipelines need 144 push-constant bytes and this GPU has 128. This directly exercises the new guard; ctest reports 100% passed with the three tests skipped. The implementation itself was already in main; this validates the carried synthetic regression and the 128-byte-device behavior.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1419/head:github-bot/gh-1419'
git switch 'github-bot/gh-1419'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1419'
git switch 'github-bot/gh-1419'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1419'
git switch 'github-bot/gh-1419'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1419'
git switch 'main'
git merge --squash 'github-bot/gh-1419'
git switch 'main'
git merge --ff-only 'github-bot/gh-1419'
git switch 'main'
git merge 'github-bot/gh-1419'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.