summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-24 03:16:06 +0200
committerMarek Olšák <[email protected]>2017-06-27 18:45:07 +0200
commitbcf5d5ce403acb05035c42f29cde0000bb7e5d00 (patch)
tree7220367852086c14934c815775d21967981cb282 /src/mesa/main
parentfad0b4721942d05cba34c0270bafeaecc1292c95 (diff)
mesa: fix clip plane enable breakage
Broken by: commit 00173d91b70ae4dcea7c6324ee4858c498cae14b Author: Marek Olšák <[email protected]> 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 <[email protected]> Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/enable.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index e1293f9bf1e..18a288d35c2 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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);