summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_tex.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-05-09 13:02:41 +1000
committerDave Airlie <airlied@panoply-rh.(none)>2008-05-09 13:02:41 +1000
commitc50ffc4cb89b67ae59208eb72cdb664c846ba987 (patch)
treebf4b008317008083fd0802cb2020f62782aca31d /src/mesa/drivers/dri/intel/intel_tex.c
parent990e010394a2685c1daeaef61cf4f7e2a0ba419e (diff)
downloadexternal_mesa3d-c50ffc4cb89b67ae59208eb72cdb664c846ba987.zip
external_mesa3d-c50ffc4cb89b67ae59208eb72cdb664c846ba987.tar.gz
external_mesa3d-c50ffc4cb89b67ae59208eb72cdb664c846ba987.tar.bz2
mesa/intel: map/unmap texture objects around mipmap generation function.
This at least stops the compiz brain explosion we were seeing, I do wonder though if we should somehow be calling intel_generate_mipmap somehow.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 329af0d..1fa9da6 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -198,6 +198,21 @@ intel_generate_mipmap(GLcontext *ctx, GLenum target,
}
}
+void intelMapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
+{
+ struct intel_texture_object *intelObj = intel_texture_object(texObj);
+ struct intel_context *intel = intel_context(ctx);
+
+ intel_tex_map_images(intel, intelObj);
+}
+
+void intelUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
+{
+ struct intel_texture_object *intelObj = intel_texture_object(texObj);
+ struct intel_context *intel = intel_context(ctx);
+
+ intel_tex_unmap_images(intel, intelObj);
+}
void
intelInitTextureFuncs(struct dd_function_table *functions)
@@ -233,6 +248,9 @@ intelInitTextureFuncs(struct dd_function_table *functions)
functions->UpdateTexturePalette = 0;
functions->IsTextureResident = intelIsTextureResident;
+ functions->MapTexture = intelMapTexture;
+ functions->UnmapTexture = intelUnmapTexture;
+
#if DO_DEBUG && !defined(__ia64__)
if (INTEL_DEBUG & DEBUG_BUFMGR)
functions->TextureMemCpy = timed_memcpy;