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

Issue 713127 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue 705156

Blocking:
issue 694359
issue 715696
issue 722288
issue 733096



Sign in to add a comment

Sampler objects are not properly virtualized in command buffer

Project Member Reported by qiankun....@intel.com, Apr 19 2017

Issue description

Comment 1 by kbr@chromium.org, Apr 19 2017

Blockedon: 705156
Blocking: 694359
Labels: -Pri-3 Pri-2
Status: Available (was: Untriaged)
Corrected link to the affected CL:
https://codereview.chromium.org/2820113008/

Per my comments on that CL:

This failure is really strange. I would have thought it might be an unrelated change which slipped past the CQ because it didn't run the optional GPU tryservers, but it really seems to be caused by this WebGL conformance roll.

Thinking about it more -- the addition of the new tests in this CL probably changed the distribution of tests among shards, and there is probably some bug in the browser which makes it sensitive to the order in which tests are run, causing them to fail if they're run in a certain order.

We saw a few similar failures in  Issue 694359  after the switch to the typ test harness.

Another bug,  Issue 705156 , came up recently where it was necessary to run a specific shard's tests in a particular order.

I think we should push ahead with this conformance roll and take the opportunity to debug this reproducible test failure. After the roll, the failure should be reproducible with something like:

./content/test/gpu/run_gpu_integration_test.py webgl_conformance --webgl-conformance-version=2.0.1 --total-shards=15 --shard-index=8 --read-abbreviated-json-results-from content/test/data/gpu/webgl2_conformance_tests_output.json --browser=release --filter-tests-after-sharding

Comment 2 by kbr@chromium.org, Apr 19 2017

Labels: OS-Linux
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 19 2017

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

commit 9589135cc575bcaeb2b730df193ca9cbc408cec4
Author: qiankun.miao <qiankun.miao@intel.com>
Date: Wed Apr 19 17:53:53 2017

Roll WebGL fd73a60..73fd432

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/fd73a60..73fd432

BUG= 708730 ,  712584 ,  712117 ,  713127 ,  angleproject:1966 

