[Mesa-dev] [Mesa-stable] [PATCH] swrast: Fix the coordinates passed to _mesa_regions_overlap()

Anuj Phogat anuj.phogat at gmail.com
Wed Nov 25 16:01:48 PST 2015


On Wed, Nov 25, 2015 at 10:44 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Nov 25, 2015 at 10:22 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> 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.
>
> Read the rest of the thread -- it didn't look like a bug to me.
>
> I'm confused. I said it didn't look like a bug because the rectangles
> are inclusive. You said (I think) it does look like a bug because the
> rectangles are inclusive. Anuj's last reply says
> _mesa_regions_overlap() is wrong for rectangles that share an edge...
>
> But if the bounds are inclusive, and rectangles share an edge...
> doesn't that mean the regions overlap?

>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."

Going by the last sentence, rectangles with the shared edge don't
overlap.


More information about the mesa-dev mailing list