Branch
Hash :
3cf7a604
Author :
Date :
2025-05-17T19:39:08
WebGPU: Add extensions for importing external textures Add EGL_ANGLE_device_webgpu which exposes the adapter and device used by ANGLE internally. Add EGL_ANGLE_webgpu_texture_client_buffer which allows importing external WGPUTexture handles if they share the same device as ANGLE (queried from EGL_ANGLE_device_webgpu). Bug: angleproject:418022112 Change-Id: I0683d36b84a0f8e0e9b68a5ec0d3aa8b7a95152c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6553063 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
Name
ANGLE_device_webgpu
Name Strings
EGL_ANGLE_device_webgpu
Contributors
Geoff Lang
Contact
Geoff Lang, Google (geofflang 'at' google 'dot' com)
Status
Draft
Version
Version 1, May 15, 2025
Number
EGL Extension #XXX
Extension Type
EGL device extension
Dependencies
This extension is written against the language of EGL 1.5 as
modified by EGL_EXT_device_query.
EGL_EXT_device_query is required.
Overview
ANGLE has the ability to run GPU commands on a WebGPU device.
This extension defines a mapping from an EGL device to a WebGPU
device, after it's queried from an EGL display.
IP Status
No known claims.
New Types
None.
New Procedures and Functions
None.
New Tokens
Accepted as a queried <attribute> in eglQueryDeviceAttribEXT:
EGL_WEBGPU_DEVICE_ANGLE 0x34F3
EGL_WEBGPU_ADAPTER_ANGLE 0x34F4
Changes to section 3.2 (Devices)
Replace the paragraph immediately following the prototype for
eglQueryDeviceAttribEXT:
<attribute> may be EGL_WEBGPU_DEVICE_ANGLE or EGL_WEBGPU_ADAPTER_ANGLE.
On success, EGL_TRUE is returned, and a valid WGPUDevice or WGPUAdapter
handle corresponding to the EGL device is returned in <value>. wgpuAddRef is
called on the handle before returning and the client is responsible for
releasing this reference. This handle is compatible with WebGPU API functions.
If the EGL device is not currently associated with a WebGPU device and <attribute>
is EGL_WEBGPU_DEVICE_ANGLE or EGL_WEBGPU_ADAPTER_ANGLE, EGL_BAD_ATTRIBUTE is
returned, and <value> is left unchanged.
Issues
None
Revision History
Version 1, May 15, 2025 (Geoff Lang)
- Initial Draft