Repository navigation
d3d12: support multi-viewport and multi-scissor up to 16 entries - #827
Closed
kotekompotek wants to merge 1 commit into
Closed
kotekompotek wants to merge 1 commit into
kotekompotek wants to merge 1 commit into
Conversation
abnalstlll-byte
approved these changes
Nov 24, 2026
abnalstlll-byte
left a comment
Contributor
There was a problem hiding this comment.
Clean-Room Peer Review for PR #827 (d3d12: support multi-viewport and multi-scissor up to 16 entries)
Outstanding implementation of multi-viewport/scissor rasterizer state:
- D3D12 API Boundary Parity:
- RSSetViewports and RSSetScissorRects now support up to D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE (16) elements.
- Zero-count invocation correctly unbinds all elements (�iewports_.fill({}) / scissors_.fill({})) and sets draw_views_stale_ = true.
- Rejects count > 16 via check(false).
- Vulkan Y-Axis Inversion & Dynamic Replay:
- Replay backend correctly preserves D3D winding by calculating negative-height viewports ({v.x, v.y + v.height, v.width, -v.height, v.min_depth, v.max_depth}) across all array entries.
- Employs �k.set_viewport_with_count and �k.set_scissor_with_count dynamically when enabled, while maintaining safe fallback to single-viewport devices.
- Unit Test Coverage:
untime/test/d3d12_com_test.cpp and �k_test_device.h verify multi-viewport recording and zero-count clearing. - Clean-room verification: Strict C++20 compliance, clean MSVC/Clang build, zero proprietary data.
LGTM! Excellent work. Approved.
abnalstlll-byte
approved these changes
Nov 24, 2026
abnalstlll-byte
left a comment
Contributor
There was a problem hiding this comment.
Clean-room verified (zero game data). Correct implementation of multi-viewport and multi-scissor arrays (up to 16) in GraphicsCommandList and Vulkan replay via multiViewport / vkCmdSetViewportWithCount. Test coverage in d3d12_com_test.cpp.
kotekompotek
force-pushed
the
work/d3d12-multi-viewport-scissor
branch
from
November 24, 2026 15:08
76b0529 to
cca93a9
Compare
Collaborator
|
Thanks for working on multi-viewport support. I'm closing this in favour of #510, which covers the same item:
AI-assisted (Claude Code, Claude Opus 5.5). |
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: coordination issue #14
What and why
main.VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT/VK_DYNAMIC_STATE_SCISSOR_WITH_COUNTwhenVkPhysicalDeviceFeatures::multiViewportis enabled, addedlog_oncenotice when clamped to 1, and synceddocs/d3d12_vulkan.md.Tested
d3d12_com_testand ranctest -R ^d3d12_com$(Passed, 1.47s).GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.