i965: Change the order of conditions tested in if
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 15 Apr 2015 18:46:53 +0000 (11:46 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 7 May 2015 18:43:01 +0000 (11:43 -0700)
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>
src/mesa/drivers/dri/i965/brw_surface_formats.c

index c5fde350fe3d02aa33d50e550da8120e537bc03d..016f87a4c2a0000424a3d2c73205dfd8aa4072b3 100644 (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