diff options
author | keithw <keithw> | 2002-01-27 12:02:15 +0000 |
---|---|---|
committer | keithw <keithw> | 2002-01-27 12:02:15 +0000 |
commit | 93447166c06055ce5288419049e434bc5e480724 (patch) | |
tree | 3f2c68d456bfe21fad16fc2698c0a6441d4773ca | |
parent | ab44a97ef03edca719418e665bc3c2ff0990281a (diff) |
shared texobj patch from PanagiotisX_4_2_0-20020127-preimport
-rw-r--r-- | xc/lib/GL/mesa/src/drv/mga/mgatexmem.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatexmem.c b/xc/lib/GL/mesa/src/drv/mga/mgatexmem.c index db779b4ce..146852a88 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatexmem.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgatexmem.c @@ -254,8 +254,18 @@ void mgaAgeTextures( mgaContextPtr mmesa, int heap ) idx != MGA_NR_TEX_REGIONS && nr < MGA_NR_TEX_REGIONS ; idx = sarea->texList[heap][idx].prev, nr++) { + /* If switching texturing schemes, then the SAREA might not + * have been properly cleared, so we need to reset the + * global texture LRU. + */ + if ( idx * sz > mmesa->mgaScreen->textureSize[heap] ) { + nr = MGA_NR_TEX_REGIONS; + break; + } + if (sarea->texList[heap][idx].age > mmesa->texAge[heap]) { - mgaTexturesGone(mmesa, heap, idx * sz, sz, 1); + mgaTexturesGone(mmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use); } } |