[PR #3495] [MERGED] shader_recompiler: Relax dual source blending assert to allow up to two targets. #3516

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3495
Author: @squidbus
Created: 8/31/2025
Status: Merged
Merged: 9/1/2025
Merged by: @squidbus

Base: mainHead: dsb


📝 Commits (1)

  • 2bfdb6a shader_recompiler: Relax dual source blending assert to allow up to two targets.

📊 Changes

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

View changed files

📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+4 -2)

📄 Description

Dual source blending only supports 1 output render target, and thus only allows exports to 2 different target indices, 1 for each source. It is technically allowed, however, to have 0 or 1 export target(s) while dual source blending is enabled.

In the 0 targets case, both sources are undefined. In this case the game may just be rendering a pass writing depth and not color.

I am not sure if any games will hit the 1 target case, however this is technically allowed. In this case the second source is an undefined value for blending.


🔄 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/3495 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 8/31/2025 **Status:** ✅ Merged **Merged:** 9/1/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `dsb` --- ### 📝 Commits (1) - [`2bfdb6a`](https://github.com/shadps4-emu/shadPS4/commit/2bfdb6acb06ccbbe8fc1a265d560029d5873bc0d) shader_recompiler: Relax dual source blending assert to allow up to two targets. ### 📊 Changes **1 file changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+4 -2) </details> ### 📄 Description Dual source blending only supports 1 output render target, and thus only allows exports to 2 different target indices, 1 for each source. It is technically allowed, however, to have 0 or 1 export target(s) while dual source blending is enabled. In the 0 targets case, both sources are undefined. In this case the game may just be rendering a pass writing depth and not color. I am not sure if any games will hit the 1 target case, however this is technically allowed. In this case the second source is an undefined value for blending. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:58 +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#3516
No description provided.