mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
mesa: fix trivial bugs in glPopAttrib
There were quite a few. Hopefully the comments make it clear. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
This commit is contained in:
parent
674d275f59
commit
cd0148dd38
1 changed files with 8 additions and 2 deletions
|
|
@ -808,6 +808,8 @@ _mesa_PopAttrib(void)
|
|||
FLUSH_CURRENT(ctx, 0);
|
||||
memcpy(&ctx->Current, &attr->Current,
|
||||
sizeof(struct gl_current_attrib));
|
||||
/* Set _NEW_LIGHT because current attribs may reference materials. */
|
||||
ctx->NewState |= _NEW_CURRENT_ATTRIB | _NEW_LIGHT;
|
||||
}
|
||||
|
||||
if (mask & GL_DEPTH_BUFFER_BIT) {
|
||||
|
|
@ -830,6 +832,7 @@ _mesa_PopAttrib(void)
|
|||
ctx->DriverFlags.NewClipPlaneEnable |
|
||||
ctx->DriverFlags.NewDepth |
|
||||
ctx->DriverFlags.NewDepthClamp |
|
||||
ctx->DriverFlags.NewFragClamp |
|
||||
ctx->DriverFlags.NewFramebufferSRGB |
|
||||
ctx->DriverFlags.NewLineState |
|
||||
ctx->DriverFlags.NewLogicOp |
|
||||
|
|
@ -837,9 +840,11 @@ _mesa_PopAttrib(void)
|
|||
ctx->DriverFlags.NewPolygonState |
|
||||
ctx->DriverFlags.NewSampleAlphaToXEnable |
|
||||
ctx->DriverFlags.NewSampleMask |
|
||||
ctx->DriverFlags.NewSampleShading |
|
||||
ctx->DriverFlags.NewScissorTest |
|
||||
ctx->DriverFlags.NewStencil |
|
||||
ctx->DriverFlags.NewNvConservativeRasterization;
|
||||
ctx->DriverFlags.NewNvConservativeRasterization |
|
||||
ctx->DriverFlags.NewTileRasterOrder;
|
||||
}
|
||||
|
||||
if (mask & GL_EVAL_BIT) {
|
||||
|
|
@ -939,7 +944,8 @@ _mesa_PopAttrib(void)
|
|||
ColorMaterial);
|
||||
TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled,
|
||||
attr->Light.ColorMaterialEnabled, GL_COLOR_MATERIAL);
|
||||
/* materials */
|
||||
/* Materials - they might be used by current attribs. */
|
||||
ctx->NewState |= _NEW_CURRENT_ATTRIB;
|
||||
memcpy(&ctx->Light.Material, &attr->Light.Material,
|
||||
sizeof(struct gl_material));
|
||||
if (ctx->Extensions.ARB_color_buffer_float) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue