Skip to content

Wait for first video frame in texture-srgb-upload.html - #3788

Open
zijiehe-google-com wants to merge 1 commit into
KhronosGroup:mainfrom
zijiehe-google-com:fix-srgb-upload-race
Open

Wait for first video frame in texture-srgb-upload.html#3788
zijiehe-google-com wants to merge 1 commit into
KhronosGroup:mainfrom
zijiehe-google-com:fix-srgb-upload-race

Conversation

@zijiehe-google-com

Copy link
Copy Markdown

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.

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.
@CLAassistant

CLAassistant commented Aug 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@zijiehe-google-com

Copy link
Copy Markdown
Author

cc @kenrussell Could you take a look at this change. I believe this change can fix this test failure on both android and fuchsia.

@zijiehe-google-com

Copy link
Copy Markdown
Author

During Ken's OOO, @toji , can you take a look at this change? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants