nir/lower_poly_line_smooth: only smooth first color target

The VK spec says:
coverage value is multiplied into the color location 0’s
alpha value after fragment shading

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
This commit is contained in:
Georg Lehmann 2025-02-01 20:09:12 +01:00 committed by Marge Bot
parent 534c2ceac8
commit 6c410456d9

View file

@ -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;