[Mesa-dev] [Mesa-stable] [PATCH] swrast: Fix the coordinates passed to _mesa_regions_overlap()
Ian Romanick
idr at freedesktop.org
Wed Nov 25 10:22:54 PST 2015
Is this related to a bugzilla or a failing test case? If not, could we
get it piglit for it?
Either way, looking at _mesa_regions_overlap (which could use a comment
saying that the rectangles are inclusive), I believe this is correct.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 11/23/2015 05:35 PM, Anuj Phogat wrote:
> Cc: "11.1" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
> src/mesa/swrast/s_copypix.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
> index 0dbccc0..31e1d3d 100644
> --- a/src/mesa/swrast/s_copypix.c
> +++ b/src/mesa/swrast/s_copypix.c
> @@ -53,8 +53,10 @@ regions_overlap(GLint srcx, GLint srcy,
> GLfloat zoomX, GLfloat zoomY)
> {
> if (zoomX == 1.0F && zoomY == 1.0F) {
> - return _mesa_regions_overlap(srcx, srcy, srcx + width, srcy + height,
> - dstx, dsty, dstx + width, dsty + height);
> + return _mesa_regions_overlap(srcx, srcy,
> + srcx + width - 1, srcy + height - 1,
> + dstx, dsty,
> + dstx + width - 1, dsty + height - 1);
> }
> else {
> /* add one pixel of slop when zooming, just to be safe */
>
More information about the mesa-dev
mailing list