summaryrefslogtreecommitdiff
path: root/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add another pragma to disable another bunch of warnings." into main ↵Treehugger Robot2024-02-0117-62/+73
|\ | | | | | | | | | | | | | | | | am: a3a0f2f3e7 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2927111 Change-Id: Idd437341266d011765ef75959d02655176ba2cba Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Add another pragma to disable another bunch of warnings.Elliott Hughes2024-01-2417-62/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I suspect someone intended there to be an AIOOBE check in here, but I can't understand the code well enough to be sure of that, let alone well enough to actually implement it. So just add this warning to the list of warnings we're already ignoring. Also update the generator to take into account the stuff that folks have manually added to the generated files... There's still one manual edit necessary because the generator can't cope with the fact that eglDupNativeFenceFDANDROID() has a hand-written Java wrapper, so the generated native method needs to be private and renamed. But at least we're down to one trivial manual edit (adding a line to the methods[] in android_opengl_EGLExt.cpp). Test: treehugger Change-Id: I9f80315612192d65f1e2710a53a9404757ae34bd
* | Merge Android 24Q1 Release (ab/11220357)Xin Li2024-01-299-73/+497
|\ \ | |/ |/| | | | | | | Bug: 319669529 Merged-In: I264e728c49f0500f2f868c3a25b0910d0d527340 Change-Id: I0de5ae0000a29e4b9735e6c4f381f680eb0723cd
| * Remove EGL_KHR_image_gl_colorspace workaround for Android PAlec Mouri2023-11-173-36/+1
| | | | | | | | | | | | | | | | | | | | The ro.vndk.version sysprop is getting removed as part of VNDK deprecation, which will break this workaround. Android P is not really supported anymore, so remvoe the workaround entirely. Bug: 311267616 Test: builds Change-Id: Ieb65da5504083d2db275a68940c1d83940219505
| * Merge changes I17b91fb6,Ibc671cec into mainCody Northrop2023-11-156-37/+496
| |\ | | | | | | | | | | | | | | | * changes: EGL Multifile Blobcache: Add status file EGL Multifile BlobCache: Limit entry count
| | * EGL Multifile Blobcache: Add status fileCody Northrop2023-11-144-13/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a status file that contains the cache version and platform build ID. On future startups, if those values don't match, clear the cache. This alleviates a problem on driver updates, which cause all new queries to miss, creating new entires, filling the cache. For apps with many small entries, the start up time has become a problem. Test: libEGL_test, EGL_test, ANGLE trace tests, apps Bug: b/295051628 Bug: b/310535559 Change-Id: I17b91fb6c994237fb5c2a220db4f23050d45742b
| | * EGL Multifile BlobCache: Limit entry countCody Northrop2023-11-135-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit the number of entries to 4096. This is an empirical number based on app behavior. Some using many small entries are taking a long time to load the cache. Test: MultifileBlobCacheTest.CacheMaxEntrySucceeds Bug: b/295051628 Bug: b/310535559 Change-Id: Ibc671cec25dd7c9bc10b9d1ee1fb837180eb7551
| | * EGL: Close Multifile Blobcache files after mappingCody Northrop2023-09-272-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When loading entries from disk, we don't need to keep the files open after mapping their contents. Per mmap documentation: After the mmap() call has returned, the file descriptor, fd, can be closed immediately without invalidating the mapping. https://man7.org/linux/man-pages/man2/mmap.2.html This will prevent consuming excessive file descriptors, which are a limited resource. Added new test that ensures file descriptors do not remain open. Test: libEGL_test, EGL_test, restricted_trace_perf.py Bug: b/286809755 Change-Id: I6317fdbce340a8e7cbf3020ad41386cf9915dd2d
| | * Make sure the correct ANGLE binary is used.Peiyong Lin2023-09-071-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when eglGetDisplay is called, the code would attempt to initialize ANGLE platform methods and acquire pointers to reset the ANGLE platform. However, without this patch we continue using ro.hardware.egl to form the ANGLE binary name, which is now wrong. Not being able to correctly load the ANGLE binaries means platform methods are not initialize. This currently doesn't have known side effect except that we are observing a bunch of error messages that don't make sense that point to the native OpenGL ES driver loading failure. This patch makes sure ANGLE binary is used when initialize ANGLE platform. Bug: b/293503000 Test: atest CtsAngleIntegrationHostTestCases -c Change-Id: I5189042efc41fa7bef06d20f43ed4da3b1271dab
| | * Merge "Clean up EGL Loader." into mainPeiyong Lin2023-08-031-56/+51
| | |\
| | | * Clean up EGL Loader.Peiyong Lin2023-08-031-56/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes deprecated driver loading path, clean up comments and misc. Bug: b/293503000 Test: boot Change-Id: Ibc62bf59ed7b0cb3671583d2af853c457977d1d1
| | * | Revert^3 "Revert "Load native GLES driver when specified.""Peiyong Lin2023-08-011-6/+23
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: Revert to reland the patch. Original patch was reverted due to PcmaPhotoEditingV3 regression, see b/293486861. Original commit message: """ Load native GLES driver when specified. Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch passes this information down to the native graphics environment so that the EGL loader can properly check. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default """ Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: Ibcf9d765ce1bd8931859d1c11e849a311adda172
| | * Revert^2 "Revert "Load native GLES driver when specified.""Peiyong Lin2023-08-011-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert reason: PcmaPhotoEditingV3 regressed, see b/293486861. Original change id: I6a2e716d340d9be3610c31abbcbe7984bf472f9f Bug: b/283858001 Bug: b/293486861 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: Id08acb6e18db095c632aa8d1a7810ede0c1a1ad2
| | * Merge "Revert "Revert "Load native GLES driver when specified.""" into ↵Peiyong Lin2023-07-261-6/+23
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udc-qpr-dev am: feb3d1595b am: b9bcd78850 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24049733 Change-Id: Ib0bb0ca0e0405a60155bb9cd56ad5606bbd923f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Merge "Revert "Revert "Load native GLES driver when specified.""" into ↵Peiyong Lin2023-07-261-6/+23
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udc-qpr-dev am: feb3d1595b Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24049733 Change-Id: Ia1532e11d12c8663429c57701c4b5170435f26ea Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | | * Revert "Revert "Load native GLES driver when specified.""Peiyong Lin2023-07-251-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1d6261388df9c5f6866bd4f2b296ad685c79badc. Reason for revert: Revert the revert to reland the patch. Original patch was reverted due to rss memory regression. Attempt to reland the patch with a fix, the original regression seems to be caused by usage of enum. Original commit message: """ Load native GLES driver when specified. Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch adds the support to load native GLES drivers when specified. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default """ Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: I6a2e716d340d9be3610c31abbcbe7984bf472f9f
| | * | | Fix bt2020 linear ext mapping issue in EGL and Vulkan.Sally Qi2023-07-191-5/+10
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EGL_EXT_BT2020_LINEAR should be mapped to extend bt2020 linear if output format is FP16. Bug: 261485283 Test: builds Change-Id: Ifd68cc10afc0b5b38b15af2a938d02bb3bcd3764
| | * | Merge "Revert "Load native GLES driver when specified."" into udc-qpr-dev ↵Treehugger Robot2023-07-121-23/+6
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 5443413a3f Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23984063 Change-Id: Ia7481e0f1d6f166ce3529f22612b86d1e1621498 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Revert "Load native GLES driver when specified."Peiyong Lin2023-07-071-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0d60e80ad8162e791305dfb8844a59f1ef9840d3. Reason for revert: culprit of boot memory regression Original commit message: """ Load native GLES driver when specified. Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch adds the support to load native GLES drivers when specified. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default """ Bug: b/283858001 Bug: b/289956225 Change-Id: I785d2d3ff8dd21a1a207ccd814b5dddb080e9b52 Test: forrest test
| | * | Merge "Load native GLES driver when specified." into udc-qpr-dev am: b410845c83Peiyong Lin2023-07-031-6/+23
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23865478 Change-Id: I364f614016947bda2193521f7e5b641467b51f6d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Load native GLES driver when specified.Peiyong Lin2023-06-301-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch adds the support to load native GLES drivers when specified. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: I85840811d9586bd9f2765b47f3cd1a94c9a8580a
| | * | Merge "Avoid unloading ANGLE." into udc-qpr-dev am: de8bd96be0Peiyong Lin2023-06-281-10/+15
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23845380 Change-Id: I529d6f844e99d66442eb5704a9738f31e81e4979 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * Avoid unloading ANGLE.Peiyong Lin2023-06-281-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when ANGLE is the default GLES driver and preloaded, by setting an application to use ANGLE when ANGLE apk doesn't present, the system ANGLE should be used. However, the loader will unload the default driver and load ANGLE. And hence when ANGLE is the default GLES driver, it will be unloaded and then reloaded. This patch makes sure the loader skips unloading and immediately return in this case. Minor: Only unload the drivers when there are preloaded drivers. Bug: b/283858001 Test: verified with camera Test: verified by forcing GLES driver preloading Change-Id: I82b6408405ef7c507e50ab259204bdce95fda110
| | | * Update EGL_GL_COLORSPACE_BT2020_HLG_EXT to the correct value am: 704ade2ba7 ↵Chris Glover2023-06-221-1/+1
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 9e98e34f53 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23516798 Change-Id: I3edb6e4e8b6c9876a49c6058c6e45971a3f8119e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | \ Update EGL_GL_COLORSPACE_BT2020_HLG_EXT to the correct value am: 704ade2ba7 ↵Chris Glover2023-06-221-1/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 9e98e34f53 am: 05a72dee0c Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23516798 Change-Id: I5d00ca257583f7fabb654320b7f20e3d54e27aa0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * \ \ Update EGL_GL_COLORSPACE_BT2020_HLG_EXT to the correct value am: 704ade2ba7 ↵Chris Glover2023-06-221-1/+1
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 9e98e34f53 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23516798 Change-Id: Ia50e20203ad1dc342268f3f21de74d78b0336874 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | | | Merge "Clean up ANGLE integration logic." into udc-qpr-dev am: 7f4c6322ebPeiyong Lin2023-06-176-24/+30
| | |\ \ \ \ | | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23716792 Change-Id: I6f1fe78a158f94fcef08fdb31655119b79e52ef4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * | | Clean up ANGLE integration logic.Peiyong Lin2023-06-166-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename variables to clarify the meanings, remove unused methods. Bug: b/283858001 Test: test with camera with dialog on Test: atest CtsAngleIntegrationHostTestCases Change-Id: I1db89b79879dec663f198fd3faad7501a3511698
| | * | | | Merge "Only use the first available suffix value when loading drivers." into ↵Treehugger Robot2023-06-141-9/+14
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udc-qpr-dev am: ed6c97e573 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23678855 Change-Id: I8a8fcae1a61425a8fb5b9dbce913a48de9cbc396 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * | | Only use the first available suffix value when loading drivers.Peiyong Lin2023-06-131-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the EGL loader to use only the first available suffix value when loading the GLES drivers. Previously the loader will continue to read values from a list of properties if it fails to load the value from the previous property. However, this silent fallback should not have happened, the value of the driver suffix properties must be set correctly or left empty if it's not intended to be used. Bug: b/277100371 Test: boot with persist.graphics.egl points to a nonexisted drivers Change-Id: Id6dd9a5aec5e737e8251f9b5f63176a9f8ebc594
| | * | | | Merge "Revert "Revert "Do not allow wildcard matching in GL loader.""" into ↵Treehugger Robot2023-05-241-1/+5
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udc-qpr-dev am: 3a135c3c6e Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23415349 Change-Id: Ifa61250159b81892f6c21360932bf49e3e73de8e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * | | Revert "Revert "Do not allow wildcard matching in GL loader.""Peiyong Lin2023-05-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 237ab0873378805fc2d00fda9b3969216aad912e. Reason for revert: The original patch is not the culprit. Original commit message: ``` Original commit message: ``` Previously when ro.hardware.egl and ro.board.platform were not set, the loader would attempt to load the exact GLES drivers, and if it failed, it would attempt to use wildcard matching to find the GLES drivers. However, ro.hardware.egl must be set to point to the GLES drivers and hence wildcard matching should be disallowed. This patch makes sure the GL loader no longer uses that path if a device is launched in Android 14 and beyond. ``` Reason for revert: startup regression in b/283393625 ``` Bug: b/283393625 Change-Id: Id6fdd60e9a011679cedbd4eef5b3c7ea83882af9 Test: N/A
| | * | | | Merge "Revert "Do not allow wildcard matching in GL loader."" into ↵Peiyong Lin2023-05-221-5/+1
| | |\| | | | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udc-qpr-dev am: b6fe8a664b Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23373256 Change-Id: I69b7a71cfa005962e9e1007b9370af132bd2541a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | | * | Revert "Do not allow wildcard matching in GL loader."Peiyong Lin2023-05-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c034b3a9bc122e4df4f5ebadf45c585612ef80d3. Original commit message: ``` Previously when ro.hardware.egl and ro.board.platform were not set, the loader would attempt to load the exact GLES drivers, and if it failed, it would attempt to use wildcard matching to find the GLES drivers. However, ro.hardware.egl must be set to point to the GLES drivers and hence wildcard matching should be disallowed. This patch makes sure the GL loader no longer uses that path if a device is launched in Android 14 and beyond. ``` Reason for revert: startup regression in b/283393625 Bug: b/283393625 Change-Id: I7bf18d62ea7a15d6d203328fe2c6a453051a7206 Test: hot_startup_com.google.android.calculator-mean
* | | | | Merge "opengl: tests: Add explict android:exported flag to manifests on ↵Treehugger Robot2023-12-291-2/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLDual.apk" into android14-tests-dev am: 82a619320e Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2863874 Change-Id: Ifefc60214d8c805f0c5bc406b1e945adf7682d31 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * | | | opengl: tests: Add explict android:exported flag to manifests on GLDual.apkJoseph Cheng2023-12-081-2/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After Android S+, it's required to add android:exported flag on manifests if an intent filter is defined. We have added this flag on serveral apps by previous change[1]. This is a follow-up change for GLDual.apk. [1]: https://android.googlesource.com/platform/frameworks/native/+/8e8ae4222f9fb0499af755a4255cceb89a79bd78 Test: The GLDual.apk can be installed successfully on Android 14 devices. Bug: 315418422 Change-Id: Iead9ab7b5e6ebe954b6883289aef70cd6d192ad1
* | | | Merge "Make gl_headers available to com.android.virt apex" into mainArve Hjønnevåg2023-11-141-0/+4
|\ \ \ \
| * | | | Make gl_headers available to com.android.virt apexArve Hjønnevåg2023-11-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to make crosvm vendor available Bug: 309149829 Test: build aosp_cf_x86_64_phone_trusty_vm-userdebug Change-Id: I1c50d40411d462a32e6b159f965be6f30317d406
* | | | | include system ANGLE usage as ANGLE usageSolti2023-11-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL set the system ANGLE usage as GpuStatsInfo::Driver::ANGLE. Previously it was categorized as GpuStatsInfo::Driver::GL. The reason is ANGLE will be shipped as a system driver, not as APK. We want to monitor the adoption of system ANGLE driver. Test: collect the GPU stats before and after the CL. Check the GPU stats reflects ANGLE traffic. See details in http://b/308476674#comment3 Test: run CtsAngleIntegrationHostTestCases on ABTD with the change, See details in http://b/308476674#comment2 Bug: b/308152854, b/308476674, b/308098783 Change-Id: I938b2d112f3da3ced3a1590a08fd70687da855e4 Merged-In: I9beb7c75d65b7aa2b7c5af9f262f30be9d6247d5
* | | | | Merge "Avoid double initialization of ANGLE platform." into mainTreehugger Robot2023-11-045-51/+23
|\ \ \ \ \
| * | | | | Avoid double initialization of ANGLE platform.Peiyong Lin2023-11-035-51/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when ANGLE libraries were loaded, the loader already attempted to dlsym the ANGLEGetDisplayPlatform method, but when EGLDisplay is called everytime, it will always call into open the ANGLE library again and attempt to dlsym ANGLEGetDisplayPlatform and ANGLEResetDisplayPlatform, since ANGLE is already opened, the loader should just dlsym once and bookkeep the results. Bug: b/236050939 Test: trace no longer shows duplicate display platform call Change-Id: I8ce2596c3b0968a4a2e9f7651f59d2ad67efbc64
* | | | | | Do not use default namespace to load ANGLE when in vendor partition.Peiyong Lin2023-11-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the loader was changed to always assume ANGLE is in system partition, but this is not true until the flag is enabled. Bug: b/309001559 Test: avd boot Change-Id: Ia973bd2cc9e3aff3693e28784c61fb8bf61adaf5
* | | | | | nullptr check on suffix.Peiyong Lin2023-11-021-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value of suffix could be nullptr, hence we should perform a nullptr check. Bug: b/309001559 Test: boot Change-Id: Ifd0bf521544d378cb438a8d9c3e0ad2ed5a199db
* | | | | Merge "Make ANGLE loadable from system image." into mainPeiyong Lin2023-11-022-66/+87
|\ \ \ \ \
| * | | | | Make ANGLE loadable from system image.Peiyong Lin2023-10-202-66/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously ANGLE was built as part of vendor partition, and hence when it was the default OpenGL ES driver, the loader should use sphal namespace to dlopen it. However, having ANGLE in vendor partition also means Android OS relies on updates of the vendor partition to get ANGLE. While in general ANGLE has an implicit dependency on the Vulkan driver in the vendor partition, we should be able to update it outside of the vendor parition. This patch changes the loading the ANGLE binaries with the assumption that ANGLE binaries is part of the system image. This will give Android OS the benefit to ship and update ANGLE independently from vendor partition and hence shipping ANGLE is no longer blocked by updating the vendor partition. This will also allow Android to have minimal requirements on ANGLE. Bug: b/293503000 Test: atest CtsAngleIntegrationHostTestCases -c Change-Id: If32dd9ff8b023dc975930cb7bce7b003c10618e4
* | | | | | EGL: Close Multifile Blobcache files after mappingCody Northrop2023-10-232-5/+65
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When loading entries from disk, we don't need to keep the files open after mapping their contents. Per mmap documentation: After the mmap() call has returned, the file descriptor, fd, can be closed immediately without invalidating the mapping. https://man7.org/linux/man-pages/man2/mmap.2.html This will prevent consuming excessive file descriptors, which are a limited resource. Added new test that ensures file descriptors do not remain open. Test: libEGL_test, EGL_test, restricted_trace_perf.py Bug: b/286809755 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5f8117acd45348704629a8aa7bd2169a5ad6a547) Merged-In: I6317fdbce340a8e7cbf3020ad41386cf9915dd2d Change-Id: I6317fdbce340a8e7cbf3020ad41386cf9915dd2d
* | | | | Merge "[Cherry-pick] Make sure the correct ANGLE binary is used." into mainTreehugger Robot2023-10-201-13/+4
|\ \ \ \ \
| * | | | | [Cherry-pick] Make sure the correct ANGLE binary is used.Peiyong Lin2023-10-201-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when eglGetDisplay is called, the code would attempt to initialize ANGLE platform methods and acquire pointers to reset the ANGLE platform. However, without this patch we continue using ro.hardware.egl to form the ANGLE binary name, which is now wrong. Not being able to correctly load the ANGLE binaries means platform methods are not initialize. This currently doesn't have known side effect except that we are observing a bunch of error messages that don't make sense that point to the native OpenGL ES driver loading failure. This patch makes sure ANGLE binary is used when initialize ANGLE platform. Bug: b/293503000 Test: atest CtsAngleIntegrationHostTestCases -c Change-Id: I5189042efc41fa7bef06d20f43ed4da3b1271dab Merged-In: I5189042efc41fa7bef06d20f43ed4da3b1271dab
* | | | | | [Cherry-pick] Clean up EGL Loader.Peiyong Lin2023-10-201-56/+51
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes deprecated driver loading path, clean up comments and misc. Bug: b/293503000 Test: boot Change-Id: Ibc62bf59ed7b0cb3671583d2af853c457977d1d1 Merged-In: Ibc62bf59ed7b0cb3671583d2af853c457977d1d1
* | | | | [Cherry-pick] Revert^3 "Revert "Load native GLES driver when specified.""Peiyong Lin2023-10-191-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: Revert to reland the patch. Original patch was reverted due to PcmaPhotoEditingV3 regression, see b/293486861. Original commit message: """ Load native GLES driver when specified. Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch passes this information down to the native graphics environment so that the EGL loader can properly check. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default """ Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: Ibcf9d765ce1bd8931859d1c11e849a311adda172 Merged-In: Ibcf9d765ce1bd8931859d1c11e849a311adda172