From 6c410456d9f7cb19cc231ced589e752faaa7a7c4 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sat, 1 Feb 2025 20:09:12 +0100 Subject: [PATCH] nir/lower_poly_line_smooth: only smooth first color target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VK spec says: coverage value is multiplied into the color location 0’s alpha value after fragment shading Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák Acked-by: Erik Faye-Lund Part-of: --- src/compiler/nir/nir_lower_poly_line_smooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_poly_line_smooth.c b/src/compiler/nir/nir_lower_poly_line_smooth.c index bcd2419e1f9..4fcca5cfab6 100644 --- a/src/compiler/nir/nir_lower_poly_line_smooth.c +++ b/src/compiler/nir/nir_lower_poly_line_smooth.c @@ -43,7 +43,7 @@ lower_polylinesmooth(nir_builder *b, nir_instr *instr, void *data) return false; int location = nir_intrinsic_io_semantics(intr).location; - if ((location != FRAG_RESULT_COLOR && location < FRAG_RESULT_DATA0) || + if ((location != FRAG_RESULT_COLOR && location != FRAG_RESULT_DATA0) || nir_intrinsic_src_type(intr) != nir_type_float32) return false;