mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
intel: use new mipmap generation hooks in driver.
This commit is contained in:
parent
86bd98c6aa
commit
0dbd5c8640
5 changed files with 13 additions and 11 deletions
|
|
@ -172,7 +172,6 @@ timed_memcpy(void *dest, const void *src, size_t n)
|
|||
*/
|
||||
void
|
||||
intel_generate_mipmap(GLcontext *ctx, GLenum target,
|
||||
const struct gl_texture_unit *texUnit,
|
||||
struct gl_texture_object *texObj)
|
||||
{
|
||||
struct intel_texture_object *intelObj = intel_texture_object(texObj);
|
||||
|
|
@ -198,6 +197,15 @@ intel_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
}
|
||||
}
|
||||
|
||||
static void intelGenerateMipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj)
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
struct intel_texture_object *intelObj = intel_texture_object(texObj);
|
||||
|
||||
intel_tex_map_images(intel, intelObj);
|
||||
intel_generate_mipmap(ctx, target, texObj);
|
||||
intel_tex_unmap_images(intel, intelObj);
|
||||
}
|
||||
|
||||
void
|
||||
intelInitTextureFuncs(struct dd_function_table *functions)
|
||||
|
|
@ -221,6 +229,7 @@ intelInitTextureFuncs(struct dd_function_table *functions)
|
|||
functions->CopyTexSubImage2D = _swrast_copy_texsubimage2d;
|
||||
#endif
|
||||
functions->GetTexImage = intelGetTexImage;
|
||||
functions->GenerateMipmap = intelGenerateMipmap;
|
||||
|
||||
/* compressed texture functions */
|
||||
functions->CompressedTexImage2D = intelCompressedTexImage2D;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ void intel_tex_unmap_images(struct intel_context *intel,
|
|||
int intel_compressed_num_bytes(GLuint mesaFormat);
|
||||
|
||||
void intel_generate_mipmap(GLcontext *ctx, GLenum target,
|
||||
const struct gl_texture_unit *texUnit,
|
||||
struct gl_texture_object *texObj);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -161,9 +161,7 @@ do_copy_texsubimage(struct intel_context *intel,
|
|||
|
||||
/* GL_SGIS_generate_mipmap */
|
||||
if (intelImage->level == texObj->BaseLevel && texObj->GenerateMipmap) {
|
||||
intel_generate_mipmap(ctx, target,
|
||||
&ctx->Texture.Unit[ctx->Texture.CurrentUnit],
|
||||
texObj);
|
||||
intel_generate_mipmap(ctx, target, texObj);
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
|
|
|
|||
|
|
@ -522,9 +522,7 @@ intelTexImage(GLcontext * ctx,
|
|||
|
||||
/* GL_SGIS_generate_mipmap */
|
||||
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
|
||||
intel_generate_mipmap(ctx, target,
|
||||
&ctx->Texture.Unit[ctx->Texture.CurrentUnit],
|
||||
texObj);
|
||||
intel_generate_mipmap(ctx, target, texObj);
|
||||
}
|
||||
|
||||
_mesa_unmap_teximage_pbo(ctx, unpack);
|
||||
|
|
|
|||
|
|
@ -103,9 +103,7 @@ intelTexSubimage(GLcontext * ctx,
|
|||
|
||||
/* GL_SGIS_generate_mipmap */
|
||||
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
|
||||
intel_generate_mipmap(ctx, target,
|
||||
&ctx->Texture.Unit[ctx->Texture.CurrentUnit],
|
||||
texObj);
|
||||
intel_generate_mipmap(ctx, target, texObj);
|
||||
}
|
||||
|
||||
_mesa_unmap_teximage_pbo(ctx, packing);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue