From 1d5aad9db42858eeacbed4adff3172ab6be8e1df Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 1 Aug 2022 18:57:53 -0400 Subject: [PATCH] panfrost: Include mask in replace blend shader name Helpful to disambiguate blend shaders with different colour masks used for the same format/replace operation. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/lib/pan_blend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c index 7c76a7fc1d9..11d3b7e113f 100644 --- a/src/panfrost/lib/pan_blend.c +++ b/src/panfrost/lib/pan_blend.c @@ -531,7 +531,11 @@ get_equation_str(const struct pan_blend_rt_state *rt_state, int ret; if (!rt_state->equation.blend_enable) { - ret = snprintf(str, len, "replace"); + ret = snprintf(str, len, "replace(%s%s%s%s)", + (rt_state->equation.color_mask & 1) ? "R" : "", + (rt_state->equation.color_mask & 2) ? "G" : "", + (rt_state->equation.color_mask & 4) ? "B" : "", + (rt_state->equation.color_mask & 8) ? "A" : ""); assert(ret > 0); return; }