freedreno/ir3: remap FRAG_RESULT_COLOR to _DATA* for dual-src blending

gl_SecondaryFragColorEXT is mapped to FRAG_RESULT_COLOR and just
have a different io.dual_source_blend_index. We don't need to replicate
the color to other render targets in case of dual source blending, so
we could just remap it to FRAG_RESULT_DATA0 + index.

Fixes piglit test:
 arb_blend_func_extended-fbo-extended-blend-pattern_gles2

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8245>
This commit is contained in:
Danylo Piliaiev 2020-12-28 15:53:08 +02:00 committed by Marge Bot
parent 174070942b
commit 122da9bd2d
1 changed files with 5 additions and 1 deletions

View File

@ -3200,7 +3200,11 @@ setup_output(struct ir3_context *ctx, nir_intrinsic_instr *intr)
so->writes_pos = true;
break;
case FRAG_RESULT_COLOR:
so->color0_mrt = 1;
if (!ctx->s->info.fs.color_is_dual_source) {
so->color0_mrt = 1;
} else {
slot = FRAG_RESULT_DATA0 + io.dual_source_blend_index;
}
break;
case FRAG_RESULT_SAMPLE_MASK:
so->writes_smask = true;