summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texstore.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-05-21 16:41:03 +0000
committerBrian Paul <[email protected]>2001-05-21 16:41:03 +0000
commit3893e638e6521b9c070e01c0b31d22754ff97a88 (patch)
treef92282e8466199dd45c72e6725c3fa0263bae2e0 /src/mesa/swrast/s_texstore.c
parente7e38a47a8dd567fd5a848cbef09b14018fb2fe0 (diff)
initial support for GL_SGIS_generate_mipmap extension
Diffstat (limited to 'src/mesa/swrast/s_texstore.c')
-rw-r--r--src/mesa/swrast/s_texstore.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c
index b7ca0abf358..e1adeded7fc 100644
--- a/src/mesa/swrast/s_texstore.c
+++ b/src/mesa/swrast/s_texstore.c
@@ -1,4 +1,4 @@
-/* $Id: s_texstore.c,v 1.4 2001/05/03 22:13:32 brianp Exp $ */
+/* $Id: s_texstore.c,v 1.5 2001/05/21 16:41:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -46,6 +46,7 @@
#include "mem.h"
#include "texformat.h"
#include "teximage.h"
+#include "texstore.h"
#include "s_context.h"
#include "s_depth.h"
@@ -190,6 +191,11 @@ _swrast_copy_teximage1d( GLcontext *ctx, GLenum target, GLint level,
&_mesa_native_packing, texObj, texImage);
FREE(image);
}
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ _mesa_generate_mipmap(ctx, texUnit, texObj);
+ }
}
@@ -244,6 +250,11 @@ _swrast_copy_teximage2d( GLcontext *ctx, GLenum target, GLint level,
&_mesa_native_packing, texObj, texImage);
FREE(image);
}
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ _mesa_generate_mipmap(ctx, texUnit, texObj);
+ }
}
@@ -311,6 +322,11 @@ _swrast_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
&_mesa_native_packing, texObj, texImage);
FREE(image);
}
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ _mesa_generate_mipmap(ctx, texUnit, texObj);
+ }
}
@@ -382,6 +398,11 @@ _swrast_copy_texsubimage2d( GLcontext *ctx,
&_mesa_native_packing, texObj, texImage);
FREE(image);
}
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ _mesa_generate_mipmap(ctx, texUnit, texObj);
+ }
}
@@ -452,4 +473,9 @@ _swrast_copy_texsubimage3d( GLcontext *ctx,
&_mesa_native_packing, texObj, texImage);
FREE(image);
}
+
+ /* GL_SGIS_generate_mipmap */
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ _mesa_generate_mipmap(ctx, texUnit, texObj);
+ }
}