summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-12-22 10:36:03 +0200
committerTopi Pohjolainen <[email protected]>2017-01-27 08:57:26 +0200
commit26a9e039fdc63c04d5b3383d91c5eea1494c0f8f (patch)
treee061c43e2235e96386e06ef14817b881608e01f7 /src/mesa/drivers
parentbcec4113cc812f604deb8dff2bb91a32340984fa (diff)
i965/miptree: Remove redundant check for null texture
There exact same check earlier in brw_miptree_layout() which intel_miptree_create_layout() in turn calls unconditionally. Reviewed-by: Samuel Iglesias Gons\341lvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c7
1 files changed, 1 insertions, 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 f2debae444a..19f4f883d7e 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -631,13 +631,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;