Commit c2014bce by Geoff Lang Committed by Commit Bot

Expose eglCreatePlatformWindowSurfaceEXT and eglCreatePlatformPixmapSurfaceEXT

These entry points are part of EGL_EXT_platform_base but were never returned by eglGetProcAddress. BUG=angleproject:2603 Change-Id: I4782df67fa8625a9af29a18df02af7b5fa73d75e Reviewed-on: https://chromium-review.googlesource.com/1075469Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 3f1eba94
......@@ -2344,6 +2344,36 @@ Error ValidateGetPlatformDisplayEXT(EGLenum platform,
return ValidateGetPlatformDisplayCommon(platform, native_display, attribMap);
}
Error ValidateCreatePlatformWindowSurfaceEXT(const Display *display,
const Config *configuration,
void *nativeWindow,
const AttributeMap &attributes)
{
if (!Display::GetClientExtensions().platformBase)
{
return EglBadAccess() << "EGL_EXT_platform_base not supported";
}
ANGLE_TRY(ValidateConfig(display, configuration));
return EglBadDisplay() << "ValidateCreatePlatformWindowSurfaceEXT unimplemented.";
}
Error ValidateCreatePlatformPixmapSurfaceEXT(const Display *display,
const Config *configuration,
void *nativePixmap,
const AttributeMap &attributes)
{
if (!Display::GetClientExtensions().platformBase)
{
return EglBadAccess() << "EGL_EXT_platform_base not supported";
}
ANGLE_TRY(ValidateConfig(display, configuration));
return EglBadDisplay() << "ValidateCreatePlatformPixmapSurfaceEXT unimplemented.";
}
Error ValidateProgramCacheGetAttribANGLE(const Display *display, EGLenum attrib)
{
ANGLE_TRY(ValidateDisplay(display));
......
......@@ -129,6 +129,14 @@ Error ValidateGetPlatformDisplay(EGLenum platform,
Error ValidateGetPlatformDisplayEXT(EGLenum platform,
void *native_display,
const EGLint *attrib_list);
Error ValidateCreatePlatformWindowSurfaceEXT(const Display *display,
const Config *configuration,
void *nativeWindow,
const AttributeMap &attributes);
Error ValidateCreatePlatformPixmapSurfaceEXT(const Display *display,
const Config *configuration,
void *nativePixmap,
const AttributeMap &attributes);
Error ValidateProgramCacheGetAttribANGLE(const Display *display, EGLenum attrib);
......
......@@ -242,6 +242,22 @@ EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, void *native_d
return egl::GetPlatformDisplayEXT(platform, native_display, attrib_list);
}
EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list)
{
return egl::CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
}
EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLint *attrib_list)
{
return egl::CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
}
EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
{
return egl::QueryDisplayAttribEXT(dpy, attribute, value);
......
......@@ -63,6 +63,8 @@ EXPORTS
eglProgramCachePopulateANGLE @69
eglProgramCacheQueryANGLE @70
eglProgramCacheResizeANGLE @71
eglCreatePlatformWindowSurfaceEXT @72
eglCreatePlatformPixmapSurfaceEXT @73
; 1.5 entry points
eglCreateSync @38
......
......@@ -164,6 +164,54 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
}
}
EGLSurface EGLAPIENTRY CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list)
{
EVENT(
"(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, void *native_window = 0x%0.8p, "
"const EGLint *attrib_list = 0x%0.8p)",
dpy, config, native_window, attrib_list);
Thread *thread = GetCurrentThread();
Display *display = static_cast<Display *>(dpy);
Config *configuration = static_cast<Config *>(config);
AttributeMap attributes = AttributeMap::CreateFromIntArray(attrib_list);
ANGLE_EGL_TRY_RETURN(
thread,
ValidateCreatePlatformWindowSurfaceEXT(display, configuration, native_window, attributes),
EGL_NO_SURFACE);
thread->setError(EglBadDisplay() << "CreatePlatformWindowSurfaceEXT unimplemented.");
return EGL_NO_SURFACE;
}
EGLSurface EGLAPIENTRY CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLint *attrib_list)
{
EVENT(
"(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, void *native_pixmap = 0x%0.8p, "
"const EGLint *attrib_list = 0x%0.8p)",
dpy, config, native_pixmap, attrib_list);
Thread *thread = GetCurrentThread();
Display *display = static_cast<Display *>(dpy);
Config *configuration = static_cast<Config *>(config);
AttributeMap attributes = AttributeMap::CreateFromIntArray(attrib_list);
ANGLE_EGL_TRY_RETURN(
thread,
ValidateCreatePlatformPixmapSurfaceEXT(display, configuration, native_pixmap, attributes),
EGL_NO_SURFACE);
thread->setError(EglBadDisplay() << "CreatePlatformPixmapSurfaceEXT unimplemented.");
return EGL_NO_SURFACE;
}
// EGL_EXT_device_query
EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib *value)
{
......
......@@ -24,6 +24,14 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface s
// EGL_EXT_platform_base
ANGLE_EXPORT EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLint *attrib_list);
// EGL_EXT_device_query
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
......
......@@ -40,7 +40,9 @@ ProcEntry g_procTable[] = {
{"eglCreatePbufferSurface", P(egl::CreatePbufferSurface)},
{"eglCreatePixmapSurface", P(egl::CreatePixmapSurface)},
{"eglCreatePlatformPixmapSurface", P(egl::CreatePlatformPixmapSurface)},
{"eglCreatePlatformPixmapSurfaceEXT", P(egl::CreatePlatformPixmapSurfaceEXT)},
{"eglCreatePlatformWindowSurface", P(egl::CreatePlatformWindowSurface)},
{"eglCreatePlatformWindowSurfaceEXT", P(egl::CreatePlatformWindowSurfaceEXT)},
{"eglCreateStreamKHR", P(egl::CreateStreamKHR)},
{"eglCreateStreamProducerD3DTextureANGLE", P(egl::CreateStreamProducerD3DTextureANGLE)},
{"eglCreateSync", P(egl::CreateSync)},
......@@ -1231,5 +1233,5 @@ ProcEntry g_procTable[] = {
{"glWeightPointerOES", P(gl::WeightPointerOES)},
{"glWeightPointerOESContextANGLE", P(gl::WeightPointerOESContextANGLE)}};
size_t g_numProcs = 1163;
size_t g_numProcs = 1165;
} // namespace egl
......@@ -776,7 +776,9 @@
],
"EGL_EXT_platform_base": [
"eglGetPlatformDisplayEXT"
"eglGetPlatformDisplayEXT",
"eglCreatePlatformWindowSurfaceEXT",
"eglCreatePlatformPixmapSurfaceEXT"
],
"EGL_EXT_device_query": [
......
......@@ -149,7 +149,6 @@
1340 WIN : dEQP-EGL.functional.negative_api.swap_interval = FAIL
2382 WIN : dEQP-EGL.functional.native_color_mapping.native_window.* = SKIP
1340 WIN : dEQP-EGL.functional.native_coord_mapping.native_window.* = FAIL
1340 WIN : dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base = FAIL
1340 WIN : dEQP-EGL.functional.preserve_swap.preserve.no_read_before_swap.* = SKIP
1340 WIN : dEQP-EGL.functional.preserve_swap.preserve.read_before_swap.* = SKIP
1340 WIN : dEQP-EGL.functional.resize.back_buffer.* = SKIP
......@@ -191,7 +190,6 @@
2546 LINUX : dEQP-EGL.functional.render.single_context.gles2.rgba8888_pixmap = SKIP
2546 LINUX : dEQP-EGL.functional.render.single_context.gles3.rgba8888_pixmap = SKIP
2546 LINUX : dEQP-EGL.functional.thread_cleanup.* = SKIP
2546 LINUX : dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base = FAIL
2546 LINUX : dEQP-EGL.functional.native_color_mapping.native_window.* = FAIL
2546 LINUX : dEQP-EGL.functional.native_coord_mapping.native_window.* = FAIL
2546 LINUX : dEQP-EGL.functional.negative_api.choose_config = FAIL
......@@ -200,7 +198,6 @@
2546 LINUX : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_no_depth_no_stencil = FAIL
// Mac failures
2546 MAC : dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base = FAIL
2546 MAC : dEQP-EGL.functional.native_color_mapping.native_window.* = FAIL
2546 MAC : dEQP-EGL.functional.native_coord_mapping.native_window.* = FAIL
2546 MAC : dEQP-EGL.functional.negative_api.choose_config = FAIL
......@@ -221,7 +218,6 @@
2546 ANDROID : dEQP-EGL.functional.color_clears.multi_context.* = FAIL
2546 ANDROID : dEQP-EGL.functional.color_clears.multi_thread.* = FAIL
2546 ANDROID : dEQP-EGL.functional.color_clears.single_context.* = FAIL
2546 ANDROID : dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base = FAIL
2546 ANDROID : dEQP-EGL.functional.native_color_mapping.native_window.* = FAIL
2546 ANDROID : dEQP-EGL.functional.native_coord_mapping.native_window.* = FAIL
2546 ANDROID : dEQP-EGL.functional.negative_api.choose_config = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment