mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #1986] d3d12: support StreamOutput RasterizedStream other than 0 (D3D-STREAMOUTPUT-RASTERIZED-STREAM) #1993
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#1993
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/1986
Author: @Miici0
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/d3d-stream-output-rasterized-stream📝 Commits (3)
c99f265d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback9fc0789d3d12: accept StreamOutput PSOs, implement SOSetTargets, capture draws via VK_EXT_transform_feedbacke045cccd3d12: support StreamOutput RasterizedStream other than 0 (D3D-302)📊 Changes
11 files changed (+527 additions, -7 deletions)
View changed files
📝
runtime/CMakeLists.txt(+27 -0)📝
runtime/shims/d3d12_com.cpp(+27 -0)📝
runtime/shims/d3d12_com.h(+12 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+86 -6)📝
runtime/src/command_list.h(+9 -0)📝
runtime/src/vulkan_backend.h(+6 -1)📝
runtime/src/vulkan_replay.h(+77 -0)➕
runtime/test/d3d12_stream_output_test.cpp(+230 -0)➕
runtime/test/glsl/ps_stream_output.frag(+9 -0)➕
runtime/test/glsl/vs_stream_output.vert(+11 -0)📝
runtime/test/vk_test_device.h(+33 -0)📄 Description
Claimed in the coordination issue as: D3D-STREAMOUTPUT-RASTERIZED-STREAM (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7165139723)
Depends on: #1884
What and why
#1884 (D3D-STREAMOUTPUT-RUNTIME) refused any
RasterizedStreamother than 0. This PR handles the two remaining cases:D3D12_SO_NO_RASTERIZED_STREAM(no stream reaches the rasterizer):rasterizerDiscardEnableon the pipeline's rasterization state. Needs no extra Vulkan feature; still captures everything via transform feedback.VkPipelineRasterizationStateStreamCreateInfoEXTchained into the rasterization state, gated on thegeometryStreamsfeature (detected/enabled by #1236) and the index being below the device'smaxTransformFeedbackStreams.The pipeline-creation refusal and the
Recipe/build()rasterization-state wiring are both updated; the draw-replay capture path is unaffected (capture is per XFB buffer slot, not per rasterized stream).Tested
d3d12_stream_output_test.cppnow runs its capture check twice: once atRasterizedStream0 (as before) and once atD3D12_SO_NO_RASTERIZED_STREAM. Both capture all 3 vertices correctly, 0 mismatches, on real hardware.An explicit non-zero stream index needs a multi-stream geometry shader to exercise meaningfully, which this PR does not add; that code path is implemented per the Vulkan spec but not independently tested here.
Full
ctest(runtime/build, RelWithDebInfo): same pattern as #1884, only the pre-existingd3d12_execute_indirect_validationfailure (#1066, unrelated). No regressions.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11 26300.9974, Vulkan SDK 1.4.363.1.
AI-assisted: yes (Claude Code)
Checklist
main(stacked on #1884, which is stacked on #1236) and merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.