diff options
author | Brian Paul <[email protected]> | 2010-04-02 09:17:47 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-04-02 09:20:05 -0600 |
commit | bc50336b6ab40b6f4df7dbe19abe8b1d89938472 (patch) | |
tree | e1852407eaa2a48274021d4e89b35c3636fc5318 /src/gallium/drivers/llvmpipe/lp_scene.c | |
parent | 82e289d355089952a217b14081bac8ffff04ab2e (diff) |
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.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 681ce674d49..0c51b52d170 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); } |