summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2015-04-15 11:46:53 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2015-05-07 11:43:01 -0700
commit15259d63e808a08d755d2b44efaa62d5a8ca7655 (patch)
tree65ac646aead0b215bcbddc21b6c94b0540185e96
parent8e029105c2e6959390a68116ac6d1d277815519f (diff)
downloadexternal_mesa3d-15259d63e808a08d755d2b44efaa62d5a8ca7655.zip
external_mesa3d-15259d63e808a08d755d2b44efaa62d5a8ca7655.tar.gz
external_mesa3d-15259d63e808a08d755d2b44efaa62d5a8ca7655.tar.bz2
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>
-rw-r--r--src/mesa/drivers/dri/i965/brw_surface_formats.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index c5fde35..016f87a 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