diff options
author | Keith Whitwell <[email protected]> | 2000-12-26 05:09:27 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2000-12-26 05:09:27 +0000 |
commit | cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290 (patch) | |
tree | 45385bd755d8e3876c54b2b0113636f5ceb7976a /src/mesa/drivers/glide/fxddtex.c | |
parent | d1ff1f6798b003a820f5de9fad835ff352f31afe (diff) |
Major rework of tnl module
New array_cache module
Support 8 texture units in core mesa (now support 8 everywhere)
Rework core mesa statechange operations to avoid flushing on many
noop statechanges.
Diffstat (limited to 'src/mesa/drivers/glide/fxddtex.c')
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index f7beaf7e34f..7c101e823d9 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -333,11 +333,6 @@ void fxDDTexDel(GLcontext *ctx, struct gl_texture_object *tObj) FREE(ti); tObj->DriverData = NULL; - -/* Pushed into core: Set _NEW_TEXTURE whenever a bound texture is - * deleted (changes bound texture id). - */ -/* ctx->NewState |= _NEW_TEXTURE; */ } @@ -824,6 +819,23 @@ static GLboolean fxIsTexSupported(GLenum target, GLint internalFormat, /**** NEW TEXTURE IMAGE FUNCTIONS ****/ /**********************************************************************/ + +static void PrintTexture(int w, int h, int c, const GLubyte *data) +{ + int i, j; + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + if (c==2) + printf("%02x %02x ", data[0], data[1]); + else if (c==3) + printf("%02x %02x %02x ", data[0], data[1], data[2]); + data += c; + } + printf("\n"); + } +} + + GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, @@ -960,6 +972,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, return GL_FALSE; } + if (ti->validated && ti->isInTM) { /*printf("reloadmipmaplevels\n");*/ fxTMReloadMipMapLevel(fxMesa, texObj, level); @@ -1082,21 +1095,6 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, } -static void PrintTexture(int w, int h, int c, const GLubyte *data) -{ - int i, j; - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - if (c==2) - printf("%02x %02x ", data[0], data[1]); - else if (c==3) - printf("%02x %02x %02x ", data[0], data[1], data[2]); - data += c; - } - printf("\n"); - } -} - GLvoid *fxDDGetTexImage(GLcontext *ctx, GLenum target, GLint level, const struct gl_texture_object *texObj, |