gallium: Fix region overlap conditions for rectangles with a shared edge
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 11 Dec 2015 22:41:31 +0000 (14:41 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 10 Jun 2016 21:35:21 +0000 (14:35 -0700)
commit466b3201633a61bc9adfb38397a6fe776cb1cfe3
tree7082dd4c70d03356c21ea1f68e4f63b73bdacb43
parentf8679badd423b61b3a49e1138445f9f3d740fdde
gallium: Fix region overlap conditions for rectangles with a shared edge

>From OpenGL 4.0 spec, section 4.3.2 "Copying Pixels":
"The pixels corresponding to these buffers are copied from the source
rectangle bounded by the locations (srcX0, srcY 0) and (srcX1, srcY 1)
to the destination rectangle bounded by the locations (dstX0, dstY 0)
and (dstX1, dstY 1). The lower bounds of the rectangle are inclusive,
while the upper bounds are exclusive."

So, the rectangles sharing just an edge shouldn't overlap.
 -----------
|           |
 ------- ---
|       |   |
|       |   |
 ------- ---

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/util/u_blit.c