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 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
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 patch modifies the guest libraries to use the new
fast qemu "opengles" pipe to communicate with the host
renderer process.
Note that the renderer is still listening on a TCP socket
on port 22468.
Change-Id: I6ab84f972a8024e1fdababa4615d0650c8d461bf
Conflicts:
tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
tools/emulator/opengl/tests/gles_android_wrapper/ServerConnection.h
glShaderSource strings are concatenated into a single string
before sent over the wire protocol. The wire protocol transfer is
done using a special api call 'glShaderString'
Change-Id: I90c157df66fe82fee17c460a1e7852d370c77088
Shader strings are sent over the wire protocal as one concatenated
string. a special api call - glShaderString is used to handle the
encoding and decoding of this string.
Change-Id: Id682763f35e9fcc6215559931db2112a4fa981a9
Extends GLClientState to support additional state data
that is required by GLESv2. this includes:
* normalized flag in vertex attribute arrays
* getter for vertex attribute arrays state
* glParamSize now knows about the result size of GL2 parameters
* utility functions required for a GLESv2 encoder
Change-Id: I7e57d978bed5b8b929b918aee66c7f71dc5df3b1
This fix adds support for OpenGLES 1.1 extensions in the codec
layer. This fix also includes bug fixes in GLEncoder (client-state)
and gles android wrapper modules.
Change-Id: I512649724d43e4af9d3ce5d49ae66d9f4da0b823
This is the emulator opengl implementation of gralloc.
NOTE that it is currently build only if BUILD_EMULATOR_OPENGL_DRIVER
is defined, This is because the other driver peices (EGL/GLES) are
still missing.
Change-Id: If48f5ed619df6efb00cb4e590d99ce49d87875f6
This is a static library of utilities shared between the emulator opengl
system components, gralloc, EGL, GLES. In includes host connection functionality
and access to OpenGL TLS info.
Change-Id: Ic63a6f7384a2035308ca6d316c747f0e6c6f2ef3
That adds the renderControl API encoder/decoder which is used for
guest to host control commands. See system/renderControl_enc/README
for more info about the API itself.
Change-Id: I2c72803137889d646fbb3d2a56ecdcf94b088f40
This change includes four changes:
1) moved IOStream.h into host/include/libOpenGLRender, this directory
will include the api interface into the libOpenGLRender which will be
used later by the emulator and we need this interface to use IOStream.h
2) Updated Andorid.mk files to include the new directory location of IOStream.h
in the LOCAL_C_INCLUDE.
3) Added new function "read" to IOStream which reads a message without a givven
size.
4) Updated TcpStream to use "cutils/sockets.h" instead of using directly the socket api for portability reasons. (It now compiles on windows as well).
Change-Id: I30eb40c8dcd5aacf0d993aff9cdb90b283b12dde
Moved 'isPointer' attribute from variable to type field.
The .types input file now includes new column specifying if a type is a pointer or not
previously emugen declared as pointer only types which included '*' character but did not
process well the case of 'char **' (pointer to pointer).
Fixed the gl.types and ut_rendercontrol.types accordingly.
Few other fixes to gl.attrib and gl.in.
Change-Id: Ifd3591119dfa504703c68556802a40e38fe4940e
Move system/OpenglCodecCommon into shared/OpenglCodecCommon so it's code
can be shared among more components of the project.
Move tests/ut_renderer/TimeUtils.* into a the common area
Annotate ErrLog.h and GLDecoderContextData.h with the project license statement
Change-Id: Ieea42e95edd5ad89fda4cfa40356a012304ee976
This change the opengl target side encoder library (libGLESv1_enc)
The library includes api definition files for 'emugen' code generation
tool and a serrounding code to handle opengl specific sematics (such as client state)
tracking
Change-Id: I8708b945c8c9c7fbe06147b703bdee27a576c7a0
This change adds the libOpenglCodecCommon, which holds
shared code between the encoder and the decoder parts of the opengl
codec. The library is built as static with both a target version and
a host version.
Change-Id: I163eea8fdb635620e6cde9d1d75c3e7369953213