Commit 168445c2 by Geoff Lang Committed by Commit Bot

Add an extension for requesting a NULL Display.

BUG=angleproject:1468 Change-Id: Ief4b0e7d7a0420e59e547cd24fde53deb3718ccb Reviewed-on: https://chromium-review.googlesource.com/388845 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent d08f3b3d
Name
ANGLE_platform_angle_null
Name Strings
EGL_ANGLE_platform_angle_null
Contributors
Geoff Lang, Google
Contacts
Geoff Lang, Google (geofflang 'at' google 'dot' com)
Status
Draft
Version
Version 1, September 23, 2016
Number
EGL Extension #??
Extension Type
EGL client extension
Dependencies
Requires ANGLE_platform_angle.
Overview
This extension enables selection of null display types which perform state
tracking and validation but do not render any content.
New Types
None
New Procedures and Functions
None
New Tokens
Accepted as values for the EGL_PLATFORM_ANGLE_TYPE_ANGLE attribute:
EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE
Additions to the EGL Specification
None.
New Behavior
To request a display that performs no rendering and has no platform
dependencies, the value of EGL_PLATFORM_ANGLE_TYPE_ANGLE should be
EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE.
Issues
None
Revision History
Version 1, 2016-09-23 (Geoff Lang)
- Initial draft
...@@ -526,6 +526,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu ...@@ -526,6 +526,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu
#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E
#endif /* EGL_ANGLE_platform_angle_opengl */ #endif /* EGL_ANGLE_platform_angle_opengl */
#ifndef EGL_ANGLE_platform_angle_null
#define EGL_ANGLE_platform_angle_null 1
#define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE
#endif /* EGL_ANGLE_platform_angle_null */
#ifndef EGL_ANGLE_window_fixed_size #ifndef EGL_ANGLE_window_fixed_size
#define EGL_ANGLE_window_fixed_size 1 #define EGL_ANGLE_window_fixed_size 1
#define EGL_FIXED_SIZE_ANGLE 0x3201 #define EGL_FIXED_SIZE_ANGLE 0x3201
......
...@@ -867,6 +867,7 @@ std::vector<std::string> ClientExtensions::getStrings() const ...@@ -867,6 +867,7 @@ std::vector<std::string> ClientExtensions::getStrings() const
InsertExtensionString("EGL_ANGLE_platform_angle", platformANGLE, &extensionStrings); InsertExtensionString("EGL_ANGLE_platform_angle", platformANGLE, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_d3d", platformANGLED3D, &extensionStrings); InsertExtensionString("EGL_ANGLE_platform_angle_d3d", platformANGLED3D, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_opengl", platformANGLEOpenGL, &extensionStrings); InsertExtensionString("EGL_ANGLE_platform_angle_opengl", platformANGLEOpenGL, &extensionStrings);
InsertExtensionString("EGL_ANGLE_platform_angle_null", platformANGLENULL, &extensionStrings);
InsertExtensionString("EGL_ANGLE_device_creation", deviceCreation, &extensionStrings); InsertExtensionString("EGL_ANGLE_device_creation", deviceCreation, &extensionStrings);
InsertExtensionString("EGL_ANGLE_device_creation_d3d11", deviceCreationD3D11, &extensionStrings); InsertExtensionString("EGL_ANGLE_device_creation_d3d11", deviceCreationD3D11, &extensionStrings);
InsertExtensionString("EGL_ANGLE_x11_visual", x11Visual, &extensionStrings); InsertExtensionString("EGL_ANGLE_x11_visual", x11Visual, &extensionStrings);
......
...@@ -639,6 +639,9 @@ struct ClientExtensions ...@@ -639,6 +639,9 @@ struct ClientExtensions
// EGL_ANGLE_platform_angle_opengl // EGL_ANGLE_platform_angle_opengl
bool platformANGLEOpenGL; bool platformANGLEOpenGL;
// EGL_ANGLE_platform_angle_null
bool platformANGLENULL;
// EGL_ANGLE_device_creation // EGL_ANGLE_device_creation
bool deviceCreation; bool deviceCreation;
......
...@@ -53,6 +53,10 @@ ...@@ -53,6 +53,10 @@
# endif # endif
#endif #endif
#if defined(ANGLE_ENABLE_NULL)
#include "libANGLE/renderer/null/DisplayNULL.h"
#endif
namespace egl namespace egl
{ {
...@@ -209,6 +213,12 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const AttributeMap &attribMap) ...@@ -209,6 +213,12 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const AttributeMap &attribMap)
break; break;
#endif #endif
#if defined(ANGLE_ENABLE_NULL)
case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE:
impl = new rx::DisplayNULL();
break;
#endif
default: default:
UNREACHABLE(); UNREACHABLE();
break; break;
...@@ -874,6 +884,10 @@ static ClientExtensions GenerateClientExtensions() ...@@ -874,6 +884,10 @@ static ClientExtensions GenerateClientExtensions()
extensions.platformANGLEOpenGL = true; extensions.platformANGLEOpenGL = true;
#endif #endif
#if defined(ANGLE_ENABLE_NULL)
extensions.platformANGLENULL = true;
#endif
#if defined(ANGLE_ENABLE_D3D11) #if defined(ANGLE_ENABLE_D3D11)
extensions.deviceCreation = true; extensions.deviceCreation = true;
extensions.deviceCreationD3D11 = true; extensions.deviceCreationD3D11 = true;
......
...@@ -197,6 +197,17 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp ...@@ -197,6 +197,17 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp
} }
break; break;
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE:
if (!clientExtensions.platformANGLENULL)
{
SetGlobalError(Error(EGL_BAD_ATTRIBUTE,
"Display type "
"EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE "
"requires EGL_ANGLE_platform_angle_null."));
return EGL_NO_DISPLAY;
}
break;
default: default:
SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); SetGlobalError(Error(EGL_BAD_ATTRIBUTE));
return EGL_NO_DISPLAY; return EGL_NO_DISPLAY;
......
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