tests: skip honestly when push constants fall below the 144-byte contract #1467

Closed
leonida/mandy
whoalin1 wants to merge 0 commits from honest-pushconst-skips into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

whoalin1 commented 2026-11-25 00:49:30 +00:00

Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148908938
Complements #1449 (which guards the other 24 entries); both use the existing device_push_constants_need_fallback → return 77 pattern.

What

Two tests had latent gaps on GPUs with maxPushConstantsSize < 144 (the 144-byte ShaderUserData contract; 128-byte devices like AMD Radeon iGPUs):

  • d3d12_first_light_test (package-gated by LEONIDA_FIRST_LIGHT_DIR): creates translated PSOs that need 144 push-constant bytes — would FAIL on a smaller-limit device. Now checks device_push_constants_need_fallback after the layer device exists and returns 77, matching d3d12_msaa_draw_test/d3d12_fspx_compute_test.
  • d3d12_state_sweep_test — worse: every case's PSO fails the same way, each counts as a per-case skip, and the test could return success having compared nothing (silent pass). Now guards right after create_vulkan_device, before host_device()/the case loop.

(+12 lines, 2 files; both CMake entries already had SKIP_RETURN_CODE 77.)

Tested

  • AMD Radeon iGPU (gfx1035, driver 24.10.24, LEONIDA_PC_TAIL_UBO=1, validation on): d3d12_state_sweep_test prints the skip and exits 77 (was silent pass); d3d12_first_light_test skips (no package dir on this machine — guard verified by inspection + clean compile, same position/pattern as the three existing guarded tests).
  • NVIDIA RTX 4070 SUPER: d3d12_state_sweep_test ran the full sweep — 498 cases compared, 0 differ, 0 skipped, exit 0.
  • Full runtime build clean (Ninja, RelWithDebInfo, 642 targets).

AI-assisted (Devin).

Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148908938 Complements #1449 (which guards the other 24 entries); both use the existing `device_push_constants_need_fallback → return 77` pattern. ## What Two tests had latent gaps on GPUs with `maxPushConstantsSize < 144` (the 144-byte `ShaderUserData` contract; 128-byte devices like AMD Radeon iGPUs): - **`d3d12_first_light_test`** (package-gated by `LEONIDA_FIRST_LIGHT_DIR`): creates translated PSOs that need 144 push-constant bytes — would FAIL on a smaller-limit device. Now checks `device_push_constants_need_fallback` after the layer device exists and returns 77, matching `d3d12_msaa_draw_test`/`d3d12_fspx_compute_test`. - **`d3d12_state_sweep_test`** — worse: every case's PSO fails the same way, each counts as a per-case skip, and the test could return **success having compared nothing** (silent pass). Now guards right after `create_vulkan_device`, before `host_device()`/the case loop. (+12 lines, 2 files; both CMake entries already had `SKIP_RETURN_CODE 77`.) ## Tested - AMD Radeon iGPU (gfx1035, driver 24.10.24, `LEONIDA_PC_TAIL_UBO=1`, validation on): `d3d12_state_sweep_test` prints the skip and exits 77 (was silent pass); `d3d12_first_light_test` skips (no package dir on this machine — guard verified by inspection + clean compile, same position/pattern as the three existing guarded tests). - NVIDIA RTX 4070 SUPER: `d3d12_state_sweep_test` ran the full sweep — **498 cases compared, 0 differ, 0 skipped**, exit 0. - Full runtime build clean (Ninja, RelWithDebInfo, 642 targets). AI-assisted (Devin).
PierreEbele commented 2026-11-25 15:34:48 +00:00

Reviewed 696237b: could not execute here — both tests need Windows+MSVC+GPU (first_light also needs tools/first_light.py output), so I verified by inspection against main. The skips are warranted: main's layer refuses every translated graphics PSO below 144 push-constant bytes (ShaderUserData is fixed at 144 and the uniform-buffer fallback is not built yet), both tests are registered with SKIP_RETURN_CODE 77, the helpers accept the inner device, and d3d12_state_sweep_test really would end with differ ? 1 : 0 — a green exit having compared nothing — without this early skip. The branch merges cleanly into current main (merge-tree exit 0; main's newer create_device_proxy(console_lists=false) call is kept alongside the skips). No finding. AI-assisted review.

Recommendation: Merge

Reviewed 696237b: could not execute here — both tests need Windows+MSVC+GPU (first_light also needs tools/first_light.py output), so I verified by inspection against main. The skips are warranted: main's layer refuses every translated graphics PSO below 144 push-constant bytes (ShaderUserData is fixed at 144 and the uniform-buffer fallback is not built yet), both tests are registered with SKIP_RETURN_CODE 77, the helpers accept the inner device, and d3d12_state_sweep_test really would end with `differ ? 1 : 0` — a green exit having compared nothing — without this early skip. The branch merges cleanly into current main (merge-tree exit 0; main's newer create_device_proxy(console_lists=false) call is kept alongside the skips). No finding. AI-assisted review. **Recommendation:** Merge
whoalin1 commented 2026-11-25 20:07:24 +00:00

Rebased cleanly onto current main (db1a22d29) as b71723ab4 to refresh the stale CI baseline; no conflicts. The branch remains the two honest push-constant skip guards. AI-assisted with Devin.

Rebased cleanly onto current main (`db1a22d29`) as `b71723ab4` to refresh the stale CI baseline; no conflicts. The branch remains the two honest push-constant skip guards. AI-assisted with Devin.
whoalin1 commented 2026-11-26 13:27:26 +00:00

Consolidated into #1449 as cherry-pick e8f09538f to reduce review noise. The first-light and state-sweep push-constant skips are preserved there.

Consolidated into #1449 as cherry-pick `e8f09538f` to reduce review noise. The first-light and state-sweep push-constant skips are preserved there.
Sign in to join this conversation.
No description provided.