Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-03-01 Thread Gurchetan Singh
On Thu, Feb 28, 2019 at 8:15 PM Roland Scheidegger wrote: > > Am 01.03.19 um 00:28 schrieb Gurchetan Singh: > > On Thu, Feb 28, 2019 at 12:39 AM Boris Brezillon > > wrote: > >> > >> Hello Gurchetan, > >> > >> On Wed, 27 Feb 2019 10:34:26 -0800 > >> Gurchetan Singh wrote: > >> > >>> On Mon, Feb 2

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-03-01 Thread Eric Anholt
Boris Brezillon writes: > From: Daniel Stone > > pipe_boxes are x/y + width/height, rather than x0/y0 -> x1/y1. This > means that (x+width) is not included in the box. > > The box intersection check was seemingly written for inclusive regions, > and would falsely assert that adjacent boxes would

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-28 Thread Roland Scheidegger
Am 01.03.19 um 00:28 schrieb Gurchetan Singh: > On Thu, Feb 28, 2019 at 12:39 AM Boris Brezillon > wrote: >> >> Hello Gurchetan, >> >> On Wed, 27 Feb 2019 10:34:26 -0800 >> Gurchetan Singh wrote: >> >>> On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon >>> wrote: From: Daniel Stone >>>

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-28 Thread Gurchetan Singh
On Thu, Feb 28, 2019 at 12:39 AM Boris Brezillon wrote: > > Hello Gurchetan, > > On Wed, 27 Feb 2019 10:34:26 -0800 > Gurchetan Singh wrote: > > > On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon > > wrote: > > > > > > From: Daniel Stone > > > > > > pipe_boxes are x/y + width/height, rather tha

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-28 Thread Boris Brezillon
Hello Gurchetan, On Wed, 27 Feb 2019 10:34:26 -0800 Gurchetan Singh wrote: > On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon > wrote: > > > > From: Daniel Stone > > > > pipe_boxes are x/y + width/height, rather than x0/y0 -> x1/y1. This > > means that (x+width) is not included in the box. > >

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-27 Thread Gurchetan Singh
On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon wrote: > > From: Daniel Stone > > pipe_boxes are x/y + width/height, rather than x0/y0 -> x1/y1. This > means that (x+width) is not included in the box. > > The box intersection check was seemingly written for inclusive regions, > and would falsely

[Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-25 Thread Boris Brezillon
From: Daniel Stone pipe_boxes are x/y + width/height, rather than x0/y0 -> x1/y1. This means that (x+width) is not included in the box. The box intersection check was seemingly written for inclusive regions, and would falsely assert that adjacent boxes would overlap. Fix the off-by-one by being