summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-07 13:26:16 +1000
committerTimothy Arceri <[email protected]>2017-06-09 09:13:46 +1000
commitbc70bad59bde311434349bbe07b7fb1d3b0ec559 (patch)
treeed702288f8d317dde9b1a1f5fdc18dc5d46ace98 /src/mesa/vbo
parent99987fe92e5e109d7a0c114477cba52cdc6629b5 (diff)
mesa: inline vbo_exec_invalidate_state() and call from mesa core
Rather than calling it indirectly in each driver. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo.h1
-rw-r--r--src/mesa/vbo/vbo_context.c6
-rw-r--r--src/mesa/vbo/vbo_context.h18
-rw-r--r--src/mesa/vbo/vbo_exec.c22
-rw-r--r--src/mesa/vbo/vbo_exec.h1
5 files changed, 18 insertions, 30 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 79f75386f72..eec484b3767 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -78,7 +78,6 @@ struct _mesa_index_buffer {
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
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 384e40516c8..a5f915d9bdb 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -227,12 +227,6 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx )
}
-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);
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index 5cf399ffcd7..0418643f8f4 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -56,6 +56,7 @@
#include "vbo_exec.h"
#include "vbo_save.h"
+#include "main/api_arrayelt.h"
#include "main/macros.h"
#ifdef __cplusplus
@@ -91,6 +92,23 @@ static inline struct vbo_context *vbo_context(struct gl_context *ctx)
}
+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.
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index de8461f1fcc..dc26dfd37b4 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -26,7 +26,6 @@
*/
-#include "main/api_arrayelt.h"
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/vtxfmt.h"
@@ -71,27 +70,6 @@ void vbo_exec_destroy( struct gl_context *ctx )
/**
- * 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,
* assuming that no geometry shading is done and primitive restart is not
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 9358ca2acf1..f1e3881b1f9 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -147,7 +147,6 @@ struct vbo_exec_context
*/
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: