mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #3296] [MERGED] control_flow_graph: Treat empty conditional branch as noop #3366
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#3366
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/3296
Author: @raphaelthegreat
Created: 7/22/2025
Status: ✅ Merged
Merged: 7/23/2025
Merged by: @georgemoralis
Base:
main← Head:empty-branch📝 Commits (1)
68703bdcontrol_flow_graph: Treat empty conditional branch as noop📊 Changes
1 file changed (+4 additions, -2 deletions)
View changed files
📝
src/shader_recompiler/frontend/control_flow_graph.cpp(+4 -2)📄 Description
This fixes the motion blur in Driveclub (CUSA00093)
In the offending shader the AMD compiler appears to have had a derp moment and emitted an empty branch. It wants to check if s28 <= v5, but instead of doing it directly, it checks s28 > v5, does an empty branch, reverses the condition and then does the actual branch. This confuses the structurization passes (not exactly sure yet though) and causes the branch to be s28 > v5. Avoid this by not ending a block on such no-op branches, so the reversing of condition is also part of the branch
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.