[Mesa-dev] [PATCH] i965: Simplify separate stencil check

Eric Anholt eric at anholt.net
Thu Mar 14 12:40:54 PDT 2013


Paul Berry <stereotype441 at gmail.com> writes:

> 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.
> ---
>  src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)))) {

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130314/9367b6fb/attachment-0001.pgp>


More information about the mesa-dev mailing list