[Mesa-dev] [PATCH 02/27] i965/miptree: Remove redundant check for null texture
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Mon Jan 16 12:07:25 UTC 2017
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
On Mon, 2017-01-16 at 11:13 +0200, Topi Pohjolainen wrote:
> There exact same check earlier in brw_miptree_layout() which
> intel_miptree_create_layout() in turn calls unconditionally.
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 25f8f39..9488bec 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -628,13 +628,8 @@ miptree_create(struct brw_context *brw,
> first_level, last_level, width0,
> height0, depth0, num_samples,
> layout_flags);
> - /*
> - * pitch == 0 || height == 0 indicates the null texture
> - */
> - if (!mt || !mt->total_width || !mt->total_height) {
> - intel_miptree_release(&mt);
> + if (!mt)
> return NULL;
> - }
>
> if (mt->tiling == (I915_TILING_Y | I915_TILING_X))
> mt->tiling = I915_TILING_Y;
More information about the mesa-dev
mailing list