<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">Is there a test or bug this fixes? If so, that should be mentioned in the commit message and you should cc stable.</p>
<div class="gmail_quote">On Dec 11, 2015 2:39 PM, "Anuj Phogat" <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From OpenGL 4.0 spec, section 4.3.2 "Copying Pixels":<br>
"The pixels corresponding to these buffers are copied from the source<br>
rectangle bounded by the locations (srcX0, srcY 0) and (srcX1, srcY 1)<br>
to the destination rectangle bounded by the locations (dstX0, dstY 0)<br>
and (dstX1, dstY 1). The lower bounds of the rectangle are inclusive,<br>
while the upper bounds are exclusive."<br>
<br>
So, the rectangles sharing just an edge shouldn't overlap.<br>
-----------<br>
| |<br>
------- ---<br>
| | |<br>
| | |<br>
------- ---<br>
<br>
Cc: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
Cc: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
---<br>
src/mesa/main/blit.c | 8 ++++----<br>
1 file changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c<br>
index a32f1a4..9c4c0f3 100644<br>
--- a/src/mesa/main/blit.c<br>
+++ b/src/mesa/main/blit.c<br>
@@ -68,16 +68,16 @@ _mesa_regions_overlap(int srcX0, int srcY0,<br>
int dstX0, int dstY0,<br>
int dstX1, int dstY1)<br>
{<br>
- if (MAX2(srcX0, srcX1) < MIN2(dstX0, dstX1))<br>
+ if (MAX2(srcX0, srcX1) <= MIN2(dstX0, dstX1))<br>
return false; /* dst completely right of src */<br>
<br>
- if (MAX2(dstX0, dstX1) < MIN2(srcX0, srcX1))<br>
+ if (MAX2(dstX0, dstX1) <= MIN2(srcX0, srcX1))<br>
return false; /* dst completely left of src */<br>
<br>
- if (MAX2(srcY0, srcY1) < MIN2(dstY0, dstY1))<br>
+ if (MAX2(srcY0, srcY1) <= MIN2(dstY0, dstY1))<br>
return false; /* dst completely above src */<br>
<br>
- if (MAX2(dstY0, dstY1) < MIN2(srcY0, srcY1))<br>
+ if (MAX2(dstY0, dstY1) <= MIN2(srcY0, srcY1))<br>
return false; /* dst completely below src */<br>
<br>
return true; /* some overlap */<br>
--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>