OSDN Git Service

android-x86/device-generic-goldfish-opengl.git
7 years ago[GLESv3] versions, es > 2, encoder
Lingfeng Yang [Mon, 9 Jan 2017 20:04:12 +0000 (12:04 -0800)]
[GLESv3] versions, es > 2, encoder

- Encoder with ES 3.x entry points
- Allow ES versions > 2 depending on host capability

Change-Id: I71e374f1685610bb0e4f9e04f4bba87b0cbaa02b

7 years agoMerge "Revert "Fix boot for car emulator on git-master""
Lingfeng Yang [Wed, 11 Jan 2017 00:30:58 +0000 (00:30 +0000)]
Merge "Revert "Fix boot for car emulator on git-master""

7 years agoRevert "Fix boot for car emulator on git-master"
Lingfeng Yang [Wed, 11 Jan 2017 00:30:45 +0000 (00:30 +0000)]
Revert "Fix boot for car emulator on git-master"

This reverts commit 3783edd49fd2ad6f200cbf9d04978132f2e41bd2.

Change-Id: I25dab3f8c151506a84601ab0c341d5dfc7c3b2ae

7 years agoRevert "Fix git-master and sync device"
Weilun Du [Fri, 6 Jan 2017 18:37:21 +0000 (18:37 +0000)]
Revert "Fix git-master and sync device"

This reverts commit 057e300788707fca96aeb82c3cc4d1d9b475b032.

Change-Id: Ic2d2c808cf1587e839abfa7a8928792544f231ac

7 years agoFix git-master and sync device
Lingfeng Yang [Wed, 4 Jan 2017 01:35:08 +0000 (17:35 -0800)]
Fix git-master and sync device

Disable sync device for now until we fix rest of the issues

Change-Id: Ie4878b1231b481e5085d47e7525f0ae4b3c7e9db

7 years agoFix boot for car emulator on git-master
Lingfeng Yang [Tue, 3 Jan 2017 23:57:53 +0000 (15:57 -0800)]
Fix boot for car emulator on git-master

bug: 33623000

Change-Id: Ie17136f2adafdb567bf9a490cf1282f1703d4f54

7 years agoFix black screen in apps
Lingfeng Yang [Wed, 14 Dec 2016 21:13:51 +0000 (13:13 -0800)]
Fix black screen in apps

- multi-line for loop body :)
- distinguish locked vs unlocked cb width

Change-Id: I4d978011a1b7a7aa5efb244a56353857285e3a03

7 years agoMerge "Fix out-of-bounds vertex arrays"
TreeHugger Robot [Tue, 13 Dec 2016 01:52:55 +0000 (01:52 +0000)]
Merge "Fix out-of-bounds vertex arrays"

7 years agoFix out-of-bounds vertex arrays
Lingfeng Yang [Tue, 13 Dec 2016 00:17:02 +0000 (16:17 -0800)]
Fix out-of-bounds vertex arrays

Index range cache got a bogus argument for "offset",
so it was not being invalidated properly.

When it wasn't being invalidated properly, our validation
could issue out-of-bounds errors even when the index buffer
was actually not out of bounds.

Change-Id: I9c59412bb20bd6ea16e25bf83f1e64d5889910e9

7 years agoMerge "Handle repeated swapBuffer errors"
TreeHugger Robot [Fri, 9 Dec 2016 00:36:02 +0000 (00:36 +0000)]
Merge "Handle repeated swapBuffer errors"

7 years agoHandle repeated swapBuffer errors
Joshua Lang [Thu, 8 Dec 2016 22:49:07 +0000 (14:49 -0800)]
Handle repeated swapBuffer errors

Changed eglSwapBuffers to actually signal an error when swapBuffers
fails. This was hiding an error log at the SurfaceFlinger callsite.

When eglSwapBuffers is called after a prior error, we should not try to
enqueue a NULL buffer which was causing a segfault that takes down
SurfaceFlinger.

