New issue
Advanced search Search tips

Issue 873424 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 20
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 828135



Sign in to add a comment

WebGL non-blocking readback racily fails and falls back to slow path

Project Member Reported by kainino@chromium.org, Aug 11

Issue description

Due to a race condition between OnSignalAck and CheckResultsAvailable, getSyncParameter or clientWaitSync can report that a WebGLSync has passed before the readback results are actually available to getBufferSubData. This results in getBufferSubData falling back to the slower path sometimes (and printing the appropriate warning to the dev console).

Since it's a race, this is somewhat hard to test, but it does reproduce reliably with the picking demo:
http://kai.graphics/getBufferSubDataAsync-Demo/
 
Description: Show this description
Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 12

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

commit 4be2ac272ba959e8f1727ce37035fa3e3999f38d
Author: Kai Ninomiya <kainino@chromium.org>
Date: Sun Aug 12 18:26:35 2018

Fix a race in WebGL non-blocking readback implementation

Due to a race condition between OnSignalAck and CheckResultsAvailable,
getSyncParameter or clientWaitSync can report that a
WebGLSync has passed before the readback results are actually available
to getBufferSubData. This results in getBufferSubData falling back to
the slower path sometimes.

To remedy this, this change switches from using SignalQuery to a custom
callback mechanism managed by the individual QueryTracker Query object.
This callback is called immediately when the Query discovers that it
has completed.

Bug:  873424 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I2136e3ea4d55dc4b5c2392d24791b787500a30af
Reviewed-on: https://chromium-review.googlesource.com/1171908
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582478}
[modify] https://crrev.com/4be2ac272ba959e8f1727ce37035fa3e3999f38d/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/4be2ac272ba959e8f1727ce37035fa3e3999f38d/gpu/command_buffer/client/query_tracker.cc
[modify] https://crrev.com/4be2ac272ba959e8f1727ce37035fa3e3999f38d/gpu/command_buffer/client/query_tracker.h

Status: Fixed (was: Started)

Sign in to add a comment