This patch provides two useful changes to the ut_renderer
unit-test program:
1/ the ability to control the GL window dimensions with
two env. variables: ANDROID_WINDOW_WIDTH and ANDROID_WINDOW_HEIGHT
2/ the ability to save/restore the GL window position between
GL connections.
Both are useful to use ut_renderer in a demo setting, nothing more.
Change-Id: I19a8f911ee821ddc4eb6307de12d63600ff696b0
The previous changes replaced /system/lib/libGLES_emul.so with
several other libraries (lib{EGL, GLESv1_CM, GLESv2}_emul.so).
The clean step removes the old libGLES_emul.so from the build to
avoid any surprises.
Change-Id: I285b34c4d5f5a8bd3b37d9cb1b2da33fb155e62c
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
This change fixes bugs in the encoder and decoder code generation
with nullAllowed flaged parameters
Change-Id: I7b196fbb41bbb2cfaa429e7c1dde3a415778ee51
Ensure a server connection creation on make current, for cases where
the context and surface was created on a seperate thread.
In addition this commit publishes all the surface as ES2 capable
if queried.
Change-Id: Ie415b8ab3e370fa7fe97a526276e333aaa5e9e8b
Handle GLESv2 rendering in the emulator:
* load and initialize GLESv2 encoder library
* hide request for GLESv2 surfaces and contexts from the emulator
native implementation
* communicate the context/surface version configuration to the rendering
server
Change-Id: I9226275fc4a24983767735bdf19ddafbe9d07f34
Make the unit test renderer (ut_renderer) encode GLESv2 commands.
A rendering thread has both V1 & V2 decoder object, and tryies to decode
commands of the two protocols from the stream.
Context creating is taking into account the API version and creates context
accordingly.
Decoder data is shared between the V1 & V2 decoders and applied to both of
them on makeCurrent (regardless to the requested context version)
Change-Id: If78e84310e5dcd22108c19656051b138b22e3c9f
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
Use seperate EGL_emul, GLESv1_CM_emul and GLESv2_emul implementation
libraries. This replaces GLES_emul that was prviously included
EGL and GLESv1.
This change enables the wrapper to support GLESv2. However,
this current EGL implementation uses the native android emulator
EGL thus will not expose this GLESv2 capability.
Change-Id: Ib0a309d71cce1248efe9a08aa59434101d0ac607
Add functionality to generate a wrapper library. A wrapper library includes:
1. entry points
2. dispatch table (accessed from the library entry points)
3. dispatch table accessor callback
4. dispatch table initialization function
Note that the dispatch table initialization function used to be part of the decoder. This
change moves it to be part of the dispatch table layer where it belongs.
Change-Id: Ide6764a17cc029056f9946e778a513cdc2a49003
Match the location type in the decoder context data to take
int locations rather then symbolic constants.
Change-Id: I353e43315c90dbeafe4820a3749a0d1cf0848d4b
make the number of suppoted vertex attributes (by the codec)
common across the encoder and the decoder.
Change-Id: I699ef62821566cec0764982872adb92ebb8861e9
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 fixes several issues when building the host libraris on Darwin.
Note that there is still not proper implementation of backend functions.
Change-Id: I3ba4120df6545a8c2aa62fdfcaadaf5ff4972456
This is the EGL implementation for the host EGL/GLES translator.
EglImp.cpp - includes the EGL entry points implementation.
ThreadInfo.cpp - defines the per-thread info which is shared to EGL and GLES
EglOsApi.h - platform dependant interface functions.
EglLinuxApi.cpp - implements the GLX platform of EglOsApi
EglWindowsApi.cpp - implenents the Windows platform of EglOsApi - This has not been compiled yet!!!
Change-Id: I30a8cf457858ef04febf67005787d8d18e5e7a70
This is the GLESv1 on top of OpenGL implementation on the host.
GLDispatch - dispatch table to host OpenGL implementation.
GLESimp - includes GLES entry points implementation.
Change-Id: Ief5eac2253a5a98b75a5d76363a36b7587d17391
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 sample program simulates the use of the renderer api as it should
be used from the emulator program. It opens a SDL window, initialize the
renderer, process events on the window and terminate the renderer when the
window is closed.
Change-Id: If983b4ce6465dee71f548e8edaf2b56b6443f7b0
This is the host renderer executable. It is a small process which
just calls into libOpenglRender library. The process is invoked
through the initOpenGLRenderer function of libOpenglRenderer.
Change-Id: I85af075b5eb751ffb9543ecbd8e7fc155054f146
This is a library which includes all the OpenGL renderer functionality,
it is packaged in a library so that both the renderer process and the emulator
program will be able to use that functionality.
NOTES:
1) gl_proc.h and GLDispatch.{h,cpp} in this commit will be replaced
with the decoder auto-generated dispatch in a later commit, the
auto-generated dispatch is currently missing some extension functions
required for the renderer.
2) look at host/include/libOpenglRender/render_api.h for the external
interface defined for this library (to be used by the emulator).
The following is a description of each component:
FrameBuffer - The main object which manages the framebuffer and color buffers.
This is a singleton which get initialized through its initialize
static function. It initializes the OpenGL renderer and must be
called first. This initialization function is not thread safe so
it must be called before any thread that is calling to this
library is created.
FBConfig - Includes a static set of configs supported by the renderer which get
initialized during FrameBuffer initialization phase. Also,
an instance of this class includes the a description of one frame
buffer configuration supported by the renderer.
RenderContext - encapsulate a rendering context state.
ColorBuffer - implements a color buffer object as a texture which can be bind
as render target or source.
WindowSurface - implements the functionality of a native window which can be
bound to a rendering context and its target ColorBuffer can
be specified and replaced.
ThreadInfo - holds per-thread information.
EGLDispatch - loads the EGL plugin library, all egl calls are made through
this dispatch table which get initialized during initialization
phase.
GLDispatch - loads the GLES plugin library, all GLES calls are made through
this dispatch table which get initialized during initialization
phase - This will be replaced by the auto-generated code of the
decoder ...
RenderThread - implements a thread that reads command tokens from an IOStream
and decode it.
RenderControl - implements the host side implementation of the renderControl
API, when a renderControl token is decoded from the stream
it is dispatched to this implementation.
RenderServer - implements a TCP server which listens to port number and
launcges a RenderThread for each new connection.
Change-Id: I9f34d17bdfcb715893a13cd30086c767f499df87
This is just a set of OS dependant functionality needed by the
emulator OpenGL host renderer. It currently has implementation for
Linux and Windows only.
osDynLibrary - dlopen/dlsym abstraction
osProcess - interface to launch a new process, wait and kill it.
osThread - abstraction interface for creating a thread.
Change-Id: Ib0264592d8c87e865da87acf5c94e2b331801ca4
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