[Mesa-dev] [PATCH] mesa: don't call _mesa_update_clip_plane in the GL core profile
Ilia Mirkin
imirkin at alum.mit.edu
Wed Jun 14 21:44:44 UTC 2017
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Wed, Jun 14, 2017 at 5:37 PM, Marek Olšák <maraeo at gmail.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list