Strange… In _clientWaitAsync…
_clientWaitAsync = function(sync, flags = 0, interval_ms = 10) {
return new Promise((resolve, reject) => {
let check = () => {
const res = gl.clientWaitSync(sync, flags, 0);
if (res == gl.WAIT_FAILED) {
console.log(gl.getError());
reject();
return;
}
if (res == gl.TIMEOUT_EXPIRED) {
setTimeout(check, interval_ms);
return;
}
resolve();
};
check();
});
}
gl.clientWaitSync is returning WAIT_FAILED on Firefox, but works fine on Chrome.
gl.getError() is returning 0 (no error), and everything seems to be working fine if I just ignore the error and change reject() into resolve(). What could have caused the WAIT_FAILED?