[PR #1532] [CLOSED] shader_recompiler: shaer patch to manualy normalize on unsupported Vulkan UNORM/SNORM formats #2156

Closed
opened 2026-02-27 21:15:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1532
Author: @LNDF
Created: 11/14/2024
Status: Closed

Base: mainHead: normalization


📝 Commits (8)

📊 Changes

6 files changed (+136 additions, -6 deletions)

View changed files

📝 src/shader_recompiler/ir/ir_emitter.cpp (+5 -0)
📝 src/shader_recompiler/ir/ir_emitter.h (+2 -0)
📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+65 -0)
📝 src/shader_recompiler/specialization.h (+21 -6)
📝 src/video_core/amdgpu/resource.h (+16 -0)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.cpp (+27 -0)

📄 Description

Vulkan doesn't have support for SNORM/UNORM number formats for 32, 32_32, 32_32_32 and 32_32_32_32 data formats. Insteed use SINT/UINT and normalize/unormalize on shader when reading/writing.

Maybe we don't need to specialize by number of components, I can revert that.


🔄 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/1532 **Author:** [@LNDF](https://github.com/LNDF) **Created:** 11/14/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `normalization` --- ### 📝 Commits (8) - [`ed5da02`](https://github.com/shadps4-emu/shadPS4/commit/ed5da0263cf213d8a1a893ad71858221f857a506) Copy IR instruction - [`e498875`](https://github.com/shadps4-emu/shadPS4/commit/e49887535f545b6b236f254d19f1aff164dc8e7e) Initial prep - [`a4010b3`](https://github.com/shadps4-emu/shadPS4/commit/a4010b33125fa01fad270529691269dbd761284f) Add surface formats - [`78ad50b`](https://github.com/shadps4-emu/shadPS4/commit/78ad50bf56c56001383ed30afcc4e39d22358ca3) Patch read and write - [`008d2ac`](https://github.com/shadps4-emu/shadPS4/commit/008d2ac1db0225379020ee4935feac1fa2f801b7) Surface format fixup - [`fe3b41c`](https://github.com/shadps4-emu/shadPS4/commit/fe3b41c64bfd50f15cf7f1ede6b6a2fe4d2b20f1) Shader specialization - [`0fd4c3b`](https://github.com/shadps4-emu/shadPS4/commit/0fd4c3b307bb97ff8bb583effb63bd4909f9b421) Handle atomic instructions - [`a4dba67`](https://github.com/shadps4-emu/shadPS4/commit/a4dba67e0c43f84c4650a38d16af04cec568802f) Specialize normalization component number ### 📊 Changes **6 files changed** (+136 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/ir/ir_emitter.cpp` (+5 -0) 📝 `src/shader_recompiler/ir/ir_emitter.h` (+2 -0) 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+65 -0) 📝 `src/shader_recompiler/specialization.h` (+21 -6) 📝 `src/video_core/amdgpu/resource.h` (+16 -0) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.cpp` (+27 -0) </details> ### 📄 Description Vulkan doesn't have support for SNORM/UNORM number formats for 32, 32_32, 32_32_32 and 32_32_32_32 data formats. Insteed use SINT/UINT and normalize/unormalize on shader when reading/writing. Maybe we don't need to specialize by number of components, I can revert that. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:24 +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#2156
No description provided.