diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-23 11:00:04 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-23 11:00:04 -0600 |
commit | de25f82067bca5231fb968190f6c12cb517d62ff (patch) | |
tree | 3575e6e6252b40bd1d2070e81b5a1c0fc9b8300d /src/gallium/drivers/softpipe | |
parent | 890679d4322e7ba4f12f32532a3fdd277edff886 (diff) | |
parent | e41707becaffd604fedc885719e5b061a4a5b363 (diff) |
Merge branch 'mesa_7_6_branch'
Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tex_tile_cache.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h index c6003f3550..04e65ce220 100644 --- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h +++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h @@ -68,12 +68,6 @@ struct softpipe_tex_cached_tile #define NUM_ENTRIES 50 - -/** XXX move these */ -#define MAX_WIDTH 2048 -#define MAX_HEIGHT 2048 - - struct softpipe_tex_tile_cache { struct pipe_screen *screen; diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 608fbcc589..de47970985 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -82,6 +82,12 @@ sp_create_tile_cache( struct pipe_screen *screen ) { struct softpipe_tile_cache *tc; uint pos; + int maxLevels, maxTexSize; + + /* sanity checking: max sure MAX_WIDTH/HEIGHT >= largest texture image */ + maxLevels = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); + maxTexSize = 1 << (maxLevels - 1); + assert(MAX_WIDTH >= maxTexSize); tc = CALLOC_STRUCT( softpipe_tile_cache ); if (tc) { diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.h b/src/gallium/drivers/softpipe/sp_tile_cache.h index a80678e865..f21c74cb9c 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.h +++ b/src/gallium/drivers/softpipe/sp_tile_cache.h @@ -74,8 +74,8 @@ struct softpipe_cached_tile /** XXX move these */ -#define MAX_WIDTH 2048 -#define MAX_HEIGHT 2048 +#define MAX_WIDTH 4096 +#define MAX_HEIGHT 4096 struct softpipe_tile_cache |