diff options
author | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
---|---|---|
committer | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
commit | 55f8b7053065ce88296608071feed6f9540f6c0d (patch) | |
tree | 86ac301ed5805c895985040caf56f857de017233 /src/mesa/drivers/dri/r300/r300_texmem.c | |
parent | 518f9168862b2096278ae14a65c8c854c208e004 (diff) | |
parent | 7b559a91028d297b34df9ec939bd4d00fad6027c (diff) |
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_texmem.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texmem.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c index db80325309..38f0da8b7c 100644 --- a/src/mesa/drivers/dri/r300/r300_texmem.c +++ b/src/mesa/drivers/dri/r300/r300_texmem.c @@ -49,9 +49,6 @@ SOFTWARE. #include "r300_state.h" #include "r300_cmdbuf.h" #include "radeon_ioctl.h" -/* -#include "r300_swtcl.h" -*/ #include "r300_tex.h" #include "r300_ioctl.h" #include <unistd.h> /* for usleep() */ @@ -66,29 +63,16 @@ SOFTWARE. */ void r300DestroyTexObj(r300ContextPtr rmesa, r300TexObjPtr t) { + int i; + if (RADEON_DEBUG & DEBUG_TEXTURE) { fprintf(stderr, "%s( %p, %p )\n", __FUNCTION__, (void *)t, (void *)t->base.tObj); } - if (rmesa != NULL) { - unsigned i; - - for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) { - if (t == rmesa->state.texture.unit[i].texobj) { - rmesa->state.texture.unit[i].texobj = NULL; - /* This code below is meant to shorten state - pushed to the hardware by not programming - unneeded units. - - This does not appear to be worthwhile on R300 */ -#if 0 - remove_from_list(&rmesa->hw.tex[i]); - make_empty_list(&rmesa->hw.tex[i]); - remove_from_list(&rmesa->hw.cube[i]); - make_empty_list(&rmesa->hw.cube[i]); -#endif - } + for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) { + if (rmesa->state.texture.unit[i].texobj == t) { + rmesa->state.texture.unit[i].texobj = NULL; } } } @@ -299,10 +283,10 @@ static void r300UploadRectSubImage(r300ContextPtr rmesa, * Upload the texture image associated with texture \a t at the specified * level at the address relative to \a start. */ -static void uploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t, - GLint hwlevel, - GLint x, GLint y, GLint width, GLint height, - GLuint face) +static void r300UploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t, + GLint hwlevel, + GLint x, GLint y, GLint width, GLint height, + GLuint face) { struct gl_texture_image *texImage = NULL; GLuint offset; @@ -511,6 +495,9 @@ int r300UploadTexImages(r300ContextPtr rmesa, r300TexObjPtr t, GLuint face) { const int numLevels = t->base.lastLevel - t->base.firstLevel + 1; + if (t->image_override) + return 0; + if (RADEON_DEBUG & (DEBUG_TEXTURE | DEBUG_IOCTL)) { fprintf(stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__, (void *)rmesa->radeon.glCtx, (void *)t->base.tObj, @@ -566,9 +553,10 @@ int r300UploadTexImages(r300ContextPtr rmesa, r300TexObjPtr t, GLuint face) dirty_images[face] & (1 << (i + t->base.firstLevel))) != 0) { - uploadSubImage(rmesa, t, i, 0, 0, - t->image[face][i].width, - t->image[face][i].height, face); + r300UploadSubImage(rmesa, t, i, 0, 0, + t->image[face][i].width, + t->image[face][i].height, + face); } } t->base.dirty_images[face] = 0; |