> -----Original Message----- > From: Eric Engestrom [mailto:eric.engest...@imgtec.com] > Sent: Thursday, June 15, 2017 7:30 PM > To: Marathe, Yogesh <yogesh.mara...@intel.com> > Cc: mesa-dev@lists.freedesktop.org; Chad Versace > <chadvers...@chromium.org>; Palli, Tapani <tapani.pa...@intel.com> > Subject: Re: [Mesa-dev] egl/android: fence_fd being forced to -1 > > On Thursday, 2017-06-15 13:27:06 +0000, Marathe, Yogesh wrote: > > Hello, > > > > I'm tyring to run flatland native app on android. It apparantly fails > > because of a > fence issue. > > while debuging further it is observed that > > droid_window_enqueue_buffer() is forcing fence_fd =-1. > > I assume you've read the comment on the line above the one you mentioned?
Yes I read this, although what's not clear to me is the case that not covered in comments i.e. when a valid fd needs to be used. I will wait for Chad's comments. Thanks Eric. > > /* Queue the buffer without a sync fence. This informs the ANativeWindow > * that it may access the buffer immediately. > * > * From ANativeWindow::dequeueBuffer: > * > * The fenceFd argument specifies a libsync fence file descriptor for > * a fence that must signal before the buffer can be accessed. If > * the buffer can be accessed immediately then a value of -1 should > * be used. The caller must not use the file descriptor after it > * is passed to queueBuffer, and the ANativeWindow implementation > * is responsible for closing it. > */ > int fence_fd = -1; > dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer, > fence_fd); > > > Whats the expectation here if app wants to use fence sync? > > > > If we want to have this native app working with the lib where exactly > > fence should be created / populated, it should be with buffer producer, > > right? > > I don't know this code personally, so I Cc'ed Chad, who wrote this code in > commit bfe28b8d93 (albeit 5 years ago, so he might not remember all of it) and > Tapani who reviewed it. Yeah this app also seems to be around since then. > > > > > BTW, We can't/ don't want to change the flatland app! > > > > Regards, > > Yogesh. > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev