[PR #806] d3d12: preserve float DepthBias in RASTERIZER1 and RASTERIZER2 streams #844

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/806
Author: @kotekompotek
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: work/d3d12-rasterizer-float-depth-bias


📝 Commits (1)

  • ab87f83 d3d12: preserve float DepthBias in RASTERIZER1 and RASTERIZER2 streams

📊 Changes

5 files changed (+187 additions, -16 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+2 -1)
📝 runtime/shims/d3d12_vulkan_device.cpp (+20 -8)
📝 runtime/src/depth24_fragment.h (+7 -7)
📝 runtime/test/d3d12_bundle_test.cpp (+153 -0)
📝 runtime/test/d3d12_d24_support_test.cpp (+5 -0)

📄 Description

Claimed in the coordination issue as: D3D-RASTERIZER-FLOAT-BIAS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main.
  • Preserved FLOAT DepthBias in RASTERIZER1 and RASTERIZER2 pipeline streams (runtime/shims/d3d12_vulkan_device.cpp and runtime/src/depth24_fragment.h).
  • Updated runtime/test/d3d12_bundle_test.cpp (Vertex input layout order/formats, SubTopology triangle topology, CullMode = D3D12_CULL_MODE_NONE, 64x64 DXGI_FORMAT_D24_UNORM_S8_UINT depth buffer + GREATER depth test comparing 1.5f vs 0.0f for RASTERIZER1/RASTERIZER2), added depth24_bias_constant unit assertions in runtime/test/d3d12_d24_support_test.cpp, and synced docs/d3d12_vulkan.md.

Tested

  • Built d3d12_com_test and d3d12_d24_support_test and ran d3d12_com & d3d12_d24_support (2/2 Passed on NVIDIA GeForce GTX 1050).
  • Ran tests/test_ctest_registration.py (4/4 OK).
  • Note: d3d12_bundle_test was not compiled locally because glslangValidator is absent in this 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.

🔄 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/806 **Author:** [@kotekompotek](https://github.com/kotekompotek) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `work/d3d12-rasterizer-float-depth-bias` --- ### 📝 Commits (1) - [`ab87f83`](https://github.com/ubiquitarianism/leonida/commit/ab87f836fb14a555a7b63f45523718b82027bf62) d3d12: preserve float DepthBias in RASTERIZER1 and RASTERIZER2 streams ### 📊 Changes **5 files changed** (+187 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+2 -1) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+20 -8) 📝 `runtime/src/depth24_fragment.h` (+7 -7) 📝 `runtime/test/d3d12_bundle_test.cpp` (+153 -0) 📝 `runtime/test/d3d12_d24_support_test.cpp` (+5 -0) </details> ### 📄 Description Claimed in the coordination issue as: D3D-RASTERIZER-FLOAT-BIAS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main`. - Preserved `FLOAT DepthBias` in `RASTERIZER1` and `RASTERIZER2` pipeline streams (`runtime/shims/d3d12_vulkan_device.cpp` and `runtime/src/depth24_fragment.h`). - Updated `runtime/test/d3d12_bundle_test.cpp` (`Vertex` input layout order/formats, `SubTopology` triangle topology, `CullMode = D3D12_CULL_MODE_NONE`, `64x64` `DXGI_FORMAT_D24_UNORM_S8_UINT` depth buffer + `GREATER` depth test comparing `1.5f` vs `0.0f` for `RASTERIZER1`/`RASTERIZER2`), added `depth24_bias_constant` unit assertions in `runtime/test/d3d12_d24_support_test.cpp`, and synced `docs/d3d12_vulkan.md`. ### Tested - Built `d3d12_com_test` and `d3d12_d24_support_test` and ran `d3d12_com` & `d3d12_d24_support` (`2/2 Passed` on NVIDIA GeForce GTX 1050). - Ran `tests/test_ctest_registration.py` (`4/4 OK`). - Note: `d3d12_bundle_test` was not compiled locally because `glslangValidator` is absent in this 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. --- <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#844
No description provided.