From d5a93a4b77d95a76cb00d800b687a0aafc398958 Mon Sep 17 00:00:00 2001 From: Kimmo Kinnunen Date: Wed, 10 Apr 2024 15:48:34 +0300 Subject: [PATCH] offscreencanvas-sync.html Flush to insert the fence sync (#3639) Flush the commands after inserting the fence sync. Otherwise it is not guaranteed that the implementation processes the commands. Remove the clear commands, their results are not used. --- .../conformance2/offscreencanvas/offscreencanvas-sync.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/tests/conformance2/offscreencanvas/offscreencanvas-sync.html b/sdk/tests/conformance2/offscreencanvas/offscreencanvas-sync.html index dc70a60bbd..d086cae64a 100644 --- a/sdk/tests/conformance2/offscreencanvas/offscreencanvas-sync.html +++ b/sdk/tests/conformance2/offscreencanvas/offscreencanvas-sync.html @@ -35,8 +35,7 @@ let canvas = new OffscreenCanvas(128, 128); let gl = canvas.getContext("webgl2"); let sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0); - gl.clearColor(0.0, 1.0, 0.0, 1.0); - gl.clear(gl.COLOR_BUFFER_BIT); + gl.flush(); tick(function() { const status = gl.getSyncParameter(sync, gl.SYNC_STATUS); if (status == gl.SIGNALED) {