From c43ab1217d17c42587f13802b7e970f00d403646 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Mon, 1 Sep 2025 16:42:48 -0700 Subject: [PATCH] shader_recompiler: Relax dual source blending assert to allow up to two targets. (#3495) --- src/shader_recompiler/backend/spirv/spirv_emit_context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index e7c1340ce..25d7c4773 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -658,8 +658,10 @@ void EmitContext::DefineOutputs() { frag_outputs[i] = GetAttributeInfo(num_format, id, num_components, true); ++num_render_targets; } - ASSERT_MSG(!runtime_info.fs_info.dual_source_blending || num_render_targets == 2, - "Dual source blending enabled, there must be exactly two MRT exports"); + // Dual source blending allows at most 2 render targets, one for each source. + // Fewer targets are allowed but the missing blending source values will be undefined. + ASSERT_MSG(!runtime_info.fs_info.dual_source_blending || num_render_targets <= 2, + "Dual source blending enabled, there must be at most two MRT exports"); break; } case LogicalStage::Geometry: {