[Mesa-dev] [PATCH 2/3] dri3: Flush and wait for X rendering upon glXWaitX()

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 1 20:48:01 UTC 2016


On Tue, Nov 01, 2016 at 12:58:22PM -0400, Adam Jackson wrote:
> On Sat, 2016-10-22 at 11:00 +0100, Chris Wilson wrote:
> 
> > @@ -113,6 +113,11 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
> >           dri3_free_render_buffer(draw, draw->buffers[i]);
> >     }
> >  
> > +   if (draw->sync_fence) {
> > +      xcb_sync_destroy_fence(draw->conn, draw->sync_fence);
> > +      xshmfence_unmap_shm(draw->shm_fence);
> > +   }
> 
> You're leaking the fence fd. Probably should just close it immediately
> after mapping it so you don't occupy an fd per drawable.

The fence_fd is closed by xcb_dri3_fence_from_fd() as
xcb_send_request_with_fds() always calls close().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list