Commit Graph

1009 Commits

Author SHA1 Message Date
Season Li
000d88f026 Implement a number of KHR EGL extensions
Add following KHR EGL extensions:

EGL_KHR_gl_texture_3D_image
EGL_KHR_config_attribs
EGL_KHR_surfaceless_context
EGL_KHR_stream
EGL_KHR_stream_fifo
EGL_KHR_stream_producer_eglsurface
EGL_KHR_stream_consumer_gltexture
EGL_KHR_stream_cross_process_fd

Change-Id: Ie7a35b5e3761e343cb71cf446cba77f67f604bdf
2015-07-01 16:52:44 -07:00
Amith Dsouza
4f21a4cc22 Revert "Revert "Modify EGL to disconnect the window when the surface gets destroyed.""
This reverts commit 6e1a2fea67.

Driver level issues fixed by an updated graphics driver.

Bug: 21266976
Change-Id: I93339fb6c6bab988f3550adb49ef8e70cda6473e
2015-07-01 10:22:22 -07:00
Michael Lentine
1c4537e2e8 Check that width and height parameters are small.
The product of width and height should be less than UINT32_MAX (in practice
smaller). Adding the checks prevents overflows when allocating buffers.

Bug: 20726612
Change-Id: I9769edf0688a9bfe69906d49fa0540cadf4c49b0
2015-05-29 10:54:30 -07:00
Michael Lentine
6e1a2fea67 Revert "Modify EGL to disconnect the window when the surface gets destroyed."
This reverts commit 00699fa641.
2015-05-28 16:48:08 -07:00
Alistair Strachan
89301eaf21 Fix EGL shim extension injection for GL ES 3 drivers.
The Android EGL shim injects GL_EXT_debug_marker into the ES driver
EXTENSIONS string for the OpenGL ES 1.x and 2.0/3.0/3.1 drivers if
the extension is not already provided. This feature is used by
GLES_trace.

In Open GL ES 3.0 it became possible to query an indexed version of
the EXTENSIONS string via GetStringi(). NUM_EXTENSIONS Gets were
also added to the specification (taken from Open GL).

If the shim does not have to inject the extension, then there is no
problem, as glGetString() and glGetStringi() / NUM_EXTENSIONS will
be consistent. However, if the Android EGL shim injects the
extension, NUM_EXTENSIONS and GetStringi() will report one less
extension than is really available.

Consistency between these methods is tested by the dEQP framework
with the dEQP-GLES3.functional.state_query.string.extensions test.
If the driver does not provide GL_EXT_debug_marker, this test
fails.

This change wraps all of the affected entry points so that the
wrapped driver extensions are never visible directly to dEQP,
eliminating the inconsistency.
2015-05-28 15:34:31 -07:00
Michael Lentine
51c8c502f6 Merge "Modify EGL to disconnect the window when the surface gets destroyed." into mnc-dev 2015-05-14 16:39:28 +00:00
Michael Lentine
00699fa641 Modify EGL to disconnect the window when the surface gets destroyed.
Bug: 14445579

Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa
2015-05-13 15:41:41 -07:00
Dmitriy Ivanov
af3a3778c2 Merge "Switch libGLESv1_CM/libGLESv2 to hash-style=both" into mnc-dev 2015-05-13 22:11:19 +00:00
Dmitriy Ivanov
ae62e0573a Switch libGLESv1_CM/libGLESv2 to hash-style=both
Old version of unity uses custom linker to link
  itself and libmono. The custom linker does not
  support lookups with gnu-hash style. Switching
  libraries needed by libunity.so to --hash-style=both
  fixes this problem.

Bug: http://b/20093774
Change-Id: I2a4887cf7a5ee80a8976ecaad54b52dc62518e55
2015-05-13 15:05:07 -07:00
Hiroshi Yamauchi
4e7de461c1 Replace JNI primitive array critical calls with non-critical ones.
The glgen part.

Bug: 19235243
Change-Id: I69dfa84f15366808b964517c1ba270ddeb3c5940
2015-05-12 14:24:23 -07:00
Jesse Hall
408e59f63a libEGL: whitelist the EGL_KHR_create_context_no_error extension
Allow EGL implementations to expose the
EGL_KHR_create_context_no_error extension if they wish.

