diff options
author | Roland Scheidegger <[email protected]> | 2005-10-15 01:07:59 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2005-10-15 01:07:59 +0000 |
commit | ccf13781319b5b9d7ba306728f74b4ae2d099ad0 (patch) | |
tree | e99cb6a1fcb09427d3cfa74b31b19079e5e83a91 | |
parent | 30daa7529331057ecb470efb500152e9c4aa1ae5 (diff) |
fix two bugs wrt calculating max possible texture sizes for texture rectangles/cube maps.
-rw-r--r-- | src/mesa/drivers/dri/common/texmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c index 3dd807c3265..c3f6ec9baea 100644 --- a/src/mesa/drivers/dri/common/texmem.c +++ b/src/mesa/drivers/dri/common/texmem.c @@ -945,7 +945,7 @@ get_max_size( unsigned nr_heaps, do { if ( max_sizes[v] != 0 ) { limits-> f = max_sizes[v]; } } while( 0 ) #define SET_MAX_RECT(f,v) \ - do { if ( max_sizes[v] != 0 ) { limits-> f = 1 << max_sizes[v]; } } while( 0 ) + do { if ( max_sizes[v] != 0 ) { limits-> f = 1 << (max_sizes[v] - 1); } } while( 0 ) /** @@ -1000,8 +1000,8 @@ driCalculateMaxTextureLevels( driTexHeap * const * heaps, mipmaps[0] = mipmaps_at_once; mipmaps[1] = mipmaps_at_once; - mipmaps[2] = 1; - mipmaps[3] = mipmaps_at_once; + mipmaps[2] = mipmaps_at_once; + mipmaps[3] = 1; /* Calculate the maximum number of texture levels in two passes. The |