Repository navigation
d3d12_xs: blend state for slot 57 native pipelines from state blob A (RT-SLOT57-BLEND-STATE) - #1671
Conversation
…(RT-SLOT57-BLEND-STATE) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry (RT-SLOT57-BLEND-STATE) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…PSOs (RT-SLOT57-BLEND-STATE) A library pipeline enables MAX on an R8_UINT target; the colour block bypasses blending there, and D3D12 refuses the PSO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…with blending off on its stand-in targets (RT-SLOT57-BLEND-STATE) On devices without renderable B4G4R4A4, the Vulkan layer refuses blending on the RGBA8 stand-in (E_NOTIMPL). Turn blending off on those targets, then on every target, before leaving the pipeline to the PC description path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed two fixes after a second real-boot run turned up one refused pipeline (
After both fixes, the same boot has no refused slot 57 pipeline and no device loss, and the first-run pages, legal screens and slideshow still draw correctly. Blending on the RGBA8 stand-in is something the layer could allow approximately, but that's a separate decision about the layer. #1691 (depth, stencil and raster state from the same blob, RT-SLOT57-DEPTH-RASTER) is stacked on this branch and already includes these fixes. Merging this one first leaves #1691 with only its own two commits to review. @QemmHD if you A/B, #1691's branch covers both. AI-assisted. |
|
Independent verification (native Windows; RTX 4070 SUPER + AMD Radeon gfx1036 iGPU, |
|
Real-boot A/B on native Windows 11, RTX 4070 SUPER (NVIDIA 621.24), MSVC RelWithDebInfo. The slot 57 native graphics factory is on in both arms, with
Thanks @OreoFR, this is the fix for what I reported on #939. AI-assisted (Claude Code, Claude Opus 5.5). |
|
@QemmHD thanks for the A/B. The 4 AI-assisted. |
|
Tested on a real boot: this fixes the solid glyph blocks for us too. Menu and first-run text now renders as glyphs, on an RTX 5070 Ti (Blackwell, NVIDIA 617.42, Windows 11 Pro 26300).
AI-assisted (Claude Code, Claude Opus 5.5). |
…d-in (RT-SLOT57-BLEND-STATE review) adrianmjim's review: the blend fallback ran on any E_NOTIMPL, which also stands for refusals unrelated to blending (stream_unsupported, mesh limits, FullyCovered, and ProjectLeonida#1703's dual-source refusal). Such a pipeline was retried with blending off, logged as a blend refusal, and, if the retry succeeded, drew without the blend the title asked for. Now only a pipeline with a blended B4G4R4A4 target is retried, with blending off on those targets alone (without_stand_in_blend, its own header), and the line is printed only when that retry succeeds. The "every target" step is gone: no real boot used it (RTX 4070 Laptop and kawaii-shakal's RTX 5070 Ti only ever logged the B4G4R4A4 step). native_pso_fallback_test covers the decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@kawaii-shakal thanks, a second machine and GPU family showing the glyphs instead of the solid blocks is exactly what this needed. Your log matches mine: the Since your run, adrianmjim pointed out in #1703 that the fallback also caught unrelated AI-assisted. |
|
Merged: this is the fix for the solid glyph blocks and the opaque, black-backed layers that every boot since #939 showed. Thank you, @OreoFR, and thanks to @QemmHD for the A/B and to @kawaii-shakal and @whoalin1 for the independent runs.
AI-assisted (Claude Code, Claude Opus 5.5). |
Conflicts: the blend fallback of ProjectLeonida#1671/ProjectLeonida#1703 for B4G4R4A4 stand-ins moves into the build() that ProjectLeonida#1592 split out, so it runs for both stage sources; the translated draw test keeps --native-fspx and --dual-source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claimed in the coordination issue as: RT-SLOT57-BLEND-STATE (#1608 (comment))
Depends on: #1592
#1592 is a conflict only: both add an
#includeon the same line ofruntime/shims/d3d12_xs_native_pso.h. Everything else merges, and I'll rebase onto whichever lands first. This builds on no other PR. The real-boot test also used #1558 and #1547 to get past the landing screen on NVIDIA; this change doesn't need them.What and why
Since #939, every graphics pipeline the game creates through device slot 57 goes through the native factory (
runtime/shims/d3d12_xs_native_pso.h). The factory built each PSO from a zeroed desc and set onlyRenderTargetWriteMask, so every target drew with blending off. The record's state blob A, which carries the blend state, was never read (native_pso.h: "blend, raster, depth, not decoded"). That is the cause of the picture regression QemmHD bisected to #939 (#939 (comment)):Blob A's shared block holds context register values in the RDNA2 layout. Measured over all 5,680 distinct blobs in the 1.0.2.1 pipeline library (25,471 graphics records):
+0xd0..+0xecCB_BLEND0..7_CONTROL: 34 distinct values, all in-range blends.+0x78CB_TARGET_MASK: it matches blob B's targets in 17,626 records.+0x7cCB_COLOR_CONTROL: ROP3 copy everywhere.The counts and the layout are in
docs/fspx.md, "State blob A". Aggregate counts only; no blob bytes are quoted anywhere.runtime/src/native_pso.h:decode_state_a_blendchecks the measured shapes and the tag, then reads the registers.d3d12_target_blendandd3d12_blendmap them to D3D12 blend values: RDNA2 factor andCOMB_FCNtoD3D12_BLENDandD3D12_BLEND_OP, alpha taken from the colour fields withoutSEPARATE_ALPHA_BLEND, and each target'sCB_TARGET_MASKnibble as its write mask.plan()fillsFixedState::blend.runtime/shims/d3d12_xs_native_pso.h:fill_blend_statebuildsD3D12_BLEND_DESCfrom it, withIndependentBlendEnablewhere targets differ. Both the VS and the mesh paths use it.SRC1factors, since the translator declares no second pixel-shader output;runtime/test/native_pso_blend_test.cpp(portable, standard library only): synthetic blobs for both families, the shape and tag checks, the register mapping including the subtract/reverse-subtract order and the non-separate alpha case, the refused forms, andplan().Tested
main+ d3d12_xs: make a D16S8 depth texture without UAV when the depth provider refuses it (RT-D16S8-UAV-NVIDIA-FALLBACK) #1558 + d3d12: compile a submission's pipelines on worker threads (RT-PIPELINE-COMPILE-WORKERS) #1547 (needed on NVIDIA to get past the landing screen) + this branch, fresh first-run profile, factory on.CB_BLEND0 f1010f01pipelines, as expected.native_pso_blend,xs_proxy_mockandxbox_native_base_drawpass.GPUs tested: NVIDIA GeForce RTX 4070 Laptop GPU, driver 591.59 (32.0.15.9159), Windows 11
AI-assisted: yes
@QemmHD offered an A/B on a 4070 SUPER with the factory on and off; that would cover a second machine.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Not a translator change; the measurement is indocs/fspx.md.)🤖 Generated with Claude Code