[PR #3475] [MERGED] shader_recompiler: Support multiple attributes using the same load in vertex fetch shaders #3498

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3475
Author: @StevenMiller123
Created: 8/29/2025
Status: Merged
Merged: 8/29/2025
Merged by: @squidbus

Base: mainHead: fetch-shader-fixes


📝 Commits (2)

  • 0654be5 Support multiple uses of the same load.
  • eeb7736 Keep base_sgpr as a s32

📊 Changes

1 file changed (+6 additions, -11 deletions)

View changed files

📝 src/shader_recompiler/frontend/fetch_shader.cpp (+6 -11)

📄 Description

Some fetch shaders will use multiple buffer_load instructions with the same source, previously this would cause undefined behavior.

With this PR, Kingdom Come: Deliverance Royal Edition (CUSA15436) reaches menus with broken rendering.
image

Thanks to @raphaelthegreat for walking me through this fix.


🔄 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/3475 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 8/29/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `fetch-shader-fixes` --- ### 📝 Commits (2) - [`0654be5`](https://github.com/shadps4-emu/shadPS4/commit/0654be5a7673c5bd64dec3cd0df07cef8e36ebb4) Support multiple uses of the same load. - [`eeb7736`](https://github.com/shadps4-emu/shadPS4/commit/eeb7736991bf3eb426965525c690d61242aa0c84) Keep base_sgpr as a s32 ### 📊 Changes **1 file changed** (+6 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/frontend/fetch_shader.cpp` (+6 -11) </details> ### 📄 Description Some fetch shaders will use multiple `buffer_load` instructions with the same source, previously this would cause undefined behavior. With this PR, Kingdom Come: Deliverance Royal Edition (CUSA15436) reaches menus with broken rendering. <img width="1282" height="752" alt="image" src="https://github.com/user-attachments/assets/89c72cca-4c40-4e03-82ca-6f4c75f74bbb" /> Thanks to @raphaelthegreat for walking me through this fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:55 +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#3498
No description provided.