webgpu: Support GPUExternalTexture - #45873
Merged
Merged
Conversation
sagudev
force-pushed
the
ext-tex
branch
3 times, most recently
from
July 2, 2026 17:21
3dfaa8a to
a904e0f
Compare
sagudev
marked this pull request as ready for review
July 2, 2026 17:21
TimvdLippe
approved these changes
Jul 3, 2026
sagudev
enabled auto-merge
July 3, 2026 06:18
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 3, 2026
Member
|
/_mozilla/mozilla/interfaces.https.html |
sagudev
enabled auto-merge
July 3, 2026 13:02
Member
Author
|
I pushed and put to queue at very close time, and we know github ops are not atomic, so I think (hope) it put old version into queue. |
Member
Shouldn't hope that by all means🤣 |
Member
|
https://github.com/servo/servo/actions/runs/28662273305/job/85005501546 |
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Member
Author
|
rebased, and that should also retriggered CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea behind
GPUExternalTextureis that one could use texture from decoder in webgpu (and make it zerocopy). We do not have any texture sharing mechanism in servo yet and so this PR does this using CPU copies. We useget_current_frame_datato obtain Snapshot which we then upload to wgpu as normal texture (PlanarTexturein the code and that is per HTMLVideoElement so we can just update instead of creating new whole texture - something similar is done in FF) which is then imported as external texture in wgpu. Unfortunately external textures only work on DirectX12 (Windows) and Metal (Mac) so on vulkan (Linux) we throwUnsupporteddom exception. Nevertheless many tests now pass because they do not fail at missingGPUExternalTextureorimportExternalTexture../servoshell.exe --pref dom_webgpu_enabled --pref dom_webgpu_wgpu_backend=dx12 https://webgpufundamentals.org/webgpu/webgpu-simple-textured-quad-external-video.html:Testing: Covered by WebGPU CTS (partially) and tested manually using example.