Repository navigation
Conversation
|
Ready for review: integer-target blending bypass (no blend state on integer RTVs, dual-source excluded for integer targets), from DexNom/VIctory ddb7332. New layer-only PSO test added; d3d12_pso_validation_test is 61/61 layer checks and 100/100 host comparisons plain and with LEONIDA_VK_VALIDATION=1 on an RTX 3080 Ti (616.64). Mergeable; the red status is the repo-wide checks backlog. |
|
Tested for RT-STATE-AUDIT-PIPELINE on a Mac: Apple M3, macOS 26.5.1, Wine 11.0 (WineHQ macOS build, its MoltenVK 1.4.1), clang-cl/lld-link 23.1.6 cross build. Merged onto
GPUs tested: Apple M3 (profile S), MoltenVK 1.4.1 under Wine. AI-assisted (Claude Code, Claude Opus 5.5). |
|
CORRECTION to my comment above (#2023 (comment)). Wrong line: "This PR's What I measured since (2 runs each, Apple M3, Wine 11.0 with its MoltenVK 1.4.1,
So on a Mac under Wine, this test neither fails on AI-assisted (Claude Code, Claude Opus 5.5). |
lixonik
left a comment
There was a problem hiding this comment.
Reviewed and tested merged onto main (493867366) on Windows 11 + NVIDIA GeForce RTX 5070 12 GB (MSVC 19.44, Ninja Release).
integer_color_format()covers all 21 D3D12 integer render-target formats (includingR10G10B10A2_UINT), and both thedual_sourcecheck andblends[i].blendEnableclear blending for integer targets while preservingcolorWriteMask, satisfyingVUID-VkPipelineColorBlendAttachmentState-blendEnable-04727.- Built and ran
d3d12_pso_validation_test: the new case3b(gfx: integer target bypasses blending) passed on RTX 5070. (Note: the later pre-existing parity check at line 460gfx: Flags=DYNAMIC_DEPTH_BIASfails on this host because Windows 11 inbox D3D12 without the Agility SDK returnsE_INVALIDARGforDYNAMIC_DEPTH_BIAS, unrelated to this PR.)
GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341; VK_LAYER_KHRONOS_validation not installed locally).
AI-assisted (Antigravity, Gemini).
|
Verified the integer-target bypass on physical gfx906 (RADV Mesa 26.0.8, Linux Wine 11.0), main On the merge, both fenced 4 × 3 draws changed only the six covered red channels and preserved the other channels and pixels. Normalized blending and a mixed integer/UNORM render-target pair also produced the expected output. No validation errors or synchronization hazards in the submitted runs. The SRC1 control did log warnings: output type mismatch on main, unused fragment output on the merge. Remaining feature-off case: with AI-assisted. |
|
TAKEN by OreoFR (Windows, RTX 4070 8 GB) |
|
Verified by OreoFR — NO RED (the new check passes on main too)
AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR. |
|
Heads-up from a negative control: the new case 3b in this branch passes with 1. It applies and builds. 2. With the branch its test passes: 3. The control - revert only 4. Why, and it is visible in the new case itself. Case 3b builds a graphics pipeline with const HRESULT hr = create_graphics(layer_dev.p, desc);
if (hr != S_OK) { … "FAIL [gfx: integer target bypasses blending]" … return 1; }
++checked;The only thing it asserts is that creation succeeds. The change in the shim is about what state the layer emits - forcing What would detect it: inspect the created pipeline's blend state (or the Vulkan side of it) and assert What I am not saying: that the change is wrong. The shim's rule is the correct one for Vulkan; what is missing is a test that fails when the rule is not applied. I did not edit the test - that is the author's call, and a stranger rewriting an assertion would be guessing at what they meant to check. Why I am commenting: I verify open pull requests that replay onto current Written with an AI assistant. |
Ports the first concrete gap from DexNom/VIctory (source-only Rust runtime,
GPL-3.0-or-later), commit
ddb7332, reimplemented for this Vulkan layer.What
blendEnable = VK_TRUE. The layer clears the enable forthat target only, keeps its
colorWriteMask(and every other target's state), and no longer counts it as adual-source consumer.
CB_BLENDnregardless of the format, and D3D12Xbox bypasses the blender oninteger surfaces. PC D3D12 rejects that state at pipeline creation, and Vulkan requires
blendEnable = VK_FALSE(VUID-VkPipelineColorBlendAttachmentState-blendEnable-04727), so forwarding it couldonly fail the pipeline — the failed-
CreatePipelineStateclass reported on RADV in AMD/RADV + 8 GB: boot ends at 54 s with a null write at game+0x2215c35, with or without the shader library #1915.Test
d3d12_pso_validation_test§3b creates a layer-only pipeline with anR8G8B8A8_UINTtarget, blending enabledand a red write mask. PC D3D12 rejects the same state, so it is deliberately not in the parity set.
PASS (61 layer checks, 100 host comparisons), with the plain run andwith
LEONIDA_VK_VALIDATION=1.Attribution
Adapted from DexNom/VIctory
ddb7332(GPL-3.0-or-later), "Restore 40 shader variants and repair integer-targetblending"; noted in the code comment. AI-assisted.
Claimed as
D3D-INTEGER-TARGET-BLEND-BYPASSin the coordination issue.