[Mesa-dev] [PATCH v14 15/36] i965: Improve same-buffer restriction for imports
Daniel Stone
daniel at fooishbar.org
Mon Jun 5 13:53:22 UTC 2017
Hi Varad,
On 30 May 2017 at 12:53, Varad Gautam <varadgautam at gmail.com> wrote:
> + /* We only support all planes from the same bo.
> + * brw_bo_gem_create_from_prime() should return the same pointer for all
> + * fds received here */
> + bo = brw_bo_gem_create_from_prime(screen->bufmgr, fds[0], size);
> + for (i = 1; i < num_fds; i++) {
> + if (bo != brw_bo_gem_create_from_prime(screen->bufmgr, fds[i], size))
> + return NULL;
This above takes a ref, which gets leaked.
struct brw_bo *aux =
brw_bo_gem_create_from_prime(screen->bufmgr, fds[i], size);
brw_bo_unreference(aux);
if (aux != bo)
return NULL;
Thanks for the fix!
Cheers,
Daniel
More information about the mesa-dev
mailing list