mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Implement EGLImage external texture API for GL.
Tests are based on the IOSurfaceWrappingTests. Sampling tests are not implemented, since they would require support for the samplerExternalOES sampler type in WGSL. Bug: chromium:1205155 Change-Id: Icc114eaf6efaee93f1b8486e615f0fd307f23080 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50201 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Corentin Wallez <cwallez@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
b3c371031c
commit
b5652c75d2
@@ -215,6 +215,7 @@ namespace dawn_native {
|
||||
DmaBuf,
|
||||
IOSurface,
|
||||
DXGISharedHandle,
|
||||
EGLImage,
|
||||
};
|
||||
|
||||
// Common properties of external images
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#ifndef DAWNNATIVE_OPENGLBACKEND_H_
|
||||
#define DAWNNATIVE_OPENGLBACKEND_H_
|
||||
|
||||
typedef void* EGLImage;
|
||||
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
@@ -38,6 +40,16 @@ namespace dawn_native { namespace opengl {
|
||||
DAWN_NATIVE_EXPORT WGPUTextureFormat
|
||||
GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain);
|
||||
|
||||
struct DAWN_NATIVE_EXPORT ExternalImageDescriptorEGLImage : ExternalImageDescriptor {
|
||||
public:
|
||||
ExternalImageDescriptorEGLImage();
|
||||
|
||||
::EGLImage image;
|
||||
};
|
||||
|
||||
DAWN_NATIVE_EXPORT WGPUTexture
|
||||
WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor);
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
|
||||
#endif // DAWNNATIVE_OPENGLBACKEND_H_
|
||||
|
||||
Reference in New Issue
Block a user