mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
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.
This commit is contained in:
parent
eb135fe8c1
commit
bd51e8e4f4
4 changed files with 0 additions and 67 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue