diff options
author | Carl Worth <[email protected]> | 2015-03-20 12:01:33 -0700 |
---|---|---|
committer | Carl Worth <[email protected]> | 2015-04-02 22:15:45 -0700 |
commit | a57672f18deca3060eab129a77cf84f5e420bac8 (patch) | |
tree | add4f3733745dd52c33ff27bed79f01ee957f024 /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | 28510d69ff8fc03bc1693be2b7a02bc68791dd2f (diff) |
i965: Split out per-stage dirty-bit checking into separate functions
The dirty-bit checking from each brw_upload_<stage>_prog function is
split out into its a new brw_<stage>_state_dirty function.
This commit is intended to have no functional change. It exists in
preparation for some upcoming code movement in preparation for the
shader cache.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index a0eda3a8b94..b85f236b8ea 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -421,6 +421,27 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx, } } +static bool +brw_wm_state_dirty (struct brw_context *brw) +{ + return brw_state_dirty(brw, + _NEW_BUFFERS | + _NEW_COLOR | + _NEW_DEPTH | + _NEW_FRAG_CLAMP | + _NEW_HINT | + _NEW_LIGHT | + _NEW_LINE | + _NEW_MULTISAMPLE | + _NEW_POLYGON | + _NEW_STENCIL | + _NEW_TEXTURE, + BRW_NEW_FRAGMENT_PROGRAM | + BRW_NEW_REDUCED_PRIMITIVE | + BRW_NEW_STATS_WM | + BRW_NEW_VUE_MAP_GEOM_OUT); +} + static void brw_wm_populate_key( struct brw_context *brw, struct brw_wm_prog_key *key ) { @@ -590,22 +611,7 @@ brw_upload_wm_prog(struct brw_context *brw) struct brw_fragment_program *fp = (struct brw_fragment_program *) brw->fragment_program; - if (!brw_state_dirty(brw, - _NEW_BUFFERS | - _NEW_COLOR | - _NEW_DEPTH | - _NEW_FRAG_CLAMP | - _NEW_HINT | - _NEW_LIGHT | - _NEW_LINE | - _NEW_MULTISAMPLE | - _NEW_POLYGON | - _NEW_STENCIL | - _NEW_TEXTURE, - BRW_NEW_FRAGMENT_PROGRAM | - BRW_NEW_REDUCED_PRIMITIVE | - BRW_NEW_STATS_WM | - BRW_NEW_VUE_MAP_GEOM_OUT)) + if (!brw_wm_state_dirty(brw)) return; brw_wm_populate_key(brw, &key); |