On Friday, May 29, 2015 12:33:10 PM Chad Versace wrote: > On Fri 29 May 2015, Matt Turner wrote: > > On Thu, May 28, 2015 at 10:21 AM, Ben Widawsky > > > @@ -286,7 +284,7 @@ intel_miptree_create_layout(struct brw_context *brw, > > > mt->logical_height0 = height0; > > > mt->logical_depth0 = depth0; > > > mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_NO_MCS; > > > - mt->disable_aux_buffers = disable_aux_buffers; > > > + mt->disable_aux_buffers = !!(layout_flags & > > > MIPTREE_LAYOUT_DISABLE_AUX); > > > > FWIW, I much prefer (x & y) != 0 to !!(x & y). > > Matt, in the C code you've encountered in the wild, do you feel that > `(x & y) != 0` is more prevalent than `!!(x & y)`? I'm curious, because > we should probably choose the idiom which is more recognizable. > > For the record, I slightly prefer !! because I've encountered it often > in idiomatic Python, but it really doesn't matter to me. I suspect that > != 0 may be the more common idiom in C.
I prefer != 0 as well.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev