From 84b956c29be7eb547130974df9ceb3d2f3354526 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Sep 2009 15:35:05 -0600 Subject: softpipe: increase MAX_WIDTH/HEIGTH 4096 to match max texture size --- src/gallium/drivers/softpipe/sp_tile_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 1f9b8f1f4f..a524275a71 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -44,8 +44,8 @@ /** XXX move these */ -#define MAX_WIDTH 2048 -#define MAX_HEIGHT 2048 +#define MAX_WIDTH 4096 +#define MAX_HEIGHT 4096 struct softpipe_tile_cache -- cgit v1.2.3 From e41707becaffd604fedc885719e5b061a4a5b363 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 10:50:38 -0600 Subject: softpipe: added max texture/surface size sanity check --- src/gallium/drivers/softpipe/sp_tile_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index a524275a71..461cbb9f95 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -116,6 +116,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) { -- cgit v1.2.3