Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Issue 2858693002: ozone: Wait on EGLFence before committing buffers. Avoid using GL. (Closed)

Created:
3 years, 7 months ago by Daniele Castagna
Modified:
3 years, 6 months ago
Reviewers:
marcheu, dnicoara, reveman
CC:
chromium-reviews, kalyank, ozone-reviews_chromium.org, piman+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

ozone: Wait on EGLFence before committing buffers. Avoid using GL. GbmSurfaceless::SwapBuffersAsync used to always call glFlush, to call glFinish for universal link display device, and to insert an EGL fence and wait on it when "EGL_ARM_implicit_external_sync" or "EGL_EXT_image_flush_external" was available. There is no guarantee that the current GL context when GbmSurfaceless::SwapBuffersAsync is called is the context that was used to draw to the buffers we are about to commit. Additionally a glFlush or glFinish call does not guarantee content is written and flushed to buffers after those calls return. This caused some flickering on Mimo (udl device) since we'd submit for scanout buffers while GL was still drawing to them. This CL removes all the GL calls in GbmSurfaceless::SwapBuffersAsync, that might have happened on the wrong context. It changes the code so that we always insert and wait on an EGL fence, even on devices where we don't have implicit sync or flush external, making SwapBuffersAsync behavior more consistent across platforms. BUG=692508 Review-Url: https://codereview.chromium.org/2858693002 Cr-Commit-Position: refs/heads/master@{#468785} Committed: https://chromium.googlesource.com/chromium/src/+/00ef929f434505f4d09a130e0bc1d4a4938d490f

Patch Set 1 #

Patch Set 2 : Rebase on master. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -35 lines) Patch
M ui/ozone/platform/drm/gpu/gbm_surfaceless.h View 2 chunks +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surfaceless.cc View 1 5 chunks +16 lines, -32 lines 2 comments Download

Messages

Total messages: 28 (14 generated)
Daniele Castagna
3 years, 7 months ago (2017-05-02 19:03:58 UTC) #5
reveman
Non-owner lgtm. Aligns well with our plans to remove implicit sync in favor of flush ...
3 years, 7 months ago (2017-05-02 19:31:51 UTC) #10
dnicoara
lgtm
3 years, 7 months ago (2017-05-02 19:39:11 UTC) #11
marcheu
https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc File ui/ozone/platform/drm/gpu/gbm_surfaceless.cc (left): https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc#oldcode41 ui/ozone/platform/drm/gpu/gbm_surfaceless.cc:41: HasEGLExtension("EGL_EXT_image_flush_external")), hmm, note that we need this to happen ...
3 years, 7 months ago (2017-05-02 21:10:14 UTC) #14
Daniele Castagna
https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc File ui/ozone/platform/drm/gpu/gbm_surfaceless.cc (left): https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc#oldcode41 ui/ozone/platform/drm/gpu/gbm_surfaceless.cc:41: HasEGLExtension("EGL_EXT_image_flush_external")), On 2017/05/02 at 21:10:14, marcheu wrote: > hmm, ...
3 years, 7 months ago (2017-05-02 21:23:31 UTC) #15
marcheu
On 2017/05/02 21:23:31, Daniele Castagna wrote: > https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc > File ui/ozone/platform/drm/gpu/gbm_surfaceless.cc (left): > > https://codereview.chromium.org/2858693002/diff/20001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc#oldcode41 ...
3 years, 7 months ago (2017-05-02 21:29:12 UTC) #16
Daniele Castagna
On 2017/05/02 at 19:31:51, reveman wrote: > Non-owner lgtm. Aligns well with our plans to ...
3 years, 7 months ago (2017-05-02 21:49:26 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2858693002/20001
3 years, 7 months ago (2017-05-02 21:50:07 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/00ef929f434505f4d09a130e0bc1d4a4938d490f
3 years, 7 months ago (2017-05-02 21:56:41 UTC) #23
kcwu
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2866903002/ by kcwu@chromium.org. ...
3 years, 7 months ago (2017-05-06 09:02:47 UTC) #24
James Cook
On 2017/05/06 09:02:47, kcwu wrote: > A revert of this CL (patchset #2 id:20001) has ...
3 years, 7 months ago (2017-05-10 00:58:05 UTC) #25
xiangze.zhang
On 2017/05/10 00:58:05, James Cook wrote: > On 2017/05/06 09:02:47, kcwu wrote: > > A ...
3 years, 6 months ago (2017-06-01 02:09:57 UTC) #26
reveman
On 2017/06/01 at 02:09:57, xiangze.zhang wrote: > On 2017/05/10 00:58:05, James Cook wrote: > > ...
3 years, 6 months ago (2017-06-01 14:16:17 UTC) #27
Daniele Castagna
3 years, 6 months ago (2017-06-03 21:02:28 UTC) #28
Message was sent while issue was closed.
On 2017/06/01 at 14:16:17, reveman wrote:
> On 2017/06/01 at 02:09:57, xiangze.zhang wrote:
> > On 2017/05/10 00:58:05, James Cook wrote:
> > > On 2017/05/06 09:02:47, kcwu wrote:
> > > > A revert of this CL (patchset #2 id:20001) has been created in
> > > > https://codereview.chromium.org/2866903002/ by mailto:kcwu@chromium.org.
> > > > 
> > > > The reason for reverting is: This makes video_VideoDecodeAccelerator
failed on
> > > > all ChromeOS boards.
> > > > 
> > > > BUG=719145.
> > > 
> > > This is also causing crbug.com/719983 Black screen in VM, Context lost
because
> > > SwapBuffers failed
> > > 
> > > Note that the revert above did not go through.
> > 
> > Is this patch going to be reverted or stay?
> > We found it is also causing performance regression of a WebGL workload
(http://webglsamples.org/aquarium/aquarium.html) on Intel Chromebooks.
> 
> I think this should stay as we need it for correctness. Any performance
regression from it should recover when we switch to explicit sync. How
significant is the performance regression?

I think Xiangze is referring to what we're tracking in crbug.com/721463
Xiangze, I couldn't reproduce it on a local Chromebook, can you add more
information to crbug.com/721463 how you reproduced it and which Chromebook you
used?

Powered by Google App Engine
This is Rietveld 408576698