mesa: fix clip plane enable breakage
Broken by:
commit 00173d91b7
Author: Marek Olšák <marek.olsak@amd.com>
Date: Sat Jun 10 12:09:43 2017 +0200
mesa: don't flag _NEW_TRANSFORM for st/mesa if possible
It also optimizes the case slightly for GL core.
It doesn't try to fix that glEnable might be a bad place to do the
clip plane transformation.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
@@ -361,8 +361,13 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||
|
||||
if (state) {
|
||||
ctx->Transform.ClipPlanesEnabled |= (1 << p);
|
||||
if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES)
|
||||
|
||||
/* The projection matrix transforms the clip plane. */
|
||||
/* TODO: glEnable might not be the best place to do it. */
|
||||
if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
|
||||
_mesa_update_clip_plane(ctx, p);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ctx->Transform.ClipPlanesEnabled &= ~(1 << p);
|
||||
|
||||
Reference in New Issue
Block a user