diff options
author | Will Dyson <will.dyson@gmail.com> | 2010-05-25 01:10:21 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-05-26 18:17:28 -0400 |
commit | 055750fafba58fd2ee0f5611b566a71ab0f22984 (patch) | |
tree | 2b6281e8940fa5594ce92fc27285c93f11ae6881 /src/mesa | |
parent | a9ee95651131e27d5acf3d10909b5b7e5c8d3e92 (diff) |
Enable hardware mipmap generation for radeon.
Use _mesa_meta_GenerateMipmap. It is Fast Enough(tm).
Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 5cb33a4751..bcac125baf 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -39,6 +39,7 @@ #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" +#include "drivers/common/meta.h" #include "xmlpool.h" /* for symbolic values of enum-type options */ @@ -294,9 +295,13 @@ void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_objec radeon_firevertices(rmesa); } - radeon_teximage_map(baseimage, GL_FALSE); - radeon_generate_mipmap(ctx, target, texObj); - radeon_teximage_unmap(baseimage); + if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) { + radeon_teximage_map(baseimage, GL_FALSE); + radeon_generate_mipmap(ctx, target, texObj); + radeon_teximage_unmap(baseimage); + } else { + _mesa_meta_GenerateMipmap(ctx, target, texObj); + } } |