https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_create_context_no_error.txt

Change-Id: I3290ccc2a69a1fa0b00ec3f1aa4f876906c64bfb
2015-05-12 08:42:05 -07:00
Dan Stoza
a894d082cf libEGL: Add wrappers for partial update functions
This adds EGL wrapper functions for the following EGL extensions:
    EGL_EXT_buffer_age
    EGL_KHR_partial_update
    EGL_KHR_swap_buffers_with_damage

Change-Id: I407acda1e0310f7f01a5efe9c915721a941138a4
2015-04-15 13:02:27 -07:00
Eino-Ville Talvala
82c6bcc970 DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.
- Wire up new dataSpace parameter through buffer queue stack
- Update tests to include the parameter
- Switch eglApi to using dataSpace to indicate sRGB gamma/linear
  difference
- Remove RAW_SENSOR in favor of RAW16
- Remove use of sRGB format enums
- Add default dataspace to buffer queue core
- Add query for default dataspace

Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df

Change-Id: I461952389c18051176c6b75e664f20ad369f5760
2015-03-19 13:56:00 -07:00
Jesse Hall
b6b81d6acd Merge "[MIPS] Fix mips32r1 build" 2015-03-15 02:41:05 +00:00
Dan Albert
8d31934148 am 79749845: Merge "Fix pointer-to-int and int-to-pointer warnings."
* commit '797498450cbcb87c28636e775ada942005436909':
  Fix pointer-to-int and int-to-pointer warnings.
2015-02-25 23:00:44 +00:00
Dan Albert
ad0f52fc2b Fix pointer-to-int and int-to-pointer warnings.
Change-Id: If534cbcf2c3e644270572cbf829ba9b5acab29e6
2015-02-23 10:45:27 -08:00
Bill Yi
28d41f5640 Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEAD 2015-02-19 14:31:45 -08:00
Alistair Strachan
733a807547 egl: Remove old tuna BGRA vs RGBA workaround.
Some time before kitkat, a workaround was put in place to keep tuna
working with obsolete PowerVR GPU drivers. The tuna product was dropped
in AOSP for kitkat, but the workaround remained.

There are still a number of devices shipping with OMAP4 processors, and
this workaround continues to be applied on those products even when it
is not required. The effect is that virtual display CTS will fail on
those devices.
2015-02-12 12:33:25 -08:00
Duane Sand
ecacc3f164 [MIPS] Fix mips32r1 build
Fix regression from 6701fbe5f0 .
The rdhwr instruction is unsupported by mips32r1 cpus, but is
supported via kernel emulation on those cpus.

Change-Id: Ieb3343fff0f0da54003044f451c90e1c761208eb
2015-02-02 16:54:15 -08:00
Michael Lentine
2f1e3b4d21 am d6fce7ab: Merge "Remove lock around ref count check in terminate." into lmp-mr1-dev
* commit 'd6fce7ab66e5d33e3ee16247485d1b8c26dd7ee8':
  Remove lock around ref count check in terminate.
2015-01-28 22:38:42 +00:00
Michael Lentine
54466bc441 Remove lock around ref count check in terminate.
Replace the global lock in terminate for the ref count check with atomics and a
local lock.

Bug: 19072064

Change-Id: I0cfd6564e227a75b8387a8788b16381d5bc2cc88
2015-01-28 11:54:15 -08:00
Jesse Hall
c7a7b118b5 am a46ff664: Merge "Use register numbers instead of register names"
* commit 'a46ff664571465b7a2741bed4225d30b5bf07503':
  Use register numbers instead of register names
2015-01-26 17:39:55 +00:00
Jesse Hall
0cfe43a0ad am f551e1c1: Merge "[MIPS] Further opengl support for mips64 and mipsr6"
* commit 'f551e1c1a59ae7ac906e2b204c3704d0dbf926a8':
  [MIPS] Further opengl support for mips64 and mipsr6
2015-01-22 18:50:55 +00:00
Nikola Veljkovic
5f5f65183c Use register numbers instead of register names
Avoid ambiguity by using register numbers. Register names are
interpreted depending on the ABI. Fixes the issue with mips64 gcc,
where registers t0-t4 are translated into $8-$11 (o32 ABI) instead
of $12-$15 (o64 ABI).

