[PR #3941] [MERGED] video_core: Small readback optimization #3814

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3941
Author: @raphaelthegreat
Created: 1/20/2026
Status: Merged
Merged: 1/21/2026
Merged by: @georgemoralis

Base: mainHead: readback-opt2


📝 Commits (4)

  • 1e75183 pm4_cmds: Handle nop packet overflow
  • a667541 liverpool: Detect DispatchDirect patches and promote to DispatchIndirect
  • b6464b7 clang..
  • 1df2d8f log removed

📊 Changes

2 files changed (+26 additions, -3 deletions)

View changed files

📝 src/video_core/amdgpu/liverpool.cpp (+25 -2)
📝 src/video_core/amdgpu/pm4_cmds.h (+1 -1)

📄 Description

This is an implementation of the DispatchDirect self modification elimination patch with a simple implementation on its own that shouldn't break anything hopefully. It detects when a DmaData is copying memory to the current command list, and specifically to the dimentions of a DispatchDirect packet and a) skips the copy so the region isn't marked as gpu modified and flushed b) patches the packet into an indirect dispatch to the source buffer.

Should provide a speedup to affected cases and allow them to avoid device loss errors when readbacks are disabled


🔄 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/3941 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/21/2026 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `readback-opt2` --- ### 📝 Commits (4) - [`1e75183`](https://github.com/shadps4-emu/shadPS4/commit/1e751831299374ff6ce595b4e6bcf75a5771e448) pm4_cmds: Handle nop packet overflow - [`a667541`](https://github.com/shadps4-emu/shadPS4/commit/a6675418e99ad7dd706c409302351f03ea76e66f) liverpool: Detect DispatchDirect patches and promote to DispatchIndirect - [`b6464b7`](https://github.com/shadps4-emu/shadPS4/commit/b6464b766c6704d10d0a52719ab402273f994535) clang.. - [`1df2d8f`](https://github.com/shadps4-emu/shadPS4/commit/1df2d8f59a77ade10682ba4b96d31cfceae408f0) log removed ### 📊 Changes **2 files changed** (+26 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/amdgpu/liverpool.cpp` (+25 -2) 📝 `src/video_core/amdgpu/pm4_cmds.h` (+1 -1) </details> ### 📄 Description This is an implementation of the DispatchDirect self modification elimination patch with a simple implementation on its own that shouldn't break anything hopefully. It detects when a DmaData is copying memory to the current command list, and specifically to the dimentions of a DispatchDirect packet and a) skips the copy so the region isn't marked as gpu modified and flushed b) patches the packet into an indirect dispatch to the source buffer. Should provide a speedup to affected cases and allow them to avoid device loss errors when readbacks are disabled --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:05:05 +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#3814
No description provided.