diff options
author | Lizhe Liu <lizhe.liu@intel.com> | 2015-07-15 16:49:04 +0800 |
---|---|---|
committer | Lizhe Liu <lizhe.liu@intel.com> | 2015-07-15 17:47:52 +0800 |
commit | 602da6a4afdddefd6dc398e5a01e6760ff10bf72 (patch) | |
tree | 9cb0c5242f64a3c1e0c350d420694b5de16d338a | |
parent | 0caa83f47f73dca0f99fcccb1b5f19fd2c20e4e0 (diff) | |
download | qemu-602da6a4afdddefd6dc398e5a01e6760ff10bf72.tar.gz |
Better support for openGLES 2.0 extensions
Using the OpenGL extensions mechanism, it allows software developers
to access additional performance for rendering. In classic emulator,
extensions based on host OS. So we should add more keywords there to
make better support for it.
Change-Id: Ic663170428a785b7f8cdb66e1c14f3993caf0b85
Signed-off-by: Lizhe Liu <lizhe.liu@intel.com>
3 files changed, 16 insertions, 3 deletions
diff --git a/distrib/android-emugl/host/libs/Translator/GLES_V2/GLESv2Context.cpp b/distrib/android-emugl/host/libs/Translator/GLES_V2/GLESv2Context.cpp index 02c7276737..a49cefa465 100644 --- a/distrib/android-emugl/host/libs/Translator/GLES_V2/GLESv2Context.cpp +++ b/distrib/android-emugl/host/libs/Translator/GLES_V2/GLESv2Context.cpp @@ -155,9 +155,18 @@ void GLESv2Context::initExtensionString() { if (s_glSupport.GL_OES_STANDARD_DERIVATIVES) *s_glExtensions+="GL_OES_standard_derivatives "; if (s_glSupport.GL_OES_TEXTURE_NPOT) - *s_glExtensions+="GL_OES_texture_npot"; - if (s_glSupport.GL_OES_RGB8_RGBA8) { - *s_glExtensions+=" GL_OES_rgb8_rgba8"; + *s_glExtensions+="GL_OES_texture_npot "; + if (s_glSupport.GL_OES_RGB8_RGBA8) + *s_glExtensions+="GL_OES_rgb8_rgba8 "; + if (s_glSupport.GL_OES_READ_FORMAT) + *s_glExtensions+="GL_OES_read_format "; + if (s_glSupport.GL_EXT_TEXTURE_STORAGE) + *s_glExtensions+="GL_EXT_texture_storage "; + if (s_glSupport.GL_EXT_TEXTURE_FORMAT_BGRA8888) + *s_glExtensions+="GL_EXT_texture_format_BGRA8888 "; + if (s_glSupport.GL_EXT_FRAMEBUFFER_OBJECT) { + *s_glExtensions+="GL_OES_framebuffer_object GL_OES_depth24 GL_OES_depth32 GL_OES_fbo_render_mipmap " + "GL_OES_rgb8_rgba8 GL_OES_stencil1 GL_OES_stencil4 GL_OES_stencil8 "; } } diff --git a/distrib/android-emugl/host/libs/Translator/GLcommon/GLEScontext.cpp b/distrib/android-emugl/host/libs/Translator/GLcommon/GLEScontext.cpp index ab37ca97ed..d460de56ff 100644 --- a/distrib/android-emugl/host/libs/Translator/GLcommon/GLEScontext.cpp +++ b/distrib/android-emugl/host/libs/Translator/GLcommon/GLEScontext.cpp @@ -518,6 +518,9 @@ void GLEScontext::initCapsLocked(const GLubyte * extensionString) s_glSupport.glslVersion = Version((const char*)(glslVersion)); const GLubyte* glVersion = s_glDispatch.glGetString(GL_VERSION); + if (strstr(cstring,"GL_EXT_texture_storage ")!=NULL) + s_glSupport.GL_EXT_TEXTURE_STORAGE = true; + if (strstr(cstring,"GL_EXT_bgra ")!=NULL) s_glSupport.GL_EXT_TEXTURE_FORMAT_BGRA8888 = true; diff --git a/distrib/android-emugl/host/libs/Translator/include/GLcommon/GLEScontext.h b/distrib/android-emugl/host/libs/Translator/include/GLcommon/GLEScontext.h index d6c6105930..5621fbc108 100644 --- a/distrib/android-emugl/host/libs/Translator/include/GLcommon/GLEScontext.h +++ b/distrib/android-emugl/host/libs/Translator/include/GLcommon/GLEScontext.h @@ -83,6 +83,7 @@ struct GLSupport { bool GL_OES_STANDARD_DERIVATIVES; bool GL_OES_TEXTURE_NPOT; bool GL_OES_RGB8_RGBA8; + bool GL_EXT_TEXTURE_STORAGE; }; |