/* 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);
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)
}
static void
-intel_update_state(struct gl_context * ctx, GLuint new_state)
+intel_update_state(struct gl_context * ctx)
{
+ GLuint new_state = ctx->NewState;
struct brw_context *brw = brw_context(ctx);
struct intel_texture_object *tex_obj;
struct intel_renderbuffer *depth_irb;
}
static void
-nouveau_update_state(struct gl_context *ctx, GLbitfield new_state)
+nouveau_update_state(struct gl_context *ctx)
{
+ GLbitfield new_state = ctx->NewState;
int i;
if (new_state & (_NEW_PROJECTION | _NEW_MODELVIEW))
}
-static void r200InvalidateState( struct gl_context *ctx, GLuint new_state )
+static void r200InvalidateState(struct gl_context *ctx)
{
+ GLuint new_state = ctx->NewState;
+
r200ContextPtr rmesa = R200_CONTEXT(ctx);
_swrast_InvalidateState( ctx, new_state );
}
-static void radeonInvalidateState( struct gl_context *ctx, GLuint new_state )
+static void radeonInvalidateState(struct gl_context *ctx)
{
+ GLuint new_state = ctx->NewState;
+
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
_vbo_InvalidateState( ctx, new_state );
}
static void
-update_state( struct gl_context *ctx, GLuint new_state )
+update_state(struct gl_context *ctx)
{
+ GLuint new_state = ctx->NewState;
+
/* not much to do here - pass it on */
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
static void
-osmesa_update_state( struct gl_context *ctx, GLuint new_state )
+osmesa_update_state(struct gl_context *ctx, GLuint new_state)
{
/* easy - just propogate */
_swrast_InvalidateState( ctx, new_state );
_vbo_InvalidateState( ctx, new_state );
}
+static void
+osmesa_update_state_wrapper(struct gl_context *ctx)
+{
+ osmesa_update_state(ctx, ctx->NewState);
+}
/**
_mesa_init_driver_functions(&functions);
/* override with our functions */
functions.GetString = get_string;
- functions.UpdateState = osmesa_update_state;
+ functions.UpdateState = osmesa_update_state_wrapper;
if (!_mesa_initialize_context(&osmesa->mesa,
api_profile,
* 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
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,
* This is in addition to any state change callbacks Mesa may already have
* made.
*/
- void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
+ void (*UpdateState)(struct gl_context *ctx);
/**
* This is called whenever glFinish() is called.
* The driver might plug in different span functions, for example.
* Also, this is where the driver can invalidate the state of any
* active modules (such as swrast_setup, swrast, tnl, etc).
- *
- * Set ctx->NewState to zero to avoid recursion if
- * Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)
*/
- new_state = ctx->NewState | new_prog_state;
+ ctx->NewState |= new_prog_state;
+ ctx->Driver.UpdateState(ctx);
ctx->NewState = 0;
- ctx->Driver.UpdateState(ctx, new_state);
ctx->Array.VAO->NewArrays = 0x0;
}
* 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) {