fix(agc): enable independentBlend for color targets with different blend states #13006
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13006"
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 brainiac91 on 2026-10-29T21:00:31Z.
What
Enables the
independentBlenddevice feature and requires it where the driver really emits differing per-attachment blend states.Pipeline::Pipelinehas always passed a distinctVkPipelineColorBlendAttachmentStateper color target:maskedStatezeroes the write mask of targets the pixel shader has no output for, the second channel of an 8_8 target gets its own factors and ops, and the guest setsCB_BLENDn_CONTROLper render target. The feature was never enabled, so each of those pipelines brokeVUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605.VulkanDevicenow enablesindependentBlendfromavailableand records it next todualSrcBlendandlogicOp, and the feature log line reports it.Pipeline.cppcompares the attachment vector and, when the entries differ, requires the feature instead of creating a pipeline the spec forbids; the alternate-component-order second-channel pipeline gets the same check, since its attachments differ independently of the first channel.Tested
Windows 11, NVIDIA RTX 5060 Ti 16 GB, driver 617.14, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON. No title run.Paired runs of
agc_driver_prepared_exportsandagc_driver_srgb8_color_targetfrom the same machine and GPU withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan SDK 1.4.363),ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. Neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS.main: 14 + 4 = 18VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605, the count #11990 reports.VUID-line in either log, and both tests pass.The device log reports
independentBlend=1on this GPU, andagc_driver_address_passespasses too.tools/check_conventions.py --base origin/mainpasses.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-29T21:46:35Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The implementation looks technically sound, but this PR duplicates the still-open #6782 fix for the same validation error and does not acknowledge or coordinate with it.
What I ran
Reviewed head
b9f5938118395b3a61e140e3a62c8707bf941b6dagainst current upstreammain52f212ec053f917455f2f87674ddb708dcc545d8; the merge preview is clean. I inspected the device feature enablement, pipeline checks, #11990, and open #6782. No local build or GPU tests were run.Results
Unedited local command output
Findings
Blocking
independentBlendto fix the same #11990 validation error. Its current head4433a62b3bf6248df830994a255701c72581cc95requires and enables the feature inVulkanDevice.cpp; this PR adds a more compatible conditional-enable path and rejects differing pipeline attachments when the feature is unavailable. That distinction is useful, but both PRs implement the same fix and currently propose different device-compatibility policies. This PR's checklist says no other PR implements the same work.Non-blocking
Sources
Not verified
I did not run the local C++ build, validation tests, or another GPU comparison. The author-reported Windows/NVIDIA evidence is not independently reproduced here.
To get this to a good state
Please coordinate the overlapping fix with #6782's author and update the checklist/PR relationship so maintainers can select one coherent implementation. I will recheck the same source and hosted results on the resulting head.
Pull request closed