Also, use t9 ($25) for storing function address
(in getProcAddress.cpp).

Change-Id: I12ef5cd98bf14dab3c01f2756889cc02856c1cd8
2015-01-19 15:58:32 +01:00
Duane Sand
6701fbe5f0 [MIPS] Further opengl support for mips64 and mipsr6
Combines 4 patches by Dragoslav and Douglas:

Use t9 to hold the address of the called function.
Add support for gl binding.
Fix inline assembly code to be R6 compatible.
Fix some more inline assembly code to be R6 compatible.

Change-Id: I0b899813790b2ba4ca538bb21692014cc1933f66
2015-01-19 11:54:46 +01:00
Jeff Davidson
b9b86f644f am 4df903db: Merge "Revert "Revert "Update protobuf library from 2.3 to 2.6."""
* commit '4df903dbc71c48e2db6fae9390795b81782470b4':
  Revert "Revert "Update protobuf library from 2.3 to 2.6.""
2015-01-15 23:02:01 +00:00
Jeff Davidson
4df903dbc7 Merge "Revert "Revert "Update protobuf library from 2.3 to 2.6.""" 2015-01-15 22:49:02 +00:00
Brian Carlstrom
a198e1c14d am 6f9c6541: Merge "[MIPS] Build libGLES for mips64, mips32r6"
* commit '6f9c6541b77b18a6922d1f50326faa9ec6ed6d2a':
  [MIPS] Build libGLES for mips64, mips32r6
2015-01-13 06:27:45 +00:00
Duane Sand
81c6d66a1d [MIPS] Build libGLES for mips64, mips32r6
For now, use generic C code instead of assembler.

Change-Id: I604ecdcde2d5373f1f68ab97a63a80667b630846
2015-01-12 22:18:13 -08:00
Jeff Davidson
eb329c07c1 am 83f14309: Merge "Revert "Update protobuf library from 2.3 to 2.6.""
* commit '83f14309f17af398ec8ff7f82d9b2f010ea7cd5f':
  Revert "Update protobuf library from 2.3 to 2.6."
2015-01-12 20:10:05 +00:00
Jeff Davidson
a9650f0ccc Revert "Revert "Update protobuf library from 2.3 to 2.6.""
This reverts commit bca4262dac.

Change-Id: I8ecd859340779dfacffba4c6d1a44c5cdbdfceed
2015-01-12 20:07:43 +00:00
Jeff Davidson
bca4262dac Revert "Update protobuf library from 2.3 to 2.6."
This reverts commit a42cdf1690.

Change-Id: I8f75e6fcc921041ebdfd35c4724134fcb2c739c6
2015-01-12 20:00:33 +00:00
Jeff Davidson
7581a96bfd am 9200d4e3: Merge "Update protobuf library from 2.3 to 2.6."
* commit '9200d4e3bf0bf9bf21d9bb335e04818364bf12a8':
  Update protobuf library from 2.3 to 2.6.
2015-01-12 19:46:11 +00:00
Jeff Davidson
a42cdf1690 Update protobuf library from 2.3 to 2.6.
Remove generated cpp/h files for gltrace.proto as we can use the build
system to generate these dynamically.

Change-Id: I949d32fb5126f1c05e2a6ed48f6636a4a9b15a48
2015-01-08 16:12:02 -08:00
Chih-Hung Hsieh
2965dab909 am bceb29c8: Merge "Fix clang -Wc++11-narrowing warnings."
* commit 'bceb29c83ea54d38b38e40d66402e56364cff56b':
  Fix clang -Wc++11-narrowing warnings.
2014-12-11 23:02:01 +00:00
Chih-Hung Hsieh
3bded9177b Fix clang -Wc++11-narrowing warnings.
Clang compiler gives warning to implicit conversions of
literal structure fields, although the compiler generated
implicit conversions are what we want in these cases.

Change-Id: I8f04e7f2fa1db0ed1d1937135d9091532eec3d5b
2014-12-11 14:45:56 -08:00
Andreas Gampe
84fd9bd151 am f8954c81: Merge "OpenGL tests: Fix unused variables"
* commit 'f8954c81a4ec43958867d1f6f497ef449bf091fd':
  OpenGL tests: Fix unused variables
