i965/miptree: Simplify the switch in supports_ccs
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 16 May 2018 18:07:41 +0000 (11:07 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 18 May 2018 16:53:06 +0000 (09:53 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 0289f4f7e4c9bacbd8b088180eaeb926b69c5550..1a797326a8233cf3f448298ebf3c1ba4ded474fe 100644 (file)
@@ -159,12 +159,8 @@ intel_miptree_supports_ccs(struct brw_context *brw,
       return false;
 
    /* MCS is only supported for color buffers */
-   switch (_mesa_get_format_base_format(mt->format)) {
-   case GL_DEPTH_COMPONENT:
-   case GL_DEPTH_STENCIL:
-   case GL_STENCIL_INDEX:
+   if (!_mesa_is_format_color_format(mt->format))
       return false;
-   }
 
    if (mt->cpp != 4 && mt->cpp != 8 && mt->cpp != 16)
       return false;