summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl/shared/OpenglOsUtils
Commit message (Collapse)AuthorAgeFilesLines
* move emulator HALs to device/generic/goldfishkeunyoung2013-03-119-868/+0
| | | | Change-Id: I1ff304d540c75c4d27c5fddeb7315e177d366fb3
* Move emugl system code to development.gitJesse Hall2012-06-069-0/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the way the SDK and Android system images are branched, host code that goes into the SDK tools can't live in the same repository as code that goes into the system image. This change keeps the emugl host code in sdk.git/emulator/opengl while moving the emugl system code to development.git/tools/emulator/opengl. A few changes were made beyond simply cloning the directories: (a) Makefiles were modified to only build the relevant components. Not doing so would break the build due to having multiple rule definitions. (b) Protocol spec files were moved from the guest encoder directories to the host decoder directories. The decoder must support older versions of the protocol, but not newer versions, so it makes sense to keep the latest version of the protocol spec with the decoder. (c) Along with that, the encoder is now built from checked in generated encoder source rather than directly from the protocol spec. The generated code must be updated manually. This makes it possible to freeze the system encoder version without freezing the host decoder version, and also makes it very obvious when a protocol changes is happening that will require special backwards-compatibility support in the decoder/renderer. (d) Host-only and system-only code were removed from the repository where they aren't used. (e) README and DESIGN documents were updated to reflect this split. No actual source code was changed due to the above. Change-Id: I2c936101ea0405b372750d36ba0f01e84d719c43
* Move emulator GLES from development.git to sdk.gitJesse Hall2012-04-189-906/+0
| | | | | | | | | | | | | | | The emulator GLES support has two interfaces: a host shared library interface used by QEMU, and a protocol between the platform and the host. The host library interface is not versioned; QEMU and the GLES renderer must match. The protocol on the other hand must be backwards compatible: a new GLES renderer must support an older platform image. Thus for branching purposes it makes more sense to put the GLES renderer in sdk.git, which is branched along with qemu.git for SDK releases. Platform images will be built against the protocol version in the platform branch of sdk.git. Change-Id: Ie73fce12815c9740e27d0f56caa53c6ceb3d30cc
* Added rules to build 64-bit libraries for 64-bit emulatorAndrew Hsieh2012-03-222-19/+51
| | | | | | | | | | | | | | | | | | All ten libraries can now be built in 64-bit named "lib64*" (*) in addition to the original 32-bit form named "lib*". Also, dlopen "lib64*so" in 64-bit. (*) eg. In Ubuntu, all can be built with the following command: make out/host/linux-x86/lib/lib64OpenglRender.so \ out/host/linux-x86/lib/lib64EGL_translator.so \ out/host/linux-x86/lib/lib64GLES_CM_translator.so \ out/host/linux-x86/lib/lib64GLES_V2_translator.so Rules to build static libraries lib64log.a, lib64cutils.a and lib64utils.a they depend were added in other CLs. Change-Id: I3afb64de6dda1d55dbd1b4443d2dbc78a683b19f
* Fixed crash and 64-bit porting issuesAndrew Hsieh2012-03-222-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. "emugen" generates four *dec.cpp files containing code like this to decode offset to pointer in stream tmp = *(T *)(ptr + 8 + 4 + 4 + 4 + *(size_t *)(ptr +8 + 4 + 4)); If *dec.cpp are compiled in 64-bit, size_t is 8-byte and dereferencing of it is likley to get wild offset for dereferencing of *(T *) to crash the code. Solution is to define tsize_t for "target size_t" instead of using host size_t. 2. Cast pointer to "uintptr_t" instead of "unsigned int" for 2nd param of ShareGroup::getGlobalName(NamedObjectType, ObjectLocalName/*64bit*/). 3. Instance of EGLSurface, EGLContext and EGLImageKHR are used as 32-bit key for std::map< unsigned int, * > SurfacesHndlMap, ContextsHndlMap, and ImagesHndlMap, respectively. Cast pointer to uintptr_t and assert upper 32-bit is zero before passing to map::find(). 4. Instance of GLeglImageOES is used to eglAttachEGLImage() which expect "unsigned int". Cast it to uintptr_t and assert upper 32-bit is zero. 5. The 5th param to GLEScontext::setPointer is GLvoid* but contains 32-bit offset to vbo if bufferName exists. Cast it to uintptr_t and assert upper 32-bit is zero. 6. Use %zu instead of %d to print size_t 7. Cast pointer to (uintptr_t) in many other places Change-Id: Iba6e5bda08c43376db5b011e9d781481ee1f5a12
* emulator: opengl: add missing pthread_mutex_destroyDavid 'Digit' Turner2011-09-131-0/+1
| | | | Change-Id: Ib6be00619e06f5ff492a080d1feb2954b626fa26
* opengl renderer: create rendering subwindowAmit Feller2011-07-031-1/+1
| | | | | | | The application provides the window handle to which the OpenglRenderer should render to however only a sub-region of this window needs to be rendered. This change adds this functionality by creating a native child subwindow into which rendering will happen.
* emulator: opengl: Update/simplify build scriptsDavid 'Digit' Turner2011-06-231-25/+31
| | | | | | | | | | | 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
* emulator opengl: more few fixups needed for the system to load.Stas Gurtovoy2011-06-211-0/+4
| | | | Change-Id: I698b14d0f594c091c237a605aeefbb048bf746ca
* this checkin supports windows OS in all Translator libsAmit Feller2011-05-172-7/+5
| | | | | | | Note: this is a re-submit of Ie5111d9c435b64d205b140a79863c0273742ee7f, fixed to avoid breaking the Mac build. Change-Id: Ib534063d3f403d33d162956bf510baf9689a246a
* Revert "this checkin supports windows OS in all Translator libs"Raphael Moll2011-05-172-5/+7
| | | | | | | | | This reverts commit 0bf68485710cb86ec9950f64b1389889ce2974e1. This commit breaks Mca builds: development/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp: In function 'EGLBoolean eglChooseConfig(void*, const EGLint*, void**, EGLint, EGLint*)': development/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp:412: error: 'PIXEL_FORMAT_INITIALIZER' was not declared in this scope make: *** [out/host/darwin-x86/obj/SHARED_LIBRARIES/libEGL_translator_intermediates/EglImp.o] Error 1
* this checkin supports windows OS in all Translator libsAmit Feller2011-05-172-7/+5
| | | | Change-Id: Ie5111d9c435b64d205b140a79863c0273742ee7f
* Fix mac buildDavid Turner2011-04-162-12/+4
| | | | Change-Id: Ic0ada31663beadbff06ac18ca4c5960c869b0ec8
* emulator opengl: add OpenglOsUtils library, a set of OS utils.Guy Zadikario2011-04-169-0/+872
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