diff options
author | Marek Olšák <[email protected]> | 2013-04-15 13:00:54 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-04-24 03:23:23 +0200 |
commit | 99bd76d834e0c771274f327e1efe9b089ff273d4 (patch) | |
tree | d58b554df1dc0ead07965381e5a6110d784eacf3 /src/mesa/drivers | |
parent | b95cbe5e800e95d888d148e20e6a4e34c8857a9e (diff) |
mesa: convert _NEW_RASTERIZER_DISCARD to a driver flag
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sol_state.c | 8 |
5 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 04d6943352e..ce22bc3a9ef 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -154,6 +154,7 @@ brwCreateContext(int api, tnl->Driver.RunPipeline = _tnl_run_pipeline; ctx->DriverFlags.NewTransformFeedback = BRW_NEW_TRANSFORM_FEEDBACK; + ctx->DriverFlags.NewRasterizerDiscard = BRW_NEW_RASTERIZER_DISCARD; ctx->Const.MaxDualSourceDrawBuffers = 1; ctx->Const.MaxDrawBuffers = BRW_MAX_DRAW_BUFFERS; diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index e4fd0714c33..2ad62cd3a91 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -151,6 +151,7 @@ enum brw_state_id { BRW_STATE_SOL_INDICES, BRW_STATE_VUE_MAP_GEOM_OUT, BRW_STATE_TRANSFORM_FEEDBACK, + BRW_STATE_RASTERIZER_DISCARD, }; #define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE) @@ -180,6 +181,7 @@ enum brw_state_id { #define BRW_NEW_SOL_INDICES (1 << BRW_STATE_SOL_INDICES) #define BRW_NEW_VUE_MAP_GEOM_OUT (1 << BRW_STATE_VUE_MAP_GEOM_OUT) #define BRW_NEW_TRANSFORM_FEEDBACK (1 << BRW_STATE_TRANSFORM_FEEDBACK) +#define BRW_NEW_RASTERIZER_DISCARD (1 << BRW_STATE_RASTERIZER_DISCARD) struct brw_state_flags { /** State update flags signalled by mesa internals */ diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 59053d4c6c9..a432b76fa77 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -215,7 +215,7 @@ static void populate_key( struct brw_context *brw, } } /* On Gen6, GS is also used for rasterizer discard. */ - /* _NEW_RASTERIZER_DISCARD */ + /* BRW_NEW_RASTERIZER_DISCARD */ if (ctx->RasterDiscard) { key->need_gs_prog = true; key->rasterizer_discard = true; @@ -257,10 +257,10 @@ brw_upload_gs_prog(struct brw_context *brw) const struct brw_tracked_state brw_gs_prog = { .dirty = { - .mesa = (_NEW_LIGHT | - _NEW_RASTERIZER_DISCARD), + .mesa = (_NEW_LIGHT), .brw = (BRW_NEW_PRIMITIVE | - BRW_NEW_TRANSFORM_FEEDBACK), + BRW_NEW_TRANSFORM_FEEDBACK | + BRW_NEW_RASTERIZER_DISCARD), .cache = CACHE_NEW_VS_PROG }, .emit = brw_upload_gs_prog diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 843324f8c9f..80a46051257 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -372,6 +372,7 @@ static struct dirty_bit_map brw_bits[] = { DEFINE_BIT(BRW_NEW_SOL_INDICES), DEFINE_BIT(BRW_NEW_VUE_MAP_GEOM_OUT), DEFINE_BIT(BRW_NEW_TRANSFORM_FEEDBACK), + DEFINE_BIT(BRW_NEW_RASTERIZER_DISCARD), {0, 0, 0} }; diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index a404e2be3d4..f5703362968 100644 --- a/src/mesa/drivers/dri/i965/gen7_sol_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c @@ -195,7 +195,7 @@ upload_3dstate_streamout(struct brw_context *brw, bool active, uint32_t dw1 = 0, dw2 = 0; int i; - /* _NEW_RASTERIZER_DISCARD */ + /* BRW_NEW_RASTERIZER_DISCARD */ if (ctx->RasterDiscard) dw1 |= SO_RENDERING_DISABLE; @@ -263,12 +263,12 @@ upload_sol_state(struct brw_context *brw) const struct brw_tracked_state gen7_sol_state = { .dirty = { - .mesa = (_NEW_RASTERIZER_DISCARD | - _NEW_LIGHT), + .mesa = (_NEW_LIGHT), .brw = (BRW_NEW_BATCH | BRW_NEW_VERTEX_PROGRAM | BRW_NEW_VUE_MAP_GEOM_OUT | - BRW_NEW_TRANSFORM_FEEDBACK) + BRW_NEW_TRANSFORM_FEEDBACK | + BRW_NEW_RASTERIZER_DISCARD) }, .emit = upload_sol_state, }; |