[Mesa-dev] [PATCH] mesa: don't call _mesa_update_clip_plane in the GL core profile
Marek Olšák
maraeo at gmail.com
Wed Jun 14 21:37:48 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
It uses the projection matrix to transform the clip plane.
---
src/mesa/main/enable.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 0324170..0f7cdcd 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -352,21 +352,22 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES ||
!ctx->DriverFlags.NewClipPlaneEnable) {
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
} else {
FLUSH_VERTICES(ctx, 0);
}
ctx->NewDriverState |= ctx->DriverFlags.NewClipPlaneEnable;
if (state) {
ctx->Transform.ClipPlanesEnabled |= (1 << p);
- _mesa_update_clip_plane(ctx, p);
+ if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES)
+ _mesa_update_clip_plane(ctx, p);
}
else {
ctx->Transform.ClipPlanesEnabled &= ~(1 << p);
}
}
break;
case GL_COLOR_MATERIAL:
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
goto invalid_enum_error;
if (ctx->Light.ColorMaterialEnabled == state)
--
2.7.4
More information about the mesa-dev
mailing list