mesa: set states in fast path for restoring light attributes

Since states were not updated in fast path for restoring light attributes,
seen darker images in solidworks2012_viewprt.trace

Fixes regression seen with solidworks2012_viewport.trace

Fixes: 7fa9d9d06c ("mesa: add a fast path for restoring light attributes")

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9657>
This commit is contained in:
Neha Bhende 2021-03-16 15:48:31 -07:00 committed by Marge Bot
parent df5607d2ef
commit edbbf4537b

View file

@ -999,10 +999,16 @@ _mesa_PopAttrib(void)
memcpy(ctx->Light.LightSource, attr->Light.LightSource,
sizeof(attr->Light.LightSource));
memcpy(&ctx->Light.Light, &attr->Light.Light,
sizeof(attr->Light.Light));
memcpy(&ctx->Light.Model, &attr->Light.Model,
sizeof(attr->Light.Model));
for (i = 0; i < ctx->Const.MaxLights; i++) {
TEST_AND_UPDATE(ctx->Light.Light[i].Enabled,
attr->Light.Light[i].Enabled,
GL_LIGHT0 + i);
memcpy(&ctx->Light.Light[i], &attr->Light.Light[i],
sizeof(struct gl_light));
}
}
/* shade model */
TEST_AND_CALL1(Light.ShadeModel, ShadeModel);