[PR #1398] d3d12_state_sweep_test: compare the per-face stencil cases only with a host that has OPTIONS14 (TEST-STATE-SWEEP-WIN10-STENCIL) #1428

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1398
Author: @qhukz13
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: cont/state-sweep-win10


📝 Commits (2)

  • feb22b4 d3d12_state_sweep_test: skip host comparison of DEPTH_STENCIL2 when host lacks OPTIONS14
  • 8da0d91 d3d12_state_sweep_test: refine OPTIONS14 skip and report failed step

📊 Changes

1 file changed (+90 additions, -30 deletions)

View changed files

📝 runtime/test/d3d12_state_sweep_test.cpp (+90 -30)

📄 Description

Claimed in the coordination issue as: TEST-STATE-SWEEP-WIN10-STENCIL (claim)

What and why

#878 added separate front and back stencil masks to the layer and 16 stencil per-face masks cases to
d3d12_state_sweep. Those cases build a pipeline state stream with D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2
(and half of them call ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef), which need
D3D12_FEATURE_D3D12_OPTIONS14.IndependentFrontAndBackStencilRefMaskSupported. Windows 10's in-box D3D12 does not
know OPTIONS14 (CheckFeatureSupport returns E_INVALIDARG) and refuses those pipelines, so on Windows 10 all 16
cases print the host refuses the pipeline (0x80070057), the layer accepts it MISMATCH and the test fails, although
the layer behaves as intended.

The test now asks the host for OPTIONS14. Where the query fails or reports FALSE, the 16 cases still run on the
layer (a layer failure is still a MISMATCH) and are printed as not comparable on this host, with the reason; they
count as skipped. A host that reports support compares them as before. The layer is not changed.

Tested

GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, ctest -R "^d3d12_state_sweep$":
fails on main (16 MISMATCH), passes 3 of 3 with this branch:

stencil per-face masks same, one ref, front-facing: not comparable on this host (host runtime lacks D3D12_FEATURE_D3D12_OPTIONS14, hr 0x80070057)
...
482 cases compared with NVIDIA GeForce GTX 1050 Ti, 0 differ; 16 skipped

The test always compares with the hardware adapter behind the Vulkan device (it does not read
LEONIDA_HOST_ADAPTER), so the supported path is not exercised on this machine; on a Windows 11 host that reports
OPTIONS14 the code path is the unchanged one.

GPUs tested: NVIDIA GeForce GTX 1050 Ti, driver 582.66, Windows 10 19045. No game files.

AI-assisted: yes (Claude Code, with Antigravity for the implementation and the runs)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption (CONTRIBUTING.md).
  • A new translator rule is in the contract table of docs/design.md. (Test only.)

🤖 Generated with Claude Code


🔄 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/1398 **Author:** [@qhukz13](https://github.com/qhukz13) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `cont/state-sweep-win10` --- ### 📝 Commits (2) - [`feb22b4`](https://github.com/ubiquitarianism/leonida/commit/feb22b48183a66e4b1fab20e6113a4df8dd472c7) d3d12_state_sweep_test: skip host comparison of DEPTH_STENCIL2 when host lacks OPTIONS14 - [`8da0d91`](https://github.com/ubiquitarianism/leonida/commit/8da0d91fcf3ce89ab6888b0968fd86ecf1cef163) d3d12_state_sweep_test: refine OPTIONS14 skip and report failed step ### 📊 Changes **1 file changed** (+90 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_state_sweep_test.cpp` (+90 -30) </details> ### 📄 Description Claimed in the coordination issue as: TEST-STATE-SWEEP-WIN10-STENCIL ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147410103)) ### What and why #878 added separate front and back stencil masks to the layer and 16 `stencil per-face masks` cases to `d3d12_state_sweep`. Those cases build a pipeline state stream with `D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2` (and half of them call `ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef`), which need `D3D12_FEATURE_D3D12_OPTIONS14.IndependentFrontAndBackStencilRefMaskSupported`. Windows 10's in-box D3D12 does not know `OPTIONS14` (`CheckFeatureSupport` returns `E_INVALIDARG`) and refuses those pipelines, so on Windows 10 all 16 cases print `the host refuses the pipeline (0x80070057), the layer accepts it MISMATCH` and the test fails, although the layer behaves as intended. The test now asks the host for `OPTIONS14`. Where the query fails or reports `FALSE`, the 16 cases still run on the layer (a layer failure is still a `MISMATCH`) and are printed as not comparable on this host, with the reason; they count as skipped. A host that reports support compares them as before. The layer is not changed. ### Tested GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, `ctest -R "^d3d12_state_sweep$"`: fails on `main` (16 `MISMATCH`), passes 3 of 3 with this branch: ``` stencil per-face masks same, one ref, front-facing: not comparable on this host (host runtime lacks D3D12_FEATURE_D3D12_OPTIONS14, hr 0x80070057) ... 482 cases compared with NVIDIA GeForce GTX 1050 Ti, 0 differ; 16 skipped ``` The test always compares with the hardware adapter behind the Vulkan device (it does not read `LEONIDA_HOST_ADAPTER`), so the supported path is not exercised on this machine; on a Windows 11 host that reports `OPTIONS14` the code path is the unchanged one. GPUs tested: NVIDIA GeForce GTX 1050 Ti, driver 582.66, Windows 10 19045. No game files. AI-assisted: yes (Claude Code, with Antigravity for the implementation and the runs) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption (CONTRIBUTING.md). - [ ] A new translator rule is in the contract table of `docs/design.md`. (Test only.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1428
No description provided.