summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_tex.c
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2010-01-19 23:34:56 +0100
committerMaciej Cencora <m.cencora@gmail.com>2010-01-19 23:38:34 +0100
commit8a4d7393bd8a752eba2ee687c1c3e2df5c82745d (patch)
tree84feaf9404112966496da8d8c38aaac0d6711fc9 /src/mesa/drivers/dri/r300/r300_tex.c
parent0aed44f8a36d4974d42f643c5065f2a4d96fc619 (diff)
radeon/r300/r600: share common glCopyTex(Sub)Image code
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_tex.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 963f648cb1..eb5d2d5004 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -312,7 +312,7 @@ static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx,
return &t->base;
}
-void r300InitTextureFuncs(struct dd_function_table *functions)
+void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions)
{
/* Note: we only plug in the functions we implement in the driver
* since _mesa_init_driver_functions() was already called.
@@ -340,6 +340,11 @@ void r300InitTextureFuncs(struct dd_function_table *functions)
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
+ if (radeon->radeonScreen->kernel_mm) {
+ functions->CopyTexImage2D = radeonCopyTexImage2D;
+ functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
+ }
+
functions->GenerateMipmap = radeonGenerateMipmap;
driInitTextureFormats();