"Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: > On Tue, Apr 16, 2013 at 04:57:49PM -0700, Eric Anholt wrote: >> Topi Pohjolainen <topi.pohjolai...@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.
pgp9lD_EX5qRd.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev