From 4c037af9cc06f4e472eab371447ff56753a51ea4 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 6 Jun 2017 15:03:50 +0200 Subject: [PATCH] mesa: add gl_driver_flags::NewScissor{Rect,Test} MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit _NEW_SCISSOR mesa flag is set when a scissor test is enabled/disabled or when a new rectangle is defined. However, it triggers too much changes in the state tracker. Actually, ST_NEW_RASTERIZER should only be called when a scissor test is enabled/disabled, while ST_NEW_SCISSOR should be called in both situations. In other words, this will avoid to update the rasterizer every time a new rectangle is defined using glScissor*(). Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- src/mesa/main/mtypes.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ab62463..21ddf57 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4406,6 +4406,12 @@ struct gl_driver_flags /** gl_context::Color::sRGBEnabled */ uint64_t NewFramebufferSRGB; + + /** gl_context::Scissor::EnableFlags */ + uint64_t NewScissorTest; + + /** gl_context::Scissor::ScissorArray */ + uint64_t NewScissorRect; }; struct gl_uniform_buffer_binding -- 2.7.4