summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_tex_subimage.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-05-07 22:50:19 -0700
committerEric Anholt <eric@anholt.net>2009-05-08 14:18:04 -0700
commit1d663ae2925ffadf419ddbea9eca8d5706ea6510 (patch)
treeab4166feb855a94335743c8019f97b3e8dee27aa /src/mesa/drivers/dri/intel/intel_tex_subimage.c
parentb6e94f71c2bfc63497e2c8265179f19babe87688 (diff)
intel: Add a metaops version of glGenerateMipmapEXT/SGIS_generate_mipmaps.
In addition to being HW accelerated, it avoids the incorrect (black) rendering of the mipmaps that SW was doing in fbo-generatemipmap. Improves the performance of the mipmap generation and drawing in fbo-generatemipmap by 30%.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_subimage.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index f86de56897..48104de2a9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -101,11 +101,6 @@ intelTexSubimage(GLcontext * ctx,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "intelTexSubImage");
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- intel_generate_mipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
if (intelImage->mt) {
@@ -114,6 +109,11 @@ intelTexSubimage(GLcontext * ctx,
}
UNLOCK_HARDWARE(intel);
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ intel_generate_mipmap(ctx, target, texObj);
+ }
}