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_vs.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_vs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 9069596489a..2846ff69be5 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -401,6 +401,20 @@ brw_setup_vue_key_clip_info(struct brw_context *brw, } } +static bool +brw_vs_state_dirty(struct brw_context *brw) +{ + return brw_state_dirty(brw, + _NEW_BUFFERS | + _NEW_LIGHT | + _NEW_POINT | + _NEW_POLYGON | + _NEW_TEXTURE | + _NEW_TRANSFORM, + BRW_NEW_VERTEX_PROGRAM | + BRW_NEW_VS_ATTRIB_WORKAROUNDS); +} + static void brw_vs_populate_key(struct brw_context *brw, struct brw_vs_prog_key *key) @@ -459,15 +473,7 @@ brw_upload_vs_prog(struct brw_context *brw) struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program; - if (!brw_state_dirty(brw, - _NEW_BUFFERS | - _NEW_LIGHT | - _NEW_POINT | - _NEW_POLYGON | - _NEW_TEXTURE | - _NEW_TRANSFORM, - BRW_NEW_VERTEX_PROGRAM | - BRW_NEW_VS_ATTRIB_WORKAROUNDS)) + if (!brw_vs_state_dirty(brw)) return; brw_vs_populate_key(brw, &key); |