mesa: fix color material tracking

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: f6c8ca06f6 ("mesa: fix material inputs in ffvertex_prog.c")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7122
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34833>
(cherry picked from commit 600892802d)
This commit is contained in:
Timothy Arceri 2025-05-06 15:59:49 +10:00 committed by Eric Engestrom
parent 1a4f9e6c00
commit fe40642c6b
2 changed files with 2 additions and 2 deletions

View file

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

View file

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