mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #2234] d3d12: the on-demand stream carries the depth-bounds flag too (DEPTH-BOUNDS-ON-DEMAND-STREAM) #2238
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2238
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2234
Author: @star41905453-coder
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:depth-bounds-stream📝 Commits (2)
7e21a88d3d12: support hardware depth-bounds testing and OMSetDepthBoundsa6e66c7d3d12: the on-demand stream carries the depth-bounds flag too (DEPTH-BOUNDS-ON-DEMAND-STREAM)📊 Changes
13 files changed (+250 additions, -19 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+7 -2)📝
runtime/shims/d3d12_com.cpp(+32 -2)📝
runtime/shims/d3d12_com.h(+3 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+23 -11)📝
runtime/src/command_list.h(+2 -0)📝
runtime/src/vulkan_backend.h(+2 -1)📝
runtime/src/vulkan_replay.h(+10 -0)📝
runtime/test/d3d12_bundle_forbidden_test.cpp(+3 -0)📝
runtime/test/d3d12_close_parity_test.cpp(+35 -0)📝
runtime/test/d3d12_com_test.cpp(+16 -1)📝
runtime/test/d3d12_mesh_test.cpp(+114 -1)📝
runtime/test/d3d12_vulkan_device_test.cpp(+2 -1)📝
runtime/test/vk_test_device.h(+1 -0)📄 Description
Depends on: #815
A stream that is realized on demand (
PipelineState::set_pending_stream, resolved on first use) goes through a secondcreate_graphicscall site that passes neither the extras nor the back-face stencil masks. So a title that binds a console PSO before it is realized silently losesDepthBoundsTestEnable— the depth-bounds test is then always on and clips nothing, with no refusal and no log.This passes both at that call site, the same as the eager one.
Test (
d3d12_mesh_test): a stream PSO withDEPTH_STENCIL1DepthBoundsTestEnable.depthBounds: draw the full-screen triangle with bounds 0.9..1.0 and then 0.0..1.0. Outside the bounds nothing may be painted, inside the whole viewport must be. Dropped flag -> yellow outside the bounds.depthBounds = false): the flag is refused withE_NOTIMPL— at creation, or at first use on a device that prepares PSOs on demand — and a success would mean the flag was dropped.What is not proven here: this box has no
depthBounds, so the draw half skips.LEONIDA_PIPELINE_COMPILE=on-demanddoes reach the lazy path, butd3d12_mesh_testalready stops at its console-PSO step under that switch on unmodifiedmain(line 344,SUCCEEDED(console_hr)), so the lazy call site is not exercised end to end locally either way. A run on a depth-bounds-capable GPU — underon-demandif possible — proves it; that is where review would help.Run:
d3d12_mesh_testpasses here (the capable branch skips), and the whole mesh suite keeps its 9 invalid / 2 not-implemented refusals.Item: DEPTH-BOUNDS-ON-DEMAND-STREAM, claimed in #1608.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.