Mesa (master): i965: Simplify separate stencil check

Paul Berry stereotype441 at kemper.freedesktop.org
Sat Mar 16 17:16:56 UTC 2013


Module: Mesa
Branch: master
Commit: 346a1b9bb927625ae5d315bfa1655be734be69de
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=346a1b9bb927625ae5d315bfa1655be734be69de

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Mar 13 13:48:13 2013 -0700

i965: Simplify separate stencil check

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 at anholt.net>

---

 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 1640590..a47f6d8 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -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)))) {




More information about the mesa-commit mailing list