2014-12-02 18:47:20 +00:00
Andreas Gampe
f8954c81a4 Merge "OpenGL tests: Fix unused variables" 2014-12-02 18:24:57 +00:00
Jesse Hall
414fd6fc7a am 4aaa3935: Merge "Avoid overwriting EGL14.EGL_NO_SURFACE"
* commit '4aaa39358f538d8e06e026385bb8be8088d78c35':
  Avoid overwriting EGL14.EGL_NO_SURFACE
2014-12-02 00:42:23 +00:00
Jesse Hall
4aaa39358f Merge "Avoid overwriting EGL14.EGL_NO_SURFACE" 2014-12-02 00:34:51 +00:00
Andreas Gampe
fa59862430 OpenGL tests: Fix unused variables
For build-system CFLAGS clean-up, fix unused variables.

Change-Id: I1863418f7467412d7698dd0ce0c8e40d1bd0348e
2014-11-24 20:02:52 -08:00
Sangkyu Lee
7290c24354 Avoid overwriting EGL14.EGL_NO_SURFACE
Both EGL14 and EGLExt have the same initialization codes for
EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY.
Since EGLExt is initialized later, they are overwritten by EGLExt's
initialization codes.
Therefore, EGL_NO_SURFACE returned by methods in EGL14 is not
actually EGL14.EGL_NO_SURFACE object and it makes several problems in
handling error cases.
For instance, "Let's fish" game application cannot be run on L.

To solve the problem, this patch makes EGL14.EGL_NO_SURFACE,
EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY initialized just once.

Change-Id: Icce878164ff0b715ad2b5a2cd038a9616c7cf1e9
2014-11-25 10:46:06 +09:00
Chih-hung Hsieh
22536916a5 am 1bb53054: Merge "Fix class vs. struct mismatch"
* commit '1bb53054f2d77ce570a22629006c849fc54707dc':
  Fix class vs. struct mismatch
2014-11-17 22:58:50 +00:00
Bernhard Rosenkränzer
9f425914db Fix class vs. struct mismatch
egl_connection_t is a struct - shouldn't be forward-declared as a class

Change-Id: I39f5d9bff9fc64f4694fb2bef7e4afa131b449cc
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 21:12:15 +01:00
Dan Albert
36ec7a8b99 am d72ff140: Merge "Move frameworks/native to libc++."
* commit 'd72ff140e0df44106cd8539396ce686aa8f3306a':
  Move frameworks/native to libc++.
2014-11-16 17:31:57 +00:00
Dan Albert
6d72063cfd Move frameworks/native to libc++.
I'm pretty sure I had done this before... Must have been new
dependencies that slipped in when L merged in.

Bug: 15193147
Change-Id: Ib9b1b8a65665d25c33c6141b9476a8e13c4084e0
2014-11-15 18:22:55 -08:00
Andreas Gampe
c5657b0c34 am fecc0bf4: Merge "Frameworks/native: Add pragmas to glgen headers"
* commit 'fecc0bf4f1d8d1939807123d0f01ca1fe377bda4':
  Frameworks/native: Add pragmas to glgen headers
2014-11-12 18:40:21 +00:00
Andreas Gampe
fecc0bf4f1 Merge "Frameworks/native: Add pragmas to glgen headers" 2014-11-12 18:30:40 +00:00
Andreas Gampe
b5da0d78d2 Frameworks/native: Add pragmas to glgen headers
The code currently being generated by glgen is not the cleanest, but
we would like to get core/jni onto -Werror. Thus add pragmas turning
off warnings locally to the C headers.

Also fix signed-comparison in two functions.

Longer term TODO: Emit clean code.

Change-Id: Iee8582f8c0c1de076d64851d3b6ca467afd5bc43
2014-11-12 10:10:12 -08:00
Jesse Hall
3b93c2b9d0 am 7b3fd290: Merge "EGL: make x86/64 wrappers resistant to -fno-omit-frame-pointer flag"
* commit '7b3fd29037bc12c2691e06334bf51171853aa8f3':
  EGL: make x86/64 wrappers resistant to -fno-omit-frame-pointer flag
2014-11-12 17:31:03 +00:00