fix(agc): give block-copied textures an sRGB view #8159
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8159"
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 savvaniss on 2026-10-20T00:54:43Z.
What
A texture that is copied block for block from a storage image (
Texture::BlockCopyTag) never got an sRGB view. Sampling one through an S# withFORCE_DEGAMMAtherefore stopped with "a texture of guest format N, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding". Textures read from guest memory and views of a storage image already have one.The block-copy image is now created with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BITwhen its format has an sRGB twin (SrgbTwinFormat). It then prepares its sRGB view like the other two constructors do. A format without a twin is unchanged and still throws.On
mainthis affects BC textures read while their blocks are still pending in a 32x2 or 32x4 uint storage image. The PS4 path of #6977 also block-copies a smaller GCN view of a render target. Trivial Pursuit Live! (CUSA03312) samples such an8_8_8_8_UNORMview withFORCE_DEGAMMAbefore its language menu.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release.
agc_driver_bc_block_copygains a case for BC7 and BC1: the pending blocks are sampled throughFORCE_DEGAMMAand must match, bit for bit, the same blocks sampled after they are stored. The stored sample must also differ from a sample without the bit. Onmain'sTexture.cppthe new case fails with the error above; with the change it passes.agc_driver_bc_block_copyandagc_driver_image_sample_force_degammaran onmainand on this branch withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(ctest -R ... -V), on both GPUs below. Both pass in all four runs. No log containswas not found but was requested by env var VK_INSTANCE_LAYERS, and none contains aVUID-line.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists many open PRs that touchTexture.cpp. Of those, only #7800 changes the block-copy constructor, and only its memory allocation.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T01:05:38Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T04:48:33Z.
Thanks for this. #7799 makes the same change (the sRGB view for block-copied textures, with the same test) and is a day older, so we'll carry it there. Your test results would be very useful on #7799, please add them there. Closing this one as a duplicate.
Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-20T12:27:51Z.
@oneandonlydean thanks, agreed. I posted the results on #7799, rerun on its current head: https://github.com/boykopovar/AnyPS5/pull/7799#issuecomment-6290825850
AI-assisted: yes (Claude Code)
Pull request closed