i965: Make brw_set_saturate() use stdbool.
authorEric Anholt <eric@anholt.net>
Wed, 8 Aug 2012 23:03:04 +0000 (16:03 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 8 Aug 2012 23:21:30 +0000 (16:21 -0700)
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.

src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_eu.h

index 2c432a9..acbf7c0 100644 (file)
@@ -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)
index 233b94c..3ab00a2 100644 (file)
@@ -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 );