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.
This commit is contained in:
parent
17fa6772d7
commit
36a91e45f7
|
@ -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()");
|
||||
|
|
|
@ -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__,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue