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

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed)

Created:
7 years, 9 months ago by epenner
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

gpu: Fix Vivante's "hisilicon" GPUs This fixes "Hisilicon" GPUs, which is an instance of a Vivante's GPU design. This involves enabling virtual contexts, since they don't support share-groups, and further adds a work-around for switching surfaces. Without the work- around the view surface "inherits" the size of the last bound surface (which for Chrome tends to be a 1x1 pbuffer) resulting in a black screen. The following steps "repair" the view surface every time it is made current: - Make it current. - Bind the default frame-buffer. - Make it not current. - Destroy/recreate it from the native handle. - Make it current again. NOTE: The "Recreate" function is added to surface because the Destroy/Initialize may be intercepted or modified by wrapper surface classes. Recreate is similar to resize, which after being forwarded by a wrapper can call Destroy/Initialize on the 'real' surface. BUG=179250, 229643 NOTRY=true No try, since it's Android only and already tested. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194737

Patch Set 1 #

Patch Set 2 : Add recreate work-around #

Total comments: 4

Patch Set 3 : Address feedback. #

Patch Set 4 : Address feedback. #

Patch Set 5 : Add TODO #

Total comments: 1

Patch Set 6 : Add FBO restore #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -6 lines) Patch
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_android.cc View 1 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M content/gpu/gpu_info_collector_android.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 3 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_driver_bug_workaround_type.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_context_egl.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_context_egl.cc View 1 2 3 4 5 2 chunks +36 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.h View 1 2 4 chunks +11 lines, -0 lines 0 comments Download
M ui/gl/gl_surface.cc View 1 2 4 chunks +24 lines, -0 lines 0 comments Download
M ui/gl/gl_surface_egl.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 1 chunk +17 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
epenner
Ptal.
7 years, 9 months ago (2013-03-28 05:23:09 UTC) #1
no sievers
On 2013/03/28 05:23:09, epenner wrote: > Ptal. lgtm. I think it's fine to enable virtual ...
7 years, 9 months ago (2013-03-28 21:51:47 UTC) #2
epennerAtGoogle
On 2013/03/28 21:51:47, Daniel Sievers wrote: > On 2013/03/28 05:23:09, epenner wrote: > > Ptal. ...
7 years, 9 months ago (2013-03-28 21:56:53 UTC) #3
epenner
PTAL. This makes this into a full work-around which fixes Huawie tablets with "Hisilicon" GPUs. ...
7 years, 8 months ago (2013-04-16 00:49:22 UTC) #4
epenner
https://codereview.chromium.org/13140006/diff/5001/ui/gl/gl_context_egl.cc File ui/gl/gl_context_egl.cc (right): https://codereview.chromium.org/13140006/diff/5001/ui/gl/gl_context_egl.cc#newcode115 ui/gl/gl_context_egl.cc:115: if (!RecreateSurfaceIfNeeded(surface)) Just one extra note on this. I ...
7 years, 8 months ago (2013-04-16 01:02:27 UTC) #5
no sievers
Oh man, this driver bug is something :) Can you make it check somewhere that ...
7 years, 8 months ago (2013-04-16 01:23:52 UTC) #6
no sievers
@owners: FWIU, we are looking for some isolated workaround for m27 as this issue affects ...
7 years, 8 months ago (2013-04-16 01:39:53 UTC) #7
epennerAtGoogle
I'll add a DCHECK that virtual contexts are enabled when I enable the work around. ...
7 years, 8 months ago (2013-04-16 02:03:14 UTC) #8
epennerAtGoogle
https://codereview.chromium.org/13140006/diff/5001/content/common/gpu/image_transport_surface_android.cc File content/common/gpu/image_transport_surface_android.cc (right): https://codereview.chromium.org/13140006/diff/5001/content/common/gpu/image_transport_surface_android.cc#newcode36 content/common/gpu/image_transport_surface_android.cc:36: .makecurrent_recreates_surfaces) { You are right, the context-group might not ...
7 years, 8 months ago (2013-04-16 02:30:10 UTC) #9
epennerAtGoogle
Addressed feedback. Ptal.
7 years, 8 months ago (2013-04-16 02:55:42 UTC) #10
epennerAtGoogle
On 2013/04/16 02:55:42, epennerAtGoogle wrote: > Addressed feedback. Ptal. Okay, I found that I liked ...
7 years, 8 months ago (2013-04-16 19:07:35 UTC) #11
greggman
https://codereview.chromium.org/13140006/diff/20001/ui/gl/gl_context_egl.cc File ui/gl/gl_context_egl.cc (right): https://codereview.chromium.org/13140006/diff/20001/ui/gl/gl_context_egl.cc#newcode136 ui/gl/gl_context_egl.cc:136: glBindFramebufferEXT(GL_FRAMEBUFFER, 0); Sorry if this is a dumb question. ...
7 years, 8 months ago (2013-04-16 19:51:19 UTC) #12
epennerAtGoogle
On 2013/04/16 19:51:19, greggman wrote: > https://codereview.chromium.org/13140006/diff/20001/ui/gl/gl_context_egl.cc > File ui/gl/gl_context_egl.cc (right): > > https://codereview.chromium.org/13140006/diff/20001/ui/gl/gl_context_egl.cc#newcode136 > ...
7 years, 8 months ago (2013-04-16 19:54:24 UTC) #13
epennerAtGoogle
I added an FBO restore just for good measure. Let me know if there is ...
7 years, 8 months ago (2013-04-17 00:30:04 UTC) #14
greggman
lgtm
7 years, 8 months ago (2013-04-17 00:34:21 UTC) #15
epennerAtGoogle
On 2013/04/17 00:34:21, greggman wrote: > lgtm Another other concerns Daniel, before I land this? ...
7 years, 8 months ago (2013-04-17 01:11:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/13140006/25001
7 years, 8 months ago (2013-04-18 00:24:51 UTC) #17
commit-bot: I haz the power
7 years, 8 months ago (2013-04-18 00:25:06 UTC) #18
Message was sent while issue was closed.
Change committed as 194737

Powered by Google App Engine
This is Rietveld 408576698