toji.github.io/webgl2-particles-2 breaks on Qualcomm GPUs upon page reload |
||||||||
Issue descriptionThe transform feedback demo http://toji.github.io/webgl2-particles-2/ frequently breaks on the Nexus 5X and 6P when the page is reloaded. Debugging indicates that glBeginTransformFeedback (called by the transform feedback pass in the demo) is generating a GL_INVALID_OPERATION. I instrumented a ChromePublic.apk build on Android, and found that the error is coming from the driver -- when GLES2DecoderImpl::DoBeginTransformFeedback calls: transform_feedback->DoBeginTransformFeedback(primitive_mode); The command buffer's validation is supposed to ensure that this can't happen. The same problem doesn't happen on the Pixel C, which uses an NVIDIA GPU, and it also doesn't happen on desktop Linux. I thought at first this was a bug in the virtual context handling in the command buffer, where if a GLES2DecoderImpl was destroyed while a transform feedback was begun, it would fail to call glEndTransformFeedback. Code inspection indicates the TransformFeedbackManager handles this case, and I added queries of the GL state just before calling glBeginTransformFeedback -- there was no active transform feedback. I suspect that Qualcomm's driver maintains the transform feedback's indexed binding points incorrectly -- as members of the context state rather than the transform feedback object. Will need to try adding workaround code to confirm this.
,
Oct 25 2016
,
Oct 25 2016
Note: I built Chromium with the use_virtualized_gl_contexts driver bug workaround disabled in src/gpu/config/gpu_driver_bug_list_json.cc and the problem still occurred on the Google Pixel. This reinforces the hypothesis that it's a bug in the driver.
,
Oct 25 2016
Filed internal bug b/32414209 against Qualcomm about this issue.
,
Oct 25 2016
zmo@ pointed out it would be pretty easy to test a workaround, so I did in the attached patch, which restores the GL_TRANSFORM_FEEDBACK_BUFFER indexed binding points each time BindTransformFeedback is called (including during virtualized context changes). Unfortunately it had no effect.
,
Oct 25 2016
,
Dec 1 2016
Per feedback on b/32414209 , it sounds like in Qualcomm's current drivers, the binaries returned from glGetProgramBinary are missing the transform feedback varying information. This is the reason this only happens upon page reload; it's only on the second and subsequent load of the program that Chromium discovers that it has a cached program binary to use. There's already a driver bug workaround for this: disable_program_cache . It was last used in Issue 510637. I'm reluctant to use it here, because it might impact the startup performance of Chrome's compositor. Perhaps we need to add a new workaround like disable_program_cache_for_webgl2 (under the assumption that Chrome's internals would never use transform feedback). Kai, may I assign this to you? We'll need to talk with others to determine the most reasonable workaround.
,
Jan 4 2017
Taking this from Kai, since per offline conversation with Victor, we'll definitely need a new workaround type. Disabling program caching for programs intended for transform feedback (i.e., where the transform feedback varyings are non-empty) seems like a good targeted workaround.
,
Jan 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7db45ad0084e0622951df2e14c4c411349ef7338 commit 7db45ad0084e0622951df2e14c4c411349ef7338 Author: kbr <kbr@chromium.org> Date: Wed Jan 04 19:26:11 2017 Add disable_program_caching_for_transform_feedback workaround. All current Qualcomm GPUs are affected by a bug where program binaries don't cache transform feedback varyings. Work around this by avoiding the use of the in-memory and disk program caches when the transform feedback varyings are non-empty. BUG= 658074 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2615573002 Cr-Commit-Position: refs/heads/master@{#441433} [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/command_buffer/service/memory_program_cache.cc [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/command_buffer/service/memory_program_cache.h [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/command_buffer/service/memory_program_cache_unittest.cc [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/config/gpu_driver_bug_list_json.cc [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/config/gpu_driver_bug_workaround_type.h [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/ipc/in_process_command_buffer.cc [modify] https://crrev.com/7db45ad0084e0622951df2e14c4c411349ef7338/gpu/ipc/service/gpu_channel_manager.cc
,
Jan 4 2017
,
Jun 23 2017
,
Oct 27 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by kbr@chromium.org
, Oct 25 2016