diff options
author | Paul Berry <[email protected]> | 2014-01-10 15:40:57 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2014-09-01 19:38:27 -0700 |
commit | c5bdf9be1eca190417998d548fd140c1eca37a54 (patch) | |
tree | ca51fac7b85df78d481b31696b0d560c6f126ed6 /src/mesa | |
parent | 6f56e1424d923fd80c84090fbf4506c9eaaffea1 (diff) |
i965: Create a macro for checking a dirty bit.
This will make it easier to extend dirty bit handling to support
compute shaders.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_gs.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 5ffd9604a9c..a44b77f4717 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -259,6 +259,12 @@ struct brw_state_flags { } while (false) +/** + * Check one of the bits in a field of brw_state_flags. + */ +#define CHECK_DIRTY_BIT(FIELD, FLAG) ((brw->state.dirty.FIELD & (FLAG)) != 0) + + /** Subclass of Mesa vertex program */ struct brw_vertex_program { struct gl_vertex_program program; diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c index ecab59ae8e5..d99502de613 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c @@ -272,7 +272,7 @@ brw_upload_gs_prog(struct brw_context *brw) if (gp == NULL) { /* No geometry shader. Vertex data just passes straight through. */ - if (brw->state.dirty.brw & BRW_NEW_VUE_MAP_VS) { + if (CHECK_DIRTY_BIT(brw, BRW_NEW_VUE_MAP_VS)) { brw->vue_map_geom_out = brw->vue_map_vs; SET_DIRTY_BIT(brw, BRW_NEW_VUE_MAP_GEOM_OUT); } |