i965: Simplify separate stencil check
authorPaul Berry <stereotype441@gmail.com>
Wed, 13 Mar 2013 20:48:13 +0000 (13:48 -0700)
committerPaul Berry <stereotype441@gmail.com>
Sat, 16 Mar 2013 17:15:51 +0000 (10:15 -0700)
The only format returned by _mesa_get_format_base_format() that
satisfies _mesa_is_depthstencil_format() is GL_DEPTH_STENCIL, so we
can simplify the check.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index 1640590b962394196c7fcac307b3f9b17cc49cca..a47f6d8367dba5dfe85b8cb3b5f619402e02899f 100644 (file)
@@ -247,7 +247,7 @@ intel_miptree_create_layout(struct intel_context *intel,
    mt->physical_depth0 = depth0;
 
    if (!for_region &&
-       _mesa_is_depthstencil_format(_mesa_get_format_base_format(format)) &&
+       _mesa_get_format_base_format(format) == GL_DEPTH_STENCIL &&
        (intel->must_use_separate_stencil ||
        (intel->has_separate_stencil &&
         intel->vtbl.is_hiz_depth_format(intel, format)))) {