Skip to content

Conversation

@haoxli
Copy link
Contributor

@haoxli haoxli commented Feb 10, 2026

Validation error was thrown if the video frame's dispaly size was different with its coded size in importExternalTexture, because it used the visible size for copySize. This issue had been fixed by updating the copySize to reflect the coded size rather than the visible size, and add a test for this case.

Issue: https://crbug.com/471021591


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

… coded size

Validation error was thrown if the video frame's dispaly size was
different with its coded size in importExternalTexture, because it used
the visible size for copySize. This issue had been fixed by updating the
copySize to reflect the coded size rather than the visible size, and
add a test for this case, see crbug.com/471021591.
@github-actions
Copy link

Results for build job (at 6f214ed):

+webgpu:web_platform,external_texture,video:importExternalTexture,video_frame_display_size_diff_with_coded_size:* - 3 cases, 3 subcases (~1/case)
-TOTAL: 285993 cases, 2344970 subcases
+TOTAL: 285996 cases, 2344973 subcases

@haoxli haoxli requested review from jchen10 and kainino0x February 10, 2026 08:04
Copy link
Contributor

@jchen10 jchen10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment on lines +450 to +451
displayWidth,
displayHeight,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add a test that textureDimensions returns the correct value for textures like this. It might even make sense to make it part of the same test (or at least sharing much of the same code).

I think I'd like to go ahead and add this now, but if not, please add a TODO(#bugnumber).

timestamp: 0,
};

const frame = new VideoFrame(imageData.data.buffer, frameInit);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be ideal if we additionally had a version of this test where the frame comes from a video file instead of a VideoFrame. Mostly in case there are differences in the YUV codepaths, but also just to have a better chance of the test running on all browsers.

If this won't be easy (I don't know how hard it is) then just add a TODO(#bugnumber).

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.

3 participants