diff options
author | Brian Paul <[email protected]> | 2013-02-18 10:11:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-02-19 07:19:19 -0700 |
commit | dfbcb1849c2fd7b88425645839cb530ca6f3f8cc (patch) | |
tree | 820431ad3f2ccdd2a2cf03b35d470a4906f585c0 /src/gallium/drivers/llvmpipe/lp_texture.c | |
parent | e2091f64cb9ea79f3b51c353ed9facc03ec5690a (diff) |
llvmpipe: fix handling of 0 x 0 framebuffer size
Bump up the size to 1 x 1. This fixes a number of potential failure
points in the code.
See also http://bugs.freedesktop.org/show_bug.cgi?id=61012
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_texture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 2e9c6bfe1ca..ce756c52897 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -240,8 +240,8 @@ llvmpipe_displaytarget_layout(struct llvmpipe_screen *screen, /* Round up the surface size to a multiple of the tile size to * avoid tile clipping. */ - const unsigned width = align(lpr->base.width0, TILE_SIZE); - const unsigned height = align(lpr->base.height0, TILE_SIZE); + const unsigned width = MAX2(1, align(lpr->base.width0, TILE_SIZE)); + const unsigned height = MAX2(1, align(lpr->base.height0, TILE_SIZE)); const unsigned width_t = width / TILE_SIZE; const unsigned height_t = height / TILE_SIZE; |