diff options
author | Jordan Justen <[email protected]> | 2015-04-22 11:43:50 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2015-05-02 00:50:00 -0700 |
commit | 0e0e23ef537c9add672ff322f34e129a07edc55e (patch) | |
tree | 83afafb333af5e60d123ea923dad81bffa62fa20 /src/mesa/drivers/dri/i965/brw_state.h | |
parent | 013031b2291e87f2559a67c2c54b9004c71ef91b (diff) |
i965/state: Emit pipeline select when changing pipelines
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 565946d4667..5c27b3d367e 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -185,6 +185,18 @@ void brw_upload_compute_state(struct brw_context *brw); void brw_compute_state_finished(struct brw_context *brw); void brw_init_state(struct brw_context *brw); void brw_destroy_state(struct brw_context *brw); +void brw_emit_select_pipeline(struct brw_context *brw, + enum brw_pipeline pipeline); + +static inline void +brw_select_pipeline(struct brw_context *brw, enum brw_pipeline pipeline) +{ + if (unlikely(brw->last_pipeline != pipeline)) { + assert(pipeline < BRW_NUM_PIPELINES); + brw_emit_select_pipeline(brw, pipeline); + brw->last_pipeline = pipeline; + } +} /*********************************************************************** * brw_state_cache.c |