diff options
author | Timothy Arceri <[email protected]> | 2017-06-07 12:19:13 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-06-09 09:13:46 +1000 |
commit | f77740f14b9057de09e61e1abf086f08a68c5a1b (patch) | |
tree | 5ceb8833e435180d8f6850b98879c0ca0b370f1d /src/mesa/drivers/x11 | |
parent | f627ac6e355a5eeb9618a0e4fff0ec26bd3c63ba (diff) |
mesa: stop passing state bitfield to UpdateState()
The code comment which seems to have been added in cab974cf6c2db
(from year 2000) says:
"Set ctx->NewState to zero to avoid recursion if
Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)"
As far as I can tell nothing in any of the UpdateState() calls
should cause it to be called recursively.
V2: add a wrapper around the osmesa update function so it can still
be used internally.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xmesaP.h | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index cd5809e070e..e06831ca777 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -678,9 +678,10 @@ enable( struct gl_context *ctx, GLenum pname, GLboolean state ) * Called when the driver should update its state, based on the new_state * flags. */ -void -xmesa_update_state( struct gl_context *ctx, GLbitfield new_state ) +static void +xmesa_update_state(struct gl_context *ctx) { + GLbitfield new_state = ctx->NewState; const XMesaContext xmesa = XMESA_CONTEXT(ctx); /* Propagate statechange information to swrast and swrast_setup diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 9320442f46a..ff3ddc4ddd0 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -354,10 +354,6 @@ xmesa_init_driver_functions( XMesaVisual xmvisual, struct dd_function_table *driver ); extern void -xmesa_update_state( struct gl_context *ctx, GLbitfield new_state ); - - -extern void xmesa_MapRenderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint x, GLuint y, GLuint w, GLuint h, |