From bc50336b6ab40b6f4df7dbe19abe8b1d89938472 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Apr 2010 09:17:47 -0600 Subject: llvmpipe: limit max texture size to 2Kx2K for now MAXWIDTH/HEIGHT were 2048 but the max texture size was 4096. This caused a crash if a 4Kx4K texture was created and rendered to. See comment about max framebuffer size in lp_scene.h. Also added assertions to catch this inconsistancy in the future. --- src/gallium/drivers/llvmpipe/lp_scene.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c') diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 681ce67..0c51b52 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -483,6 +483,9 @@ void lp_scene_begin_binning( struct lp_scene *scene, scene->tiles_x = align(fb->width, TILE_SIZE) / TILE_SIZE; scene->tiles_y = align(fb->height, TILE_SIZE) / TILE_SIZE; + + assert(scene->tiles_x <= TILES_X); + assert(scene->tiles_y <= TILES_Y); } -- cgit v1.1