[PR #1587] [MERGED] recompiler: fix how srt pass handles step rate sharps in special case #2182

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1587
Author: @baggins183
Created: 11/24/2024
Status: Merged
Merged: 11/24/2024
Merged by: @psucien

Base: mainHead: srt-step-rate-fix


📝 Commits (1)

  • 3a89ec3 recompiler: fix how srt pass handles step rate sharps in special case

📊 Changes

1 file changed (+7 additions, -3 deletions)

View changed files

📝 src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp (+7 -3)

📄 Description

In the SRT code path there has to be special handling for step rate buffers read inside the fetch shader because fetch shaders aren't actually recompiled.
The original SRT commit handled step rate buffers by making a "reservation" in the flattened user data buffer when a sharp was found during fetch shader parsing, which the JIT program would fill in.

The bug is that r10d (32 bit) was used to hold the indirect pointer used to find the step rate V#. Generalize by using Push/PopPtr to put the ptr in %rdi which also mask off the high ptr bits like Info::ReadUdReg


🔄 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/1587 **Author:** [@baggins183](https://github.com/baggins183) **Created:** 11/24/2024 **Status:** ✅ Merged **Merged:** 11/24/2024 **Merged by:** [@psucien](https://github.com/psucien) **Base:** `main` ← **Head:** `srt-step-rate-fix` --- ### 📝 Commits (1) - [`3a89ec3`](https://github.com/shadps4-emu/shadPS4/commit/3a89ec3ac107e0bbc9411986fb6ac1769bea9378) recompiler: fix how srt pass handles step rate sharps in special case ### 📊 Changes **1 file changed** (+7 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp` (+7 -3) </details> ### 📄 Description In the SRT code path there has to be special handling for step rate buffers read inside the fetch shader because fetch shaders aren't actually recompiled. The original SRT commit handled step rate buffers by making a "reservation" in the flattened user data buffer when a sharp was found during fetch shader parsing, which the JIT program would fill in. The bug is that r10d (32 bit) was used to hold the indirect pointer used to find the step rate V#. Generalize by using Push/PopPtr to put the ptr in %rdi which also mask off the high ptr bits like Info::ReadUdReg --- <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: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#2182
No description provided.