TEST=bots

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2820113008
Cr-Commit-Position: refs/heads/master@{#465664}

[modify] https://crrev.com/9589135cc575bcaeb2b730df193ca9cbc408cec4/DEPS
[modify] https://crrev.com/9589135cc575bcaeb2b730df193ca9cbc408cec4/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/9589135cc575bcaeb2b730df193ca9cbc408cec4/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
[modify] https://crrev.com/9589135cc575bcaeb2b730df193ca9cbc408cec4/content/test/gpu/gpu_tests/webgl_conformance_revision.txt

I met similar issue before: see  bug 682190  and  bug 684399 . They only appeared on Linux NVIDIA. They all disappeared after following WebGL roll.

Comment 5 by kbr@chromium.org, Apr 20 2017

Cc: xlai@chromium.org junov@chromium.org
I think there's probably some state mismanagement which affects canvas-to-WebGL-texture uploads. See https://bugs.chromium.org/p/skia/issues/detail?id=6433 . If we can take the opportunity to find what's probably a missing call to Skia's GrContext::resetContext on the Chrome side, we'll fix some longstanding lurking bugs.

Comment 6 by kbr@chromium.org, Apr 25 2017

Owner: kbr@chromium.org
Status: Assigned (was: Available)
Going to take a quick look at this. For my own records, src/third_party/webgl probably needs to be synced to 73fd432435e8a8563f2117737c7639331761bddd to reproduce.

Comment 7 by kbr@chromium.org, Apr 25 2017

With src/third_party/webgl/src/ checked out at:
73fd432435e8a8563f2117737c7639331761bddd

and src/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py checked out at:
9589135cc575bcaeb2b730df193ca9cbc408cec4

Then the following command line reproduces the failure:

./content/test/gpu/run_gpu_integration_test.py webgl_conformance --browser=release --webgl-conformance-version=2.0.1 --read-abbreviated-json-results-from=content/test/data/gpu/webgl2_conformance_tests_output.json --total-shards=15 --shard-index=8 -v --filter-tests-after-sharding --test-filter=\(conformance2_samplers_samplers\|conformance2_textures_canvas_sub_rectangle_tex_2d_r32f_red_float\)

So conformance2_samplers_samplers is messing up state that is causing conformance2_textures_canvas_sub_rectangle_tex_2d_r32f_red_float to fail.

Comment 8 by kbr@chromium.org, Apr 25 2017

Cc: cwallez@chromium.org geoffl...@chromium.org jmad...@chromium.org
Components: Internals>GPU>Internals
Doesn't fail with:

./content/test/gpu/run_gpu_integration_test.py webgl_conformance --browser=release --webgl-conformance-version=2.0.1 --read-abbreviated-json-results-from=content/test/data/gpu/webgl2_conformance_tests_output.json --total-shards=15 --shard-index=8 -v --filter-tests-after-sharding --test-filter=\(conformance2_renderbuffers_framebuffer_test\|conformance2_textures_canvas_sub_rectangle_tex_2d_r32f_red_float\) --extra-browser-args=--use_virtualized_gl_contexts=0

e.g. turning off virtualized GL contexts fixes the problem.

--extra-browser-args=--use-gl=angle also fixes the problem. ANGLE's GL context virtualization is much more complete than the command buffer's.

Continuing to investigate.

Comment 9 by kbr@chromium.org, Apr 25 2017

Status: Started (was: Assigned)
In the comment above I ran the wrong set of tests, but the conclusion is the same.

./content/test/gpu/run_gpu_integration_test.py webgl_conformance --browser=release --webgl-conformance-version=2.0.1 --read-abbreviated-json-results-from=content/test/data/gpu/webgl2_conformance_tests_output.json --total-shards=15 --shard-index=8 -v --filter-tests-after-sharding --test-filter=\(conformance2_samplers_samplers\|conformance2_textures_canvas_sub_rectangle_tex_2d_r32f_red_float\) --extra-browser-args=--use_virtualized_gl_contexts=0

The command buffer's virtualization of sampler objects is incomplete.

Comment 10 by kbr@chromium.org, Apr 25 2017

Summary: Sampler objects are not properly virtualized in command buffer (was: WebglConformance_conformance2_textures_canvas_sub_rectangle_tex_2d_r32f_red_float fails on Linux NVIDIA after a WebGL Roll)

Comment 11 by kbr@chromium.org, Apr 25 2017

Cc: vmi...@chromium.org kainino@chromium.org

Comment 12 by kbr@chromium.org, Apr 25 2017

https://codereview.chromium.org/2837213003 up for review.

 Issue 715694  has been merged into this issue.

Comment 14 by kbr@chromium.org, Apr 26 2017

Blocking: 715696
Project Member

Comment 15 by bugdroid1@chromium.org, Apr 26 2017

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

commit 69c721ec714b0650dec773173ef4be5a25347a49
Author: kbr <kbr@chromium.org>
Date: Wed Apr 26 23:58:51 2017

Restore samplers' state across virtualized GL contexts.

Tested with new WebGL conformance test being added in
https://github.com/KhronosGroup/WebGL/pull/2383 .

BUG= 713127 
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

Review-Url: https://codereview.chromium.org/2837213003
Cr-Commit-Position: refs/heads/master@{#467520}

[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/context_state.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/context_state.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gl_state_restorer_impl.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gl_state_restorer_impl.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
[modify] https://crrev.com/69c721ec714b0650dec773173ef4be5a25347a49/ui/gl/gl_state_restorer.h

Comment 16 by kbr@chromium.org, Apr 27 2017

Status: Fixed (was: Started)

Comment 17 by zmo@chromium.org, May 4 2017

This is really awesome! Thanks Ken for getting to the bottom of this.

Comment 18 by kbr@chromium.org, May 16 2017

Blocking: 722288
Blocking: -722288
Blocking: 722288
Cc: oetu...@nvidia.com
 Issue 722288  has been merged into this issue.

Comment 21 by kbr@chromium.org, Jun 17 2017

Blocking: 733096

Sign in to add a comment