summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-14 14:11:17 -0700
committerEric Anholt <[email protected]>2011-10-28 11:31:11 -0700
commitbd51e8e4f473dd4fb4f99ed7898d771c64caca2d (patch)
tree9cf1699028d22be26bbe972f67afce5708e4ca9f /src/mesa/drivers
parenteb135fe8c16388cd33b424ee3915ae52d20cb3ff (diff)
dri: Remove driver GenerateMipmap hooks.
Mesa sets up _mesa_meta_GenerateMipmap as the default hook, which does this check for fallback and call the fallback itself.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c23
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c12
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c31
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h1
4 files changed, 0 insertions, 67 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 7af51388091..05b0748bc3c 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -224,32 +224,9 @@ intel_unmap_texture_image(struct gl_context *ctx,
}
}
-/**
- * Called via ctx->Driver.GenerateMipmap()
- * This is basically a wrapper for _mesa_meta_GenerateMipmap() which checks
- * if we'll be using software mipmap generation. In that case, we need to
- * map/unmap the base level texture image.
- */
-static void
-intelGenerateMipmap(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *texObj)
-{
- if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) {
- fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
-
- _mesa_generate_mipmap(ctx, target, texObj);
- }
- else {
- _mesa_meta_GenerateMipmap(ctx, target, texObj);
- }
-}
-
-
void
intelInitTextureFuncs(struct dd_function_table *functions)
{
- functions->GenerateMipmap = intelGenerateMipmap;
-
functions->NewTextureObject = intelNewTextureObject;
functions->NewTextureImage = intelNewTextureImage;
functions->DeleteTextureImage = intelDeleteTextureImage;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 08ec03ee6c3..8dd2df47f7f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -710,17 +710,6 @@ nouveau_texture_unmap(struct gl_context *ctx, struct gl_texture_object *t)
}
}
-static void
-nouveau_generate_mipmap(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *t)
-{
- if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, t)) {
- _mesa_generate_mipmap(ctx, target, t);
- } else {
- _mesa_meta_GenerateMipmap(ctx, target, t);
- }
-}
-
void
nouveau_texture_functions_init(struct dd_function_table *functions)
{
@@ -740,5 +729,4 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
functions->UnmapTexture = nouveau_texture_unmap;
functions->MapTextureImage = nouveau_map_texture_image;
functions->UnmapTextureImage = nouveau_unmap_texture_image;
- functions->GenerateMipmap = nouveau_generate_mipmap;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 45c49e4755b..d84004527bb 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -332,35 +332,6 @@ radeon_unmap_texture_image(struct gl_context *ctx,
radeon_bo_unmap(image->mt->bo);
}
-void radeonGenerateMipmap(struct gl_context* ctx, GLenum target, struct gl_texture_object *texObj)
-{
- radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- struct radeon_bo *bo;
- GLuint face = _mesa_tex_target_to_face(target);
- radeon_texture_image *baseimage = get_radeon_texture_image(texObj->Image[face][texObj->BaseLevel]);
- bo = !baseimage->mt ? baseimage->bo : baseimage->mt->bo;
-
- radeon_print(RADEON_TEXTURE, RADEON_TRACE,
- "%s(%p, target %s, tex %p)\n",
- __func__, ctx, _mesa_lookup_enum_by_nr(target),
- texObj);
-
- if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->cmdbuf.cs)) {
- radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
- "%s(%p, tex %p) Trying to generate mipmap for texture "
- "in processing by GPU.\n",
- __func__, ctx, texObj);
- radeon_firevertices(rmesa);
- }
-
- if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) {
- _mesa_generate_mipmap(ctx, target, texObj);
- } else {
- _mesa_meta_GenerateMipmap(ctx, target, texObj);
- }
-}
-
-
/* try to find a format which will only need a memcopy */
static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
GLenum srcFormat,
@@ -1124,8 +1095,6 @@ radeon_init_common_texture_funcs(radeonContextPtr radeon,
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
- functions->GenerateMipmap = radeonGenerateMipmap;
-
functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
#if FEATURE_OES_EGL_image
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index c68228b3728..41763aae0a4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -43,7 +43,6 @@ void radeon_teximage_map(radeon_texture_image *image, GLboolean write_enable);
void radeon_teximage_unmap(radeon_texture_image *image);
void radeonMapTexture(struct gl_context *ctx, struct gl_texture_object *texObj);
void radeonUnmapTexture(struct gl_context *ctx, struct gl_texture_object *texObj);
-void radeonGenerateMipmap(struct gl_context* ctx, GLenum target, struct gl_texture_object *texObj);
int radeon_validate_texture_miptree(struct gl_context * ctx, struct gl_texture_object *texObj);
gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,