summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-07 12:19:13 +1000
committerTimothy Arceri <[email protected]>2017-06-09 09:13:46 +1000
commitf77740f14b9057de09e61e1abf086f08a68c5a1b (patch)
tree5ceb8833e435180d8f6850b98879c0ca0b370f1d /src/mesa/state_tracker
parentf627ac6e355a5eeb9618a0e4fff0ec26bd3c63ba (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/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 33bc16713c6..0e768ea9e44 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -182,8 +182,9 @@ st_invalidate_buffers(struct st_context *st)
* Called via ctx->Driver.UpdateState()
*/
static void
-st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
+st_invalidate_state(struct gl_context * ctx)
{
+ GLbitfield new_state = ctx->NewState;
struct st_context *st = st_context(ctx);
if (new_state & _NEW_BUFFERS) {