[Webkit-unassigned] [Bug 248032] New: [WPE][GTK] TextureMapperPlatformLayerDmabuf.cpp:107:5: error: 'glEGLImageTargetTexture2DOES' was not declared in this scope
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 17 05:28:28 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=248032
Bug ID: 248032
Summary: [WPE][GTK] TextureMapperPlatformLayerDmabuf.cpp:107:5:
error: 'glEGLImageTargetTexture2DOES' was not declared
in this scope
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at gnome.org
CC: bugs-noreply at webkitgtk.org, magomez at igalia.com,
zdobersek at igalia.com
WebKitGTK 2.39.1 does not build in Fedora rawhide or in GNOME master:
/builddir/build/BUILD/webkitgtk-2.39.1/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp: In member function 'void WebCore::TextureMapperPlatformLayerDmabuf::validateTexture()':
/builddir/build/BUILD/webkitgtk-2.39.1/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp:107:5: error: 'glEGLImageTargetTexture2DOES' was not declared in this scope
107 | glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/webkitgtk-2.39.1/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp: In static member function 'static std::unique_ptr<WebCore::TextureMapperPlatformLayerProxyDMABuf::DMABufLayer::EGLImageData> WebCore::TextureMapperPlatformLayerProxyDMABuf::DMABufLayer::createEGLImageData(WebCore::DMABufObject&)':
/builddir/build/BUILD/webkitgtk-2.39.1/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:323:9: error: 'glEGLImageTargetTexture2DOES' was not declared in this scope
323 | glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, data.image[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
(There might be more such failures.)
My local builds work perfectly fine, though.
Looking in GL/gl.h, I see this:
#ifndef GL_OES_EGL_image
#define GL_OES_EGL_image 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
#endif
typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
This suggests that WebKit needs to define GL_GLEXT_PROTOTYPES before including the header if it wants to get this declaration, but we don't do that anywhere. I am testing a build with -DGL_GLEXT_PROTOTYPES=1 now to see if it works. As to where we should define this value... I suppose it would need to be at the very top of OpenGLShims.h.
I'm not sure why WebKit builds properly for me locally.
Guess #1: different unified source bundles? WebKit does define GL_GLEXT_PROTOTYPES to 0 in ANGLEHeaders.h. That's surely intended to turn it off, but actually turns it on because gl.h only checks whether it is defined, not what its value is. That ANGLEHeaders.h contains a warning:
// Note: this file can't be compiled in the same unified source file
// as others which include the system's OpenGL headers.
If we were to fail to respect that rule, then it could accidentally make the declaration of glEGLImageTargetTexture2DOES available.
Guess #2: when WebKit builds successfully, it's not actually including the system GL/gl.h (which seems to be desired), but is instead including ANGLE's from Source/ThirdParty (by accident?).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221117/43f7e053/attachment.htm>
More information about the webkit-unassigned
mailing list