New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 768324 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression

Blocked on:
issue 740278



Sign in to add a comment

GLVirtualContextsTest.VertexArrayObjectRestoreDefault failing on some devices

Reported by mirko.r...@imgtec.com, Sep 25 2017

Issue description

Steps to reproduce the problem:
1. build gl tests for android
2. out/bin/run_gl_tests -f GLVirtualContextsTest.VertexArrayObjectRestoreDefault
3. 

What is the expected behavior?
test to pass

What went wrong?
test fails

Did this work before? Yes before this change https://chromium-review.googlesource.com/c/chromium/src/+/636513

Chrome version: 50.0.2661.102  Channel: n/a
OS Version: r503417
Flash Version: Shockwave Flash 22.0 r0

The failure happens on devices which don't have native_vertex_array_object support  or use client_side_arrays.
In that case emulation is used, i.e function EmulateVertexArrayState() is called:

https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gles2_cmd_decoder.cc?q=gles2_cmd_decoder&dr=C&l=16688.

This can be reproduced with arm nexus 10 (with Mali-T604, OpenGL ES 3.1) or QEMU arm (Android 6.0).
 
Components: Blink>WebGL
Labels: -Pri-2 Pri-1
Owner: kainino@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report, I'll look into it.

note to self: likely able to reproduce more easily by using workarounds to enable that path on desktop.

Comment 2 by zmo@chromium.org, Sep 25 2017

Cc: kbr@chromium.org zmo@chromium.org
Status: Started (was: Assigned)
Unfortunately, on my Mac, unsetting feature_flags_.native_vertex_array_object causes a bunch of gl_tests errors, even with my patch reverted. I don't know why that's true. One error I tracked down was an INVALID_OPERATION in the driver's glVertexAttribDivisorANGLE here:

https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gles2_cmd_decoder.cc?l=10111&rcl=aefd808a350f919fd976f1187bc1fedec1845241

Not sure how that error is even possible. But I think it was a red herring.
Labels: M-63
Labels: -M-63 M-62
Able to repro by enabling use_client_side_arrays_for_stream_buffers on my Pixel phone.
Cc: piman@chromium.org
We may want to merge this back to M-62 to prevent regressions. I don't know what kind of regressions this might cause, but since the bug is in context switching I think it could flakily cause serious issues.
Blockedon: 740278

Comment 11 by piman@chromium.org, Sep 27 2017

Agreed, we should merge to 62.
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/728c5405bd66c8303b5f6f6eba750efe3e9b7847

commit 728c5405bd66c8303b5f6f6eba750efe3e9b7847
Author: Kai Ninomiya <kainino@chromium.org>
Date: Sun Oct 01 06:00:39 2017

Fix bug in VAO emulation, recently introduced by a workaround

The workaround was added here: https://crrev.com/c/636513

Bug:  768324 
Test: GLVirtualContextsTest.VertexArrayObjectRestoreDefault
      (with use_client_side_arrays_for_stream_buffers enabled).

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I1f0b00a4ab9ab4bf5d8fbd33f567af3b0f41de58
Reviewed-on: https://chromium-review.googlesource.com/685984
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505508}
[modify] https://crrev.com/728c5405bd66c8303b5f6f6eba750efe3e9b7847/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/728c5405bd66c8303b5f6f6eba750efe3e9b7847/gpu/command_buffer/service/vertex_attrib_manager.cc
[modify] https://crrev.com/728c5405bd66c8303b5f6f6eba750efe3e9b7847/gpu/command_buffer/service/vertex_attrib_manager.h

Labels: Merge-Request-62
Requesting to merge #12. See #9 and #11.
Project Member

Comment 14 by sheriffbot@chromium.org, Oct 1 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
what is the risk associated with merging this into M62 at this point? Could this break other stuffs? Also, can we have a test in place to prevent this from happening in the future?
We consider the risk very low. This is only a very slight logical change - and we're confident that it's more correct now. Plus it only affects Imagination and ARM.

I will work on finding a way to test this change more reliably. (Perhaps we can run GLVirtualContextsTest.VertexArrayObjectRestoreDefault with the extra workaround force-enabled.)
Labels: -Hotlist-Merge-Review -Merge-Review-62 Merge-Approved-62
Thanks for thinking about finding a way to test it. Please verify your fix in the latest canary and merge it into 3202 if it all looks good.
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 3 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fead116077da984b849c5653785d6199ec4ca825

commit fead116077da984b849c5653785d6199ec4ca825
Author: Kai Ninomiya <kainino@chromium.org>
Date: Tue Oct 03 22:10:18 2017

Fix bug in VAO emulation, recently introduced by a workaround

The workaround was added here: https://crrev.com/c/636513

Bug:  768324 
Test: GLVirtualContextsTest.VertexArrayObjectRestoreDefault
      (with use_client_side_arrays_for_stream_buffers enabled).

TBR=kainino@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I1f0b00a4ab9ab4bf5d8fbd33f567af3b0f41de58
Reviewed-on: https://chromium-review.googlesource.com/685984
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#505508}(cherry picked from commit 728c5405bd66c8303b5f6f6eba750efe3e9b7847)
Reviewed-on: https://chromium-review.googlesource.com/699049
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#564}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/fead116077da984b849c5653785d6199ec4ca825/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/fead116077da984b849c5653785d6199ec4ca825/gpu/command_buffer/service/vertex_attrib_manager.cc
[modify] https://crrev.com/fead116077da984b849c5653785d6199ec4ca825/gpu/command_buffer/service/vertex_attrib_manager.h

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a1ae8cc2edec3007e1b34dfaed43547392709ee

commit 3a1ae8cc2edec3007e1b34dfaed43547392709ee
Author: Kai Ninomiya <kainino@chromium.org>
Date: Thu Oct 05 01:21:15 2017

Add coverage to regression test for  issue 768324 

Regression test for
GLVirtualContextsTest.VertexArrayObjectRestoreDefault
on devices with use_client_side_arrays_for_stream_buffers and
use_virtualized_gl_contexts.

Bug:  768324 
Test: WithWorkarounds/GLVirtualContextsTest.VertexArrayObjectRestoreDefault/1
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I1b1f8fb791a02c614f1a4c9f869016c198902a16
Reviewed-on: https://chromium-review.googlesource.com/699459
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506606}
[modify] https://crrev.com/3a1ae8cc2edec3007e1b34dfaed43547392709ee/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc

Status: Fixed (was: Started)
Labels: GPU-ARM GPU-Imagination

Sign in to add a comment