aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-26 09:57:51 -0700
committerIan Romanick <[email protected]>2011-09-09 12:01:51 -0700
commit36a91e45f755af164232ef908419bc4cb64ba45b (patch)
tree0f08b21b33ab302de8135cf159c5ea70ee37641a /src/mesa/drivers/dri
parent17fa6772d7e223f940dd8ec4e4f6cf8cab9a03c7 (diff)
intel: Silence several "warning: unused parameter"
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.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/i915_tex_layout.c40
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c16
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h11
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_layout.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_layout.h5
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 e6a47116223..45ca38e75d5 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 b5d2cf31290..16ce8f68b81 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; */
@@ -68,7 +67,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++) {
@@ -162,7 +161,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 f36240d7f1d..72cdd4c0f11 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 ea865904f68..ff746d77f96 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 9d8152375d8..e796aaf0045 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 b52e5a48855..257c07ce476 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);