Skip to content

Conversation

@hujiajie
Copy link
Contributor

@hujiajie hujiajie commented Aug 9, 2022

This fixes the error in WebGPU-backed unit tests:

OperationError: Failed to execute 'importExternalTexture' on 'GPUDevice': Failed to import texture from video element that doesn't have back resource.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@hujiajie
Copy link
Contributor Author

hujiajie commented Aug 9, 2022

The original readyState check is not deleted because of concerns on old browsers.

The original readyState check is left as compulsory even when rvfc is present because having a unified codepath that optionally awaits for the rvfc is nicer than divergent behavior.

@hujiajie hujiajie marked this pull request as draft August 9, 2022 09:03
@gyagp
Copy link

gyagp commented Aug 9, 2022

Another place that has readState check is tfjs-data/src/util/test_utils.ts. I'm not sure if we need to also fix it.
Given waiting for video is useful in multiple places, can we implement it as a utility function?

@hujiajie
Copy link
Contributor Author

Another place that has readState check is tfjs-data/src/util/test_utils.ts. I'm not sure if we need to also fix it.

I'm not sure either. Let me wait for more feedback.

Given waiting for video is useful in multiple places, can we implement it as a utility function?

Maybe, but why it was not a helper before? And is there anything changed so you are proposing this now?

@gyagp
Copy link

gyagp commented Aug 10, 2022

Another place that has readState check is tfjs-data/src/util/test_utils.ts. I'm not sure if we need to also fix it.

I'm not sure either. Let me wait for more feedback.

I think it's better to fix all the places.

Given waiting for video is useful in multiple places, can we implement it as a utility function?

Maybe, but why it was not a helper before? And is there anything changed so you are proposing this now?

To guarantee video is loaded is not straightforward and simple as we expected. That's the change from our previous understanding, so a helper function can be handy and sync all the related code on the same page.

@hujiajie hujiajie closed this Aug 11, 2022
This fixes the error in WebGPU-backed unit tests:

  OperationError: Failed to execute 'importExternalTexture' on
  'GPUDevice': Failed to import texture from video element that doesn't
  have back resource.
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