Skip to content

Commit

Permalink
Bug 1717151 - Move EGL_EXT_device_query from device exts to client ex…
Browse files Browse the repository at this point in the history
…ts. r=gfx-reviewers,lsalzman

This moved due to a fix in ANGLE 56663dbfa78 on 2020-nov-19.

Differential Revision: https://phabricator.services.mozilla.com/D125748
  • Loading branch information
kdashg committed Sep 16, 2021
1 parent 5d9ba6c commit ad26ba8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions gfx/gl/GLLibraryEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ namespace gl {

// should match the order of EGLExtensions, and be null-terminated.
static const char* sEGLLibraryExtensionNames[] = {
"EGL_ANDROID_get_native_client_buffer", "EGL_ANGLE_device_creation",
"EGL_ANGLE_device_creation_d3d11", "EGL_ANGLE_platform_angle",
"EGL_ANGLE_platform_angle_d3d"};
"EGL_ANDROID_get_native_client_buffer",
"EGL_ANGLE_device_creation",
"EGL_ANGLE_device_creation_d3d11",
"EGL_ANGLE_platform_angle",
"EGL_ANGLE_platform_angle_d3d",
"EGL_EXT_device_query"};

// should match the order of EGLExtensions, and be null-terminated.
static const char* sEGLExtensionNames[] = {
Expand All @@ -71,7 +74,6 @@ static const char* sEGLExtensionNames[] = {
"EGL_KHR_create_context",
"EGL_KHR_stream",
"EGL_KHR_stream_consumer_gltexture",
"EGL_EXT_device_query",
"EGL_NV_stream_consumer_gltexture_yuv",
"EGL_ANGLE_stream_producer_d3d_texture",
"EGL_KHR_surfaceless_context",
Expand Down
4 changes: 2 additions & 2 deletions gfx/gl/GLLibraryEGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ enum class EGLLibExtension {
ANGLE_device_creation_d3d11,
ANGLE_platform_angle,
ANGLE_platform_angle_d3d,
EXT_device_query,
Max
};

Expand All @@ -94,7 +95,6 @@ enum class EGLExtension {
KHR_create_context,
KHR_stream,
KHR_stream_consumer_gltexture,
EXT_device_query,
NV_stream_consumer_gltexture_yuv,
ANGLE_stream_producer_d3d_texture,
KHR_surfaceless_context,
Expand Down Expand Up @@ -761,7 +761,7 @@ class EglDisplay final {

// EXT_device_query
EGLBoolean fQueryDisplayAttribEXT(EGLint attribute, EGLAttrib* value) const {
MOZ_ASSERT(IsExtensionSupported(EGLExtension::EXT_device_query));
MOZ_ASSERT(mLib->IsExtensionSupported(EGLLibExtension::EXT_device_query));
return mLib->fQueryDisplayAttribEXT(mDisplay, attribute, value);
}

Expand Down
2 changes: 1 addition & 1 deletion gfx/webrender_bindings/RenderCompositorANGLE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ID3D11Device* RenderCompositorANGLE::GetDeviceOfEGLDisplay(nsACString& aError) {
const auto& gle = gl::GLContextEGL::Cast(gl);
const auto& egl = gle->mEgl;
MOZ_ASSERT(egl);
if (!egl || !egl->IsExtensionSupported(gl::EGLExtension::EXT_device_query)) {
if (!egl || !egl->mLib->IsExtensionSupported(gl::EGLLibExtension::EXT_device_query)) {
aError.Assign("RcANGLE(no EXT_device_query support)"_ns);
return nullptr;
}
Expand Down

0 comments on commit ad26ba8

Please sign in to comment.