mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #2399] d3d12_xs: capture a pipeline stream that carries a VIEW_INSTANCING subobject #2399
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#2399
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/2399
Author: @ERROR890
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/pso-stream-view-instancing📝 Commits (2)
3ae707cd3d12_xs: capture a pipeline stream that carries a VIEW_INSTANCING subobject3b5b36eMerge remote-tracking branch 'origin/main' into fix/pso-stream-view-instancing📊 Changes
2 files changed (+39 additions, -1 deletions)
View changed files
📝
runtime/shims/d3d12_xs_pso_stream.cpp(+7 -1)📝
runtime/test/pso_stream_test.cpp(+32 -0)📄 Description
Claimed in the coordination issue as: PSO-STREAM-VIEW-INSTANCING
(https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7201353671)
Depends on: none.
Fixes: none.
What and why
The parser that decides creation models
D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING(
shims/d3d12_vulkan_device.cpp): it refuses a non-zeroViewInstanceCountand accepts the subobject with a count of0. The capture walker that keeps a stream for derivation (
layout_ofinshims/d3d12_xs_pso_stream.cpp) did not modelit, so that same stream created a PSO and was never captured. The PSO carried no
PsoStreamRecord, and everyCreateDerivedPipelineStateon it failed with E_FAIL ("base PSO has no kept stream") - a silent loss of the derivedstates the title asks for, with nothing in the trace to say why.
The two walkers should agree: a stream the parser accepts has to be capturable. This models the subobject's size and
alignment in the capture walker. Only the
ViewInstanceCount == 0shape reaches it (a non-zero count is refused beforea PSO is created), so the payload's
pViewInstanceLocationsis never read; the walk needs the entry's size andalignment to step over it, nothing more, and that is what the comment on the case says.
Testing
The new case is
test_view_instancing_is_capturedinruntime/test/pso_stream_test.cpp: a synthetic stream built thesame way as the existing cases, plus a zero-count
VIEW_INSTANCINGentry; it must be captured, keep the entry'spayload offset, and still derive a tag-1 record. No D3D12 device, no Vulkan device, no game files.
GPUs tested: n/a (CPU-only test).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translatorchange in this pull request.)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.