[Mesa-dev] [PATCH 07/20] intel: Silence several "warning: unused parameter"
Ian Romanick
idr at freedesktop.org
Mon Aug 29 14:58:57 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
The intel_context and tiling parameters were not used by any if the
i9[14]5_miptree_layout or the functions they call, and the tiling parameter was
not used by brw_miptree_layout. Remove the unnecessary parameters.
---
src/mesa/drivers/dri/i915/i915_tex_layout.c | 40 ++++++++---------------
src/mesa/drivers/dri/i965/brw_tex_layout.c | 7 ++--
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 16 ++++-----
src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 11 ++-----
src/mesa/drivers/dri/intel/intel_tex_layout.c | 4 +--
src/mesa/drivers/dri/intel/intel_tex_layout.h | 5 +--
6 files changed, 30 insertions(+), 53 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c
index e6a4711..45ca38e 100644
--- a/src/mesa/drivers/dri/i915/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c
@@ -112,9 +112,7 @@ static GLint bottom_offsets[6] = {
*
*/
static void
-i915_miptree_layout_cube(struct intel_context *intel,
- struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i915_miptree_layout_cube(struct intel_mipmap_tree * mt)
{
const GLuint dim = mt->width0;
GLuint face;
@@ -156,9 +154,7 @@ i915_miptree_layout_cube(struct intel_context *intel,
}
static void
-i915_miptree_layout_3d(struct intel_context *intel,
- struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i915_miptree_layout_3d(struct intel_mipmap_tree * mt)
{
GLuint width = mt->width0;
GLuint height = mt->height0;
@@ -201,9 +197,7 @@ i915_miptree_layout_3d(struct intel_context *intel,
}
static void
-i915_miptree_layout_2d(struct intel_context *intel,
- struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i915_miptree_layout_2d(struct intel_mipmap_tree * mt)
{
GLuint width = mt->width0;
GLuint height = mt->height0;
@@ -231,20 +225,19 @@ i915_miptree_layout_2d(struct intel_context *intel,
}
GLboolean
-i915_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i915_miptree_layout(struct intel_mipmap_tree * mt)
{
switch (mt->target) {
case GL_TEXTURE_CUBE_MAP:
- i915_miptree_layout_cube(intel, mt, tiling);
+ i915_miptree_layout_cube(mt);
break;
case GL_TEXTURE_3D:
- i915_miptree_layout_3d(intel, mt, tiling);
+ i915_miptree_layout_3d(mt);
break;
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE_ARB:
- i915_miptree_layout_2d(intel, mt, tiling);
+ i915_miptree_layout_2d(mt);
break;
default:
_mesa_problem(NULL, "Unexpected tex target in i915_miptree_layout()");
@@ -319,9 +312,7 @@ i915_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
*/
static void
-i945_miptree_layout_cube(struct intel_context *intel,
- struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i945_miptree_layout_cube(struct intel_mipmap_tree * mt)
{
const GLuint dim = mt->width0;
GLuint face;
@@ -411,9 +402,7 @@ i945_miptree_layout_cube(struct intel_context *intel,
}
static void
-i945_miptree_layout_3d(struct intel_context *intel,
- struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i945_miptree_layout_3d(struct intel_mipmap_tree * mt)
{
GLuint width = mt->width0;
GLuint height = mt->height0;
@@ -467,23 +456,22 @@ i945_miptree_layout_3d(struct intel_context *intel,
}
GLboolean
-i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
- uint32_t tiling)
+i945_miptree_layout(struct intel_mipmap_tree * mt)
{
switch (mt->target) {
case GL_TEXTURE_CUBE_MAP:
if (mt->compressed)
- i945_miptree_layout_cube(intel, mt, tiling);
+ i945_miptree_layout_cube(mt);
else
- i915_miptree_layout_cube(intel, mt, tiling);
+ i915_miptree_layout_cube(mt);
break;
case GL_TEXTURE_3D:
- i945_miptree_layout_3d(intel, mt, tiling);
+ i945_miptree_layout_3d(mt);
break;
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE_ARB:
- i945_miptree_layout_2d(intel, mt, tiling, 1);
+ i945_miptree_layout_2d(mt, 1);
break;
default:
_mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()");
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 46a417a..d3cbb72 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -40,8 +40,7 @@
#define FILE_DEBUG_FLAG DEBUG_MIPTREE
GLboolean brw_miptree_layout(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling)
+ struct intel_mipmap_tree *mt)
{
/* XXX: these vary depending on image format: */
/* GLint align_w = 4; */
@@ -65,7 +64,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
if (mt->compressed)
qpitch /= 4;
- i945_miptree_layout_2d(intel, mt, tiling, 6);
+ i945_miptree_layout_2d(mt, 6);
for (level = mt->first_level; level <= mt->last_level; level++) {
for (q = 0; q < 6; q++) {
@@ -159,7 +158,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
}
default:
- i945_miptree_layout_2d(intel, mt, tiling, 1);
+ i945_miptree_layout_2d(mt, 1);
break;
}
DBG("%s: %dx%dx%d\n", __FUNCTION__,
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index f36240d..72cdd4c 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -61,8 +61,7 @@ intel_miptree_create_internal(struct intel_context *intel,
GLuint last_level,
GLuint width0,
GLuint height0,
- GLuint depth0,
- uint32_t tiling)
+ GLuint depth0)
{
GLboolean ok;
struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);
@@ -88,12 +87,13 @@ intel_miptree_create_internal(struct intel_context *intel,
mt->refcount = 1;
#ifdef I915
+ (void) intel;
if (intel->is_945)
- ok = i945_miptree_layout(intel, mt, tiling);
+ ok = i945_miptree_layout(mt);
else
- ok = i915_miptree_layout(intel, mt, tiling);
+ ok = i915_miptree_layout(mt);
#else
- ok = brw_miptree_layout(intel, mt, tiling);
+ ok = brw_miptree_layout(intel, mt);
#endif
if (!ok) {
@@ -132,8 +132,7 @@ intel_miptree_create(struct intel_context *intel,
mt = intel_miptree_create_internal(intel, target, format,
first_level, last_level, width0,
- height0, depth0,
- tiling);
+ height0, depth0);
/*
* pitch == 0 || height == 0 indicates the null texture
*/
@@ -169,8 +168,7 @@ intel_miptree_create_for_region(struct intel_context *intel,
mt = intel_miptree_create_internal(intel, target, format,
0, 0,
- region->width, region->height, 1,
- I915_TILING_NONE);
+ region->width, region->height, 1);
if (!mt)
return mt;
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index ea86590..ff746d7 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -212,14 +212,9 @@ void intel_miptree_image_copy(struct intel_context *intel,
/* i915_mipmap_tree.c:
*/
-GLboolean i915_miptree_layout(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling);
-GLboolean i945_miptree_layout(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling);
+GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt);
+GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt);
GLboolean brw_miptree_layout(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling);
+ struct intel_mipmap_tree *mt);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c
index 9d81523..e796aaf 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_layout.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c
@@ -50,9 +50,7 @@ intel_get_texture_alignment_unit(gl_format format,
}
}
-void i945_miptree_layout_2d(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling, int nr_images)
+void i945_miptree_layout_2d(struct intel_mipmap_tree *mt, int nr_images)
{
GLuint align_h, align_w;
GLuint level;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.h b/src/mesa/drivers/dri/intel/intel_tex_layout.h
index b52e5a4..257c07c 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_layout.h
+++ b/src/mesa/drivers/dri/intel/intel_tex_layout.h
@@ -38,8 +38,7 @@ static INLINE GLuint minify( GLuint d )
return MAX2(1, d>>1);
}
-extern void i945_miptree_layout_2d(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t tiling, int nr_images);
+extern void i945_miptree_layout_2d(struct intel_mipmap_tree *mt,
+ int nr_images);
void intel_get_texture_alignment_unit(gl_format format,
unsigned int *w, unsigned int *h);
--
1.7.4.4
More information about the mesa-dev
mailing list