summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c5
-rw-r--r--src/mesa/state_tracker/st_context.c6
-rw-r--r--src/mesa/state_tracker/st_context.h1
-rw-r--r--src/mesa/state_tracker/st_draw.c12
4 files changed, 20 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 7fef031f013..8337f462418 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -251,7 +251,10 @@ st_RasterPos(struct gl_context *ctx, const GLfloat v[4])
*/
rs->array[0].Ptr = (GLubyte *) v;
- /* draw the point */
+ /* Draw the point.
+ *
+ * Don't set DriverFlags.NewArray.
+ * st_feedback_draw_vbo doesn't check for that flag. */
ctx->Array._DrawArrays = rs->arrays;
st_feedback_draw_vbo(ctx, &rs->prim, 1, NULL, GL_TRUE, 0, 1,
NULL);
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 19d9da131f3..ce7dbb3f39a 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -203,6 +203,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
return st;
}
+static void st_init_driver_flags(struct gl_driver_flags *f)
+{
+ f->NewArray = ST_NEW_VERTEX_ARRAYS;
+}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
const struct gl_config *visual,
@@ -225,6 +229,8 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
return NULL;
}
+ st_init_driver_flags(&ctx->DriverFlags);
+
/* XXX: need a capability bit in gallium to query if the pipe
* driver prefers DP4 or MUL/MAD for vertex transformation.
*/
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 3ec98ada196..4786ed22fe9 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -50,6 +50,7 @@ struct u_vbuf;
#define ST_NEW_FRAMEBUFFER (1 << 3)
#define ST_NEW_EDGEFLAGS_DATA (1 << 4)
#define ST_NEW_GEOMETRY_PROGRAM (1 << 5)
+#define ST_NEW_VERTEX_ARRAYS (1 << 6)
struct st_state_flags {
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 01ba09d6567..42dc3757615 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -981,13 +981,19 @@ st_draw_vbo(struct gl_context *ctx,
const struct gl_client_array **arrays = ctx->Array._DrawArrays;
unsigned i, num_instances = 1;
unsigned max_index_plus_base;
- GLboolean new_array =
- st->dirty.st &&
- (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) != 0;
+ GLboolean new_array;
/* Mesa core state should have been validated already */
assert(ctx->NewState == 0x0);
+ /* Get Mesa driver state. */
+ st->dirty.st |= ctx->NewDriverState;
+ ctx->NewDriverState = 0;
+
+ new_array =
+ (st->dirty.st & (ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM)) ||
+ (st->dirty.mesa & (_NEW_PROGRAM | _NEW_BUFFER_OBJECT)) != 0;
+
if (ib) {
int max_base_vertex = 0;