mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[PR #1763] [MERGED] graphics: Improve handling of color buffer and storage image swizzles #2286
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2286
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1763
Author: @raphaelthegreat
Created: 12/13/2024
Status: ✅ Merged
Merged: 12/13/2024
Merged by: @raphaelthegreat
Base:
main← Head:better-swizzle📝 Commits (4)
08ed66fliverpool_to_vk: Remove wrong component swap formatseba2549shader_recompiler: Handle storage and buffer format swizzles3963ad9shader_recompiler: Skip unsupported depth export7d7352cimage_view: Remove image format swizzle📊 Changes
6 files changed (+66 additions, -49 deletions)
View changed files
📝
src/shader_recompiler/frontend/translate/export.cpp(+5 -0)📝
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp(+42 -0)📝
src/shader_recompiler/specialization.h(+10 -1)📝
src/video_core/amdgpu/resource.h(+9 -0)📝
src/video_core/renderer_vulkan/liverpool_to_vk.cpp(+0 -9)📝
src/video_core/texture_cache/image_view.cpp(+0 -39)📄 Description
Removed some color buffer component swaps that were wrong since eR8G8B8A8Unorm and eA8B8G8R8UnormPack32 are technically the same format for little-endian GPUs, which both AMD and NVIDIA are. This lets the shader specialization mechanism handle it instead.
Handle swizzles for storage image writes by swizzling incoming texel in the shader, as well as format buffer swizzles since BUFFER_LOAD_FORMAT and BUFFER_STORE_FORMAT use dst_sel from the sharp.
For storage images specifically we only perform manual swizzling if the format isn't 8_8_8_8 since those can be swizzled with image view and is already mostly handledIgnore mrtz stencil exports since those are unsupported for now
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.