i965: Change the order of conditions tested in if

Reduces the number of conditions tested in if to one in case of
non-integer formats. Makes no functional changes.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Anuj Phogat 2015-04-15 11:46:53 -07:00
parent 8e029105c2
commit 15259d63e8

View file

@ -697,9 +697,10 @@ brw_render_target_supported(struct brw_context *brw,
* available to fake it like we do for XRGB8888. Force them to being
* unsupported.
*/
if ((rb->_BaseFormat != GL_RGBA &&
rb->_BaseFormat != GL_RG &&
rb->_BaseFormat != GL_RED) && _mesa_is_format_integer_color(format))
if (_mesa_is_format_integer_color(format) &&
rb->_BaseFormat != GL_RGBA &&
rb->_BaseFormat != GL_RG &&
rb->_BaseFormat != GL_RED)
return false;
/* Under some conditions, MSAA is not supported for formats whose width is