Added a return value for rcFlushWindowColorBuffer and
rcUpdateColorBuffer in order to make those calls to block
with a round-trip to the host. This is to make sure that
the color buffer is up-to-date before the flinger use it
for rendering.
Also added a call to the native windows's lock function after
EGL is attached and bound to render on the window. This call
was missed before.
This syncronization can be optimized by removing the round-trip
and insert sync primitive to the stream at every draw command that
reads from a color buffer to make the sync happen on the host
before rendering the color buffer and remove the need for the
guest to wait for that update.
Change-Id: I1c2d8bc407b69663e992a68d5aa755f19bbe0ec3
The config_size argument in rcChooseConfig should match the number
of requested configs and not the size in bytes to store it.
Moved the configs array size computation into rendeerControl.attrib.
Change-Id: I9e797024522965a656764c20252b25ff5ae657f5
This fix performs a flip software copy to match our coords with those expected by the flinger.
We may think of a better implementation in the future.
Change-Id: Ic09a5d0e22f7e209b33c07c993a3d56e328dd3ed
This patch is a major rework of the build opengl-emulation
build scripts. See README for details.
In a nutshell, this introduces various functions that considerably
simplify the declaration of the 26+ modules in this implementation,
by handling auto-generation of sources and module imports/exports.
Change-Id: I827522d783c7b6cf5eafd37204a1025c235458cd
Fixed bug in list implementation in gralloc_free which caused a crash,
also removed some log prints.
Change-Id: Ie932c838086c99567643868682419ceb122cf787
Added rcGetGLString token to renderControl to query
a GL string constant from the current context from the host.
Implement glGetString functinality in EGL so that the string
value can be cached in the context structure and also
implementation can be shared between GLESv1 and GLESv2.
Also, fixed clientAPI context initialization check in
eglMakeCurrent. The check was for the previously bounded
context instead for the newly bounded context.
Change-Id: I41c0b4ad462c9ad5bd5c66719b41509bb1b7a947
Initialize EGL extensions functions in the EGLDispatch
table using eglGetProcAddress instead of dlsym.
(try dlsym if eglGetProcAddress failed).
Change-Id: I256c4c5f9f3728a5b0e4d5bbcc75b83aa8a85f29
Fixed eglGetProcAddress when called for egl
extension functions.
Also fixed a typo in the EGL extension string.
Change-Id: Ia081257fa641182246eec723d08ae2e9148ca0cc
The created texture format which represents the color buffer must
be of type GL_RGB or GL_RGBA also for the 565/5551 surface formats.
Change-Id: I7799a4824a0a5b8d57e3bfc507cac5664340725e
When re-binding the same context the resoult was that the
surfaces got unbinded from the context.
Fixed that situation and added an optimization to do nothing
in case of re-binding the same context to the same binded surfaces.
Change-Id: Ic7058723399b0807d902c29b4170c7465c02bb99
Those are the host side fixups required for the system to load
without failure to the point of bootanimation is run.
Change-Id: I42eebb123b05aaf6a0671e91e77a4ba6b330b852
- fix destructor of eglcontext to delete its share group if needed
- fix available eglconfigs not to choose configs with BUFFER_SIZE=0
or configs which do not support RGBA
- fix conformant bit on eglconfig
- fix typo in glBindBuffer
- fix glVertexAttribPointer to send correct offset to GL with vbo
Change-Id: I69d980407a40cb371ec62c5c883e4190bdcfce72
Also changed emugen to generates gl_ftable.h needed for
getProcAddress implementation.
Added not_api attrib to emugen's gl.attrib to exclude from the
generated ftable.
Change-Id: I03786ea5d5a640bbcf5efccadca5bf2ec3e09fca
This is the first commit for the GLESv1 implementation.
It also includes needed fixes in emugen to support const types.
Also, changed glFinish definition in gl.in to match the
definition as in gl.h.
Change-Id: I90262a1db6035a90af8db17984acecef6499847a
We need to share the cb_hande_t between gralloc/EGL/GLES, moved it
into the opengl system common lib.
Also added eglSwapBuffers implementation.
Change-Id: Ia461a48c273af42293aafcf084e457adf03cbed3
This change turns GLcommon to be static instead of shared
library.
Removed the s_globalNameSpace static object from objectNameManager
and moved it to live inside the EglDisplay object which is shared
for all display space objects (GLESv1, GLESv2 and EGL).
Change-Id: I92fa71fb7cbac423c22b7188e8d9642a5fddf0d9
Some native types like NativeFBConfig and NativeContext are
internal to the translator implementation and should not
exist in the interface headers.
Moved those types from eglplatform.h into eglinternalplatfom.h
Change-Id: I6462a007de8c185deecbb9beebc343ca3626fd0c
Initialize the GLDispatch with dummy function instead of
NULL pointer in case the function does not present on the
host OpenGL library. Prevent ugly segfault when a call to
such function is made.
Change-Id: I3488e60e091af06273a5680accabb7fe30fab066
There are some differences between GLSL/ES and Desktop
GLSL. This change translate the GLSL/ES shader source
to be compatible with the desktop GLSL language.
Change-Id: Ia6fdd6a90944926adcf440299b9ea3a4500d1eb1
fixing bug in eglChooseConfig, there was no referer to
EGL_RENDERABLE_TYPE this caused the eglChooseConfig to fail
when an attribute EGL_RENDERABLE_TYPE was specified in
the attrib_list
Change-Id: Ib4635a55ef3cc0ff380e581d4a41602ddfd32f82
load necessary functions from gl dispatch for gles2
fix usage of global names in some functions
combine the shaders and programs namespace to one
Change-Id: I92bd90a91a5840fcceebd05ab06bebb65bb415a0