From fe40642c6b17fd83c844ba8113c844eaedd4dba4 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 6 May 2025 15:59:49 +1000 Subject: [PATCH] mesa: fix color material tracking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit f6c8ca06 changed this code to only set color materials mask when the VERT_BIT_COLOR0 bit is set instead of when color material is enabled. But this meant we always skipped over the STATE_CURRENT_ATTRIB values. Fixes: f6c8ca06f649 ("mesa: fix material inputs in ffvertex_prog.c") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7122 Reviewed-by: Marek Olšák Part-of: (cherry picked from commit 600892802d3c162e7547ff3cde77369a6dd6a5a4) --- .pick_status.json | 2 +- src/mesa/main/ffvertex_prog.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 06cacabfa7e..525977f95d0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3654,7 +3654,7 @@ "description": "mesa: fix color material tracking", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f6c8ca06f649ae1367f61eca6fb7635862bd5584", "notes": null diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 2bb0543b119..4aa821f20cf 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -552,7 +552,7 @@ static void set_material_flags( struct tnl_program *p ) p->color_materials = 0; p->materials = 0; - if (p->state->varying_vp_inputs & VERT_BIT_COLOR0) { + if (p->state->light_color_material_mask) { p->materials = p->color_materials = p->state->light_color_material_mask; }