diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 99f7108b423..01685b79d85 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -402,12 +402,9 @@ static void lp_rast_store_color( struct lp_rasterizer *rast, if (x + w > rast->width) w -= x + w - rast->width; - if (y + h > rast->height) { - int h2; - h2 = h - (y + h - rast->height); - assert(h2 <= TILE_SIZE); - h = h2; - } + if (y + h > rast->height) + h -= y + h - rast->height; + assert(w >= 0); assert(h >= 0); assert(w <= TILE_SIZE); |