From 378adf3f490ffde1867eb93bb98b39c980fd1e1d Mon Sep 17 00:00:00 2001 From: zijiehe-google-com Date: Tue, 4 Aug 2026 15:41:40 -0700 Subject: [PATCH] Wait for first video frame in texture-srgb-upload.html Unlike other WebGL video tests, texture-srgb-upload.html previously called await video.play() without waiting for requestVideoFrameCallback or using wtu.waitVideoUploadable(video). On slow or asynchronous hardware decoders, texImage2D(..., video) could upload before the first frame was ready, reading all zeros ([0, 0, 0, 0]). Use await wtu.waitVideoUploadable(video) before running texture upload tests to prevent this race condition, matching the standard idiom used in tex-image-and-sub-image-2d-with-video.js and other video tests. --- sdk/tests/conformance/textures/misc/texture-srgb-upload.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/tests/conformance/textures/misc/texture-srgb-upload.html b/sdk/tests/conformance/textures/misc/texture-srgb-upload.html index 6f66bfdde..8d91eb203 100644 --- a/sdk/tests/conformance/textures/misc/texture-srgb-upload.html +++ b/sdk/tests/conformance/textures/misc/texture-srgb-upload.html @@ -72,7 +72,7 @@ video.loop = true; video.crossOrigin = "anonymous"; try { - await video.play(); + await wtu.waitVideoUploadable(video); } catch (e) { debug('Browser could not play this specific video. Skipping test.'); finishTest();