[PR #1467] [CLOSED] tests: skip honestly when push constants fall below the 144-byte contract #1496

Closed
opened 2026-11-26 20:21:26 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1467
Author: @whoalin1
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: honest-pushconst-skips


📝 Commits (1)

  • b71723a tests: skip honestly when push constants fall below the 144-byte contract

📊 Changes

2 files changed (+12 additions, -0 deletions)

View changed files

📝 runtime/test/d3d12_first_light_test.cpp (+5 -0)
📝 runtime/test/d3d12_state_sweep_test.cpp (+7 -0)

📄 Description

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).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1467 **Author:** [@whoalin1](https://github.com/whoalin1) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `honest-pushconst-skips` --- ### 📝 Commits (1) - [`b71723a`](https://github.com/ubiquitarianism/leonida/commit/b71723ab4a27affaa659a1f166893a79303f1abc) tests: skip honestly when push constants fall below the 144-byte contract ### 📊 Changes **2 files changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_first_light_test.cpp` (+5 -0) 📝 `runtime/test/d3d12_state_sweep_test.cpp` (+7 -0) </details> ### 📄 Description 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:26 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1496
No description provided.