From 585c5cf8a514783d9ed31dba3aa432797dd5f0e8 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 9 Jun 2017 22:19:33 +0200 Subject: mesa: don't update draw buffer bounds in _mesa_update_state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit st/mesa doesn't need the draw bounds for draw calls. I've added the call where it's necessary in core Mesa and drivers, but I suspect that most drivers can just move the call to the right places. The core Mesa places aren't hot paths, so the call overhead doesn't matter there. For now, only st/mesa is made such that this function is invoked very rarely. Reviewed-by: Nicolai Hähnle Reviewed-by: Brian Paul Reviewed-by: Timothy Arceri --- src/mesa/drivers/osmesa/osmesa.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/drivers/osmesa') diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index c77dcc4d372..734a4e891cb 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -119,6 +119,9 @@ get_string( struct gl_context *ctx, GLenum name ) static void osmesa_update_state(struct gl_context *ctx, GLuint new_state) { + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); + /* easy - just propogate */ _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); -- cgit v1.2.3