diff options
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 329af0d1b0..f1d6a6dbfc 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/drivers/dri/intel/intel_tex.c @@ -172,14 +172,13 @@ 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); GLuint nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; int face, i; - _mesa_generate_mipmap(ctx, target, texUnit, texObj); + _mesa_generate_mipmap(ctx, target, texObj); /* Update the level information in our private data in the new images, since * it didn't get set as part of a normal TexImage path. @@ -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; |