OSDN Git Service

android-x86/device-generic-goldfish-opengl.git
7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Wed, 23 Nov 2016 22:33:12 +0000 (22:33 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours am: ab60271bab  -s ours am: f09bf909ad  -s ours
am: d7e8dc892b  -s ours

Change-Id: I3aa8dddf4571f482028eb873e29b3be2b2340a24

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours...
Yahan Zhou [Wed, 23 Nov 2016 22:33:01 +0000 (22:33 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours am: db334bed50  -s ours am: 2737782b4d  -s ours
am: 1e5fd1e94e  -s ours

Change-Id: I1503e08d50a799e17c4f6bcb2a6d6a9ed5e6eb0b

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Wed, 23 Nov 2016 22:30:42 +0000 (22:30 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours am: ab60271bab  -s ours
am: f09bf909ad  -s ours

Change-Id: I8247229fbca72d4a6b759935909f2e99c21e03b4

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours...
Yahan Zhou [Wed, 23 Nov 2016 22:30:33 +0000 (22:30 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours am: db334bed50  -s ours
am: 2737782b4d  -s ours

Change-Id: I4d55d909a22f5b9cf3298ef48d2aa00f6a0a8916

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Wed, 23 Nov 2016 22:28:28 +0000 (22:28 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours
am: ab60271bab  -s ours

Change-Id: I14b8e7ee8e7e7a263ed170c3e595ac51b39bd6c5

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours
Yahan Zhou [Wed, 23 Nov 2016 22:28:17 +0000 (22:28 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours
am: db334bed50  -s ours

Change-Id: Id2246625716dad271de3dc9ce9f2ba0aff2a3df9

7 years agoFix glLinkProgram with invalid program name
Yahan Zhou [Tue, 22 Nov 2016 22:03:56 +0000 (14:03 -0800)]
Fix glLinkProgram with invalid program name

glLinkProgram might try setting up program attributes even when an
invalid program name is passed to it. This patch fixes it.

BUG: 33069416
Change-Id: I93ed140095b67df47b158ba837c4aac8eb9e8e50

7 years agoFix a typo in HostConnection.cpp
Yurii Zubrytskyi [Thu, 17 Nov 2016 23:44:03 +0000 (15:44 -0800)]
Fix a typo in HostConnection.cpp

Change-Id: I76217f256e2a80ef12be6cdbef5d2846da4323b0

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Fri, 11 Nov 2016 22:24:30 +0000 (22:24 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours am: ab60271bab  -s ours am: 78454be75a  -s ours
am: 0913dec00d  -s ours

Change-Id: I37ac6d6e71a1b0e5de8407e99ed483ffd45f2913

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours...
Yahan Zhou [Fri, 11 Nov 2016 22:24:21 +0000 (22:24 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours am: db334bed50  -s ours am: 096235db73  -s ours
am: 984acc9061  -s ours

Change-Id: I94e1c2dd22c4bac7cc2f478b3bf975c1efa6fc82

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Fri, 11 Nov 2016 22:17:30 +0000 (22:17 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours am: ab60271bab  -s ours
am: 78454be75a  -s ours

Change-Id: I3e7a223d68cd9c09d3a89e09cfe6ee778136e72c

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours...
Yahan Zhou [Fri, 11 Nov 2016 22:17:20 +0000 (22:17 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours am: db334bed50  -s ours
am: 096235db73  -s ours

Change-Id: I5f193e47dc9952bf6572895620d6a29e808a015a

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1...
Yahan Zhou [Fri, 11 Nov 2016 22:10:30 +0000 (22:10 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev am: ff9b220285  -s ours
am: ab60271bab  -s ours

Change-Id: I7ce588a7d17ca2c4658ea4164a7a02fcbf368c52

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e -s ours
Yahan Zhou [Fri, 11 Nov 2016 22:10:20 +0000 (22:10 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG am: 3a6d7c961e  -s ours
am: db334bed50  -s ours

Change-Id: I6b9e70cedbf94e3cdcf3d9efce2e72842f82fbbe

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev
Yahan Zhou [Fri, 11 Nov 2016 22:02:52 +0000 (22:02 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev
am: ff9b220285  -s ours

Change-Id: Ib6f93db2e813b170a5163784d992b76a5af13fa6

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG
Yahan Zhou [Fri, 11 Nov 2016 22:02:52 +0000 (22:02 +0000)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG
am: 3a6d7c961e  -s ours

Change-Id: I6f779177478c02eed15b7d9d477028bf706d990b

7 years agoMerge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev
Yahan Zhou [Fri, 11 Nov 2016 21:50:25 +0000 (21:50 +0000)]
Merge "DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG" into nyc-mr1-dev

7 years agoDO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG
Yahan Zhou [Wed, 19 Oct 2016 19:37:23 +0000 (12:37 -0700)]
DO NOT MERGE ANYWHERE Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG

It is documented here:
https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt

b/32239106

Change-Id: If0c4b39bed190a978539115d47bfbc1071903187
(cherry picked from commit e5ec7d43cfaf31efea2913321404ca88cd3ddb04)

7 years agoFaster HostConnection creation
Yurii Zubrytskyi [Fri, 4 Nov 2016 19:01:36 +0000 (12:01 -0700)]
Faster HostConnection creation

- Implement queryGlString in a single guest->host call for most
  cases: preallocate large enough buffer instead of querying for
  its size.
- Don't copy std::string-s around when we only needs a cref

Change-Id: Iffc4e9e37a1f9010ab5dfd5a4c5528f783c41137

7 years agoRe-generated protocol encoder files
Yurii Zubrytskyi [Fri, 4 Nov 2016 18:59:27 +0000 (11:59 -0700)]
Re-generated protocol encoder files

- Don't add output parameters' size to the whole packet size,
  reducing the amount of data copied over from guest to host.
- Use a static array for checksums instead of heap-allocated
  buffer

This change is totally backward compatible for the protocol,
as it (1) removes the part emulator has never touched and
(2) changes only the guest's memory allocation way, not the
task that memory is used for

Corresponing emugen CL:
  https://android-review.googlesource.com/#/c/299539/

Change-Id: Ic7c6d2bb21d57f1f6fb1622499344328f790783e

7 years agoImprove ChecksumCalculator
Yurii Zubrytskyi [Fri, 4 Nov 2016 18:57:02 +0000 (11:57 -0700)]
Improve ChecksumCalculator

- Expose the checksum sizes through public constants to allow
  users to preallocate static arrays for those
- Get rid of a slower memcpy() operations in checksum calculation

Change-Id: Ieaa92fce7b32b75a5db0f94d505c917ecfa16f74

7 years agoFix ARM boot with sync device
Lingfeng Yang [Tue, 25 Oct 2016 16:10:38 +0000 (09:10 -0700)]
Fix ARM boot with sync device

Change-Id: Id6cecb915b1b1f1a9db27019959d8ee9cc0d0659

7 years agoRevert "Fix the position of qemu_pipe header" am: 8eb71f487d
Christopher Ferris [Mon, 24 Oct 2016 21:55:34 +0000 (21:55 +0000)]
Revert "Fix the position of qemu_pipe header" am: 8eb71f487d
am: f382afc4b1

Change-Id: Ib8646a72bbda3e943a275c714025b76219e6f66f

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Mon, 24 Oct 2016 21:52:04 +0000 (21:52 +0000)]
Revert "Fix the position of qemu_pipe header"
am: 8eb71f487d

Change-Id: Icc9438c891817a3c5897df8005aaac2d7022b926

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Mon, 24 Oct 2016 21:47:34 +0000 (21:47 +0000)]
Revert "Fix the position of qemu_pipe header"
am: 6be28777eb

Change-Id: I5e1df716f587ba8e481b78e294f9b37431359e0f

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Sat, 22 Oct 2016 04:54:29 +0000 (04:54 +0000)]
Revert "Fix the position of qemu_pipe header"

The reverted CL should stay in nyc-mr1-dev only.

This reverts commit 3855dfbf428269d3c79dd7ba4b257ec5e9b917ff.

Test: Built full-eng, mmma -j30 device/generic/goldfish-opengl.

Change-Id: I4bffeae147464a7a158e0daa95155d87d0a9677b
(cherry picked from commit 2e11850e11ad1b8a548176a5dc8c223f252227d9)
(cherry picked from commit 6be28777eb169b7c09e396d23cb40d842a568e03)

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Sat, 22 Oct 2016 04:54:29 +0000 (04:54 +0000)]
Revert "Fix the position of qemu_pipe header"

The reverted CL should stay in nyc-mr1-dev only.

This reverts commit 3855dfbf428269d3c79dd7ba4b257ec5e9b917ff.

Test: Built full-eng, mmma -j30 device/generic/goldfish-opengl.

Change-Id: I4bffeae147464a7a158e0daa95155d87d0a9677b
(cherry picked from commit 2e11850e11ad1b8a548176a5dc8c223f252227d9)

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Sat, 22 Oct 2016 04:54:29 +0000 (04:54 +0000)]
Revert "Fix the position of qemu_pipe header"

This change should not have made it into master.

This reverts commit 3855dfbf428269d3c79dd7ba4b257ec5e9b917ff.

Test: Built full-eng, mmma -j30 device/generic/goldfish-opengl.

Change-Id: I4bffeae147464a7a158e0daa95155d87d0a9677b

7 years agoFix the position of qemu_pipe header
Yahan Zhou [Sat, 22 Oct 2016 01:36:56 +0000 (01:36 +0000)]
Fix the position of qemu_pipe header
am: 3855dfbf42

Change-Id: I911247a7ccd041148a422862625bf484a99201db

7 years agoMerge "Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG in eglCreateContext"
Yahan Zhou [Wed, 19 Oct 2016 21:40:58 +0000 (21:40 +0000)]
Merge "Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG in eglCreateContext"

7 years agoAccept EGL_CONTEXT_PRIORITY_LEVEL_IMG in eglCreateContext
Yahan Zhou [Wed, 19 Oct 2016 19:37:23 +0000 (12:37 -0700)]
Accept EGL_CONTEXT_PRIORITY_LEVEL_IMG in eglCreateContext

It is documented here:
https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt

b/32239106

Change-Id: If0c4b39bed190a978539115d47bfbc1071903187

7 years agoFix the position of qemu_pipe header
Yahan Zhou [Mon, 17 Oct 2016 22:06:09 +0000 (15:06 -0700)]
Fix the position of qemu_pipe header

In the master branch, qemu_pipe.h is in system folder. But in nyc-mr1,
it is in hardware folder.

BUG:32183368
Change-Id: Ic858d4f93280499896f9ff592459c2f4610a27df

7 years agoFix build (part 2)
Lingfeng Yang [Tue, 18 Oct 2016 05:48:59 +0000 (22:48 -0700)]
Fix build (part 2)

Change-Id: I319c1bfcffdccb5cef3d781e1a0cd21d4e8caf1b

7 years agoFix build
Lingfeng Yang [Tue, 18 Oct 2016 05:22:51 +0000 (22:22 -0700)]
Fix build

Change-Id: Ib64555ca689cd514139d5a8b712f1266ee38ab49

7 years agoSpeed up draw-call-bound apps with index range cache
Lingfeng Yang [Fri, 14 Oct 2016 18:20:45 +0000 (11:20 -0700)]
Speed up draw-call-bound apps with index range cache

Previously, we were looping through the entire
index buffer (can be 10^3-10^4+ items) on every
draw call, in order to find min/max vertex index.
This operation often consumes half or more
of the time taken per draw call (from systrace).

The min/max vertex index are required if:
- we are in some "immediate array" mode where
  we got an array passed as "offset" argument of
  glDrawElements (i.e., index buffer 0 bound)
- validation (dEQP tests, debugging draw calls
  where vertex buffer out-of-bounds is in question)

ANGLE uses the concept of an "index range cache"
in order to avoid recalculating index ranges
that are known already.

This CL incorporates the IndexRangeCache class
from ANGLE, greatly improving glDrawElements run time
by making it not depend on the size of the index buffer.

It also makes a slight further tweak: if
we do not flush every draw call, but instead
every two draw calls, we have lower pipe overhead
and can get about 1 FPS more.

The performance improvement: ~10-20% FPS on
non-draw-call-limited GPUs.

Linux, Quadro K2200: Antutu v6: ~35->~40 FPS

No dEQP GLES2 or EGL regressions were found.

Change-Id: I29be0f405c6d3e3257e212912c6af6c6f3e12fa7

7 years agoMerge "Ignore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on low API version"
TreeHugger Robot [Tue, 11 Oct 2016 20:42:37 +0000 (20:42 +0000)]
Merge "Ignore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on low API version"

7 years agoIgnore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on low API version
Yahan Zhou [Tue, 11 Oct 2016 19:02:24 +0000 (12:02 -0700)]
Ignore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on low API version

Some old APIs always try to ask for a surface with
EGL_SWAP_BEHAVIOR_PRESERVED_BIT, but this is never supported on the
host.

Now for API<=19, we ignore this bit.

Change-Id: I627915b5c4c3e18c1b8ae01925589ce67389daed

7 years agoFix dpi in eglQuerySurface
Yahan Zhou [Tue, 11 Oct 2016 18:39:39 +0000 (11:39 -0700)]
Fix dpi in eglQuerySurface

Previously we fake a dpi when eglQuerySurface asks for it.

Now we retrieve the real value by querying an emulator property.

Change-Id: I59e17262efb8e7cf6ce492f7ed5c86a261b7d0c5

7 years agoIgnore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on API 16
Yahan Zhou [Mon, 3 Oct 2016 20:57:50 +0000 (13:57 -0700)]
Ignore EGL_SWAP_BEHAVIOR_PRESERVED_BIT on API 16

EGL_SWAP_BEHAVIOR_PRESERVED_BIT is never supported on the host. But API
16 tries using this flag.

This CL erases the flag when in API 16.

Change-Id: I7ad1778d8f24eb142c55cfa40bf01fc82cb41343

7 years agoFix eglGetSyncAttribKHR regression for qemu1.
Tao Wu [Sat, 24 Sep 2016 08:56:05 +0000 (01:56 -0700)]
Fix eglGetSyncAttribKHR regression for qemu1.

In https://googleplex-android-review.git.corp.google.com/1219570
We assume user always call eglClientWaitSyncKHR afer eglCreateSyncKHR.
But some app just repeats calling eglGetSyncAttribKHR until it gets
EGL_SIGNALED_KHR. Previous code always returns EGL_SIGNALED_KHR in
this case.
Restore previous behavior for qemu1 code path.

Bug: 31399081
Change-Id: Ie7a12fc125627d40e294fe3a4a81abc33b6c0b00
Signed-off-by: Tao Wu <lepton@google.com>
7 years agoFix dEQP-EGL.functional.resize.pixel_density.*
Lingfeng Yang [Fri, 23 Sep 2016 20:49:09 +0000 (13:49 -0700)]
Fix dEQP-EGL.functional.resize.pixel_density.*

bug: 31703045

These tests attempt to calculate native DPI by creating
very small buffers, rendering them to a high resolution screen,
and then re-deriving the native DPI by scaling buffer size
against the window resolution in screen pixels.

Previously, they failed because EGL_HORIZONTAL_RESOLUTION
actually means to get the effective DPI of an EGL texture,
which is different from native DPI.

For example, if the screen is 2 pixels across and 4 meters wide,
the native dot pitch is 0.5 pixels per meter, but if
there is a 1x1 pixel texture filling the entire screen,
EGL_HORIZONTAL_RESOLUTION should return 0.25 pixels
per meter (1 texture pixel, 4 meters -> 0.25 ppm).

This CL queries the native window resolution and attempts
to calculate effective DPI from that.

Change-Id: I7f12d7964529bc95b5f89640dea00e9e16c66799

7 years agoMerge "Return error code in eglCreatePixmapSurface"
TreeHugger Robot [Fri, 23 Sep 2016 19:37:54 +0000 (19:37 +0000)]
Merge "Return error code in eglCreatePixmapSurface"

7 years agoMerge "Fix dEQP-EGL.functional.negative_api.choose_config"
Lingfeng Yang [Fri, 23 Sep 2016 19:06:37 +0000 (19:06 +0000)]
Merge "Fix dEQP-EGL.functional.negative_api.choose_config"

7 years agoMerge "Refactor pre-process GL resource management (guest)"
Yahan Zhou [Fri, 23 Sep 2016 18:31:05 +0000 (18:31 +0000)]
Merge "Refactor pre-process GL resource management (guest)"

7 years agoReturn error code in eglCreatePixmapSurface
Yahan Zhou [Fri, 23 Sep 2016 17:57:23 +0000 (10:57 -0700)]
Return error code in eglCreatePixmapSurface

We do not support this function, but we still need to return the
expected error code to pass N-CTS tests:

dEQP-EGL.functional.negative_api#create_pixmap_surface

Change-Id: Ic2fc7aba4f494257773fb71b798f5bba0f8ad08d

7 years agoFix dEQP-EGL.functional.negative_api.choose_config
Lingfeng Yang [Fri, 23 Sep 2016 16:42:32 +0000 (09:42 -0700)]
Fix dEQP-EGL.functional.negative_api.choose_config

bug: 31703518

This CL fixes the above test and:

- Raises EGL_BAD_PARAMETER if the |num_config| pointer is null.
- Receives EGL errors from host-side config choosing.

Change-Id: I34599ab4a8648a442aafc0e8e97b45932a4bbf32

7 years agoFix dEQP-EGL.functional.negative_api
Yahan Zhou [Fri, 23 Sep 2016 01:26:49 +0000 (18:26 -0700)]
Fix dEQP-EGL.functional.negative_api

Fix those 2 failures:
create_pbuffer_surface
surface_attrib

We need to return the right error code for them.

Change-Id: Ie8a3ed83ed36ee7619e769546869bb12f3c2ef4e

7 years agoRefactor pre-process GL resource management (guest)
Yahan Zhou [Thu, 22 Sep 2016 19:33:50 +0000 (12:33 -0700)]
Refactor pre-process GL resource management (guest)

Previously we bind a process unique id (puid) to the GL encoder / decoder
commands when managing process owned GL resources.

This patch simplify it by telling each rendering thread its puid at the
beginning, and using that puid for resource management. It will make our
life easier when we need to change other resources from owned-by-thread
to owned-by-process (e.g. EglContext).

This CL must work with host CL:
https://android-review.googlesource.com/#/c/277778

Change-Id: I94a8cb55e8619c2f0da1a5669827e89fe42660d2

7 years ago[NYC CTS] eglQuerySurface fix
Yahan Zhou [Wed, 21 Sep 2016 00:18:34 +0000 (17:18 -0700)]
[NYC CTS] eglQuerySurface fix

NYC CTS DEQP EGL tries to query almost every attribute in
eglQuerySurface. This patch tries to add support for them.

It fixes the following tests:
dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_depth_stencil
dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_stencil
dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_depth_stencil
dEQP-EGL.functional.query_surface.simple.window#rgb565_depth_stencil
dEQP-EGL.functional.query_surface.simple.window#rgb888_depth_stencil
dEQP-EGL.functional.query_surface.simple.window#rgba8888_depth_stencil

Note that a large amount of tests are marked as not supported in
dEQP-EGL.functional.query_surface.simple. This should be a bug and we
should fix it.

Change-Id: I23f6a241326951f41716d6116bf363709263bd8d

7 years ago[AMD] Fix segfault in glCopyTexImage + cube map luminance
Lingfeng Yang [Fri, 16 Sep 2016 15:54:03 +0000 (08:54 -0700)]
[AMD] Fix segfault in glCopyTexImage + cube map luminance

bug: 31523568

In particular, the test

dEQP.functional.texture.specification.basic_copyteximage2d.cube_luminance

segfaults the emulator on some AMD GPUs.

When we define cube maps using glCopyTexImage2D
and are using the GL_LUMINANCE internal format, if the negative
components of the cube map are defined first, the host AMD driver may
segfault (tested in Mobility Radeon and RX 480).

The workaround is to detect this particular API call, cube map target,
and internal format, and define the positive component first
using the same arguments, if the positive component has not been defined
already.

Change-Id: I26ed25bf3b7358ed7121a52f89d541c325beb6e4

7 years agoMerge "[CTS][deqp] avoid rebinding textures in glTex(Sub)Image2D"
TreeHugger Robot [Thu, 8 Sep 2016 21:35:13 +0000 (21:35 +0000)]
Merge "[CTS][deqp] avoid rebinding textures in glTex(Sub)Image2D"

7 years ago[CTS][deqp] avoid rebinding textures in glTex(Sub)Image2D
Lingfeng Yang [Wed, 7 Sep 2016 21:40:03 +0000 (14:40 -0700)]
[CTS][deqp] avoid rebinding textures in glTex(Sub)Image2D

bug: 31307568

If we stop rebinding the same texture every call,
we can fix 4 CTS dEQP failures on Quadro K2200 / K600's:

dEQP-GLES2.functional.texture.specification.random_teximage2d.2d_3
dEQP-GLES2.functional.texture.specification.random_teximage2d.2d_7
dEQP-GLES2.functional.texture.specification.random_teximage2d.2d_8
dEQP-GLES2.functional.texture.specification.random_teximage2d.2d_9

These random (as in seeded only once, same "random" config everytime)
texture tests attempt to construct mipmaps in random order using
repeated calls to glTexImage2D.

Four of these tests fail because they construct the texture mipmaps
in just the wrong order to expose what seems like a NVIDIA driver bug:
if we attempt to glBindTexture the "same" texture before
each glTexImage2D AND do not start with mipmap level 0, we get a
corrupted texture for what seems like all mipmap levels that were
specified before mipmap level 0 was specified.

This CL avoids calling glBindTexture when we didn't need to overrride
the GL_TEXTURE_2D texture on the host. The previous behavior seems
unresonable, in fact: it is also not a high quality thing to do if
we always issue glBindTexture on host when "restoring" a texture target
that has NOT been overriden.

No regression has been detected in CTS dEQP GLES2, EGL / CTS camera.
It should also be a slight performance increase for apps that
heavily thrash glTexImage2D.

Change-Id: I6910d93733cb682737f49aff448097e263cd675b

7 years agoMerge "+rcDestroySyncKHR, don't leak on swapBuffers"
Lingfeng Yang [Sat, 3 Sep 2016 20:13:50 +0000 (20:13 +0000)]
Merge "+rcDestroySyncKHR, don't leak on swapBuffers"

7 years ago+rcDestroySyncKHR, don't leak on swapBuffers
Lingfeng Yang [Wed, 31 Aug 2016 21:46:11 +0000 (14:46 -0700)]
+rcDestroySyncKHR, don't leak on swapBuffers

This CL is part of this host CL to clean up EGL sync objects:

https://android-review.googlesource.com/#/c/267892/

It does the following:
- adds rcDestroySyncKHR
- avoids creating an actual EGL sync object when in swapBuffers(),
  because it will be cumbersome to delete it from the guest.
  Instead, it specifically calls rcCreateSyncKHR and tells the host
  to clean up the object when it has become signaled.
- refactors rcCreateSyncKHR / goldfish_sync_queue_work to
  a common function.
- bumps the GLAsyncSwap version string to "ANDROID_EMU_native_sync_v2",
  so that the emulator can work with all combinations of
  old/new emulator/system-image.

Change-Id: Iff9a5e226b4026b955893c6f4d6ff3266009da6b

7 years agoClean up gralloc buildscript
Yahan Zhou [Fri, 2 Sep 2016 18:29:50 +0000 (11:29 -0700)]
Clean up gralloc buildscript

The current script creates gralloc.ranchu module multiple times.

Change-Id: If8ed4010d19d622a4afe6e516cb5e29d953a08e6

7 years agoMerge "Per-process EGLImage resource release"
TreeHugger Robot [Sat, 20 Aug 2016 00:03:23 +0000 (00:03 +0000)]
Merge "Per-process EGLImage resource release"

7 years agoPer-process EGLImage resource release
Yahan Zhou [Thu, 28 Jul 2016 23:31:59 +0000 (16:31 -0700)]
Per-process EGLImage resource release

https://buganizer.corp.google.com/issues/29457657

This CL marks each EGLImage with its process unique ID when
communicating with the host, so that the host can properly clean up
EGLImages when the guest process is killed.

It is doing similar thing as in
https://googleplex-android-review.git.corp.google.com/#/c/1207896/

The implementation reuses gralloc pipe. Because now the gralloc pipe
is also used outside of gralloc, this patch moves the gralloc pipe
implemenation ProcessPipe.cpp and also renames gralloc pipe.

Change-Id: I90c6d1d842ba2741d371f02a519e0fa904bc0f08

7 years agoRemove unused header.
Dmitriy Filchenko [Thu, 18 Aug 2016 01:27:09 +0000 (18:27 -0700)]
Remove unused header.

BUG: 29824203

Change-Id: Ib764899053dffabae325b8e4e7488afa3892ee85

7 years agoUpdate the get_process_name call.
Dmitriy Filchenko [Tue, 16 Aug 2016 16:56:25 +0000 (09:56 -0700)]
Update the get_process_name call.

BUG:29824203
Change-Id: I47efa5872619dcfe36579a33162214545daa9907

7 years agoMerge "Emulator: allows usage mismatch in gralloc_lock"
Bo Hu [Sat, 13 Aug 2016 03:08:48 +0000 (03:08 +0000)]
Merge "Emulator: allows usage mismatch in gralloc_lock"

7 years agoEmulator: allows usage mismatch in gralloc_lock
bohu [Thu, 11 Aug 2016 00:19:50 +0000 (17:19 -0700)]
Emulator: allows usage mismatch in gralloc_lock

For emulater with gpu host, there is no need to require that the
gralloc_lock usage has to match gralloc_alloc usage type.
If any buffer is allocated, it can be used for both read and write.

Bug: 30784436
Change-Id: I4014a3338e64cb1e8cdaa5ff50eecae0d44de318

7 years agoMerge "Revert "glGetProgramiv validation on the guest""
Yahan Zhou [Wed, 10 Aug 2016 21:15:55 +0000 (21:15 +0000)]
Merge "Revert "glGetProgramiv validation on the guest""

7 years agoRevert "glGetProgramiv validation on the guest"
Yahan Zhou [Wed, 10 Aug 2016 21:15:45 +0000 (21:15 +0000)]
Revert "glGetProgramiv validation on the guest"

This reverts commit b2856fc5983846339c3b9147b9ac4e36dd5408d5.

Let's leave the check to the host, as the check here cannot handle the situation when a program is marked for delete but not yet deleted.

CTS regression:

dEQP-GLES2.functional.lifetime.delete_used -- program

Change-Id: Ib6dcf0c11407da06fd1b91e3cdb89ee711af481b

7 years agoMerge "Revert "Revert "Emulator: create host color buffer for Vedio encoder"""
Bo Hu [Tue, 9 Aug 2016 01:09:15 +0000 (01:09 +0000)]
Merge "Revert "Revert "Emulator: create host color buffer for Vedio encoder"""

7 years agoRevert "Revert "Emulator: create host color buffer for Vedio encoder""
Bo Hu [Tue, 9 Aug 2016 01:09:06 +0000 (01:09 +0000)]
Revert "Revert "Emulator: create host color buffer for Vedio encoder""

This reverts commit 1a80c227edbc86ae585276a0b7c45e28458813f1.

Change-Id: I484c2092e30d23038f3a6ffbdf646960747b54b4

7 years agoMerge "Revert "Emulator: create host color buffer for Vedio encoder""
Bo Hu [Sun, 7 Aug 2016 05:10:31 +0000 (05:10 +0000)]
Merge "Revert "Emulator: create host color buffer for Vedio encoder""

7 years agoRevert "Emulator: create host color buffer for Vedio encoder"
Bo Hu [Sun, 7 Aug 2016 05:10:11 +0000 (05:10 +0000)]
Revert "Emulator: create host color buffer for Vedio encoder"

temp revert to track down CTS regression starting with build 107
where massive cases were not executed

This reverts commit 1454b715016822c276b8bcaaeabca2d8f5b4857c.

Change-Id: I88b37b6087dcb6677c7afb863022063db6ee5893

7 years agoYUV_428_888 <-> RGB888 conversion
Lingfeng Yang [Sat, 6 Aug 2016 00:10:30 +0000 (17:10 -0700)]
YUV_428_888 <-> RGB888 conversion

This time, I think I have it right---my assumptions:

No align

ystride == image width
cstride = ystride / 2

Change-Id: I645c98e3f2cc4271ba7be807102cc2809479cd48

7 years agoChange yv12 conversion from rgb565 to 888
Joshua Lang [Fri, 5 Aug 2016 21:18:52 +0000 (14:18 -0700)]
Change yv12 conversion from rgb565 to 888

Media codec tests that caused back to back yv12 - rgb565 conversions were
failing color threshold assertions. Changed the conversion to rgb888
instead to keep more precision during conversions.

Bug: 28750939
Change-Id: I75001261db82b9ecfa943d9a791a737a811cb168

7 years agoRevert "Make YUV_420_888 color correct"
Lingfeng Yang [Fri, 5 Aug 2016 21:17:33 +0000 (21:17 +0000)]
Revert "Make YUV_420_888 color correct"

This reverts commit 627769df70a80f638ded32984118a62196afaafc.

Change-Id: I25112dd7735446359c2493108635205eca31a662

7 years agoFix comments and style in YUV_420_888 handling
Lingfeng Yang [Fri, 5 Aug 2016 19:17:23 +0000 (12:17 -0700)]
Fix comments and style in YUV_420_888 handling

Change-Id: Ia64e2396427c944f5eedef30c4bc098303fefd88

7 years agoMake YUV_420_888 color correct
Lingfeng Yang [Fri, 5 Aug 2016 18:31:25 +0000 (11:31 -0700)]
Make YUV_420_888 color correct

This CL uses the existing YV12 / RGB converter to
do YUV_420_888 color conversion, by switching
the U and V start addresses in cases where the
format is YUV_420_888.

Change-Id: I5effe6e4ecad02b9110095521082682b785a2390

7 years agoFix build on older APIs
Lingfeng Yang [Fri, 5 Aug 2016 18:38:57 +0000 (11:38 -0700)]
Fix build on older APIs

Change-Id: I3c38c5a7f686630bb0e3fa02e840d5eade75b58a

7 years agoMerge "Allow YUV_420_888 through gralloc"
Lingfeng Yang [Fri, 5 Aug 2016 18:13:59 +0000 (18:13 +0000)]
Merge "Allow YUV_420_888 through gralloc"

7 years agoAllow YUV_420_888 through gralloc
Lingfeng Yang [Thu, 28 Jul 2016 21:29:50 +0000 (14:29 -0700)]
Allow YUV_420_888 through gralloc

This is currently only used to help pass tests that
involve the direct use of the YUV_420_888 format.

An attempt is made at format conversion using the same
code for converting YV12. This would keep memory structures
intact, but result in the wrong colors.

The test:

android.hardware.camera2.cts.AllocationTest#testAllocationFromCameraFlexibleYuv

has a much higher probability of passing with this change,
provided the emulated camera is used,
and the other CLs:

Guest:

https://googleplex-android-review.git.corp.google.com/#/c/1282093/
https://googleplex-android-review.git.corp.google.com/#/c/1291418/

Host:

https://android-review.googlesource.com/#/c/253893/

Change-Id: I70f86402ace6debae731a7f5b98833be3096fdd6

7 years agoDo not set up anything if glUseProgram gets an invalid program name
Yahan Zhou [Thu, 4 Aug 2016 23:14:20 +0000 (16:14 -0700)]
Do not set up anything if glUseProgram gets an invalid program name

It should set the appropriate error code and do not do anything.

Change-Id: Ie81a4ba3a1907607e03d82d62416c4699cf6bb1b

7 years agoglGetProgramiv validation on the guest
Yahan Zhou [Thu, 4 Aug 2016 22:31:47 +0000 (15:31 -0700)]
glGetProgramiv validation on the guest

This is to respect GLES2 spec, which says

"If an error is generated, no change is made to the contents of params."

https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetProgramiv.xml

Our encoder almost aways change the contents of params no matter what.
So we need to have the check before encoding.

Change-Id: I754a51ee43c1e83aebd2fd89d595475960cc2301

7 years agoEmulator: create host color buffer for Vedio encoder
bohu [Thu, 4 Aug 2016 19:19:22 +0000 (12:19 -0700)]
Emulator: create host color buffer for Vedio encoder

MediaCodec has GRALLOC_USAGE_HW_VIDEO_ENCODER usage flag
when it creates colorbuffer and renders to it.

We need to create corresponding colorbuffer on the
host to support such usage type.

Bug: 30088791
Change-Id: I911b1ecfb563eab5634abb2249657c1caa668a73

7 years agoMerge "Emulator: Support YV12 format in gralloc"
Bo Hu [Fri, 29 Jul 2016 19:10:31 +0000 (19:10 +0000)]
Merge "Emulator: Support YV12 format in gralloc"

7 years agoEmulator: Support YV12 format in gralloc
bohu [Mon, 18 Jul 2016 23:05:38 +0000 (16:05 -0700)]
Emulator: Support YV12 format in gralloc

The YV12 format is used by codec when it generates output.
Need to support it to pass android.media.cts.ImageReaderDecoderTest

Note:
This YV12 format and other yuv formats are only meant to be used
as software read/write buffer; they are not supported by the
host GL's colorbuffer. so when we want to render it to the host
screen, we have to convert to RGB565 format or other RGB format.

Bug: 30112142
Change-Id: I874e8f2e040fd15ad02ce48c0d65bed1cd08a791

7 years agoFix build
Lingfeng Yang [Thu, 28 Jul 2016 18:21:04 +0000 (11:21 -0700)]
Fix build

Change-Id: I22cc97d7931bfe87e86a0c5203e7e36dac9d327b

7 years agoMerge changes from topic 'emu-glsync-guest-v2'
Lingfeng Yang [Thu, 28 Jul 2016 18:00:10 +0000 (18:00 +0000)]
Merge changes from topic 'emu-glsync-guest-v2'

* changes:
  More efficient swapBuffers
  Implement EGL_KHR_fence_sync/EGL_ANDROID_native_fence_sync for emulator
  Add backing implementation of EGLSyncKHR objects
  Add DEBUG_EGL / DPRINT macros for debug logging EGL.
  Goldfish sync driver user-space interface
  Add encoder entries for EGL_KHR_fence_sync
  ANDROID_EMU_ASYNC_SWAP extension searching + setting

7 years agoMore efficient swapBuffers
Lingfeng Yang [Fri, 22 Jul 2016 22:21:58 +0000 (15:21 -0700)]
More efficient swapBuffers

Previously, we were using glFinish() in the host to make sure
that a buffer that we are presenting has been completely written to.
That is bad for performance, because it usually means to block the CPU
until the GPU's command queue is completely empty and all operations
have completed.

This CL uses eglCreateSyncKHR with a native fence FD to guarantee
the draw buffer is finished before presenting. The idea is that
after rcFlushWindowColorBufferAsync has queued up GPU commands to
finish up the draw buffer, eglCreateSyncKHR follows that up with a fence
command.

The fence command in turn is represented by a FD (by providing
EGL_SYNC_NATIVE_FENCE_ANDROID as the sync object type). Giving that FD
to queueBuffer tells SurfaceFlinger/BufferQueue not to do anything
that depends on the contents of that buffer until the fence command
has completed.

Theoretically, we are supposed to wait on the FD coming from dequeueBuffer
as well, to make sure no one else is using it, but in practice,
it matters much less; we will just overwrite the contents anyway, and it
has not proved to be any problem in terms of visual artifacts.

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570 <- needed
https://googleplex-android-review.git.corp.google.com/1219571 <- this CL

Change-Id: I3dd1b69c77665ac0143bd5a302e6a5a04736c9ea

7 years agoImplement EGL_KHR_fence_sync/EGL_ANDROID_native_fence_sync for emulator
Lingfeng Yang [Thu, 14 Jul 2016 00:44:03 +0000 (17:44 -0700)]
Implement EGL_KHR_fence_sync/EGL_ANDROID_native_fence_sync for emulator

The core purpose of these two extensions is to provide a way for one thread
to know when an EGL command has finished processing in another thread,
so that it is safe to do work that touches common memory regions,
such as frame buffers in a concurrent draw/present setup.

eglCreateSyncKHR inserts a fence command into the current context's
command queue, and returns a handle to that command. eglClientWaitSyncKHR
takes such a handle as input and blocks the CPU until that fence command
is completed.

For the emulator, we implement these commands by wrapping underlying
host implementations. That is enough for EGL_KHR_fence_sync, but we also
include an interface to the Goldfish Sync driver in order to have
EGL_ANDROID_native_fence_sync. Goldfish Sync driver adds the ability for
these fence commands and their completed/not completed state
to be represented as FDs, which the rest of the Android platform
uses for doing graphics asynchronously.

Related specs:

https://www.khronos.org/registry/vg/extensions/KHR/EGL_KHR_fence_sync.txt
https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570 <- uses this

All changes above, including host-side, are needed for this to work.
The following CL uses the functionality in this one:

https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: I9bf0ba0994b2e8689a6bed9c5eeee206a5e21f45

7 years agoAdd backing implementation of EGLSyncKHR objects
Lingfeng Yang [Thu, 14 Jul 2016 00:24:59 +0000 (17:24 -0700)]
Add backing implementation of EGLSyncKHR objects

For EGL_KHR_fence_sync and related extensions in the emulator,
we'll need an object that can track host-side sync objects
along with any Android sync framework fence fd's that
may be produced, and be able to maintain the type and status
of sync objects (generally, EGL fence vs. EGL fence + fence fd,
and signaled vs. unsignaled).

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539 <- this CL
https://googleplex-android-review.git.corp.google.com/1219570 <- uses this
https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: Ic20d11500f3a6e7164c1a5919937b26a885b1987

7 years agoAdd DEBUG_EGL / DPRINT macros for debug logging EGL.
Lingfeng Yang [Thu, 14 Jul 2016 00:11:47 +0000 (17:11 -0700)]
Add DEBUG_EGL / DPRINT macros for debug logging EGL.

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538 <- this CL
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570 <- uses this
https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: I3041732beffb3bbc92196a082dc73d3dd74a0c4e

7 years agoGoldfish sync driver user-space interface
Lingfeng Yang [Thu, 14 Jul 2016 00:05:09 +0000 (17:05 -0700)]
Goldfish sync driver user-space interface

goldfish_sync.h implements the ioctls that interface
with the goldfish sync driver and the goldfish sync
virtual device on the host.

goldfish_sync_open() tells the kernel driver that
there is a new context in which sync work
may be required. This is represented by a user-space
FD. Note that this is not a timeline FD
as with SW_SYNC_USER.

The intention is to associate each EGL context
with a sync context, reflected in getGoldfishSyncFd()
in the EGLContext_t class.

The IOC_QUEUE_WORK ioctl may return a valid fence FD
that can be used by the system to do work while
waiting for that fence FD to be signaled.

In order to avoid bad behavior, timelines and sync fence objects
are still completely maintained and signaled by the
kernel driver and underlying host system.

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

In particular, the ioctl() implementation is listed in

https://android-review.googlesource.com/238399

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537 <- this CL
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570 <- uses this
https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: I74b92415acd95b4bf2ec8aa3a6ff5392d86cf0b3

7 years agoAdd encoder entries for EGL_KHR_fence_sync
Lingfeng Yang [Wed, 13 Jul 2016 23:27:43 +0000 (16:27 -0700)]
Add encoder entries for EGL_KHR_fence_sync

- also update encoder templates to latest version

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535
https://googleplex-android-review.git.corp.google.com/1219536 <- this CL
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570 <- uses this
https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: Ief436ccf8947d35c4b7719dc9ef6def4488cb3f0

7 years agoANDROID_EMU_ASYNC_SWAP extension searching + setting
Lingfeng Yang [Wed, 13 Jul 2016 23:26:10 +0000 (16:26 -0700)]
ANDROID_EMU_ASYNC_SWAP extension searching + setting

In order for the async frame swapping feature to work
with all combinations of new/old emulators and system images,
one way to do it is to introduce an emulator-specific GL
extension. This is the same way the checksum calculation
support works.

This is a port to device/generic/goldfish-opengl, based on

https://googleplex-android-review.git.corp.google.com/#/c/1065345/

This is part of a sequential, multi-CL change. There is also
a corresponding multi-CL change on the host side:

https://android-review.googlesource.com/#/q/topic:emu-glsync-host

The changes in the system image are as follows:

platform/build:

https://googleplex-android-review.git.corp.google.com/1024926

device/generic/goldfish:

https://googleplex-android-review.git.corp.google.com/1230942

device/generic/goldfish-opengl:

https://googleplex-android-review.git.corp.google.com/1219535 <- this CL
https://googleplex-android-review.git.corp.google.com/1219536
https://googleplex-android-review.git.corp.google.com/1219537
https://googleplex-android-review.git.corp.google.com/1219538
https://googleplex-android-review.git.corp.google.com/1219539
https://googleplex-android-review.git.corp.google.com/1219570
https://googleplex-android-review.git.corp.google.com/1219571

Change-Id: Id07a72e5cb3397ff9d0b55788b8ad763c15050f3

7 years agoEmulator: allow swread of GRALLOC_USAGE_HW_VIDEO_ENCODER buffer
bohu [Mon, 25 Jul 2016 19:25:18 +0000 (12:25 -0700)]
Emulator: allow swread of GRALLOC_USAGE_HW_VIDEO_ENCODER buffer

Because either hardware or software encoder can be used, a buffer
created with GRALLOC_USAGE_HW_VIDEO_ENCODER should allow both to
read the buffer.

Bug: 30088791
Change-Id: I3cb6c1449628fcd0f676858f52c6dce01577fa95

7 years agoFix gralloc pipe and add flush to rcCloseColorBufferPuid
Yahan Zhou [Fri, 22 Jul 2016 20:51:14 +0000 (13:51 -0700)]
Fix gralloc pipe and add flush to rcCloseColorBufferPuid

There is a typo in gralloc pipe. Also rcCloseColorBufferPuid needs to be
flushed to function correctly.

Change-Id: Ic006578f560dede0bdc073d6ab862e588b71e452

7 years agoMerge "Fix master build"
Colin Cross [Thu, 21 Jul 2016 04:47:57 +0000 (04:47 +0000)]
Merge "Fix master build"

7 years agoMerge "Revert "Use the new <system/qemu_pipe.h>.""
Christopher Ferris [Thu, 21 Jul 2016 02:09:47 +0000 (02:09 +0000)]
Merge "Revert "Use the new <system/qemu_pipe.h>.""

7 years agoRevert "Use the new <system/qemu_pipe.h>."
Christopher Ferris [Thu, 21 Jul 2016 02:08:53 +0000 (02:08 +0000)]
Revert "Use the new <system/qemu_pipe.h>."

This reverts commit a4b8bbbcc63dd03305bcdb6acf4d916da2889206.

Change-Id: I3bd5b8b88c9462f7af744c6ec626ff7fe0432dc2

7 years agoMerge "Use the new <system/qemu_pipe.h>."
Christopher Ferris [Thu, 21 Jul 2016 01:45:04 +0000 (01:45 +0000)]
Merge "Use the new <system/qemu_pipe.h>."

7 years agoUse the new <system/qemu_pipe.h>.
Christopher Ferris [Thu, 21 Jul 2016 01:42:55 +0000 (18:42 -0700)]
Use the new <system/qemu_pipe.h>.

The old qemu_pipe.h was moved so change to use the new location of the
header.

Change-Id: I032a9444a430f3426ec430fff27f6b117443b5ca

7 years agoFix master build
Yahan Zhou [Thu, 21 Jul 2016 00:15:15 +0000 (17:15 -0700)]
Fix master build

Change-Id: Ib81144748f520a9812c98c3cd23f114ba490d297

7 years agoMerge "Fix jb build"
Yahan Zhou [Wed, 20 Jul 2016 23:26:20 +0000 (23:26 +0000)]
Merge "Fix jb build"

7 years agoFix jb build
Yahan Zhou [Wed, 20 Jul 2016 23:12:02 +0000 (16:12 -0700)]
Fix jb build

Change-Id: I31b9e3e44523819f54da362e688b2c5098ec27bd

7 years agoMerge "Fix jb arm boot"
Bo Hu [Wed, 20 Jul 2016 21:37:20 +0000 (21:37 +0000)]
Merge "Fix jb arm boot"