mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-18 19:50:20 +01:00
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:
parent
df5607d2ef
commit
edbbf4537b
1 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue