mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
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
This commit is contained in:
parent
e2091f64cb
commit
dfbcb1849c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue