diff options
author | Eric Anholt <[email protected]> | 2012-08-08 16:03:04 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-08 16:21:30 -0700 |
commit | 33dfdc735e052d9c9b33883350e926d40220b6ac (patch) | |
tree | cdefdcdc4d5d033605c376b13ce3e4261e51ea36 /src | |
parent | 1b148e660e4cefcfbdc65ef8a58a7e52e8820782 (diff) |
i965: Make brw_set_saturate() use stdbool.
There was a chance for brw_wm_emit.c to screw up and pass (1 << 4) instead of
1, which would get converted to 0 when stored. Instead, use stdbool which
converts nonzero to true/1 like we want.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 2c432a92303..acbf7c0bf25 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -141,9 +141,9 @@ void brw_set_mask_control( struct brw_compile *p, GLuint value ) p->current->header.mask_control = value; } -void brw_set_saturate( struct brw_compile *p, GLuint value ) +void brw_set_saturate( struct brw_compile *p, bool enable ) { - p->current->header.saturate = value; + p->current->header.saturate = enable; } void brw_set_acc_write_control(struct brw_compile *p, GLuint value) diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 233b94cfda4..3ab00a263eb 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -802,7 +802,7 @@ static INLINE struct brw_instruction *current_insn( struct brw_compile *p) void brw_pop_insn_state( struct brw_compile *p ); void brw_push_insn_state( struct brw_compile *p ); void brw_set_mask_control( struct brw_compile *p, GLuint value ); -void brw_set_saturate( struct brw_compile *p, GLuint value ); +void brw_set_saturate( struct brw_compile *p, bool enable ); void brw_set_access_mode( struct brw_compile *p, GLuint access_mode ); void brw_set_compression_control(struct brw_compile *p, enum brw_compression c); void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value ); |