summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-01-05 21:20:06 +0100
committerSamuel Pitoiset <[email protected]>2016-02-13 15:51:17 +0100
commit08c46025c87654fbc885136a2c8cc4cce902dd37 (patch)
treef90558228e20c56362c3cfa2adf839e02c10da41 /src/mesa/state_tracker/st_context.c
parenta8328e3a50169c3c74656df7f63f56f061d9e751 (diff)
st/mesa: add a second pipeline for compute
Compute needs a new and different validation path. Changes from v2: - make use of unreachable() instead of assert() when the pipeline is invalid - move the st_pipeline enumeration to st_context.h instead of st_api.h Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 9016846b148..b73b0abd55a 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -138,8 +138,11 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
}
+ /* Invalidate render and compute pipelines. */
st->dirty.mesa |= new_state;
st->dirty.st |= ST_NEW_MESA;
+ st->dirty_cp.mesa |= new_state;
+ st->dirty_cp.st |= ST_NEW_MESA;
/* This is the only core Mesa module we depend upon.
* No longer use swrast, swsetup, tnl.
@@ -208,8 +211,11 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
/* state tracker needs the VBO module */
_vbo_CreateContext(ctx);
+ /* Initialize render and compute pipelines flags */
st->dirty.mesa = ~0;
st->dirty.st = ~0;
+ st->dirty_cp.mesa = ~0;
+ st->dirty_cp.st = ~0;
/* Create upload manager for vertex data for glBitmap, glDrawPixels,
* glClear, etc.