mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #3064] [MERGED] shader_recompiler: Better handling of geometry shader scenario G #3190
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3064
Author: @raphaelthegreat
Created: 6/8/2025
Status: ✅ Merged
Merged: 6/9/2025
Merged by: @squidbus
Base:
main← Head:gs-scenario📝 Commits (1)
3068a48shader_recompiler: Better handling of geometry shader scenario G📊 Changes
8 files changed (+33 additions, -4 deletions)
View changed files
📝
src/shader_recompiler/frontend/copy_shader.cpp(+3 -0)📝
src/shader_recompiler/frontend/copy_shader.h(+3 -2)📝
src/shader_recompiler/frontend/translate/translate.h(+1 -0)📝
src/shader_recompiler/ir/passes/readlane_elimination_pass.cpp(+1 -0)📝
src/shader_recompiler/ir/passes/ring_access_elimination.cpp(+14 -1)📝
src/shader_recompiler/runtime_info.h(+1 -0)📝
src/video_core/amdgpu/liverpool.h(+9 -1)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+1 -0)📄 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 the number of vertices it outputs. 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
Oops wrong branch🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.