summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl
Commit message (Collapse)AuthorAgeFilesLines
...
| * EmuGL: remove broken EGL buffer refcountingJesse Hall2011-12-121-10/+0
| | | | | | | | | | | | | | | | | | | | | | The emulator EGL implementation tried to hold its own reference to buffers acquired/released with dequeueBuffer/queueBuffer, but was missing an incRef after dequeueBuffer during swapBuffers. Since the native window holds a reference to the buffer between dequeueBuffer and queueBuffer, the EGL reference isn't needed anyway. Change-Id: I95e4f9f4faf59198f99939cdca6603fe176c56bc
* | am 96cd9c31: Merge "EmuGL: capture VBO contents in GL2Encoder" into ics-mr0Jesse Hall2011-12-011-0/+3
|\| | | | | | | | | * commit '96cd9c3130b6215534e863b94637b384da8102c9': EmuGL: capture VBO contents in GL2Encoder
| * EmuGL: capture VBO contents in GL2EncoderJesse Hall2011-12-011-0/+3
| | | | | | | | | | | | | | | | | | The glBufferData, glBufferSubData, and glDeleteBuffers entry points had interception routines in GL2Encoder which cache the data, but they weren't hooked up. So when glDrawElements tried to retrieve the cached data it wasn't there. Change-Id: Iaed11fccaefab3186485be53a0f15c8ca0a255f9
* | am af4f66be: EmuGL: implement OES_EGL_image_external for GLESv1Jesse Hall2011-11-226-36/+697
|\| | | | | | | | | * commit 'af4f66be50b17c8b8fce1dda53389bb0a10968ba': EmuGL: implement OES_EGL_image_external for GLESv1
| * EmuGL: implement OES_EGL_image_external for GLESv1Jesse Hall2011-11-216-36/+697
| | | | | | | | | | | | | | GLESv2 support will come in a followup change but will take advantage of the GLClientState changes. Change-Id: Ib6cbb4dafbd071e3b59b1e5d808b3e23656ada92
* | am f37a7ed6: GLES translator: don\'t delete EGLImage texturesJesse Hall2011-11-221-2/+5
|\| | | | | | | | | * commit 'f37a7ed6c5c609a3afc33f81bf50893362917ae6': GLES translator: don't delete EGLImage textures
| * GLES translator: don't delete EGLImage texturesJesse Hall2011-11-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | When remapping a GLES texture to a different GL texture in glEGLImageTargetTexture2DOES(), the GLES texture's previous GL texture was deleted unconditionally. This is bad when it came from an EGLImage and is therefore owned by (and will continue to be used by) some other object. The code now skips deleting the old GL texture if it came from an EGLImage. This mirrors the logic in glDeleteTextures(). Change-Id: I5b650334a7019d824517c2915b1f23961fbbd809
* | am faaf1553: EmuGL: set texture info from EGLImageJesse Hall2011-11-221-0/+4
|\| | | | | | | | | * commit 'faaf1553cfa39c23ceb198ba7edbd46ff3a11f7a': EmuGL: set texture info from EGLImage
| * EmuGL: set texture info from EGLImageJesse Hall2011-11-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | The EGL->GL translator implementation of glEGLImageTargetTexture2DOES was properly replacing uses of the target texture object with the texture object associated with the EGLImage in the host GL library, but wasn't updating its own info about the texture (dimensions, etc.). This broke places where the translator relied on knowing this, e.g. when implementing the GLES glDrawTexi call on top of GL glDrawArrays. Change-Id: Ia4aefd89852a2609221c56da76bfac927464c0b2
* | should fix sdk buildMathias Agopian2011-11-152-8/+1
| | | | | | | | Change-Id: I5b403056f5245eae9a6476d9d573a3b1c25ea0c6
* | Merge "emulator: opengl: add design document for emulation implementation."David 'Digit' Turner2011-10-191-0/+593
|\ \
| * | emulator: opengl: add design document for emulation implementation.David 'Digit' Turner2011-10-191-0/+593
| |/ | | | | | | | | | | | | This patch adds a rather extensive document explaining the design of our OpenGLES emulation, both on the guest and the host. Change-Id: I13cf1eac21e5a8a0be170b5f90100b04f9ae6d75
* / emulator: opengl: minor fix and reformattingDavid 'Digit' Turner2011-10-193-6/+13
|/ | | | | | | This patches fixes a minor invalid usage of delete (instead of delete[]) and reformats the source code a little to make it more obvious. Change-Id: If853d12e74549abcc6682430c837b0f14da81fdc
* am 7b2cacb4: am 76f63551: am 894a63dd: emulator: opengl: Add custom_write ↵David 'Digit' Turner2011-09-285-5/+59
|\ | | | | | | | | | | | | optimization to encoder. * commit '7b2cacb4523bc564321d0726c8b53b72f6b1c562': emulator: opengl: Add custom_write optimization to encoder.
| * am 894a63dd: emulator: opengl: Add custom_write optimization to encoder.David 'Digit' Turner2011-09-285-5/+59
| |\ | | | | | | | | | | | | * commit '894a63dd6eb8a1c675c21a8a10eff8c0118890c8': emulator: opengl: Add custom_write optimization to encoder.
| | * emulator: opengl: Add custom_write optimization to encoder.David 'Digit' Turner2011-09-205-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows an auto-generated GLES encoder function to write 'isLarge' buffers with a custom writer, instead of calling stream->readFully() directly. This is intended to allow writing pixel or vertex data that is stored with a specific stride. Another patch will introduce the corresponding changes to the .attrib files Change-Id: I6ca86b968cd3f4db91676bc485ee1e84419e50e0
* | | am 5127bebf: am 8790e10a: am 5d7f0875: emulator: opengl: \'large\' buffer ↵David 'Digit' Turner2011-09-2811-104/+297
|\| | | | | | | | | | | | | | | | | | | | optimization * commit '5127bebff8d3848c96749d80c8c4ad79fc88bb54': emulator: opengl: 'large' buffer optimization
| * | am 5d7f0875: emulator: opengl: \'large\' buffer optimizationDavid 'Digit' Turner2011-09-2811-104/+297
| |\| | | | | | | | | | | | | * commit '5d7f0875e9cda2d6ab37b49f0b6ceed8f0d16f45': emulator: opengl: 'large' buffer optimization
| | * emulator: opengl: 'large' buffer optimizationDavid 'Digit' Turner2011-09-2011-104/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the guest encoding libraries to avoid un-necessary copies when sending large buffers (e.g. pixels) to the host. Instead, the data is sent directly through a new IOStream method (writeFully()). On my machine, this improves the NenaMark2 benchmark (from 50.8 to 57.1 fps). More importantly, this speeds up the display of non-GL surfaces too, which are sent through the special rcUpdateColorBuffer() function in gralloc_goldfish. This is noticeable in many parts of the UI (e.g. when scrolling through lists). To tag a given parameter, use the new 'isLarge' variable flag in the protocol .attrib file. Implemented for the following encoding functions: rcUpdateColorBuffer glTexSubImage2D glTexImage2Di glBufferData glBufferSubData glCompressedTexImage2D glCompressedTexSubImage2D glTexImage3DOES glTexSubImage3DOES glCompressedTexImage3DOES glCompressedTexSubImage3DOES + Optimize the auto-generated encoder functions to avoid repeated function calls (for size computations). Change-Id: I13a02607b606c40cd05984cd2051b1f3424bc2d0
* | | am 175512d4: am 5d2e245d: am e72ed049: emulator: opengl: improve gralloc ↵David 'Digit' Turner2011-09-281-17/+38
|\| | | | | | | | | | | | | | | | | | | | debug traces * commit '175512d4aba36f5e5be9a12dca64cc27d159ec98': emulator: opengl: improve gralloc debug traces
| * | am e72ed049: emulator: opengl: improve gralloc debug tracesDavid 'Digit' Turner2011-09-281-17/+38
| |\| | | | | | | | | | | | | * commit 'e72ed049a890da6883b0de09a2263b88b648391a': emulator: opengl: improve gralloc debug traces
| | * emulator: opengl: improve gralloc debug tracesDavid 'Digit' Turner2011-09-201-17/+38
| | | | | | | | | | | | | | | | | | + shut up the gralloc module for now. Change-Id: I7d22c63f298c4e50d96655adf4025a65b7405c28
* | | am 81488f05: am ac6c7392: am 9a6c0287: emulator: opengl: fix inccorect ↵David 'Digit' Turner2011-09-281-2/+2
|\| | | | | | | | | | | | | | | | | | | | delete usage. * commit '81488f055f5a2bd7e5307a0e16d5ff924baf566e': emulator: opengl: fix inccorect delete usage.
| * | am 9a6c0287: emulator: opengl: fix inccorect delete usage.David 'Digit' Turner2011-09-281-2/+2
| |\| | | | | | | | | | | | | * commit '9a6c02877a128a0236377ee21b78767faa50ad83': emulator: opengl: fix inccorect delete usage.
| | * emulator: opengl: fix inccorect delete usage.David 'Digit' Turner2011-09-201-2/+2
| | | | | | | | | | | | Change-Id: I3afc5197d2d13c4698a535ed769a56920e81c94f
* | | am f90030a9: am 0bf9070e: am 6aca3d9f: emulator: opengl: add missing ↵David 'Digit' Turner2011-09-282-0/+6
|\| | | | | | | | | | | | | | | | | | | | EGLDisplay destructor * commit 'f90030a9bf63d47840c88c6f8022bc0a903df9dd': emulator: opengl: add missing EGLDisplay destructor
| * | am 6aca3d9f: emulator: opengl: add missing EGLDisplay destructorDavid 'Digit' Turner2011-09-282-0/+6
| |\| | | | | | | | | | | | | * commit '6aca3d9f7c8e637ec253ca1d501d8b91d3e63770': emulator: opengl: add missing EGLDisplay destructor
| | * emulator: opengl: add missing EGLDisplay destructorDavid 'Digit' Turner2011-09-202-0/+6
| | | | | | | | | | | | Change-Id: I788904a597b7929a7fc7a5db3cf5baa79b9f1936
* | | am 5703f4d9: am 81ee5461: am 8abfab1b: emulator: opengl: make internal ↵David 'Digit' Turner2011-09-284-7/+7
|\| | | | | | | | | | | | | | | | | | | | tables const. * commit '5703f4d9ec04f5e774f8cb154af7fd087bebfffd': emulator: opengl: make internal tables const.
| * | am 8abfab1b: emulator: opengl: make internal tables const.David 'Digit' Turner2011-09-284-7/+7
| |\| | | | | | | | | | | | | * commit '8abfab1baf04ebd57f8eff74485b746d56368014': emulator: opengl: make internal tables const.
| | * emulator: opengl: make internal tables const.David 'Digit' Turner2011-09-204-7/+7
| | | | | | | | | | | | | | | | | | + fix a typo. Change-Id: I4c290d673de5eff24998b97cfb996d9da17dd006
* | | resolved conflicts for merge of 944b4f80 to masterDavid 'Digit' Turner2011-09-271-18/+3
|\| | | | | | | | | | | Change-Id: I83f38f345caa456466d86e46f4f3c94721b7ebd1
| * | resolved conflicts for merge of 4e6af749 to gingerbread-plus-aospDavid 'Digit' Turner2011-09-2318-225/+786
| |\| | | | | | | | | | Change-Id: I3a8d71bd9b359a067c2a250db99e855e59c08854
| | * emulator: opengl: Back-port GLES emulation from the master tree.David 'Digit' Turner2011-09-20257-0/+44173
| | | | | | | | | | | | | | The modules here are only built when BUILD_EMULATOR_OPENGL is defined to true in your environment or your BoardConfig.mk (see tools/emulator/opengl/Android.mk) Change-Id: I5f32c35b4452fb5a7b4d5f9fc5870ec1da6032e6
* | emulator: opengl: Fix the Windows SDK buildDavid 'Digit' Turner2011-09-151-4/+6
| | | | | | | | Change-Id: I97be6f81af321f75ff5d43b258387fdc039f0210
* | Merge "emulator: opengl: Support named pipes on Win32"David 'Digit' Turner2011-09-134-9/+291
|\ \
| * | emulator: opengl: Support named pipes on Win32David 'Digit' Turner2011-09-134-9/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Win32 named pipes for the communication channel between the Opengl renderer library and its clients. Named pipes should be much faster than local TCP sockets on this platform. Note that by default, TCP sockets are still used. The emulator needs to call setStreamMode(STREAM_MODE_PIPE) to be able to use these. Change-Id: I86d36624cf2b7fdd50f41e1e43c908348dca4657
* | | Merge "emulator: opengl: Add support for unix sockets."David 'Digit' Turner2011-09-1317-210/+514
|\| |
| * | emulator: opengl: Add support for unix sockets.David 'Digit' Turner2011-09-1317-210/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the OpenGLES rendering library to use Unix sockets instead of TCP ones when communicating with its clients. On certain benchmarks (e.g. 0xBench teapot), this provides a noticeable improvement (x1.05 fps) without any other changes. On practice, Unix sockets are faster than TCP sockets, even local ones. Also, this introduces a moderate amount of abstraction that will allow us to use Win32 named pipes on Windows (where TCP sockets are much slower than they are on Unix). Note that by default, TCP streams are still used. The client (emulator) must call the new API 'setStreamMode' to change it to STREAM_MODE_UNIX between 'initLibrary' and 'startOpenglRenderer' calls. + Adjust callers / user appropriately. Change-Id: I4105bbf07541f3146b50a58d1a5b51e8cf044fab
* | | Merge "emulator: opengl: re-enable gralloc builds"David 'Digit' Turner2011-09-132-2/+3
|\ \ \
| * | | emulator: opengl: re-enable gralloc buildsDavid 'Digit' Turner2011-09-132-2/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-enables the build of the gralloc GLES emulation library. This is only for experimentation / debugging purpose. GLES emulation is still disabled by default in the emulator. Even if you force-enable it by using the '-gpu on' flag, this module will not properly yet and nothing will be displayed. Change-Id: I8f0ca8805ed99037b011365d08507ca08bff5e75
* / / emulator: opengl: add missing pthread_mutex_destroyDavid 'Digit' Turner2011-09-131-0/+1
|/ / | | | | | | Change-Id: Ib6be00619e06f5ff492a080d1feb2954b626fa26
* | emulator: opengl: Fix egl.cfg tsdefinitionDavid 'Digit' Turner2011-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the definition of the emulator-specific egl.cfg file used to indicate to our EGL system library which support modules are available in the emulator. We need to list two modules here: 'emulation' corresponding to GPU emulation 'android' corresponding to the software renderer The indices before each name correspond to the 'display' and 'impl' numbers that are expected by frameworks/base/opengl/libs/EGL/Loader.cpp In a nutshell, 'display' should always be 0, and 'impl' should be 0 for the software renderer, and 1 for a hardware-based one. See the code under framewors/base/opengl/libs/EGL/egl.cpp for mode details. Change-Id: I52c898759200c2dfba9049ed00b31b18e8c37f69
* | am 7cd5aeb7: am dda2e51a: am 6ba16ba7: Merge "emulator: opengl: add ↵David 'Digit' Turner2011-08-305-20/+45
|\| | | | | | | | | | | | | initLibrary function to render library" * commit '7cd5aeb7c7a109712a660c89d50fb67d35471081': emulator: opengl: add initLibrary function to render library
| * Merge "emulator: opengl: add initLibrary function to render library"David 'Digit' Turner2011-08-295-20/+45
| |\
| | * emulator: opengl: add initLibrary function to render libraryDavid 'Digit' Turner2011-08-295-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an initLibrary() function to libOpenglRender. It will be used by the emulator to fallback on software rendering if the library cannot be initialized properly, e.g. if it is not possible to load the host EGL/GLES libraries. Change-Id: I41e8ad73a315166e4a15cbee1db72c2552370f46
* | | am 1ff9d194: am b6114c7b: am 7cb797f1: Merge "emulator: opengl: use bilinear ↵David 'Digit' Turner2011-08-301-2/+2
|\| | | | | | | | | | | | | | | | | | | | filtering" * commit '1ff9d194e3f252a03555edd90702a368a10e50cc': emulator: opengl: use bilinear filtering
| * | Merge "emulator: opengl: use bilinear filtering"David 'Digit' Turner2011-08-291-2/+2
| |\ \ | | |/ | |/|
| | * emulator: opengl: use bilinear filteringDavid 'Digit' Turner2011-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the filter used to scale the GL window in the rendering library. Instead of nearest-neighbour, use bi-linear, which will provide for much more pleasant results when scaling the emulator UI window, or toggling to full-screen mode. Change-Id: If2d9e1300fa4878c25e1221eaedb565b9150431a
* | | emulator: opengl: Fix the emulator-specific builds.David 'Digit' Turner2011-08-291-8/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The gralloc.goldfish module cannot build in master because the gralloc interface evolved considerably since gingerbread (which the current code is based on). For now, disable it completely, this will make it impossible to test GPU emulation in the internal master tree for now. We'll have to port this module to the new world-order to solve this. Change-Id: I864217f9c41fd1234f0df497005499800af879e5