Module: Mesa Branch: master Commit: ac0aff722286095ef037beb0017f8c9170ac7c23 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac0aff722286095ef037beb0017f8c9170ac7c23
Author: Marek Olšák <marek.ol...@amd.com> Date: Sun Jun 4 23:08:07 2017 +0200 mesa: add gl_driver_flags::NewFramebufferSRGB _NEW_BUFFERS updates too much stuff. Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> --- src/mesa/main/enable.c | 5 ++++- src/mesa/main/mtypes.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index ef278a318a..0e07f4c3b9 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -258,7 +258,10 @@ _mesa_set_framebuffer_srgb(struct gl_context *ctx, GLboolean state) { if (ctx->Color.sRGBEnabled == state) return; - FLUSH_VERTICES(ctx, _NEW_BUFFERS); + + /* TODO: Switch i965 to the new flag and remove the conditional */ + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewFramebufferSRGB ? 0 : _NEW_BUFFERS); + ctx->NewDriverState |= ctx->DriverFlags.NewFramebufferSRGB; ctx->Color.sRGBEnabled = state; if (ctx->Driver.Enable) { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7ec012321f..9ac2711197 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4402,6 +4402,9 @@ struct gl_driver_flags * gl_context::Scissor::WindowRects */ uint64_t NewWindowRectangles; + + /** gl_context::Color::sRGBEnabled */ + uint64_t NewFramebufferSRGB; }; struct gl_uniform_buffer_binding _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit