feat(agc): blend into an unclamped normalized color target in the pixel shader #11684
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11684"
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 oneandonlydean on 2026-10-27T02:41:57Z.
What
A draw that enabled color blending into an unclamped normalized color target (UNORM/SNORM with the unclamped blend mode) used to be refused with "blending unclamped normalized color is not implemented". The draw's blend is now done in the pixel shader, on a float storage view of the target, inside the pixel-interlock section, and clamped to the format's range (
[0, 1]or[-1, 1]) only at the end.TargetMerge/TargetBlendadd their fields to the cache key, the snapshot hash, the draw lookup and the request serializer only when blending is enabled, so keys, hashes and serialized bytes of every other draw are identical (the blend flag is bit 16 of the old merge mask word, which an older reader rejects instead of misreading).SRC_ALPHA_SATURATE,MINandMAXfollow Vulkan.fragmentShaderPixelInterlock.agc_driver_unclamped_normalized_blendis the new execution test: it blends 14 UNORM and 4 SNORM draws against a float oracle (with channels outside the write mask required to be exact), two same-draw overdraws of 16 layers each, the request bytes, the cache key and the masks, and the refusal without pixel interlock.docs/dev/debt/libSceAgcDriver.mdrecords the path.Tested
0bad0fc46a: build of the eight test executables of the bar, rc 0;ctest -R '^(agc_driver_unclamped_normalized_blend|agc_driver_graphics|agc_shader_memory|request_serializer|agc_shader_disk_cache|agc_pipeline_journal|agc_driver_pipeline_journal|agc_driver_packed_unorm4444_partial_write|agc_driver_packed_unorm4444_multisample_partial_write|public_headers)': 77 of 77 passed.agc_driver_unclamped_normalized_blendprints "14 UNORM draws, 4 SNORM draws, 2 same-draw overdraws of 16 layers, 1 refusal without pixel interlock"; withVK_LAYER_KHRONOS_validationit reports no validation error, onlyUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings (the attachment is unbound or masked).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 (none added).mdfiles or images added to the repository