<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 7:18 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
The for_bo parameter of intel_miptree_create_layout appears to be unused<br>
since 27eedca when Eric removed some Gen5 code (after the i915 and i965<br>
drivers parted ways).<br>
<br>
intel_mipmap_tree.c: In function 'old_intel_miptree_create_layout':<br>
intel_mipmap_tree.c:77:35: warning: unused parameter 'for_bo' [-Wunused-parameter]<br>
bool for_bo)<br>
^<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i915/intel_mipmap_tree.c | 14 +++-----------<br>
src/mesa/drivers/dri/i915/intel_mipmap_tree.h | 3 +--<br>
src/mesa/drivers/dri/i915/intel_tex_image.c | 3 +--<br>
3 files changed, 5 insertions(+), 15 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i915/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915/intel_mipmap_tree.c<br>
index 307ad4d..5cbf763 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i915/intel_mipmap_tree.c<br>
@@ -60,11 +60,6 @@ target_to_target(GLenum target)<br>
}<br>
}<br>
<br>
-/**<br>
- * @param for_bo Indicates that the caller is<br>
- * intel_miptree_create_for_bo(). If true, then do not create<br>
- * \c stencil_mt.<br>
- */<br>
struct intel_mipmap_tree *<br>
intel_miptree_create_layout(struct intel_context *intel,<br>
GLenum target,<br>
@@ -73,8 +68,7 @@ intel_miptree_create_layout(struct intel_context *intel,<br>
GLuint last_level,<br>
GLuint width0,<br>
GLuint height0,<br>
- GLuint depth0,<br>
- bool for_bo)<br>
+ GLuint depth0)<br>
{<br>
struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);<br>
if (!mt)<br>
@@ -181,8 +175,7 @@ intel_miptree_create(struct intel_context *intel,<br>
<br>
mt = intel_miptree_create_layout(intel, target, format,<br>
first_level, last_level, width0,<br>
- height0, depth0,<br>
- false);<br>
+ height0, depth0);<br>
/*<br>
* pitch == 0 || height == 0 indicates the null texture<br>
*/<br>
@@ -262,8 +255,7 @@ intel_miptree_create_for_bo(struct intel_context *intel,<br>
<br>
mt = intel_miptree_create_layout(intel, GL_TEXTURE_2D, format,<br>
0, 0,<br>
- width, height, 1,<br>
- true);<br>
+ width, height, 1);<br>
if (!mt) {<br>
free(region);<br>
return mt;<br>
diff --git a/src/mesa/drivers/dri/i915/intel_mipmap_tree.h b/src/mesa/drivers/dri/i915/intel_mipmap_tree.h<br>
index aab30ed..2520b30 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i915/intel_mipmap_tree.h<br>
@@ -240,8 +240,7 @@ intel_miptree_create_layout(struct intel_context *intel,<br>
GLuint last_level,<br>
GLuint width0,<br>
GLuint height0,<br>
- GLuint depth0,<br>
- bool for_bo);<br>
+ GLuint depth0);<br>
<br>
struct intel_mipmap_tree *<br>
intel_miptree_create_for_bo(struct intel_context *intel,<br>
diff --git a/src/mesa/drivers/dri/i915/intel_tex_image.c b/src/mesa/drivers/dri/i915/intel_tex_image.c<br>
index 5ab60d1..63ef08b 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_tex_image.c<br>
+++ b/src/mesa/drivers/dri/i915/intel_tex_image.c<br>
@@ -241,8 +241,7 @@ intel_set_texture_image_region(struct gl_context *ctx,<br>
<br>
intel_image->mt = intel_miptree_create_layout(intel, target, image->TexFormat,<br>
0, 0,<br>
- width, height, 1,<br>
- true);<br>
+ width, height, 1);<br>
if (intel_image->mt == NULL)<br>
return;<br>
intel_region_reference(&intel_image->mt->region, region);<br>
<span class=""><font color="#888888">--<br>
2.1.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra"><span style="font-size:12.8000001907349px">Reviewed-by: Anuj Phogat <</span><a href="mailto:anuj.phogat@gmail.com" target="_blank" style="font-size:12.8000001907349px">anuj.phogat@gmail.com</a><span style="font-size:12.8000001907349px">></span><br></div></div>