[PR #2236] [MERGED] shader_recompiler: Fix image write swizzles. #2586

Closed
opened 2026-02-27 22:00:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2236
Author: @squidbus
Created: 1/24/2025
Status: Merged
Merged: 1/24/2025
Merged by: @squidbus

Base: mainHead: fix-swiz


📝 Commits (1)

  • e4df903 shader_recompiler: Fix image write swizzles.

📊 Changes

2 files changed (+29 additions, -6 deletions)

View changed files

📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+2 -2)
📝 src/video_core/amdgpu/types.h (+27 -4)

📄 Description

Component mapping for swizzle needs to be inverted for image writes. For example, if the swizzle is [000R], it means that alpha should be written to red, not that red should be written to alpha.

Fixes videos in CUSA01047 intro. I believe this fixes baldness in CUSA00900 as well (https://github.com/shadps4-emu/shadPS4/issues/1858).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/2236 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 1/24/2025 **Status:** ✅ Merged **Merged:** 1/24/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `fix-swiz` --- ### 📝 Commits (1) - [`e4df903`](https://github.com/shadps4-emu/shadPS4/commit/e4df903828c3c9838a1737a5e7e6213e5c8f6ce3) shader_recompiler: Fix image write swizzles. ### 📊 Changes **2 files changed** (+29 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+2 -2) 📝 `src/video_core/amdgpu/types.h` (+27 -4) </details> ### 📄 Description Component mapping for swizzle needs to be inverted for image writes. For example, if the swizzle is [000R], it means that alpha should be written to red, not that red should be written to alpha. Fixes videos in CUSA01047 intro. I believe this fixes baldness in CUSA00900 as well (https://github.com/shadps4-emu/shadPS4/issues/1858). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:00:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2586
No description provided.