mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #2368] [CLOSED] d3d12_xs: the stand-in blend fallback reads the blend state D3D12 applies #2373
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#2373
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/2368
Author: @ERROR890
Created: 11/26/2026
Status: ❌ Closed
Base:
main← Head:fix/native-pso-standin-blend📝 Commits (2)
5a830efd3d12_xs: the stand-in blend fallback reads the blend state D3D12 applies27cc6afMerge main (fbf100b1b..e57bc63bc) into fix/native-pso-standin-blend📊 Changes
2 files changed (+94 additions, -7 deletions)
View changed files
📝
runtime/shims/d3d12_xs_native_pso_fallback.h(+31 -7)📝
runtime/test/native_pso_fallback_test.cpp(+63 -0)📄 Description
Claimed in the coordination issue as: NATIVE-PSO-STANDIN-BLEND
(https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7197231884)
Depends on: none.
Fixes: none.
What and why
without_stand_in_blend(runtime/shims/d3d12_xs_native_pso_fallback.h) decides whether a graphics pipeline isretried with blending off on its B4G4R4A4 stand-in targets. It read
BlendState.RenderTarget[i]for the target's ownindex, but D3D12 only gives every target its own entry when
IndependentBlendEnableis TRUE; with it FALSE,RenderTarget[0]describes all of them and the rest are ignored. Two consequences:says no blend, so the pipeline stayed missing;
The rewrite had the matching problem: it set
IndependentBlendEnable = TRUEto turn blending off on the stand-inalone, without first giving the other targets the state they inherited from
RenderTarget[0], so turning the flag onmade each of them read its own (usually zeroed) entry and silently stop blending.
What changes:
RenderTarget[IndependentBlendEnable ? i : 0], and a target whose blend is alogic op counts too, since the layer's refusal tests
BlendEnable || LogicOpEnable;RenderTarget[0]is copied into all eight entries first, and only then are blending andlogic ops turned off on the stand-in targets;
native_pso_fallback_testgains the cases: the stand-in at index > 0 under non-independent blending; the ignoredentry that must not cause a retry; the inherited state every other target keeps once the flag goes on; the independent
case where only the stand-in changes; and a stand-in whose blend is a logic op. The existing four cases still pass.
Testing
GPUs tested: n/a. This is a pure decision-logic change in a header plus its unit test; no Vulkan device, no D3D12
object and no game files are involved.
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.