New issue
Advanced search Search tips

Issue 912466 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 6
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

WebGLSync is always UNSIGNALED

Reported by michal.w...@gmail.com, Dec 6

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce the problem:
Execute the function:

function test() {
    let canvas = document.createElement('canvas');
    let gl = canvas.getContext('webgl2');
    let sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);
    gl.flush();
    gl.finish();

    let status = gl.getSyncParameter(sync, gl.SYNC_STATUS);
    console.log(sync, status, status === gl.UNSIGNALED);  // logs "true"
    gl.deleteSync(sync);
}

What is the expected behavior?
The console.log() logs false for status===gl.UNSIGNALED, and the status is equal to gl.SIGNALED.

What went wrong?
I'm expecting this to work, since gl.finish() should wait until all GPU commands have been processed - but it looks like the sync fence was not.

This also does not work in a more complete example, where I'm trying to use WebGLSyncs to determine whether a render has been finished.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 70.0.3538.110  Channel: n/a
OS Version: 10.0
Flash Version: 

I would very much appreciate a minimal, working WebGLSync example that actually gets signaled. I searched GitHub for such but I found nothing.
 
test.js
363 bytes View Download
Status: WontFix (was: Unconfirmed)
WebGL fences do not change state during the execution of a JavaScript function. To observe a change in state, you must first return control back to the browser. See the spec here: https://www.khronos.org/registry/webgl/specs/latest/2.0/#GET_SYNC_PARAMETER

And also the Rationale section here:
https://www.khronos.org/registry/webgl/specs/latest/2.0/#GET_QUERY_PARAMETER

Sign in to add a comment