OSDN Git Service

mesa: stop passing state bitfield to UpdateState()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 7 Jun 2017 02:19:13 +0000 (12:19 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 8 Jun 2017 23:13:46 +0000 (09:13 +1000)
commitf77740f14b9057de09e61e1abf086f08a68c5a1b
tree5ceb8833e435180d8f6850b98879c0ca0b370f1d
parentf627ac6e355a5eeb9618a0e4fff0ec26bd3c63ba
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 <brianp@vmware.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
13 files changed:
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i915/intel_context.c
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/nouveau/nouveau_state.c
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/radeon/radeon_state.c
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/drivers/osmesa/osmesa.c
src/mesa/drivers/x11/xm_dd.c
src/mesa/drivers/x11/xmesaP.h
src/mesa/main/dd.h
src/mesa/main/state.c
src/mesa/state_tracker/st_context.c