Commit 4c06817a by Corentin Wallez Committed by Commit Bot

Add support for targetting GLES with DisplayGLX.

BUG=angleproject:1145 Change-Id: I3072c31f2f743943b2ed9a3b1a020529112d5f71 Reviewed-on: https://chromium-review.googlesource.com/324091Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 2e5dd41c
...@@ -180,6 +180,8 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const AttributeMap &attribMap) ...@@ -180,6 +180,8 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const AttributeMap &attribMap)
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE: case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
#if defined(ANGLE_PLATFORM_WINDOWS) #if defined(ANGLE_PLATFORM_WINDOWS)
impl = new rx::DisplayWGL(); impl = new rx::DisplayWGL();
#elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX();
#else #else
// No GLES support on this platform, fail display creation. // No GLES support on this platform, fail display creation.
impl = nullptr; impl = nullptr;
......
...@@ -89,13 +89,18 @@ class DisplayGLX : public DisplayGL ...@@ -89,13 +89,18 @@ class DisplayGLX : public DisplayGL
private: private:
const FunctionsGL *getFunctionsGL() const override; const FunctionsGL *getFunctionsGL() const override;
glx::Context initializeContext(glx::FBConfig config, const egl::AttributeMap &eglAttributes); egl::Error initializeContext(glx::FBConfig config,
const egl::AttributeMap &eglAttributes,
glx::Context *context);
void generateExtensions(egl::DisplayExtensions *outExtensions) const override; void generateExtensions(egl::DisplayExtensions *outExtensions) const override;
void generateCaps(egl::Caps *outCaps) const override; void generateCaps(egl::Caps *outCaps) const override;
int getGLXFBConfigAttrib(glx::FBConfig config, int attrib) const; int getGLXFBConfigAttrib(glx::FBConfig config, int attrib) const;
glx::Context createContextAttribs(glx::FBConfig, const std::vector<int> &attribs) const; egl::Error createContextAttribs(glx::FBConfig,
gl::Version version,
int profileMask,
glx::Context *context) const;
FunctionsGL *mFunctionsGL; FunctionsGL *mFunctionsGL;
...@@ -112,6 +117,8 @@ class DisplayGLX : public DisplayGL ...@@ -112,6 +117,8 @@ class DisplayGLX : public DisplayGL
bool mIsMesa; bool mIsMesa;
bool mHasMultisample; bool mHasMultisample;
bool mHasARBCreateContext; bool mHasARBCreateContext;
bool mHasARBCreateContextProfile;
bool mHasEXTCreateContextES2Profile;
enum class SwapControl enum class SwapControl
{ {
......
...@@ -116,6 +116,9 @@ ...@@ -116,6 +116,9 @@
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
// GLX_EXT_create_context_es2_profile
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
// GLX_EXT_texture_from_pixmap // GLX_EXT_texture_from_pixmap
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
......
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