d3d12: support separate front/back stencil masks in DEPTH_STENCIL2 streams #799

Closed
github-bot wants to merge 1 commit from gh-pr/799/head into gh-pr/799/base
Owner

@⁠kotekompotek on GitHub · 2026-11-24 13:59 UTC · original
kotekompotek:work/d3d12-stencil-separate-masks → main · +95 −12 · 3 files · 1 commits · closed without merging

Claimed in the coordination issue as: coordination issue #14

What and why

  • Rebased onto current main.
  • Supported separate front/back stencil read and write masks in D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2 streams (runtime/shims/d3d12_vulkan_device.cpp), added stream test cases in runtime/test/d3d12_bundle_test.cpp, and synced docs/d3d12_vulkan.md.

Tested

  • Built d3d12_com_test and ran ctest -R ^d3d12_com$ (Passed, 1.65s). (d3d12_bundle_test requires glslangValidator, which is not installed in this local environment.)

GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠kotekompotek** on GitHub · 2026-11-24 13:59 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/799) `kotekompotek:work/d3d12-stencil-separate-masks` → `main` · +95 −12 · 3 files · 1 commits · closed without merging Claimed in the coordination issue as: coordination issue #14 ### What and why - Rebased onto current `main`. - Supported separate front/back stencil read and write masks in `D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2` streams (`runtime/shims/d3d12_vulkan_device.cpp`), added stream test cases in `runtime/test/d3d12_bundle_test.cpp`, and synced `docs/d3d12_vulkan.md`. ### Tested - Built `d3d12_com_test` and ran `ctest -R ^d3d12_com$` (`Passed`, 1.65s). (`d3d12_bundle_test` requires `glslangValidator`, which is not installed in this local environment.) GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:21:51 +00:00
github-bot closed this pull request 2026-11-26 09:21:51 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 19:50 UTC · original

Thanks for working on this, @⁠kotekompotek. I'm closing this in favour of #878, which fixes the same refusal:

  • Both PRs send the back face's masks to depth.back correctly, so the device code is equivalent.
  • #878 also sets OPTIONS14.IndependentFrontAndBackStencilRefMaskSupported to TRUE. This PR accepts different face masks but still reports the cap as FALSE.
  • The new d3d12_bundle_test block binds no depth-stencil view and uses KEEP/ALWAYS, so the stencil test never runs. It would also pass if the back masks were ignored. #878 compares 16 per-face mask and reference cases with the host D3D12 device, and those cases fail when the back face gets the front face's masks.
  • #878 also had the earlier claim for D3D-STENCIL-FACE-MASKS in #14.

Your review of #878 is very welcome if you spot anything it misses.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 19:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/799#issuecomment-7142665062) Thanks for working on this, @⁠kotekompotek. I'm closing this in favour of #878, which fixes the same refusal: - Both PRs send the back face's masks to `depth.back` correctly, so the device code is equivalent. - #878 also sets `OPTIONS14.IndependentFrontAndBackStencilRefMaskSupported` to TRUE. This PR accepts different face masks but still reports the cap as FALSE. - The new `d3d12_bundle_test` block binds no depth-stencil view and uses KEEP/ALWAYS, so the stencil test never runs. It would also pass if the back masks were ignored. #878 compares 16 per-face mask and reference cases with the host D3D12 device, and those cases fail when the back face gets the front face's masks. - #878 also had the earlier claim for D3D-STENCIL-FACE-MASKS in #14. Your review of #878 is very welcome if you spot anything it misses. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.