[PR #3063] [CLOSED] buffer_cache: Inline data to cpu unless gpu modified #3188

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3063
Author: @raphaelthegreat
Created: 6/8/2025
Status: Closed

Base: mainHead: dc-fix2


📝 Commits (1)

  • 01eb805 buffer_cache: Inline data to cpu unless gpu modified

📊 Changes

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

View changed files

📝 src/video_core/buffer_cache/buffer_cache.cpp (+1 -1)

📄 Description

The sea islands register reference mentions 2 different behaviors for VGT_GS_MAX_VERT_OUT. For Scenario C it represents the actual amount of output vertices a GS will make. For Scenario G on the other hand it represents the maximum, so it can't always be used for mapping offset to attribute, as the actual component stride might be smaller.

This fixes a crash when compiling a geometry shader in Driveclub (CUSA00093) which "lies" about its output vertex size. While the actual number is 4, the register reports a much larger number (44). Instead attempt to compute the output vertices from the copy shader and if they mismatch do some validation checks and use that instead. I've also added a warning in case this regresses any other geoshaders, so it can be seen easily


🔄 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/3063 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 6/8/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dc-fix2` --- ### 📝 Commits (1) - [`01eb805`](https://github.com/shadps4-emu/shadPS4/commit/01eb805ac8b5722baebd13098d829639500cf62e) buffer_cache: Inline data to cpu unless gpu modified ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/buffer_cache/buffer_cache.cpp` (+1 -1) </details> ### 📄 Description The sea islands register reference mentions 2 different behaviors for VGT_GS_MAX_VERT_OUT. For Scenario C it represents the actual amount of output vertices a GS will make. For Scenario G on the other hand it represents the maximum, so it can't always be used for mapping offset to attribute, as the actual component stride might be smaller. This fixes a crash when compiling a geometry shader in Driveclub (CUSA00093) which "lies" about its output vertex size. While the actual number is 4, the register reports a much larger number (44). Instead attempt to compute the output vertices from the copy shader and if they mismatch do some validation checks and use that instead. I've also added a warning in case this regresses any other geoshaders, so it can be seen easily --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:46 +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#3188
No description provided.