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

Issue 66033009: [Android] Add workaround to unbind gpu memory buffer only on NVIDIA (Closed)

Created:
7 years, 1 month ago by boliu
Modified:
7 years, 1 month ago
Reviewers:
kaanb, reveman, no sievers, piman
CC:
chromium-reviews, rjkroege, piman+watch_chromium.org, ozone-reviews_chromium.org, kalyank
Visibility:
Public.

Description

[Android] Add workaround to unbind gpu memory buffer only on NVIDIA For gralloc backed gpu memory buffer on Android, it is undefined whether locking for read/write while the buffer is bound to a texture is allowed. On nvidia devices (eg 2012 nexus 7), lock without unbind will lead to deadlocks in the driver (crbug.com/264096). However on other nexus gpu vendors (img, arm, qualcomm), unbind is very expensive since it flushes the gpu pipeline. And vendors have advised that lock while bound is allowed and is the right solution to this slowness, as long as the texture is eventually recycled or deleted. Add a workaround for nvidia to only unbind in GLImage::DidUseTexImage. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234740

Patch Set 1 #

Patch Set 2 : Update a more comments #

Total comments: 2

Patch Set 3 : SetReleaseAfterUse #

Total comments: 8

Patch Set 4 : address Kaan's comments #

Patch Set 5 : Rename in json #

Patch Set 6 : comma #

Total comments: 8

Patch Set 7 : Address Reveman's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -3 lines) Patch
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/image_manager.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/image_manager.cc View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M gpu/config/gpu_driver_bug_list_json.cc View 1 2 3 4 5 2 chunks +15 lines, -1 line 0 comments Download
M gpu/config/gpu_driver_bug_workaround_type.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_image.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gl/gl_image.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gl/gl_image_egl.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M ui/gl/gl_image_egl.cc View 1 2 3 4 5 6 4 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
boliu
This is the minimum change needed get the desired behavior. But I think it might ...
7 years, 1 month ago (2013-11-12 00:26:35 UTC) #1
reveman
https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h File ui/gl/gl_image.h (right): https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h#newcode42 ui/gl/gl_image.h:42: virtual void DidUseTexImage(bool release_tex_image); Bind/release as part of Will/DidUseTexImage ...
7 years, 1 month ago (2013-11-12 16:39:40 UTC) #2
boliu
https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h File ui/gl/gl_image.h (right): https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h#newcode42 ui/gl/gl_image.h:42: virtual void DidUseTexImage(bool release_tex_image); On 2013/11/12 16:39:42, David Reveman ...
7 years, 1 month ago (2013-11-12 16:47:47 UTC) #3
reveman
On 2013/11/12 16:47:47, boliu wrote: > https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h > File ui/gl/gl_image.h (right): > > https://codereview.chromium.org/66033009/diff/30001/ui/gl/gl_image.h#newcode42 > ...
7 years, 1 month ago (2013-11-12 16:55:45 UTC) #4
boliu
Changed to SetReleaseAfterUse, which is plumbed through ImageManager. Kept SetReleaseAfterUse (instead of the reverse) since ...
7 years, 1 month ago (2013-11-12 18:42:39 UTC) #5
kaanb
lg2m with some suggestions https://codereview.chromium.org/66033009/diff/100001/gpu/config/gpu_driver_bug_list_json.cc File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/66033009/diff/100001/gpu/config/gpu_driver_bug_list_json.cc#newcode22 gpu/config/gpu_driver_bug_list_json.cc:22: "version": "3.2", I think 3.11 ...
7 years, 1 month ago (2013-11-12 18:49:57 UTC) #6
boliu
https://codereview.chromium.org/66033009/diff/100001/gpu/config/gpu_driver_bug_list_json.cc File gpu/config/gpu_driver_bug_list_json.cc (right): https://codereview.chromium.org/66033009/diff/100001/gpu/config/gpu_driver_bug_list_json.cc#newcode22 gpu/config/gpu_driver_bug_list_json.cc:22: "version": "3.2", On 2013/11/12 18:49:57, kaanb wrote: > I ...
7 years, 1 month ago (2013-11-12 19:07:20 UTC) #7
kaanb
lgtm https://codereview.chromium.org/66033009/diff/240001/gpu/command_buffer/service/image_manager.h File gpu/command_buffer/service/image_manager.h (right): https://codereview.chromium.org/66033009/diff/240001/gpu/command_buffer/service/image_manager.h#newcode50 gpu/command_buffer/service/image_manager.h:50: nit: extra space
7 years, 1 month ago (2013-11-12 19:34:12 UTC) #8
reveman
https://codereview.chromium.org/66033009/diff/240001/ui/gl/gl_image.cc File ui/gl/gl_image.cc (right): https://codereview.chromium.org/66033009/diff/240001/ui/gl/gl_image.cc#newcode31 ui/gl/gl_image.cc:31: NOTIMPLEMENTED(); Only a small subset of derived classes should ...
7 years, 1 month ago (2013-11-12 20:56:54 UTC) #9
boliu
https://codereview.chromium.org/66033009/diff/240001/gpu/command_buffer/service/image_manager.h File gpu/command_buffer/service/image_manager.h (right): https://codereview.chromium.org/66033009/diff/240001/gpu/command_buffer/service/image_manager.h#newcode50 gpu/command_buffer/service/image_manager.h:50: On 2013/11/12 19:34:13, kaanb wrote: > nit: extra space ...
7 years, 1 month ago (2013-11-12 21:06:50 UTC) #10
reveman
ui/gl/gl_image* lgtm
7 years, 1 month ago (2013-11-12 21:12:19 UTC) #11
boliu
+piman for owners
7 years, 1 month ago (2013-11-12 21:15:18 UTC) #12
piman
lgtm
7 years, 1 month ago (2013-11-12 21:19:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/66033009/310001
7 years, 1 month ago (2013-11-12 23:39:36 UTC) #14
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-11-13 02:07:05 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/66033009/310001
7 years, 1 month ago (2013-11-13 02:30:55 UTC) #16
commit-bot: I haz the power
7 years, 1 month ago (2013-11-13 04:00:52 UTC) #17
Message was sent while issue was closed.
Change committed as 234740

Powered by Google App Engine
This is Rietveld 408576698