From: Anuj Phogat Date: Wed, 15 Apr 2015 18:46:53 +0000 (-0700) Subject: i965: Change the order of conditions tested in if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15259d63e808a08d755d2b44efaa62d5a8ca7655;p=mesa.git 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 Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index c5fde350fe3..016f87a4c2a 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -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