Repository navigation
d3d12_state_sweep_test: compare the per-face stencil cases only with a host that has OPTIONS14 (TEST-STATE-SWEEP-WIN10-STENCIL) - #1398
Conversation
…ost lacks OPTIONS14 The 16 stencil per-face masks cases build a pipeline state stream with D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2 (and half also call ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef), which require D3D12_FEATURE_D3D12_OPTIONS14::IndependentFrontAndBackStencilRefMaskSupported. On older in-box host runtimes such as Windows 10 (build 19045), CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS14) fails with E_INVALIDARG (0x80070057) and the host refuses those pipelines with E_INVALIDARG while the layer accepts them on purpose. Query OPTIONS14 on the host device and, when the query fails or reports FALSE, still run the cases on the layer and report them as not comparable on this host instead of a MISMATCH. Hosts that report support are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed feb22b4: test-only change; on a host without OPTIONS14 (or reporting IndependentFrontAndBackStencilRefMaskSupported = FALSE) the 16 DEPTH_STENCIL2 cases still run on the layer but count as "not comparable" instead of MISMATCH. I could not run the test here (Windows-only sweep test; no GPU), so this is a code-reading review: the shims implement DEPTH_STENCIL2 per-face masks and ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef, and the file is unchanged on main since the base. Nits: FALSE-reporting hosts also skip the identical-mask/single-ref cases, and a post-pipeline layer failure prints "pipeline 0x00000000". AI-assisted review. Recommendation: Merge |
Address review nits on PR ProjectLeonida#1398: - When CheckFeatureSupport(OPTIONS14) succeeds with IndependentFrontAndBackStencilRefMaskSupported == FALSE, only skip the 14 per-face cases that actually use differing front/back masks or OMSetFrontAndBackStencilRef (back_ref >= 0). The 2 identical-mask single-ref DEPTH_STENCIL2 cases ('same, one ref', front/back-facing) remain compared against the host. When OPTIONS14 itself fails, all 16 DEPTH_STENCIL2 cases stay skipped. - Record failed_step and failed_hr in Result for every failing call in run(), and print them instead of always printing 'pipeline 0x00000000' when a post-pipeline step fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Both nits are addressed in 8da0d91:
Run on Windows 10 Pro 19045, GTX 1050 Ti, NVIDIA 582.66, MSVC RelWithDebInfo: |
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 maskscases tod3d12_state_sweep. Those cases build a pipeline state stream withD3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2(and half of them call
ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef), which needD3D12_FEATURE_D3D12_OPTIONS14.IndependentFrontAndBackStencilRefMaskSupported. Windows 10's in-box D3D12 does notknow
OPTIONS14(CheckFeatureSupportreturnsE_INVALIDARG) and refuses those pipelines, so on Windows 10 all 16cases print
the host refuses the pipeline (0x80070057), the layer accepts it MISMATCHand the test fails, althoughthe layer behaves as intended.
The test now asks the host for
OPTIONS14. Where the query fails or reportsFALSE, the 16 cases still run on thelayer (a layer failure is still a
MISMATCH) and are printed as not comparable on this host, with the reason; theycount 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(16MISMATCH), passes 3 of 3 with this branch: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 reportsOPTIONS14the 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
mainand merges cleanly.docs/design.md. (Test only.)🤖 Generated with Claude Code