summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
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/drivers/dri/i915
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/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c4
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 6c4882378f4..1406b65b654 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -52,8 +52,10 @@
/* Override intel default.
*/
static void
-i915InvalidateState(struct gl_context * ctx, GLuint new_state)
+i915InvalidateState(struct gl_context * ctx)
{
+ GLuint new_state = ctx->NewState;
+
_swrast_InvalidateState(ctx, new_state);
_swsetup_InvalidateState(ctx, new_state);
_vbo_InvalidateState(ctx, new_state);
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 5607d5b5b69..6c59b425a91 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -314,8 +314,9 @@ static const struct debug_control debug_control[] = {
static void
-intelInvalidateState(struct gl_context * ctx, GLuint new_state)
+intelInvalidateState(struct gl_context * ctx)
{
+ GLuint new_state = ctx->NewState;
struct intel_context *intel = intel_context(ctx);
if (ctx->swrast_context)