mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
vbo: fix incorrect switch statement in init_mat_currval()
The variable 'i' is a value in [0, MAT_ATTRIB_MAX-1] so subtracting
VERT_ATTRIB_GENERIC0 gave a bogus value and we executed the default
switch clause for all loop iterations.
This doesn't fix any known issues but was clearly incorrect.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit dd293d8aae)
This commit is contained in:
parent
a9da1ead7b
commit
c0b85c5a4c
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ static void init_mat_currval(struct gl_context *ctx)
|
|||
/* Size is fixed for the material attributes, for others will
|
||||
* be determined at runtime:
|
||||
*/
|
||||
switch (i - VERT_ATTRIB_GENERIC0) {
|
||||
switch (i) {
|
||||
case MAT_ATTRIB_FRONT_SHININESS:
|
||||
case MAT_ATTRIB_BACK_SHININESS:
|
||||
cl->Size = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue