Commit Graph

135 Commits

Author SHA1 Message Date
Amit Feller
fce7b684b1 integrating objectNameManger into GLES implementation
Change-Id: Icda250f9e9d3af15a2d7c214136b777833d5596d
2011-04-29 22:10:43 +02:00
Amit Feller
a245cb125f Emulator's host translator EGL implementation.
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
2011-04-29 22:10:43 +02:00
Amit Feller
03dcd431cc Emulator's GLES translator implementation.
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
2011-04-29 22:10:43 +02:00
Liran
fb06a28c30 GLESv1 extensions
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
2011-04-28 09:24:46 +03:00
David Turner
eff952cdbf Really fix the Mac build.
Damned!

Change-Id: Ice8295fb23beefe328207112b011489276b5b278
2011-04-16 22:21:57 +02:00
David Turner
427cb6c3b0 Fix mac build
Change-Id: Ic0ada31663beadbff06ac18ca4c5960c869b0ec8
2011-04-16 19:23:56 +02:00
Guy Zadikario
cca6a5fc0e emulator opengl: small test app for the emulator renderer API.
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
2011-04-16 10:45:48 +03:00
Guy Zadikario
555d9bece7 emulator opengl: the host renderer executable.
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
2011-04-16 10:45:48 +03:00
Guy Zadikario
1f0d3939ed emulatgor opengl: First commit of the host renderer library.
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
2011-04-16 10:45:39 +03:00
Guy Zadikario
20368d96e0 emulator opengl: add OpenglOsUtils library, a set of OS utils.
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
2011-04-16 10:42:43 +03:00
Guy Zadikario
f7cd7ec421 emulator opengl: first commit of gralloc implementation.
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
2011-04-16 10:42:34 +03:00
Guy Zadikario
64db3f9a02 emulator opengl: OpenglSystemCommon library shared between gralloc/EGL/GLES.
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
2011-04-16 10:32:39 +03:00
David 'Digit' Turner
f85c358b27 Fix Mac build
Change-Id: I030c9903f073aced6c2778665f7961f3e9f9804d
2011-04-15 16:30:26 +02:00
David Turner
23a491dccd Merge "emulator opengl: renderControl API encoder/decoder" 2011-04-15 06:45:25 -07:00
David Turner
0f0732febf Merge "emulator opengl: Added glUtilsPixelBitSize function to glUtils." 2011-04-15 06:43:32 -07:00
David Turner
2732ff2db2 Merge "Moved IOStream.h to be used in external API for libOpenGLRender." 2011-04-15 06:42:28 -07:00
Guy Zadikario
32fc922316 emulator opengl: renderControl API encoder/decoder
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
2011-04-13 13:33:26 +03:00
Guy Zadikario
fc2d0b09ec emulator opengl: Added glUtilsPixelBitSize function to glUtils.
moved pixel size calculation from GLClientState to glUtils to be used
outside the client state scope. (needed for the renderControl encoder
which will follow in next commit).

Change-Id: I5adbc40b241537054c6743e2afc52ba44454664f
2011-04-13 13:33:26 +03:00
Guy Zadikario
caafd4df2e Moved IOStream.h to be used in external API for libOpenGLRender.
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
2011-04-13 13:33:05 +03:00
Amit Feller
a7ec4c76e2 This is a common library for the EGL/GLES/GLES2 translator libraries.
It includes code that is shared with all three components:

    ThreadInfo.h - defines a structure of information stored in the TLS.
    TranslatorIfaces - defines the interface between EGL and its client APIs (GLES and GLESv2)
    objectrNameManager - manages the set of OpenGL objects in share groups name space.

Change-Id: Idb1bd1e2c3dcbb5dac7ba4ea85f78da856b897d9
2011-04-12 15:28:14 +03:00
David 'Digit' Turner
45c722023d Really fix the Mac SDK build this time. Doh.
Change-Id: I529c42f89e752b245f76d7ea0d55ad6c676936b0
2011-04-05 17:23:55 +02:00
David 'Digit' Turner
c29456a000 Fix Mac sdk builds
Change-Id: Ia90be6b2ef10520ab2efb70fc03332a36e531ddc
2011-04-05 15:37:31 +02:00
David Turner
e8c05eb11a Merge "fix handling pointers in emugen." 2011-04-05 05:59:55 -07:00
Liran
03c86416d5 fix handling pointers in emugen.
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
2011-04-04 16:05:18 +03:00
Jacky Romano
81c015740c emulator opengl - directory rearrangment
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
2011-04-04 12:20:49 +03:00
David 'Digit' Turner
e97b54b648 Fix device builds
This patch ensures that the egl.cfg file specific to our
hardware OpenGL emulation is only copied to the system images
of emulator-specific build products.

This fixes a conflict for device-specific products (which provide
their own hw-specific egl.cfg).

Change-Id: I30cd64ba5915e5ffdc1091de8db20f6c3c671486
2011-03-31 09:39:59 +02:00
David 'Digit' Turner
db35d9a010 Fix linux sdk build.
This is a temporary patch until we update the prebuilt/ tree accordingly
to include libxcb.so for Linux.

Change-Id: I76d9966bfb73bf3f5ca35cc30f6e12fb262dc2b2
2011-03-29 18:37:37 +02:00
Jacky Romano
f99884f916 Android emulator opengl - host side EGL wrapper
This adds an EGL wrapper used by the test rendering to load an EGL
implementation that matches the OpenGL ES impelmentation that it uses.
The library is a simple wrapper that direct EGL calls through a dispatch
table that is dynamically loaded from an EGL shared library implementation

Change-Id: I6379d6b156c69f9e017da0039c96699290f0f84f
2011-03-28 19:22:31 +02:00
Jacky Romano
faa8994f17 Android emulator opengl - unit test host side renderer
This adds 'ut_renderer' - a host side unit test renderer. ut_renderer is used to
take a command stream over a socket connection and render it into an opengl window.
The renderer uses the GLESv1_dec decoder library and the ut_rendercontrol api to parse
the command stream.
The ut_renderer uses an external (plug-in) opengl impelementation.

Change-Id: I77794044ca9ca8a75a66a95a248eac384710aafe
2011-03-28 19:20:23 +02:00
Jacky Romano
a4205ba264 Android emulator opengles - unit test gles wrapper
This adds opengl es implementation driver that selects whether to use
the native android emulator opengl impelementation or use a remote,
host side renderer. This driver is used to selectivley run applications using
the remote renderer. The selection is based on the application/process name and
is configured using /etc/gles_emul.cfg in the emulator side.

This change also installs /etc/egl.cfg that is used by the Android opengl wrapper
to select an opengl implementation

Change-Id: I66eda3d48938f8057bf45e6476b7faefaf1130fb
2011-03-28 19:18:27 +02:00
Jacky Romano
2d824c62e7 Android emulator opengl - unit testing render control api
This adds minimal rendering control api codec that is used by opengl codec
unit tests. The api is used to pass messages regarding resource creation
(surfaces, opengl context) and swapbuffers notifications.
The actual encoder and decoder code is generated using 'emugen'

Change-Id: Ia9b74ae755d032a9b02fdc5f85575d4cd8ada326
2011-03-28 19:08:40 +02:00
Jacky Romano
f92438f64c Android emulator opengl - OpenGL ES 1.1 decoder
This change adds the opengl host side decoder library (libGLESv1_dec)
The library uses the GLESv1 api defintion (part of libGLESv1_enc library)
used by emugen to generate the library code. It also includes
The generated code is wrapped with the GLDecoder class to handle OpenGL
specific semantics

Change-Id: I0948f1984e538d8f6cfedc961e6296686b4be850
2011-03-28 19:08:20 +02:00
Jacky Romano
6a04b8afc5 Emulator opengl - Opengl ES 1.1 encoder
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
2011-03-28 19:06:03 +02:00
Jacky Romano
c27986a3c2 Opengl implementation - codec common code
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
2011-03-28 19:01:49 +02:00
Jacky Romano
9760e2863a Emugen : A tool to generate wire protocol code
Emugen is a tool that can be used to generate code that
deals with marshaling/unmarshaling request to/from a wire-protocol.
Its input is an API defintion files and its output is C++ source
code for the client (caller) and the server (callee) sides.

See README file for more details.

This submission is resubmission of code that lived under
sdk/emulator/opengl/. However, it also includes minor updates
in ApiGen.cpp

Change-Id: I0ede7448e0a0e26fa0fbc5590d07d1f2f6566f0a
2011-03-16 15:58:23 +02:00