On 2016-08-24 17:54:23, Kenneth Graunke wrote: > On Wednesday, August 24, 2016 5:49:53 PM PDT Ian Romanick wrote: > > On 08/24/2016 05:46 PM, Matt Turner wrote: > > > On Wed, Aug 24, 2016 at 4:54 PM, Jordan Justen > > > <[email protected]> wrote: > > >> - if (_mesa_format_has_color_component(format, i)) > > >> + if (is_color ? _mesa_format_has_color_component(format, i) : i > > >> == 0) > > > > > > This line kinda makes my head hurt. Not sure what to suggest. > > > > Yeah... I wasn't sure that (is_color && > > _mesa_format_has_color_component(format, i)) || (!is_color && i == 0) > > was actually better. > > How about > > static bool > has_component(mesa_format format, int i) > { > if (_mesa_is_format_color_format(format) > return _mesa_format_has_color_component(format, i); > > /* depth and stencil have only one component */ > return i == 0; > }
Looks good to me. I'll make this change. Thanks, -Jordan _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
