Rather than calling it indirectly in each driver.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
_swrast_InvalidateState(ctx, new_state);
_swsetup_InvalidateState(ctx, new_state);
- _vbo_InvalidateState(ctx, new_state);
_tnl_InvalidateState(ctx, new_state);
_tnl_invalidate_vertex_state(ctx, new_state);
intel_context(ctx)->NewGLState |= new_state;
if (ctx->swrast_context)
_swrast_InvalidateState(ctx, new_state);
- _vbo_InvalidateState(ctx, new_state);
intel->NewGLState |= new_state;
if (ctx->swrast_context)
_swrast_InvalidateState(ctx, new_state);
- _vbo_InvalidateState(ctx, new_state);
brw->NewGLState |= new_state;
_swrast_InvalidateState(ctx, new_state);
_tnl_InvalidateState(ctx, new_state);
- _vbo_InvalidateState(ctx, new_state);
nouveau_state_emit(ctx);
}
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
R200_CONTEXT(ctx)->radeon.NewGLState |= new_state;
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
R100_CONTEXT(ctx)->radeon.NewGLState |= new_state;
}
/* not much to do here - pass it on */
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
}
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
}
static void
*/
_swrast_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
if (_mesa_is_user_fbo(ctx->DrawBuffer))
#include "texobj.h"
#include "texstate.h"
#include "varray.h"
+#include "vbo/vbo_context.h"
#include "viewport.h"
#include "blend.h"
out:
new_prog_state |= update_program_constants(ctx);
+ ctx->NewState |= new_prog_state;
+ vbo_exec_invalidate_state(ctx);
+
/*
* Give the driver a chance to act upon the new_state flags.
* 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).
*/
- ctx->NewState |= new_prog_state;
ctx->Driver.UpdateState(ctx);
ctx->NewState = 0;
ctx->Array.VAO->NewArrays = 0x0;
if (new_state & _NEW_PROGRAM_CONSTANTS)
st->dirty |= st->active_states & ST_NEW_CONSTANTS;
-
- /* This is the only core Mesa module we depend upon.
- * No longer use swrast, swsetup, tnl.
- */
- _vbo_InvalidateState(ctx, new_state);
}
GLboolean _vbo_CreateContext( struct gl_context *ctx );
void _vbo_DestroyContext( struct gl_context *ctx );
-void _vbo_InvalidateState( struct gl_context *ctx, GLbitfield new_state );
void
}
-void _vbo_InvalidateState( struct gl_context *ctx, GLbitfield new_state )
-{
- vbo_exec_invalidate_state(ctx, new_state);
-}
-
-
void _vbo_DestroyContext( struct gl_context *ctx )
{
struct vbo_context *vbo = vbo_context(ctx);
#include "vbo_exec.h"
#include "vbo_save.h"
+#include "main/api_arrayelt.h"
#include "main/macros.h"
#ifdef __cplusplus
}
+static inline void
+vbo_exec_invalidate_state(struct gl_context *ctx)
+{
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
+
+ if (!exec->validating && ctx->NewState & (_NEW_PROGRAM | _NEW_ARRAY)) {
+ exec->array.recalculate_inputs = GL_TRUE;
+ }
+
+ if (ctx->NewState & _NEW_EVAL)
+ exec->eval.recalculate_maps = GL_TRUE;
+
+ _ae_invalidate_state(ctx, ctx->NewState);
+}
+
+
/**
* Return VP_x token to indicate whether we're running fixed-function
* vertex transformation, an NV vertex program or ARB vertex program/shader.
*/
-#include "main/api_arrayelt.h"
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/vtxfmt.h"
}
-/**
- * Really want to install these callbacks to a central facility to be
- * invoked according to the state flags. That will have to wait for a
- * mesa rework:
- */
-void vbo_exec_invalidate_state( struct gl_context *ctx, GLbitfield new_state )
-{
- struct vbo_context *vbo = vbo_context(ctx);
- struct vbo_exec_context *exec = &vbo->exec;
-
- if (!exec->validating && new_state & (_NEW_PROGRAM|_NEW_ARRAY)) {
- exec->array.recalculate_inputs = GL_TRUE;
- }
-
- if (new_state & _NEW_EVAL)
- exec->eval.recalculate_maps = GL_TRUE;
-
- _ae_invalidate_state(ctx, new_state);
-}
-
-
/**
* Figure out the number of transform feedback primitives that will be output
* considering the drawing mode, number of vertices, and instance count,
*/
void vbo_exec_init( struct gl_context *ctx );
void vbo_exec_destroy( struct gl_context *ctx );
-void vbo_exec_invalidate_state( struct gl_context *ctx, GLbitfield new_state );
/* Internal functions: