fix(agc): enable independentBlend for color targets with different blend states #6782
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6782"
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?
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-16T11:32:39Z.
What
Graphics pipelines give each color target its own blend state, decoded from its
CB_BLEND<n>_CONTROL, but the device was created without theindependentBlendfeature. A pipeline whose targets blend differently was therefore invalid (VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605: "pAttachments[2] is different than pAttachments[0] and independentBlend feature was not enabled"); a driver is free to apply attachment 0's state to every target.The feature is now required and enabled at device creation, like sampler anisotropy and BC texture compression. It is core Vulkan 1.0 and supported by desktop GPUs and lavapipe.
Tested
mainat3f171d03e; rebased ontoaff725bf6, wheremainitself does not build here (PipelineJournal.cppstatic assertions onShaderStagesandMeshConfiguration), which this change does not touch.VK_LAYER_KHRONOS_validation: the validation layer reported 00605 for its multi-target pipelines (20 reports, the duplicate limit, in the first minutes).agc_driver_graphics,agc_driver_dual_source_blend,agc_driver_reversed_order_blend,agc_driver_swap_alt_blendand the color target tests pass, with no 00605 report under the validation layer.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T11:36:29Z.
Review: APPROVED
Reviewed the device feature enablement and validation. The reported multi-attachment pipeline needs independentBlend, and the code checks support before enabling it; existing device requirements already use this fail-fast feature model. The validation-layer reproduction and focused blend tests support the change; I found no blocking issue.
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-16T15:05:23Z.
Review: APPROVED
Astro's Playroom (PPSA01325) hits the same thing. Linux, RTX 5080 (NVIDIA 615.78.08),
VK_LAYER_KHRONOS_validationwith the duplicate limit off, from boot into the first level:main82ddae75breportsVUID-VkPipelineColorBlendStateCreateInfo-pAttachments-006058 times,mainwith this PR 0 times. NoindependentBlendthrow, both runs reach the level, and the frames I could match between the two runs are the same. The other validation messages are the same kinds in both runs.Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T09:02:57Z.
Independent validation of exact head
4433a62b3, merged unchanged into integration63d on mainadb0e7a8cb. This composition also has an adapted #6235, whose mixed-MRT fixture exposes the feature requirement.Before your two-line change, Khronos core validation1.4.363 logs ten
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605errors in PreparedExports on each actual GPU, despite a successful readback/test exit. With your change, PreparedExports and FrontFaceAllBits each pass3/3 on RTX5080 (10de:2c02, driver32.0.16.1062) and Radeon Graphics (1002:13c0, driver32.0.21036.18): 12 fresh physical-GPU processes, zero layer errors/warnings, layer insertion and device identity verified in every log. Ubuntu24.04 WSL / GCC13.3 / Mesa25.2.8 llvmpipe adds six ordinary fixture passes. Windows11 Enterprise26200 / WinLibs GCC15.2r7; Vulkan required, project shader cache disabled; no selected skips/timeouts.Full Windows/Linux relinker/libs builds pass for this composition; this is not a standalone-head/main build claim. Fresh Sonic PPSA99902 runs on both physical GPUs retain their separate DCC/Vulkan submission stops, with no new menu/gameplay claim. No duplicate fix. AI-assisted: yes (Codex); author responsible.
Imported from boykopovar/AnyPS5. Originally posted by Sam-mon7 on 2026-10-17T09:47:53Z.
One more title and OS for this change: Demon's Souls (PPSA01341), Windows 11, RTX 4070 (driver 610.88),
VK_LAYER_KHRONOS_validationwith core and object-lifetime checks (duplicate limit 3), same route into the Nexus each run.independentBlend:VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605reported until the duplicate limit.02275, covered by #862).The stack was main
3ebad9045(2026-10-13) plus other open PRs, not current main.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T14:20:47Z.
First AMD-on-Linux (RADV) data for this PR. Merged onto
mainc4708fa20(clean merge) and compared with the samemain, on the same machine.Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8. Khronos validation layer 1.3.275, confirmed loaded with
VK_LOADER_DEBUG=layer.ANYPS5_NO_SHADER_CACHE=1mainVUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605agc_driver_prepared_exports, 3 inagc_driver_srgb8_color_target)agc_driver_prepared_exports,agc_driver_srgb8_color_targetThe only other
VUID-lines in these runs come from the old layer:VkDeviceCreateInfo-pNext-pNext, because it predatesVK_KHR_maintenance8, andVkGraphicsPipelineCreateInfo-pLibraries-06681. Their counts are identical with and without the PR (4 and 26). The PR adds no newVUID-.Full suite without the layer (
ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1631/1633 on bothmainand with this PR. The two failures are the same on both:agc_driver_image_table_vouched_lookups(#7766, fix in #7916) andagc_driver_guest_memory_lifetime(#7784).GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by VicRaster on 2026-10-21T17:40:38Z.
Independent Windows GPU validation of standalone head
4433a62b3bf6248df830994a255701c72581cc95, checked again before posting and still unchanged. This was built directly from the PR head, without merging newer main or adding production changes.Ryzen 9 3900X, RTX 3080 Ti, supported WinLibs MinGW-w64 GCC 15.2.0, Release, SPIRV-Tools disabled.
All five focused runs passed:
agc_driver_independent_blendfixture: GPU pixel readback verifies equal and different MRT blend states, FP32/FP16 exports, both attachments, masked channels and unchanged pixels outside the scissor.APS5_NO_GPL=1: passed. Device logs confirmpipelineLibrary=0, versus1in the normal run.agc_driver_dual_source_blendandagc_driver_swap_alt_blend: passed on the GPU.agc_driver_graphics: mock suite passed.The four GPU processes used
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Khronos validation 1.4.363 was positively loaded in each process. Full stdout/stderr contained no VUID errors or missing-layer warnings; no GPU tests were skipped.These results verify the tested independent-blend behaviour on this NVIDIA device. They are focused head validation, not a parent comparison, full-suite result or game-performance claim. No game was run.
AI-assisted testing and report: Codex.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T19:52:08Z.
Validation-layer data point for this PR (data only).
Setup: Linux (WSL2 Ubuntu 24.04, GCC 13.3, Release), llvmpipe,
vulkan-validationlayers1.3.275.0-1 from the Ubuntu archive (older than the SDK a driver ships with),VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.main950388bfd; this PR's change (the two lines inVulkanDevice.cpp, taken asgit diff upstream/main...refs/pr/6782) applied on top of it.Before (
main): across all 483 builtagc_driver_*_tests,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605("pAttachments[1] is different than pAttachments[0] and independentBlend feature was not enabled") is reported 16 times, all fromagc_driver_prepared_exportsandagc_driver_srgb8_color_target.After (this PR): those two tests, run again with the layer: 0 reports of
00605; both pass. The layer was active in the run (theVUID-VkDeviceCreateInfo-pNext-pNextlines about an unknownVkStructureType, which an older layer raises for every device, are still there).One run each. I did not run this PR's change on the RTX 4080 SUPER or the RX 6400 for this comment.
Not run: the other 481 tests with the change under the layer, other GPUs, other platforms.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T08:30:10Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The PR body omits the required
Fixes:checklist item from the current repository template.What I ran
Reviewed the unchanged head
4433a62b3bf6248df830994a255701c72581cc95; PR base isaff725bf6d8d61ed33e80507421fd131aeae1305, and the current-main preview against98ddd9c1792bbab016ceed5db267a93d1d61f00ais clean. Environment: Debian 12, Linux x86_64, Python 3.11.2, Git 2.39.5. This follow-up checks PR metadata; I did not rebuild or rerun the unchanged AGC code.Results
Fixes:Relevant raw output
Findings
Blocking
Fixes:line in every PR body. The body hasDepends on:andUnblocks:, but noFixes:entry. Please addFixes: noneif no issue is closed, or the correctFixes #Nreference if one is. This is a template/contribution-rule correction; the code approval previously submitted remains scoped to the unchanged head.Sources
Fixes:item in the template at current mainTo get this to a good state
Please update the PR body with the correct
Fixes:value. I will rerun the body and convention checks after the update.