Bug: 33432596
Change-Id: I72f3301e0adbc4ea75266c9c1c9e01d9169036e7

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296 am...
Bill Yi [Tue, 6 Dec 2016 23:52:12 +0000 (23:52 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296 am: df28bb8ddf am: 4033cc718c
am: d8dad693b2

Change-Id: Ie80f047c5a8f81fbc81e8e60ba4c158022590002

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296 am...
Bill Yi [Tue, 6 Dec 2016 23:48:12 +0000 (23:48 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296 am: df28bb8ddf
am: 4033cc718c

Change-Id: I3ea15643bbabf94be2fdccb2982459aa8b284f45

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296
Bill Yi [Tue, 6 Dec 2016 23:44:11 +0000 (23:44 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD am: 0bff4a1296
am: df28bb8ddf

Change-Id: I8651d7ebd3694ac715dcaac6f46d7094c5e327eb

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Tue, 6 Dec 2016 23:39:41 +0000 (23:39 +0000)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: 0bff4a1296

Change-Id: Icdff0ea2225fe1dd8e1b587f829b005810413655

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Tue, 6 Dec 2016 22:30:40 +0000 (14:30 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

7 years agoMerge "Print more info if a draw call is out of bounds"
TreeHugger Robot [Tue, 6 Dec 2016 14:38:04 +0000 (14:38 +0000)]
Merge "Print more info if a draw call is out of bounds"

7 years agoMerge "[GLESv3][VAO] enable/pointer for vertex attribs when possible"
TreeHugger Robot [Fri, 2 Dec 2016 22:09:45 +0000 (22:09 +0000)]
Merge "[GLESv3][VAO] enable/pointer for vertex attribs when possible"

7 years agoInitial empty repository
Bill Yi [Fri, 2 Dec 2016 21:05:18 +0000 (21:05 +0000)]
Initial empty repository

7 years agoPrint more info if a draw call is out of bounds
Lingfeng Yang [Fri, 2 Dec 2016 20:32:41 +0000 (12:32 -0800)]
Print more info if a draw call is out of bounds

Change-Id: I8f35d27a76d8b023f63543f2afdd4dc9c2a18a0b

7 years ago[GLESv3][VAO] enable/pointer for vertex attribs when possible
Lingfeng Yang [Fri, 2 Dec 2016 16:02:15 +0000 (08:02 -0800)]
[GLESv3][VAO] enable/pointer for vertex attribs when possible

If we don't forward enables/pointers to the host until
right before the draw, when a nonzero VAO is bound,
it defeats the purpose of VAO usage for performance.

This CL prepares the GLES2 encoder for VAO usage by
forwarding those calls whenever possible.

It gives a flag to sendVertexAttributes to not do any
changes in GL state if all attributes are backed by VBOs.

The reason we don't forward them 100% is because of
supporting either legacy or tricky behavior:

Legacy: specifying vertex arrays from host memory directly
with a host ptr passed to glVertexAttribPointer
Tricky: Using glVertexAttrib*f*(...) instead of
glVertexAttribPointer

Change-Id: I190aab86d7dcd7e01cfac0a1f60b44fac131abd0

7 years agoMerge "Revert "GL2Encoder: Do not forward GLES API version queries""
Lingfeng Yang [Fri, 2 Dec 2016 17:43:24 +0000 (17:43 +0000)]
Merge "Revert "GL2Encoder: Do not forward GLES API version queries""

7 years agoRevert "GL2Encoder: Do not forward GLES API version queries"
Lingfeng Yang [Fri, 2 Dec 2016 17:43:01 +0000 (17:43 +0000)]
Revert "GL2Encoder: Do not forward GLES API version queries"

This reverts commit dadc6b152a14c98bb49ce9848078a6c8bce9bf9f.

dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rgb10_a2 Pass -> Fail

I will provide a proper fix for this; since we are supporting GLESv3, adding the client version to the tracked state and selectively rejecting such formats with GL_FRAMEBUFFER_UNSUPPORTED.

Change-Id: Id7fc205b6ddd46fa72c62cd9a8c67cadee78d46d

7 years agoMerge "More accurate validation on gl vertex attributes"
Yahan Zhou [Fri, 2 Dec 2016 02:02:30 +0000 (02:02 +0000)]
Merge "More accurate validation on gl vertex attributes"

7 years agoMore accurate validation on gl vertex attributes
Yahan Zhou [Thu, 1 Dec 2016 21:49:44 +0000 (13:49 -0800)]
More accurate validation on gl vertex attributes

This CL has more accurate validation for gl vertex attributes, and is
more tolerable if the user forgot to disable some vertex attribute
arrays.

Change-Id: I6bb205add25bf51f0ba70a5cb267c3319a17a842

7 years agoMerge "GL2Encoder: Do not forward GLES API version queries"
Yahan Zhou [Thu, 1 Dec 2016 18:17:11 +0000 (18:17 +0000)]
Merge "GL2Encoder: Do not forward GLES API version queries"

7 years agoGL2Encoder: Do not forward GLES API version queries
Yu Ning [Tue, 31 May 2016 08:40:54 +0000 (16:40 +0800)]
GL2Encoder: Do not forward GLES API version queries

Original author: Chenglangjie Yang <chenglangjie.yang@intel.com>

GLESv3 adds two additional glGetIntegerv() parameters for returning
GLES API version number: GL_MAJOR_VERSION and GL_MINOR_VERSION. They
are not supported by GLESv2, though. Compare:

(v3) https://www.khronos.org/opengles/sdk/docs/man3/html/glGet.xhtml
(v2) https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml

dEQP actually uses this API to determine if the device being tested
supports GLESv3. If GL2Encoder just forwards such queries to the
host, the result will be the desktop GL API version implemented by
the host GPU driver, which is almost always >= 3.0. This can mislead
dEQP into treating the emulated device as GLESv3-compatible, and
cause various GLESv2 tests to fail.

When applied to AOSP master, this patch fixes various dEQP-GLES2
failures in the following packages:

 dEQP-GLES2.functional.fbo.completeness.renderable.*
 dEQP-GLES2.functional.negative_api.*
 dEQP-GLES2.functional.draw.random
 dEQP-GLES2.functional.rasterization.primitives

When applied to Partner m-emu-dev, it causes a few regressions in
dEQP-GLES2 (actually false negatives), which will be addressed by
two other patches.

Change-Id: I801144aeee922d90af4c7dda6af68dcc0a40fb6d
Signed-off-by: Chenglangjie Yang <chenglangjie.yang@intel.com>
[Revised code and commit message]
Signed-off-by: Yu Ning <yu.ning@intel.com>
7 years agoRevert "Fix the position of qemu_pipe header" am: 94ad9fbf53 am: b0e5b30f13
Christopher Ferris [Wed, 30 Nov 2016 02:36:12 +0000 (02:36 +0000)]
Revert "Fix the position of qemu_pipe header" am: 94ad9fbf53 am: b0e5b30f13
am: f10543b3b5

Change-Id: I239c1c42ac6e92290a7319c790fdbf91e354d94b

7 years agoRevert "Fix the position of qemu_pipe header" am: 94ad9fbf53
Christopher Ferris [Wed, 30 Nov 2016 02:31:41 +0000 (02:31 +0000)]
Revert "Fix the position of qemu_pipe header" am: 94ad9fbf53
am: b0e5b30f13

Change-Id: Id43618ad8b4c83b41b0dfa709152640366071fd4

7 years agoRevert "Fix the position of qemu_pipe header"
Christopher Ferris [Wed, 30 Nov 2016 02:26:11 +0000 (02:26 +0000)]
Revert "Fix the position of qemu_pipe header"
am: 94ad9fbf53

Change-Id: I042af868b1f418b0ee5902dc928b405717808cd1

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
(cherry picked from commit 2e11850e11ad1b8a548176a5dc8c223f252227d9)

7 years agoRevert "Revert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc""
Lingfeng Yang [Wed, 30 Nov 2016 00:52:35 +0000 (00:52 +0000)]
Revert "Revert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc""

This reverts commit 9b166b966d6f03f13f65d3134f9c5e1133ec10e2.

Change-Id: I9b10b45d1ebd3b51ede2f75cc8ab403914b0d777

7 years agoMerge "Revert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc""
Miao Wang [Tue, 29 Nov 2016 23:51:38 +0000 (23:51 +0000)]
Merge "Revert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc""

7 years agoRevert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc"
Miao Wang [Tue, 29 Nov 2016 23:43:24 +0000 (23:43 +0000)]
Revert "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc"

This reverts commit df3a043b96b90d949643ddd0219fc0bf4ff68040.

Change-Id: Ic87fa2f922bd61123e64fc32fc8ebb13dec4c219

7 years agoMerge "Fix build - add LOGV->ALOGV"
Lingfeng Yang [Tue, 29 Nov 2016 22:29:29 +0000 (22:29 +0000)]
Merge "Fix build - add LOGV->ALOGV"

7 years agoFix build - add LOGV->ALOGV
Lingfeng Yang [Tue, 29 Nov 2016 22:23:14 +0000 (14:23 -0800)]
Fix build - add LOGV->ALOGV

Change-Id: I669211faa3c58488c5b9b23d900a4e6da8e5c512

7 years agoMerge "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc"
Lingfeng Yang [Tue, 29 Nov 2016 21:55:55 +0000 (21:55 +0000)]
Merge "DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc"

7 years agoDO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc
Lingfeng Yang [Sat, 24 Sep 2016 00:53:48 +0000 (17:53 -0700)]
DO NOT MERGE ANYWHERE: Goldfish DMA-based gralloc

Also includes YV12/YUV420888 conversion on the host.

Change-Id: Ie0c23f6e18ae96b2bdeadf6dbd4828ca1e7de8a0

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""