llvmpipe:fix using 32bit rasterization mistakenly, causing overflows
authorRoland Scheidegger <sroland@vmware.com>
Fri, 23 Jun 2017 17:35:50 +0000 (19:35 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 23 Jun 2017 17:39:29 +0000 (19:39 +0200)
commitc7688d2de5bb0861965e6e7b76a396ab6eec253f
tree249bae051093db2dc686917d2688fbae8f27f36c
parent672d245ffe85e85afe6ddd36868c145bb528c79b
llvmpipe:fix using 32bit rasterization mistakenly, causing overflows

We use the bounding box (triangle extents) to figure out if 32bit rasterization
could potentially overflow. However, we used the bounding box which already got
rounded up to 0 for negative coords for this, which is incorrect, leading to
overflows and hence bogus rendering in some of our private use.

It might be possible to simplify this somehow (we're now using 3 different
boxes for binning) but I don't quite see how.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup_context.h
src/gallium/drivers/llvmpipe/lp_setup_line.c
src/gallium/drivers/llvmpipe/lp_setup_point.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c