[Mesa-dev] [PATCH 4/8] intel: prepare for dri images having more than plane
Pohjolainen, Topi
topi.pohjolainen at intel.com
Tue Apr 23 02:21:31 PDT 2013
On Mon, Apr 22, 2013 at 10:06:19AM -0700, Eric Anholt wrote:
> "Pohjolainen, Topi" <topi.pohjolainen at intel.com> writes:
>
> > On Tue, Apr 16, 2013 at 04:57:49PM -0700, Eric Anholt wrote:
> >> Topi Pohjolainen <topi.pohjolainen at intel.com> writes:
> >> > + if (image->regions[i]->bo)
> >> > + intel_region_release(&image->regions[i]);
> >>
> >> Why are you looking at the BO for deciding whether to free the region?
> >> A region should always have a BO. If you're trying to null-check the
> >> region, intel_region_release already does that.
> >
> > As I switched to using a fixed sized array of regions (holding up-to-three
> > planes), the images having one or two planes would have the rest of the regions
> > initialized to zero. And I simply decided to use the 'bo'-pointer as telling if
> > the region was in use or not.
>
> The struct has an array of region pointers, and "there's no region"
> should be region[i] == NULL, not region[i]->bo == NULL.
Very true, I'll fix this.
More information about the mesa-dev
mailing list