summaryrefslogtreecommitdiffstats
path: root/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Camera/gralloc: Add basic capability handling, support DEPTHEino-Ville Talvala2015-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | Also fix bug with AE not correctly overriding sensor values when ON but still INACTIVE. - Add Y16 support to gralloc (treat exactly as RAW16) - Add Y16 output support to camera - Adds depth static and dynamic fields to camera: - poseRotation - poseTranslation - intrinsicCalibration - radialDistortion - availableDepthStreamConfigurations - availableDepthMinFrameDurations - availableDepthStallDurations - depthIsExclusive Bug: 20537722 Change-Id: If64bb2a698a8a49777f848cfc6401d8fba299541
* opengl: Fix QemuPipeStream::readFully reading beyond end of bufferYu Ning2015-07-221-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | When GPU emulation is enabled, the emulator sometimes freezes, with an error message in logcat similar to the following: QemuPipeStream::readFully failed (buf 0x7f9cd8ab8000): Bad address Some users have reported the same issue, e.g.: https://code.google.com/p/android/issues/detail?id=170633 The root cause is that QemuPipeStream::readFully(void *buf, size_t len) may attempt to read beyond (buf + len), resulting in a -EFAULT return value from the goldfish/qemu pipe driver. Fix this bug to improve the stability of the emulator. In addition, - Add more information to the said error message to facilitate future debugging. - Use "%zu" instead of "%d" for logging size_t variables. Change-Id: I8785fee0427fd6c0f25237470b346e769a82c992 Signed-off-by: Yu Ning <yu.ning@intel.com> Signed-off-by: Pengcheng Chen <pengcheng.chen@intel.com>
* am 9cf8ded9: am 2b763c9f: Merge "Checking parameters for glCreateShader in ↵David Turner2015-03-271-0/+2
|\ | | | | | | | | | | | | guest" * commit '9cf8ded9783bbd05f8c4b3454164af4b5782a262': Checking parameters for glCreateShader in guest
| * Checking parameters for glCreateShader in guestTina Zhang2015-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | Currently, the guest part doesn't do enough to check each API's parameters. This may lead to conformance issues. Considering performance and conformance on multiple platform, it's better to add the parameter validation in guest part. Change-Id: Ic37c9bae5fba3c7e75a2095416fea41b8d1a949a Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* | Replace HAL_PIXEL_FORMAT_RAW_SENSOR with RAW_16Eino-Ville Talvala2015-02-191-1/+1
|/ | | | Change-Id: Iee70a27184d5ed35623814886487a5166c73567e
* resolved conflicts for merge of dd14cf86 to lmp-mr1-dev-plus-aospbohu2015-01-291-8/+2
|\ | | | | | | Change-Id: I128516966bf0949a7079269d8923daf5a7b9a112
| * guest system gles fix: Enable screen capture with gpu onstaging/cm-12.1stable/cm-12.1-YOG7Dstable/cm-12.1-YOG4Pstable/cm-12.1-YOG3Ccm-12.1bohu2015-01-291-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when running emulator with gpu on, screen capture does not work. This commit fixes that by doing the following steps: 1. enable gralloc to allocate buffer in gralloc_alloc for screen capture usage mode. 2. read back screen pixels in gralloc_lock for screen capture usage mode Note: This commit only fixes guest side, and to make screen capture work, we also need the corresponding fix on host side in the following CL: e36c098b5563adcc7442cb3a172ff769ee3fb4b6 (cherry picked from commit 5a50ac8819525f851c677be88a466b14737dbb18) Change-Id: Ie9307eda411ab3d0b3842fbb4a71926dd62a1875
| * Fix a missed function override in GLEncoder.cppbohu2014-12-101-0/+1
| | | | | | | | | | | | | | | | glColorPointer override was missed and this commit fixes that. (cherry picked from commit 2e74d05cf71810cd25ac69d656c3bfa01aef7907) Change-Id: I8b303c5751aa38bd246903aeb418815f9ffd97f5
| * Update goldfish from aosp/masterbohu2014-12-0237-3156/+2247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge aosp/master fixes into lmp-dev This patch updates the goldfish device to match the following patches: 1c9492dd Fix GPU emulation crash. 1da62b8c opengl: Fix a few function name typos. a4d0e1ca opengl: Remove accessor functions from encoders. 223a765d opengl: Remove compiler warnings. b7837c3c opengl: Regenerate GPU emulation encoder sources. 622970b4 opengl: Fix 64-bit build. 5fa17220 Unbind buffer when buffer is deleted 4a01a642 Properly initialize GLClientState's m_states 2c71ccd4 handles glGetBooleanv when value is nonboolean 4f9ec391 Fix eglDestroyContext and glTexImage2D 585a4b03 opengl: Fix pixelDataSize() ambiguity. Change-Id: I3f574149558b4b4cee8a3e354314f6da8f49957d
| * Merge aosp/master fixes into lmp-devbohu2014-10-216-8/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the goldfish device to match the following patches: 3f62b50d Make the size of "cb_handle_t" same for 32/64-bit 7a2929cd Remove display initialization from eglGetProcAddress API d0fead3c ranchu: Add ARM64-specific root/ramdisk config files. 58ab34d9 Upgrade goldfish sensor HAL module to 1_0 e3e68659 ranchu: Fix goldfish_pipe definitions. fe2c5beb Use more appropriate type in cb_handle_t::validate. 40a674e0 Fix emulator crashes on glDrawElements command 972291ae Handle empty buffer in QemuPipeStream::writeFully 4aad46d9 Allow glGetProgramInfoLog_enc to have empty length 691e021d Guard against negative width and height f2f04f45 Guard against negative buffer size ebe80e44 Handle empty data parameter in glTexSubImage2D_enc Change-Id: Ib272952af902dc57fa6c76f966eb508a5fda838e
| * Merge "Make the size of "cb_handle_t" same for 32/64-bit" into lmp-devVince Harron2014-09-191-1/+5
| |\
| | * Make the size of "cb_handle_t" same for 32/64-bitTina Zhang2014-09-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb_handle_t is usually created by Surfaceflinger which is a 64-bit process on 64-bit platform, and used by client processes which could be 32-bit processes or 64-bit processes. Since the "cb_handle_t" is like a protocol, we should make its size same for both 32-bit and 64-bit processes. Signed-off-by: Tina Zhang <tina.zhang@intel.com> (cherry picked from commit 3f62b50d45441ae077c958423e9e301acd5dcc11) Change-Id: I12aace9446e4566d9b12b0f50970ec00e8537dd9
| * | Remove display initialization from eglGetProcAddress APITina Zhang2014-09-181-9/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to do the initialization in the eglGetProcAddress API. The work can be finished in the eglInitialize API. When zygote pre-loading resources, eglGetProcAddress will be called. If we let eglGetProcAddress do the display initialization, zygote will get the "qemu-pipe" handle of the "opengles" service. This is bad, because all the java processes which forked from zygote will get the same handle from zygote. Then the host service cannot distinguish from the device threads, and this will lead the emulator to crash. Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: WeixingX Tian <weixingx.tian@intel.com> (cherry picked from commit 7a2929cd6548693b581c17ba69308a49e03c56be) Change-Id: I156970e004172e0bbe23a1a0c6c6b86850fd2ba6
* | guest system gles fix: Enable screen capture with gpu onbohu2015-01-261-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when running emulator with gpu on, screen capture does not work. This commit fixes that by doing the following steps: 1. enable gralloc to allocate buffer in gralloc_alloc for screen capture usage mode. 2. read back screen pixels in gralloc_lock for screen capture usage mode Note: This commit only fixes guest side, and to make screen capture work, we also need the corresponding fix on host side in the following CL: e36c098b5563adcc7442cb3a172ff769ee3fb4b6 Change-Id: I24b91bb70669fe2ddad3a5fc2eaccf3f3eaa0e1b
* | Merge "Set proper error code for glShaderBinary function"Bo Hu2015-01-222-0/+10
|\ \
| * | Set proper error code for glShaderBinary functionBo Hu2015-01-212-0/+10
| | | | | | | | | | | | | | | | | | | | | This function is not supported, but we still need to set proper error code when it is called, instead of doing nothing. Change-Id: I3f880e9b5e661fe4bd8e8f51f38df71c24b420e5
* | | opengl: Regenerate GPU emulation encoder sources to fix NULL parameters in ↵bohu2015-01-141-8/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | some gl functions. This fix handles NULL values of 'size' and 'type' in glGetActiveAttrib and glGetActiveUniform. This patch updates the encoder sources to match the auto-generated output of the latest 'emugen' tools from sdk/emulator/opengl/ Generated by using external/qemu/distrib/update-emugl-source.sh related change: 82aa88b78e26b048e428a930a867166eff611984 Change-Id: Ifbd9e8bf3473ed054e95e1ee3a7885652c2002ce
* | Merge "Add parameters validation to glShaderSource() API"Bo Hu2014-12-173-1/+10
|\ \
| * | Add parameters validation to glShaderSource() APITina Zhang2014-12-113-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | According to GLES2.0 Spec., add parameters validataion to glShaderSource() API. Change-Id: I5b0e939fd9657ccbb40a13896c8fc74ef02fd085 Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* | | Cleanup Obsolete LOCAL_PRELINK_MODULE.Ying Wang2014-12-161-1/+0
| | | | | | | | | | | | | | | Bug: 18675947 Change-Id: Ic464d98babf86e5bf76c3bacc875926968726cf9
* | | Add shader version to glGetStringbohu2014-12-112-0/+7
|/ / | | | | | | | | | | | | When querry shader version, current implementation returns null. This commit fixes it. Change-Id: If9b7c0ba3bb2bc48d0b7404529254834fff6ee5c
* | Fix a missed function override in GLEncoder.cppbohu2014-12-091-0/+1
| | | | | | | | | | | | glColorPointer override was missed and this commit fixes that. Change-Id: I6f51c57fa6b6d8af0802d06cf42994fbb3bc80b9
* | Merge "Fix eglDestroyContext and glTexImage2D"bohu2014-12-014-6/+41
|\ \
| * | Fix eglDestroyContext and glTexImage2Dbohu2014-11-264-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When destroy context that is in use, EGL spec says: "If the EGL rendering context context is not current to any thread, eglDestroyContext destroys it immediately. Otherwise, context is destroyed when it becomes not current to any thread." 2. When calling glTexImage2D, should bind the correct texture first. Change-Id: I6c779b71d1e6002b8a484477921ba323acbd986e
* | | opengl: Fix pixelDataSize() ambiguity.David 'Digit' Turner2014-11-279-35/+47
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GLESv1 encoder library was calling the pixelDataSize() function definition from the GLESv2 encoder library, resulting in bugs, like the inability to see the boot animation when -gpu on is used. This fixes the issue by using namespaces to differentiate the two implementations. Note that the auto-generated files have been updated by re-running update-emugl-sources.sh as specified by opengl/README after applying the following patches: https://android-review.googlesource.com/#/c/116642/ https://android-review.googlesource.com/#/c/116643/ https://android-review.googlesource.com/#/c/116644/ Change-Id: Idbd84fb6ca5934cbb9af009b09f9a38cc4a1340a
* | Merge "handles glGetBooleanv when value is nonboolean"bohu2014-11-181-0/+1
|\ \
| * | handles glGetBooleanv when value is nonbooleanbohu2014-11-181-0/+1
| | | | | | | | | | | | | | | | | | Properly converts non-zero value to GL_TRUE. Change-Id: I9ca1d42d9b36ae9ce0a01cf6a358d9fe59a02558
* | | Properly initialize GLClientState's m_statesbohu2014-11-171-0/+1
|/ / | | | | | | | | | | | | The data pointer of m_states[i] should be initialized to 0; otherwise it contains garbage. Change-Id: Ibfa9bb6fec395de6ac98a3e6b91d4c6ff4143f2c
* | Merge "Unbind buffer when buffer is deleted"bohu2014-11-172-0/+9
|\ \
| * | Unbind buffer when buffer is deletedbohu2014-11-062-0/+9
| | | | | | | | | | | | | | | | | | | | | When buffer is deleted, it should be un-bind also. Also fix error code related to buffer Change-Id: I3e7ec88399822469a36119c2de03157a2bbea812
* | | am 3fe2263e: Merge "opengl: Fix 64-bit build."David 'Digit' Turner2014-10-311-3/+3
|\| | | | | | | | | | | | | | * commit '3fe2263e2429a0611796e3e84c6f8b54bc30aa48': opengl: Fix 64-bit build.
| * | opengl: Fix 64-bit build.David 'Digit' Turner2014-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous patch broke the 64-bit with the following error message: device/generic/goldfish/opengl/system/egl/egl.cpp: In function 'EGLBoolean eglGetConfigs(EGLDisplay, void**, EGLint, EGLint*)': device/generic/goldfish/opengl/system/egl/egl.cpp:559:33: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] *configs++ = (EGLConfig)i; This was due to the fact that the type of |i| went from uintptr_t to int. This patch fixes the issue by casting i to (EGLConfig)(uintptr_t)i. Change-Id: I3158c91d63b13eff3f8e8babb1faba8b58dc7373
* | | resolved conflicts for merge of 5a7d8f2d to stage-aosp-masterDavid 'Digit' Turner2014-10-3130-3133/+2148
|\| | | | | | | | | | | Change-Id: I4ce3cee422f8e98d70bbf2ffcaac34650c7182b4
| * | opengl: Regenerate GPU emulation encoder sources.David 'Digit' Turner2014-10-3114-872/+888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the encoder sources to match the auto-generated output of the latest 'emugen' tools from sdk/emulator/opengl/ Generated by using external/qemu/distrib/update-emugl-source.sh This shall only results in minor changes: - Minor indentation fixes. - Using 'const' to define constant tables. - Using anonymous namespaces in the encoders. Change-Id: Ib282b31c4c05da897157ef90e5a9deb914a08bda
| * | opengl: Remove compiler warnings.David 'Digit' Turner2014-10-3011-9/+74
| | | | | | | | | | | | | | | | | | | | | | | | Simply remove multiple compiler warnings about unused parameter. Note that this modifies three auto-generated files, which will require fixing the 'emugen' program in the future. Change-Id: I19edce7c6480770b893d033ed6b1c65744091d62
| * | opengl: Remove accessor functions from encoders.David 'Digit' Turner2014-10-3016-2244/+1178
| | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are not necessary since all the fields are public members of structures. Also gets us closer to the state of the real emugen output, which isn't matched yet due to other differences. Change-Id: Iea092beca7e3a819c286fe3d84897e6a170747f8
| * | opengl: Fix a few function name typos.David 'Digit' Turner2014-10-304-13/+13
| | | | | | | | | | | | | | | | | | | | | A small preliminary patch to make future patches slightly simpler, easier to merge into the internal tree. Change-Id: Iec649b61349106d4531a6e28141c0f0687a144c5
* | | Fix build which is due to a poor mergeBill Yi2014-10-301-0/+3
| | | | | | | | | | | | | | | | | | Related commit: fbb8828965084a753f04263f3265d68acbfdc7ab BUG:18155628
* | | resolved conflicts for merge of 7472654e to stage-aosp-masterDavid 'Digit' Turner2014-10-303-0/+15
|\| | | | | | | | | | | Change-Id: Ieda2d8d1ac00854de28959e4632827a12b399cf2
| * | Fix GPU emulation crash.David 'Digit' Turner2014-10-304-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the crash that occurs during boot when the boot animation starts. The main issue is that the wrong version of glGenTextures_enc() was being called. The root issue is that libGLESv1_CM_emulation.so, which implements the GLESv1 API in the system, is linked to both libGLESv2_enc.so and libGLESv1_enc.so which both provided a glGenTextures_enc() function, used to encode a glGenTextures() command call into the wire protocol. Until recently, and due to pure luck, the function call in libGLESv1_CM_emulation.so was resolved to the function in libGLESv1.so, which is the correct version to use from this library. However, due to recent changes in the dynamic linker's symbol resolution implementation, the version in libGLESv2.so was being used instead. The bug is really in our library and this patch provides a fix by removing the duplicate functions, with the help of C++ namespaces. NOTE: This patch modifies auto-generated code. A better fix would be to fix the generator, then refresh the sources with its new output. However, several other manual patches have been performed on these files in the past too to fix other issues, so doing so would lose the fixes. A future patch will update the generator, and refresh all sources accordingly. This is a "quick-fix" to get us to a proper booting state. NOTE: Even after applying this patch, the system boots to the 'home screen' but fails to display the boot animation. BUG=18146046 Change-Id: I48cab73ad583e303723340e80d19a82fa301b61d
* | | Merge commit 'ca37eef61fa94932463f117ff1655a7e68f1827e' into HEADBill Yi2014-10-226-17/+17
|\ \ \ | |/ / |/| |
| * | am 9c6d3726: Merge "Fix emulator crashes on glDrawElements command"bohu2014-10-141-2/+2
| |\ \ | | | | | | | | | | | | | | | | * commit '9c6d37269b85c41203a2f061958922315d55f6ce': Fix emulator crashes on glDrawElements command
| * \ \ am 7fa2b92d: Merge "Use more appropriate type in cb_handle_t::validate."Bo Hu2014-09-301-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '7fa2b92de2058a3556e5f38a135de415bb3d5e45': Use more appropriate type in cb_handle_t::validate.
| * \ \ \ am 638ee524: Merge "Remove display initialization from eglGetProcAddress API"David Turner2014-07-241-9/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '638ee524f83053613c47ddea22c4bf98a0175c2f': Remove display initialization from eglGetProcAddress API
| * \ \ \ \ am 9b1e6c5a: Merge "Make the size of "cb_handle_t" same for 32/64-bit"David Turner2014-07-171-1/+5
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | * commit '9b1e6c5a3ccd943b7158dce83387fbfcc1162d69': Make the size of "cb_handle_t" same for 32/64-bit
| * | | | | am dc684041: am c04a27cb: opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-289-2/+36
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dc684041d9fbfd3b7db6fb0294286764d92564d0': opengl: rcOpenColorBuffer must be synchronous
| | * \ \ \ \ am c04a27cb: opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-289-2/+36
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c04a27cb9a25ba26893212914fd725a85f8d6694': opengl: rcOpenColorBuffer must be synchronous
| | | * | | | | opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-279-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gralloc register_buffer() function, which calls rcOpenColorBuffer, must actually increment the reference count before returning. Otherwise the buffer allocator may release its reference before the client has obtained one, and the buffer will be freed prematurely. Since rcOpenColorBuffer was just sending a message to the host without waiting for it to be received/processed, this guarantee was not met. Adding a return value makes the call synchronous. Bug: 12988668 Change-Id: I8b2399cfb0f600f99b3387f630343291b59bc9a6
| * | | | | | | opengl: Fix const-ness of GLES prototypes to match new headersJesse Hall2014-05-216-17/+17
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 1502849 Change-Id: I902517c23354e14f9c63b1584db286d682315bb5
* | | | | | | Merge "Handle empty data parameter in glTexSubImage2D_enc"bohu2014-10-211-2/+2
|\ \ \ \ \ \ \