util


Log

Author Commit Date CI Message
Mohan Maiya 295eece6 2023-12-26T17:28:04 Vulkan: Add feature to force enable sample usage Add a feature that would force enable the VK_IMAGE_USAGE_SAMPLED_BIT usage flag for an image with external format, irrespective of the requested AHB usage. Bug: b/155487768 Change-Id: Ie46012d6f905317cd42a69768b4d35b44db474c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5153131 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi 16bfe951 2023-12-21T10:23:05 Add README.chromium for llvm and clspv Bug: angleproject:8369 Change-Id: I20bbb38b45aace848f8002cb49f206d98c2d7aa1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5145927 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Charlie Lao 40f4de8f 2023-12-15T10:17:32 Vulkan: Ensure we use cached memory for readPixels stagingBuffer Previous CL crrev.com/c/5112759 does not solve the performance issue for ChromeOS. The reason is that on more recent intel GPU, there is no hostVisibleCachedCoherent heap. When we allocate staging buffer, we specify CachedCoherent as the preferredFlags instead of requiredFlags. This means we still end up getting UncachedCoherent since VMA tries to respect coherent bits as first priority. This CL Changes CachedCoherent to CachedPreferCoherent, and made Cached as required bit, thus ensures the memory allocated is cached. Since coherent bit may not be honored, thus we have to call invalidate/flush (which underline implementation will check the bit and early out if no need). Somehow on ARM GPU using cachedNonCoherent staging buffer causing many test failures, even though we do call invalidate() after allocation, and tests pass on all other GPUs. It almost indicates ARM driver have a bug with invalidate() that it is not doing expected. But before I can be sure and fixed, I added feature bit to keep ARM the old behavior, which uses UnCached memory for readPixels which should suffer the performance as well. Bug: b/315836169 Bug: b/310701311 Change-Id: I1eec6105ce74275faa893b0206be8470f0cde72f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5122318 Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 3439e421 2023-12-15T11:37:53 Vulkan: Remove AHB workaround for camera app This is now fixed in camera app main branch. The workaround is removed here. Bug: b/239181279 Change-Id: I782baf7a42a8c9a897f1947d8b2f6feba606ce29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5126931 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 6d9f0aee 2023-11-30T00:00:00 Metal: Ensure helper invocations when derivatives are used Set sample coverage mask to ensure that fragment shader helper invocations are performed when derivatives are used. Fixed the following tests on Apple silicon: dEQP-GLES2.functional.texture.mipmap .2d.projected.nearest_linear_repeat .2d.projected.linear_linear_repeat .cube.projected.linear_nearest .cube.projected.linear_linear dEQP-GLES3.functional.texture.mipmap .2d.projected.nearest_nearest_mirror .2d.projected.linear_nearest_clamp .2d.projected.linear_nearest_repeat .2d.projected.linear_nearest_mirror .2d.projected.nearest_linear_repeat .2d.projected.linear_linear_clamp .2d.projected.linear_linear_repeat .3d.projected.nearest_nearest_mirror .3d.projected.linear_nearest_clamp .3d.projected.linear_nearest_repeat .3d.projected.nearest_linear_clamp .3d.projected.nearest_linear_mirror .3d.projected.linear_linear_clamp .3d.projected.linear_linear_repeat Fixed: angleproject:8443 Fixed: angleproject:7023 Change-Id: I13fc52532b94de098dcf3e9f5f02d48a6c8913c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5089131 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi fb6b960c 2023-11-27T14:24:28 Remove GL_CHROMIUM_texture_filtering_hint This was using an unregistered Vulkan extension to set the precision of SwiftShader's internal filtering for the sake of Chrome. That's baked in at build instead. Bug: angleproject:8349 Bug: chromium:726075 Change-Id: I12849d2d29d99626f22a92ee9d74366f78658476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5063344 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev edcfab40 2023-11-23T00:00:00 Metal: Implement textureCubeGrad transformation for AGX Wrapped all affected built-in function calls with helpers that transform derivative values. Fixed all *.texturegrad.* dEQP failures on Apple silicon. Fixed: angleproject:7021 Fixed: angleproject:8433 Change-Id: I16b023840ad267ab72d31fde3cb0fa7048e5310c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5071254 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 3680a5dc 2023-11-17T13:51:07 Vulkan: Let program warmup continue passed link The warmup task does not actually affect the link results, so there is no reason to wait for it when the application queries the link status. This change allows the warm up task to continue in parallel until the program is used at draw time. This allows the warm up to be more efficient when the link itself is not parallelized. For applications that create programs in the middle of every frame, it's still likely best to disable warm up (as the following immediate draw will already effectively do the warm up). Note that currently the warm up code in the Vulkan backend is not completely thread-safe, and so the program still blocks on that task before the first draw can happen (or the program is modified in any way). Bug: angleproject:8417 Change-Id: I0877fef39a0585c3279e32699ce817d4643d7cd6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5037538 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yiwei Zhang d842f3db 2023-11-29T06:53:58 Vulkan: add a disableSeparateShaderObjects feature Dota Underlords uses one PPO and keeps swapping the attached program. Though we get cache hit, the hundreds pipeline creation calls still amount to non-trivial CPU overhead via ANGLE. The use of SSO has been disabled by the app in certain cases, and this feature is added to support entirely disabling SSO in ANGLE on all Vulkan backend impls. Bug: b/309028728 Test: Dota Underlords easily hits target FPS on ANV and RADV Change-Id: I54532975237218563b8750f1878a83e386fe776d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5073414 Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Caroline Liu 879598f3 2023-11-10T21:38:01 [fuchsia] Strip ScenicWindow utility of unsupported Fuchsia tools Bug: fuchsia:64206 Change-Id: I7e2ec1e1d2ebc16c2381f21c0c1ad2ad7149c4fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5020238 Reviewed-by: Emircan Uysaler <emircan@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 2155534b 2023-11-06T11:49:20 Don't set dirty bits for attribs that are out of range. PrivateState::setAllDirtyBits sets all bits in mDirtyCurrentValues. When the context has fewer max attibutes than MAX_VERTEX_ATTRIBS, this can cause out-of-bounds access to PrivateState::mVertexAttribCurrentValues if the dirty bits are iterated over without range validation. Bug: chromium:1496378 Change-Id: I65481c432263a6e353a9361bba741b97dc5e20b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5008034 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 12cc04d0 2023-11-07T10:26:18 Vulkan: Workaround camera AHB's layerCount being random value We are seeing AHB used by google's camera app has random value in the layerCount. In my reproduced case, it is 0, which translates to layerCount in the VkImage. Sometimes I am also seeing a huge number in the layerCount as well. This causes problem in ARM driver that end up with assertion and other problems that end up with crash later. We need to root cause the underlying bug which is tracked by b/239181279. But before we have an actual fix in AHB creation code, this CL forces com.google.android.GoogleCamera AHB's layerCount to be 1 as a temporary app specific bug workaround so that we can move forward to get camera app up running with ANGLE. Bug: b/309480316 Bug: b/239181279 Change-Id: I219f6f89863a2cb8dee6c5efb0812389272373ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5010082 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Roman Lavrov b581a6ce 2023-11-07T10:45:39 Traces: workaround sporadic uncompress failures Usually succeeding uncompress retry: https://issuetracker.google.com/296921272#comment26 Move uncompressed data to mBinaryData and keep going. Unknown if the test would succeed or crash later on, would be interesting to see. Bug: b/296921272 Change-Id: If4f158305cef49208f39164ee3865e5fdccd39ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5008081 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5a71be90 2023-11-03T15:07:06 D3D: Make non-constant loop indexing limitation a feature flag ... instead of exposing it as a front-end limitation only to set a shader flag in the front-end. Bug: angleproject:1130 Change-Id: Idbd9a1b7b79d231bd9fc1c0061c768df4aaab92d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5004847 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi e7ce481f 2023-11-01T22:44:22 Consolidate parallel compilation in front-end This cleans up the multiple compilation task implementations in the backends and consolidates them in the front-end. The front-end is then able to do the compilation in an unlocked tail call instead if desired (in a future change). This change is in preparation for having the program link tasks directly wait on the shader compilation tasks. As a result, the "shader resolve" should not be needed to access the shader compilation results; it should be enough to wait for the compilation job. This change therefore moves post-processing of results to the compilation job itself as they did not need to actually be done after compilation is done (merely after translation is done). As a side effect, shader substition and other debug features should now work for the GL backend as they are now done before back-end compilation. Bug: angleproject:8297 Change-Id: Ib9274b1149fadca7545956a864d6635b6cba5c3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4994655 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mike Schuchardt b48d9daf 2023-10-27T10:11:15 Capture/Replay: Gen gen-on-bind resources on replay Fixes a handle id collision where capture-time handles are directly used at replay time for gen-on-bind resources, and end up colliding with handles already allocated by the replay driver. This change explicitly allocates an unused handle for gen-on-bind resources by calling glGen*. The destruction of gen-on-bind resources is already managed correctly by handleGennedResource(). Test: Capture and replay The Sims Mobile Bug: b/303100333 Change-Id: I084c95c09c771bb7476e16ba81545852248d0945 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4985062 Commit-Queue: Mike Schuchardt <mikes@lunarg.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev 3b555e8d 2023-10-26T00:00:00 GL: Add emulateClipOrigin workaround Older Adreno drivers apply GL_CLIP_ORIGIN_EXT to the framebuffer instead of the clip space, thus causing various side-effects. Used a uniform to emulate the correct behavior. Drive-by: * Fixed a typo in ClipControlTest.OriginFrontFacing Fixed: angleproject:8392 Change-Id: I2f7145977ab0e11dc88e8dbfec2cd32c4c31f830 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4987326 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Le Hoang Quyen 65f6c2ea 2023-10-22T18:07:55 Metal: always implicitly resolve MSAA render buffers on tiled GPUs. On tile based GPUs, implicitly resolving MSAA render buffers to single-sampled is preferred. Because it would save bandwidth by avoiding storing the MSAA textures to memory. Furthermore resolving as StoreAction is almost a free operation on these GPUs. Traditional desktop GPUs almost always store MSAA textures to memory anyway, so this feature would have no benefit besides adding additional resolve step as well as memory overhead of the hidden single-sampled textures. Bug: chromium:1486094 Change-Id: I5eb3b1314560024dd5c0834b0c0b43a6b4d3d51b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4962114 Commit-Queue: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 6258acae 2023-10-19T00:00:00 GL: Add resyncDepthRangeOnClipControl workaround Some drivers do not apply GL_CLIP_ORIGIN_EXT and GL_CLIP_DEPTH_MODE_EXT state changes until other transformation states are updated. As a workaround, force-resync the depth range on clip control updates. Fixed: angleproject:8381 Change-Id: I26f95108e9419be30ea0b562e02ab4bae78f65bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4966525 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 384a29a8 2023-07-27T10:51:07 Reland: GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE Now that Chromium no longer uses it. This is a reland of: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 Bug: angleproject:5509 Change-Id: I650e598580539fbe404f2ec4b56b20b56b948f6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu cfc40d2b 2023-07-19T17:47:13 Vulkan: Adjust clear color precision for GL_RGB5_A1 FBO When clear color has more precision than the framebuffer format can hold, dithering is automatically applied on some hardware. This issue causes below dEQP tests to fail when the FBO color attachment format is RGB5_A1: KHR-GLES31.core.draw_buffers_indexed.color_masks KHR-GLES32.core.draw_buffers_indexed.color_masks Adjust the clear color precision for RGB5_A1 format to workaround the issue. We can remove this workaround once the vulkan driver fixes the auto-dithering problem. Bug: b/292282210 Change-Id: Ic3ffebd2d20c8782612619a60d1ec2cc6d613c22 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4937472 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 57fcee54 2023-10-11T14:48:53 Vulkan: Add feature flag for externalFormatResolve This CL adds supportsExternalFormatResolve feature flag and enable the vulkan extension if existed. This CL is split from Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I731f35dc629c12c7290c6ed24ff54967e2e4eab7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932592 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com>
Roman Lavrov 21ea0a3c 2023-10-13T11:33:31 Add gzip tests when hitting a decompression error Might give some hints about what got broken Bug: angleproject:8307 Change-Id: I0a5aa05ed0e876ea060c1b8db6e61a79cbf9c4f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4937222 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi ffb32380 2023-10-02T16:01:37 Vulkan: Fix device creation on multi-queue devices When multiple eligible queue families are exposed by the device, ANGLE defers devices creation until a surface is made current, at which point it selects a queue family that supports presentation to that surface. This path was largely untested and was broken: - Some post-device-creation initialization was not deferred until the device was actually created - Some cap calculation depended on the chosen queue family index - Query of device capabilities was done too late, such that ANGLE could not correctly determine the level of support for ES versions. Bug: angleproject:8300 Change-Id: I2a35396d1fd08ed26d217dff07d10e9a9c1ac55f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4907895 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi 97a48912 2023-09-26T10:31:58 Turn is-link-thread-safe feature into a positive condition Chrome's --disable-gpu-driver-bug-workarounds currently sets every feature to false, which breaks the GL backend. Bug: angleproject:8297 Change-Id: I284d0699e356d7c1a362eb992cdc0d052f9ea7c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887598 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Hailin Zhang 141bada9 2023-09-22T10:25:30 Vulkan: add prefer cached memory type for dynamic buffer usage. Bug: b/288119108 Change-Id: I0fb5d91780e83af06762b9f3e6122313e76624da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886846 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Jonah Ryan-Davis cd8495b0 2023-09-14T20:00:32 Re-enable Metal on AMD FirePro. Instead of disabling Metal altogether, test whether it works to just disable the rescobeGlobalVariables compiler workaround on FirePro devices. Bug: angleproject:8317 Change-Id: Ia93a1fef04a387c5756d14660a2da4eb39b8db08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864732 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuxin Hu ffd6ec26 2023-09-07T15:39:19 Reland "Make egl surface uncurrent when being destroyed" This relands commit 497440cdcb7d2ee59bca612dd07fc13cf09a6a57. This is to workaround errors when app does below behaviors: 1) while there is a context still bound to the current rendering thread and the surface, call eglDestroySurface() 2) create a new surface eglCreateWindowSurface() 3) call eglMakeCurrent() with the surface created in step 2) 4) does work on the new surface The old surface won't be destroyed in step 1) because it was still bound by the context of the current rendering thread. When creating new surface on step 2), some hardware will return error code EGL_BAD_ALLOC, because the old egl surface is still associated with the native window. To workaround, when destroying surface, if the surface is still bound by the context of the current rendering thread, release the context and surface by passing EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent(). The workaround is controlled by a frontend feature uncurrentEglSurfaceUponSurfaceDestroy. This feature is only enabled on vulkan backends. Bug: b/292285899 Change-Id: Id4c47f1b20e0f90d1013a68893fd70e917c030e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4867066 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi b4852ef9 2023-02-08T14:18:06 Vulkan: Drop support for Vulkan 1.0 Bug: angleproject:7959 Change-Id: Ib673679ea1a503af22b37092dbff1ee1fd34fba6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4233092 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi 68bfa1ed 2023-08-22T22:02:15 Support for link to be entirely parallelized The link job is split as such: - Front-end link - Back-end link - Independent back-end link subtasks (typically native driver compile jobs) - Post-link finalization Each step depends on the previous. These steps are executed as such: 1. Program::link calls into ProgramImpl::link - ProgramImpl::link runs whatever needs the Context, such as releasing resources - ProgramImpl::link returns a LinkTask 2. Program::link implements a closure that calls the front-end link and passes the results to the backend's LinkTask. 3. The LinkTask potentially returns a set of LinkSubTasks to be scheduled by the worker pool 4. Once the link is resolved, the post-link finalization is run In the above, steps 1 and 4 are done under the share group lock. Steps 2 and 3 can be done in threads or without holding the share group lock if the backend supports it. Step 2 is not yet made independent of the Context on some backends, and a frontend feature is used to make that step either run on the main thread or as a worker thread. Bug: angleproject:8297 Change-Id: I12f1e6bbaf365543dfcac969e166e0b5aa622104 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4808191 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 5afc76e3 2023-09-12T11:05:08 Disable Metal on AMD FirePro devices. These older drivers are crashing in the driver for unknown reasons. Only 0.5% of Chrome users are on these devices, so we'll disable Metal on them. Bug: angleproject:8317 Change-Id: Ia3ca5c3fa8e96aab903e15d989cfbd459679b15d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859020 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Yuxin Hu 8a7ad933 2023-09-13T15:11:46 Revert "Make egl surface uncurrent when being destroyed" This reverts commit 497440cdcb7d2ee59bca612dd07fc13cf09a6a57. Reason for revert: this caused chromium webview tests failures: https://chromium-review.googlesource.com/c/chromium/src/+/4860891. Original change's description: > Make egl surface uncurrent when being destroyed > > This is to workaround errors when app does below behaviors: > > 1) while there is a context still bound to the current > rendering thread and the surface, call eglDestroySurface() > 2) create a new surface eglCreateWindowSurface() > 3) call eglMakeCurrent() with the surface created in step 2) > 4) does work on the new surface > > The old surface won't be destroyed in step 1) because > it was still bound by the context of the current rendering > thread. When creating new surface on step 2), some hardware > will return error code EGL_BAD_ALLOC, because the old egl > surface is still associated with the native window. > > To workaround, when destroying surface, if the surface > is still bound by the context of the current rendering > thread, release the context and surface by passing > EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent(). > > The workaround is controlled by a frontend feature > uncurrentEglSurfaceUponSurfaceDestroy. This feature > is only enabled on vulkan and gl backends. > > Bug: b/292285899 > Change-Id: I872d2e116ba6860f58d1176f011a5ef7c5a5af4e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851255 > Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bug: b/292285899 Change-Id: I760054d856294e6691e79e165fd73ce9e560621f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4862958 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Yuxin Hu 497440cd 2023-09-07T15:39:19 Make egl surface uncurrent when being destroyed This is to workaround errors when app does below behaviors: 1) while there is a context still bound to the current rendering thread and the surface, call eglDestroySurface() 2) create a new surface eglCreateWindowSurface() 3) call eglMakeCurrent() with the surface created in step 2) 4) does work on the new surface The old surface won't be destroyed in step 1) because it was still bound by the context of the current rendering thread. When creating new surface on step 2), some hardware will return error code EGL_BAD_ALLOC, because the old egl surface is still associated with the native window. To workaround, when destroying surface, if the surface is still bound by the context of the current rendering thread, release the context and surface by passing EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent(). The workaround is controlled by a frontend feature uncurrentEglSurfaceUponSurfaceDestroy. This feature is only enabled on vulkan and gl backends. Bug: b/292285899 Change-Id: I872d2e116ba6860f58d1176f011a5ef7c5a5af4e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851255 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi b185c3ea 2023-09-11T12:28:43 Vulkan: Add host-image-copy usage to images when optimal The change currently doesn't actually copy on host, but prepares the image for it. Bug: angleproject:8341 Change-Id: I4458712dca46ef9872020e158a3f902e94f5eb93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856146 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi e234c182 2023-09-08T16:19:29 Add features for VK_EXT_host_image_copy Bug: angleproject:8341 Change-Id: Id076e6c9e040f3c19a1eb221f6099ac11d4d091a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852280 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 55054e76 2023-09-01T11:35:36 Traces: temporary patch to log zlib message on failure Bug: b/296921272 Change-Id: I0111889dba2f57650caf26a0b86a6669b231f956 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833616 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 2ef238bc 2023-09-01T13:01:23 Revert "Traces: add temporary debug info to LoadBinaryData" This reverts commit 0d701c81d01e18ae5741e9e8843441f24697f04f. Reason for revert: CRC is ok: http://b/296921272#comment3 Original change's description: > Traces: add temporary debug info to LoadBinaryData > > Unable to repro the bug by triggering tasks on swarming, hopefully this > eventually catches something. > > Bug: angleproject:8307 > Change-Id: I34dd0c8a9e82e54f3a07e2d7a249ddfaa543bae7 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794110 > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Roman Lavrov <romanl@google.com> Bug: angleproject:8307 Change-Id: I0f04baf5241e99d7c2514bcdc583e58e2fd51535 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834063 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Alexey Knyazev 0688a940 2023-08-21T00:00:00 GL: Disable EXT_texture_mirror_clamp_to_edge on Mesa Although the extension string is exposed, the new enum is currently rejected when using an OpenGL ES context. Bug: angleproject:8319 Change-Id: I17c4105344fe7ca3038a79e0e09528db1d96376b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4807744 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 9f258f8a 2023-08-21T00:00:00 GL: Add disableRenderSnorm workaround Disable the extension on Mesa versions that clamp negative snorm values to zero on read. Fixed: angleproject:8315 Change-Id: I5459db40cb08c546fba15f5e6d70578029a8218a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804324 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi d8f088e0 2023-08-14T11:07:24 GL: Remove parallel compile/link without driver support This feature was practically disabled everywhere due to various bugs, and is complicating the code. In effect, the code was always spawning a thread for the compilation and link jobs, immediately fail it (due to a workaround), then do the job when compile/link is resolved (much closer to draw time). This leads to bad user experience, but also is racy because the shaders may get recompiled in the meantime and there is little the GL backend could do to stop that (efficiently). After this change, parallel compile/link is either done by the driver (if supported), or it isn't done. This is a partial revert of a100d8f471f79b9f88d387164992cc5bd9c6ee9f. Bug: angleproject:3031 Bug: chromium:922936 Bug: chromium:1184692 Bug: chromium:1202928 Change-Id: I6348bee3249ccb3828bb98ac2a69dc7d305f821c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774785 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Arthur Eubanks 30c9bd21 2023-08-21T13:17:21 Mark more TraceFunctions methods as pure virtual Otherwise there's expected to be an implementation of them, causing breakages like ld.lld: error: undefined symbol: typeinfo for angle::TraceFunctions Change-Id: Ieda87db9983a08c139ce7cf2ad962d33c1eeeac2 Bug: chromium:1453674 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799335 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Auto-Submit: Arthur Eubanks <aeubanks@google.com> Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Roman Lavrov 99e3e652 2023-08-18T18:02:42 Traces: LoadBinaryData verifies that all data was read Bug: angleproject:8307 Change-Id: I4ae30b45a94e69ff2baa76b1b7d735a076c6611b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794111 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 0d701c81 2023-08-18T17:46:27 Traces: add temporary debug info to LoadBinaryData Unable to repro the bug by triggering tasks on swarming, hopefully this eventually catches something. Bug: angleproject:8307 Change-Id: I34dd0c8a9e82e54f3a07e2d7a249ddfaa543bae7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794110 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Mark Lobodzinski d85de0e9 2023-08-09T14:15:56 Capture/Replay: Add optional replay of trimmed resources This CL: - Adds '--include-inactive-resources' option to angle_trace_tests - Removes the 'trim-enabled' option - Outputs all previously trimmed shaders/programs to trace file in a new Setup function, SetupReplayContextSharedInactive() which is executed only if the new option is specified - Modifies CaptureTest to add inactive resources, but does not set the include-inactive-resources flag Bug: b/296055694 Change-Id: I33b18d5da727d55c90c2012c2bf64b1413521429 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781552 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Alexey Knyazev 59f158c1 2023-08-10T00:00:00 GL: Add explicitFragmentLocations workaround Some drivers produce incorrect results when a fragment output has an implicit location and gl_SampleMask[] is written to. Fixed: angleproject:8308 Change-Id: I615952ef61b1cb611984ec7defb189d89ab3281c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777702 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 16cfa28e 2023-08-08T22:08:24 Vulkan: Basic infra for parallel link This change moves pipeline warm up to a parallelizable task, mostly as an exercise to put in the infrastructure for parallel link in the Vulkan backend. Follow up changes will move more of the link step to this task. The end goal is to be able to make the link task independent of ContextVk, which would allow it to be run as an UnlockedTailCall, even if not using a worker thread. Bug: angleproject:8297 Change-Id: I17047162b2a41f0d681d9e3ee33f2e0239b4280d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764231 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan ffe81dd3 2023-08-03T14:53:32 Vulkan: allow opt-in to MSRTT emulation via overrides The existing enableMultisampledRenderToTexture feature combines conditions for device feature support and the policy decision of whether to allow MSRTT emulation. This change splits it into two features, allowing application developers to control the policy condition for the emulation path without impacting the device capability checks. Bug: angleproject:8291 Change-Id: Ic1525c878906b10df777c582e44b931028aae928 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749525 Auto-Submit: Steven Noonan <steven@uplinklabs.net> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell d2236b58 2023-07-29T23:50:05 Support substituting translated shaders. Add dumpTranslatedShaders and enableTranslatedShaderSubstitution frontend ANGLE features, which allow ANGLE developers to prototype optimizations and other transforms without fully implementing them in the shader translator. Tested on macOS with ANGLE's Metal backend, but should work with the other source-level translator backends. Add documentation for pre-existing substitution of shader sources, and of translated shaders added in this CL. Fixed: angleproject:8280 Change-Id: I24d5ef88a479b23e81cc8169fe813c263acfc71f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4731553 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 2d5fb09d 2023-07-22T22:34:20 Stubs for EGL_ANGLE_external_context_and_surface Bug: angleproject:5509 Change-Id: I8e2395784abcd2b4e3e1f888e70a879ef49287bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706026 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9aadc7aa 2023-07-13T11:44:51 Metal: Require MSL 2.1. We had previously shipped both MSL 2.0 and 2.1 shaders to support MacOS 10.13 (MSL 2.0 only) while also supporting the stencil blit fast path that MSL 2.1 provides with the has_shader_stencil_output feature. Each configuration of precompiled shaders is ~300kb so we will drop support for MacOS 10.13 and only ship the MSL 2.1 shaders. Rework of the disablement for NVIDIA and GPU family 1 to be more readable. The features themselves are always true because "disable on NVIDIA" is always true and the check for "is NVIDIA" is moved to the code which fails the initialization. Bug: angleproject:8258 Change-Id: Icc8c69540e43fd2b0b237fffbfe170bb3422903f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681130 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang d40669bb 2023-07-17T11:49:13 Android: Use ALooper_pollOnce instead of ALooper_pollAll ALooper_pollAll can cause potential deadlocks. These calls are only made by our test suites. Bug: chromium:1464077 Change-Id: Id56c0db67e10d6df00c3e6b9126952ffa1d40d48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690382 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Phan Quang Minh 4cab5e94 2023-07-12T10:04:10 Vulkan: Enable timeline semaphores if supported by device This is needed for a similar change in Chromium to function with `--enable-features=VulkanFromANGLE`. Bug: angleproject:8253 Change-Id: I422964ea010c650439dd4797ee8ba7b533f26a87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4675807 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 4e6124da 2023-06-23T14:46:28 GL: Ensure all instanced attributes have a buffer with data Apple OpenGL drivers sometimes crash when given an instanced draw with a buffer that has never been given data. It's not efficient to check if the attribute is both zero-sized and instanced so just ensure that every time a zero-sized buffer is bound to an attribute, it gets initialized with some data. Bug: chromium:1456243 Change-Id: I66b7c7017843153db2df3bc50010cba765d03c5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4642048 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Anne Redulla 66c2e4fc 2023-07-04T17:02:07 [ssci] Added Shipped field to READMEs This CL adds the Shipped field (and may update the License File field) in Chromium READMEs. Changes were automatically created, so if you disagree with any of them (e.g. a package is used only for testing purposes and is not shipped), comment the suggested change and why. See the LSC doc at go/lsc-chrome-metadata. Bug: b/285450740 Change-Id: I770554248e33c1e50938cc32daee36a83b643ec9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4672125 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 113f847b 2023-06-26T12:07:52 centralize basic OS/platform detection functions We had multiple different places that defined these, and with varying naming schemes. Centralize them to be defined in platform_helpers.h. Also renaming the IsApple(uint32_t) functions to IsAppleGPU(uint32_t) to avoid ambiguous meaning: "IsApple" should mean "is Apple-vended OS" while "IsAppleGPU" should mean "is Apple GPU vendor ID". Bug: angleproject:8229 Change-Id: If4e3fc5ac1b5b8ad416663950a1b2ee912ccad99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4647291 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Steven Noonan <steven@uplinklabs.net> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 42c3a9fe 2023-06-23T03:53:09 Vulkan: support creating context with MoltenVK on macOS The Vulkan loader somewhat recently introduced a requirement that clients must opt-in to using portability implementations of Vulkan (such as MoltenVK). Since there is no native Vulkan driver for macOS (and therefore no alternative), unconditionally enable the portability enumeration extension there. Bug: angleproject:8229 Change-Id: I24f0f24e25abd277855ed9ac4de370cfb47d3266 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639495 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Amirali Abdolrashidi 5f9548c3 2023-05-19T11:51:04 Vulkan: Free the garbage memory before realloc Currently image allocations fall back to system memory in case of a device OOM. However, in some cases, it is also possible to gain some memory by freeing garbage memory from the device. This allows us to keep the allocation on the device memory. * Updated the image allocation fallback, so we will try cleaning the garbage memory through the renderer before retrying the allocation. * finishOneCommandBatchAndCleanup() in RendererVk, which will call a similar function in its CommandQueue. It will be called until there are no more in-flight submissions. * The existing finishOneCommandBatchAndCleanup() in CommandQueue has been renamed to finishOneCommandBatchAndCleanupImpl(). * Updated the flags used for VMA image allocations. If any device memory is freed after garbage cleanup to make enough space for the new allocation, it will take precedence over the system memory. * Added unit tests in which a new image allocation could happen on the device after freeing the garbage memory. * They use a 2D texture and a 2D texture array for garbage. Bug: b/280304441 Change-Id: Ia5e605e180833b44af8c77550ab1b0b8ba21724e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4547941 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Steven Noonan ac263582 2023-06-19T12:26:44 Vulkan: add workaround for VK_EXT_full_screen_exclusive on AMD On outdated (but recent) AMD drivers, the Windows-only Vulkan extension VK_EXT_full_screen_exclusive appeared to be implicitly enabled and set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT mode. Even though ANGLE did not enable or interact with this extension at all, the driver was incorrectly returning VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT error codes on various swapchain operations when the full screen window focus was lost (i.e. alt-tab out and back in). Naturally, ANGLE was not expecting these error codes and did not know how to handle them. Depending on where the errors occurred, ANGLE might crash or retry creating the swapchain repeatedly. Treating the unexpected VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT error code as VK_ERROR_OUT_OF_DATE_KHR/VK_SUBOPTIMAL_KHR was not sufficient, because the driver would repeat the error on every swapchain operation, apparently expecting the error to be handled by a vkAcquireFullScreenExclusiveModeEXT call (even though that would make no sense, since the extension was not enabled). The incorrect driver behavior was reported to AMD and was fixed in recent driver releases. The earliest driver I've tested and know to be working is AMD's Adrenaline driver version 23.5.2 (VkPhysicalDeviceProperties calls this driverVersion 2.0.262/0x800106). The last known bad version was 0x8000e9. The simplest workaround on these older AMD graphics drivers is to explicitly enable the extension, but set it to VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT mode. On newer drivers we do not need to do anything with the extension and can ignore it. Bug: angleproject:8215 Change-Id: I7c58d47a0350f4b0bc1a77f200c1e2f72fcde8d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4627279 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Kramer Ge 88c6dfcc 2023-06-02T16:09:24 Mali: Make the placeholder FBO complete for timer queries Change the bindFramebufferForTimerQueries workaround to ensure the framebuffer is complete. Bug: chromium:1356053,b/269068358 Change-Id: Ief3198fdc4800468670a3f4323a1ffd3ca083c6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4582606 Auto-Submit: Kramer Ge <fangzhoug@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 21f16cb1 2023-06-09T17:30:38 Disable clang-format on ANGLE features autogen outputs Updates the script to produce reasonably formatted code without clang-format. Autogen files moved to autogen/ sub-directories because clang-format does not support per-file settings ;( This allows to run this codegen very quickly (~50ms on my machine) Bug: angleproject:8193 Change-Id: Ie84282090d574ebb4debe3edcfd82f983f27a5ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4604578 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan a01a566c 2023-06-09T00:31:06 extension xmls: fix incorrect use of <ptype> tags I was having trouble using some GL/EGL loader generators because of some errors in the XML definitions for ANGLE. The first major problem is the content of the <ptype> tags. Let's refer to the Khronos registry XML schema (which is annoyingly a PDF rather than an xsd that we can test against, though I don't know if an xsd would catch this anyway): https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/readme.pdf In section 12.4.2, "Contents of <param> tags" it states: The <ptype> tag is optional, and contains text which is a valid type name found in <type> tag, and indicates that this type must be previously defined for the definition of the command to succeed. Builtin C types, and any derived types which are expected to be found in other header files, should not be wrapped in <ptype> tags Note that the above is repeated for the contents of <proto> tags as well. The extension XML files currently have a bunch of <ptype> tags which don't meet the expectations described above. The correct transformation for them would be, for example: <ptype>GLfloat *</ptype> -> <ptype>GLfloat</ptype> * <ptype>void *</ptype> -> void * <ptype>const char *</ptype> -> const char * <ptype>EGLAttrib *</ptype> -> <ptype>EGLAttrib</ptype> * The next issue is that some tags have some typos, such as "<pytpe>" instead of "<ptype>". (Now *that* is something an .xsd would catch...) The last issue is the use of the typename "GLvoid" which is not as serious a problem. It is still defined in Khronos' gl.xml <types> block, but Khronos no longer uses it in their XML registries. The comment for the "GLvoid" type in their <types> block states: <type comment="Not an actual GL type, though used in headers in the past">typedef void <name>GLvoid</name>;</type> So we might as well replace those with just plain "void". Anyway, long story short: to apply these transformations, I used Perl regular expressions, and applied these expressions in order: - Fix the tag misspellings: s#<(/?)pytpe>#<\1ptype>#g - Move the const qualifiers (if present) and pointer asterisk(s) (if any) outside the <ptype> tag itself: s#<ptype>(const )?([A-Za-z0-9]+)[ ]?(\*\*?)</ptype> #\1<ptype>\2</ptype> \3#g - Replace "GLvoid", "char", and "void" inside ptype tags to normal C types outside tags: s#<ptype>(GLvoid|void|char)</ptype>#\1#g Bug: angleproject:8190 Change-Id: Ib0bea79fecb7e714910b6e92124bb9f52994d0fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603709 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop d8339e78 2023-05-25T08:40:48 FrameCapture: Support EGLSync in MEC This CL starts treating EGLSync as a tracked resource, such that we can detect when they need to be created in Setup, or regenerated in Reset. Test: MEC of infinity_ops trace Test: Replay new kentucky_route_zero trace without error Bug: angleproject:8176 Change-Id: I130212f6edb78d9df29dd6e572843df25493ae09 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4566949 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 52152933 2023-06-06T15:36:36 Add trace_interface: functions and callbacks for traces Defines the interface between the test suite (or an other TraceLibrary class user) and trace libraries. TraceFunctions defines entry points for calls suite->trace, such as SetupReplay() or SetBinaryDataDir(). TraceCallbacks defines entry points for calls trace->suite, for example for loading .angledata.gz files. These are set up via the exported SetupEntryPoints() call. Functions like SetupReplay etc no longer need to be exported from the trace library. TraceInfo (parsed representation of the trace json) is moved to trace_interface as is. This is convenient for further changes to the fixture that will allow to easily move some of the captured parameters to json. This also moves Decompress functionality (and memory ownership) to test suite entirely, which avoids Decompress/Delete callbacks - the trace just calls LoadBinaryData via TraceCallbacks and TraceLibrary releases the memory either on FinishReplay or in its destructor. This should also take care of the memory leak described in https://crrev.com/c/3858185 Bug: b/286072760 Change-Id: Ibc6f6f64156ad805b1917c8fc41a3b0d2c0d6375 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594445 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi b0e9bbd7 2023-05-31T14:23:40 Vulkan: Split features for dynamic state When a driver bug with dynamic state is encountered, it is hard to debug which dynamic state exactly is causing an issue, due to the current granularity of disabling all entire state from an extension. With this change, every dynamic state gets its own ANGLE feature, and can be toggled as necessary. Disabling the supportsExtendedDynamicState* features implicitly disables all dependent features. Bug: b/285124778 Bug: b/275210062 Bug: fuchsia:107106 Bug: angleproject:5906 Change-Id: Ic291279872df2d0eb58618ff364ab118bdcc4a9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4577553 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu dfb2bab0 2023-05-25T15:08:19 Apply Aliased Decorators To Image DataTypes Bug: b/274478912 Bug: b/266235549 Change-Id: I2cd272a1e7481a8803be63efe0be11c61560b23e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4568287 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 16b9a16a 2023-05-26T14:45:15 Add supports_legacy_dithering feature VK_EXT_legacy_dithering => VkPhysicalDeviceLegacyDitheringFeaturesEXT.legacyDithering => supportsLegacyDithering Now getting enabled=true on Android master. Bug: b/284462263 Change-Id: Ibf43184c78d9847044b10413d2050b653e452c9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4567572 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell aea88562 2023-05-19T16:52:43 Reland "Metal: Optimized BufferSubData per device" This reverts commit ee64836f702332adaca58d9f452063a04b2da955 , relanding the patch stack described there. Between patchsets 1 and 5: - The shadow buffer allocation has been replaced with a multimap of precisely-sized buffers, rather than rounding up buffer sizes. - Garbage collection of shadow buffers is triggered in three situations: - A certain number of context switches have occurred; this number was hand-tuned to avoid GC every frame. - A certain number of command buffer submissions has occurred; this number was hand-tuned to GC no more often than every few seconds on representative workloads. - The total size of the allocated shadow buffers is more than 1 MB, and either more than twice the size at the last garbage collection, or 64 MB more than at the last garbage collection. In this case, aggressive GC is performed in order to reclaim shadow buffers more quickly. Performance before and after these changes appears identical on microbenchmarks. On one Figma test case, comparing GPU memory allocated inside the BufferManager, peak consumption is decreased by over 75%, and steady-state consumption decreases by over 88%. Patchset 6 adds a needed workaround for a bug in the AMDMTLBronzeDriver affecting uploads of client-side data, and therefore some dEQP tests. It also streamlines the aggressive GC. Bug: angleproject:7544 Change-Id: I81b061f0b33c27fa403527fa12d626f4e9c88ebe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4497413 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mark Lobodzinski 9e47cbd3 2023-05-18T14:40:37 Capture/Replay: Rework trace EGLDisplay handling Refactor the trace-replay EGLDisplay handling to allow initializing the global EGLDisplay handle in the InitializeReplay4() body. This included adding support for eglGetCurrentDisplay() to the EGL-on- WGL shim. Test: angle_trace_tests --gtest_filter=infinity_ops Bug: b/282725258 Change-Id: I2319fd9a35f8fb9c0a7f10547ca39f49ce402b8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4546267 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Geoff Lang 6d3e5870 2023-05-17T16:42:47 Metal: Disable Metal support on NVIDIA GPUs NVIDIA GPUs are in a very small number of Macs and we don't have have adequate test coverage to properly support them. Add the disable_metal_on_nvidia feature to control support for NVIDIA at runtime. Also factor the support of GPU family 1 into a feature. Bug: angleproject:8170 Change-Id: I160036d710cc9e278eb77e351a483b9f5b69e8ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4544659 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 7abc5248 2023-05-19T00:00:00 Vulkan: Enable VK_EXT_depth_clamp_zero_one Replaced the 'depth_clamping' workaround with the dedicated extension or explicit fragment depth clamping. Fixed: angleproject:3970 Bug: angleproject:8077 Change-Id: Ia7666fcb3e0e949922c13a3fd11b818cbc5a8e26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4545084 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Ho ea0b1b7b 2023-05-19T15:26:50 Selectively advertise base vertex and instance fns On newer Mali GPUs (Valhall), the glDraw*BaseVertex* implementations seem to be buggy and cause noticable artifacts. Chrome uses the presence of baseVertexBaseInstanceANGLE and baseInstanceEXT extensions to determine whether it can draw with a base vertex or to fallback to manually offsetting the vbo. This CL disables these extensions on Mali Valhall so that Chrome takes the fallback path instead to fix the visual artifacts. Bug: b/280931795 Change-Id: Ic27e37465283ca3338747b53aa7888c7eba4b7b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4549682 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 5c28a749 2023-05-18T19:20:56 Print signal to stdout before calling crash handler Doesn't fix anything but if deadlock described on the bug happens locally and stdout is piped to console (or line-buffered file), it's at least visible that a signal handler was invoked. Bug: angleproject:8080 Change-Id: I27e1b22cc269082682fd639ef087f1b8b14b26eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4544588 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi b76166d0 2023-05-18T09:57:25 Vulkan: Separate image and sampler 2D view of 3D features The sampler feature is used to determine if EGL_KHR_gl_texture_3D_image can be exposed. The image feature is used to support base GLES 3.1 storage images. Bug: b/274478146 Change-Id: Ifb283633078ace7ee65f8aafe756d0a02b727bd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4545005 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop ec308b35 2023-05-15T15:03:10 Vulkan: Add feature to limit sample count to 2 This CL adds a feature called `limitSampleCountTo2`. Using it will have the Vulkan backend limit max samples to 2. Why 2? That's the minimum required in Vulkan to multisample without error. Here's an example validation error: vkCmdResolveImage: srcImage sample count is VK_SAMPLE_COUNT_1_BIT. The Vulkan spec states: srcImage must have a sample count equal to any valid sample count value other than VK_SAMPLE_COUNT_1_BIT. https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdResolveImage-srcImage-00257 Using a limit as opposed to forcing a value allows non-multisampling (sample count of 1) to continue working. To see how tests fare when the feature is set, see the following test results that force the value on: https://chromium-review.googlesource.com/c/angle/angle/+/4534098/4 Test: adb shell setprop debug.angle.feature_overrides_enabled limitSampleCountTo2 Bug: b/279498079 Bug: angleproject:8162 Change-Id: I1df2822709151e6084c32055b5aff444e0b10db5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518562 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Greg Schlomoff <gregschlom@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang b1395bcb 2023-05-09T12:34:55 GL: Disable EXT_clip_control on Mali-G72 and G76. Querying the clip control state from the driver when sychronizing external contexts generates driver errors. Simply disable this extension in this configuration for now. Chrome is currently not using it for rasterization. This issue was noticed on specific Huawei devices in the wild. It hasn't been observed on other OEMs. Bug: chromium:1434317 Change-Id: I88d9bff1933274f61020b75e68aee9c94b0b684a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518062 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org>
Hailin Zhang 8b9440b6 2023-05-01T15:31:01 Vulkan: add option to control pipeline cache data compression. Bug: b/258207403 Change-Id: I487b1cadbacfa2f7ee889a8f58278307a126a391 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4497248 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Scott Violet b0f9c01e 2023-05-01T12:54:10 metal: adds feature that minimizes generated shader differences This adds a feature (enabled by default) that results in generating the same code regardless of whether emulateAlphaToCoverage is enabled or addExplicitBoolCasts. This is done to maximize cache sharing. Bug: chromium:1423136 Change-Id: Ia491f13469c750fc2c45aecf1f93fed53b782dc5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4496254 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org>
Alexey Knyazev b7a5714f 2023-03-31T00:00:00 Add polygon mode extension stubs * Added NV_polygon_mode * Specified a portable polygon mode extension implementable on all ANGLE backends Bug: angleproject:1791 Bug: angleproject:8132 Change-Id: I018aaaf1fb43ec16910859b152049e02169ede91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4492684 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Roman Lavrov 8be67007 2023-05-01T13:32:56 Capture/Replay: make failure to load a trace lib more clear Before this CL, the logs would point to inability to find SetTraceInfo, which is misleading as the actual issue is that the library wasn't loaded in the first place. Error handling is a bit obscure due to mTraceLibrary being set to a non-null object wrapping a null library so we have to check if getNative() is null. `loadError.empty()` can't be used to check this because it's getting set in case of success as well ¯\_(ツ)_/¯ Bug: b/276742336 Change-Id: I90f2184c35461c16d04d6bef6d921706c010fefd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4492532 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Scott Violet 3e281219 2023-04-27T14:52:18 Adds feature to output blob cache key and source for shader Bug: chromium:1423136 Change-Id: Ic03e1b9971b2f1417c0b2e95c8d3846f28a01572 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4480976 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org>
Cody Northrop 35461e60 2023-04-12T20:02:08 Android: Build traces outside of APK Our trace list has gotten too large for a single APK (2GB). To continue supporting compiled traces, we can now place the libraries in the test application's home directory, which is discoverable and executable without root. To build and run with all traces, use `angle_trace_perf_tests` as your build target, then use the local Android helper script: $ autoninja -C out/<config> angle_trace_perf_tests $ (cd out/<config>; ../../src/tests/run_angle_android_test.py \ angle_trace_tests --filter='*among_us' \ --verbose --local-output --verbose-logging \ --fixed-test-time-with-warmup 10) To continue using bundled libraries, specify your trace list in GN args using `angle_restricted_traces` and use steps that match other platforms: $ autoninja -C out/<config> angle_trace_tests $ out/Android/angle_trace_tests --gtest_filter='*among_us*' \ --verbose --local-output --verbose-logging \ --fixed-test-time-with-warmup 10 Bug: b/276474703 Change-Id: I3829cf7016e21894eee8890e2b0d527e8214f04e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4420279 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Yuxin Hu 6deca89e 2023-03-22T22:33:40 Add Spirv Instruction to explicitly cast mediump float to 16 bit If the GLSL shader code expects the comparison between two mediump float values returning true, but the SpirV compiler treats one of them as 32-bit, and treats the other one as 16-bit, the comparison would return false instead. The SpirV compiler may not automatically cast the mediump float values to 16 bits, because it may utilize the RelaxedPrecision decoration to keep a mediump float as 32-bit, so that the compiler can avoid the type cast from 32-bit highp to 16-bit mediump. This change adds an additional OpQuantizeToF16 SpirV instruction to explicitly cast mediump float scalar or mediump float vector to 16 bit, if they are assigned with a highp float value. This ensures that if the GLSL shader code ever compares two meiump float values, the SpirV shader compiler is not accidentally comparing a 16 bit with a 32 bit float value. This fixe the deqp test failure on Pixel 6 and Pixel 7: dEQP-GLES2.functional.shaders.algorithm.rgb_to_hsl_vertex. Bug: b/274859104 Bug: b/274408172 Change-Id: Ifd996cea14c0f77f45ae90f38c8e53cf5035139f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4400404 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Scott Violet 65f4d2a4 2023-04-17T10:08:18 Adds features to enable loading/saving metallibs to blobcache CompileMetalShaders results in the appropriate command line tool being run to generate metallib blobs from shader source. DisableProgramCaching results in not saving programs to BlobCache LoadMetalShadersFromBlobCache results in trying to load metallibs from BlobCache. Bug: chromium:1423136 Change-Id: I01a4d7a5d60ed5ac978fb99db01b741e0f19e76b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4434293 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org>
Alexey Knyazev 7bc4b7e3 2023-03-27T00:00:00 Metal: Implement OES_sample_variables New ESSL built-ins are mapped to their Metal counterparts and tweaked to follow OpenGL ES semantics when needed. Fixed A2C interaction with sample coverage by emulating the former on non-Apple GPUs. Bug: angleproject:8097 Fixed: angleproject:5087 Change-Id: I5d28a941af5cbc14743a3930731529f11f55febd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404896 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Roman Lavrov 4e073356 2023-04-13T15:16:53 Trace Interpreter: gzip cpp and run gold tests. New test step: angle_restricted_trace_gold_interpreted_tests similar to existing angle_restricted_trace_gold_tests but runs a subset of newest traces that have the right format. Currently there are 8 of them and the filter is hard-coded in test_suites.pyl. rise_of_empires can also be run interpreted but happened to flake during testing so it's not included for now. Trace cpp files are concatenated and gzipped as a build step producing gen/tracegz_{trace}.gz and these gz files are then distributed as part of the build --trace-interpreter flag changes from boolean to string to support: --trace-interpreter=gz: * this uses the gz file above * gold tests added in this CL use this option --trace-interpreter=c: * using uncompressed c/cpp file * existing angle_trace_interpreter_tests runs a retrace saving .c files and uses this option Bug: b/276742336 Change-Id: I69544f25bda873af191978195d02ffbdd34363c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4424690 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov aac84722 2023-04-13T12:10:25 Trace Interpreter: Allow running .cpp traces, not only .c .cpp vs .c is just the file extension, what actually matters is the trace format in which the trace was captured. For instance, fishdom is .cpp but can be run interpreted as is: out/Debug/angle_trace_tests --gtest_filter=TraceTest.fishdom --trace-interpreter Bug: b/276742336 Change-Id: I41b2bbc5ffe5ac7449913412b3eceb5c916b3803 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423870 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 2c7f31af 2023-04-13T11:47:34 Trace Interpreter: Move to a shared library. Based on https://crrev.com/c/4178024 but does only one thing: makes trace interpreter a shared library (as if it was a compiled trace) I am not sure what impact this actually has on the TracePerfTest callbacks (mentioned in the CL above) as I see onEglMakeCurrent callback getting called without this CL as well. Anyways, this makes things a bit more consistent. * Gets rid of TraceReplayInterface * TraceInterpreter is now an implementation detail * Need to additionally pass list of trace files to TraceLibrary (new SetTraceInfo replay export) * GetResourceIDMapValue is just moved as is to the right lib Bug: b/276742336 Change-Id: I67ea9fbcb4f7db999ab71c8443ea91c5631df942 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423869 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 735fb480 2023-04-13T09:34:57 Trace Interpreter: Support \\ escape sequences. This enables the 'catalyst_black' trace. Cloned from https://crrev.com/c/4178022 Bug: b/276742336 Change-Id: I9df703150504e7fcf4e18ff0a538aa3f6caddfdb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423269 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi c26011b8 2023-04-11T15:16:29 Vulkan: Make advanced blend alpha div workaround permanent This workaround turned out to affect pretty much every driver, and numerous GL implementations were found to work around it similarly to ANGLE. It seems like this workaround may only be necessary for colorburn and colordodge, but for now ANGLE applies it to all modes. Bug: b/274528004 Bug: b/277777623 Change-Id: Id555c981a9775f949a3022b7e92c755accea7cea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4416158 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen f507fe05 2023-04-06T12:27:00 Rename PLATFORM_IOS to PLATFORM_IOS_FAMILY The current define ANGLE_PLATFORM_IOS actually means "iOS or tvOS or WatchOS or MacCatalyst". The current define ANGLE_PLATFORM_WATCHOS means nothing. The current define ANGLE_PLATFORM_APPLETV means nothing. Replace PLATFORM_IOS and its uses with PLATFORM_IOS_FAMILY, so that then PLATFORM_IOS can be reintroduced and others can be fixed. Replace PLATFORM_IOS_SIMULATOR and its uses with PLATFORM_IOS_FAMILY_SIMULATOR for consistency. Use consistent `#if X` notation instead of `#if defined(X)`. Bug: angleproject:8121 Change-Id: Ibe668c2ae9bb801d15e036fcf1dfd53f22c30787 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404161 Reviewed-by: Dan Glastonbury <djg@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Jamie Madill f093a9b3 2023-04-11T18:09:00 Trace Interpreter: Support gClientArrays Needed to run cut_the_rope, fishdom, other traces. Add cut_the_rope and fishdom to interpreter CI. CL cloned from https://crrev.com/c/4178021 Bug: b/276742336 Change-Id: If7da78ba3fd7c19262692d1386c5eaa47df2ca6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4415246 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov cef7dcbf 2023-04-11T16:12:12 Trace Interpreter: support harry_potter_hogwarts_mystery Handling of calls like: glGetBooleanv(GL_DEPTH_WRITEMASK, (GLboolean *)gReadBuffer); glGetFloatv(GL_DEPTH_CLEAR_VALUE, (GLfloat *)gReadBuffer); Add interpreted test to CI. Bug: b/276742336 Change-Id: Iae3ff9035044461ca1a208980c170d5d48d1a424 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4416166 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Ian Vollick 9199e77d 2023-03-30T17:25:33 [ios] simulator fixes for angle_unittests Disables some tests that do not currently work in the iOS simulator. Bug: angleproject:8116 Change-Id: I66bb9a6e2a5d10a567824e9fac163e7fd6b6a474 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4393495 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Maksim Sisov 746798b2 2023-03-31T11:35:33 Allocate buffer via malloc for demangle. abi::__cxa_demangle requires that the output buffer passed for demangling is malloced according to the documentation as (quote) - "If output_buffer is not long enough, it is expanded using realloc". Not doing that results in raising exceptions and calling the angle's exception handler recursively many times. That results in a huge stacktrace as a result, which is printed until the program is terminated. Bug: angleproject:8111 Change-Id: I7ddd1a623b55fef2c8b15f40136312dd0ff4ccaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4386396 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3aea3cfd 2023-04-03T16:38:29 Vulkan: Workaround depth bias constant factor on ANV Bug: b/249380591 Change-Id: Iaeda7faf5eb40e0e2086674d3e63bf5bc9911ab4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392893 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang f1f80e1e 2023-03-22T12:54:08 Metal: Always prefer staged GPU uploads for textures. Uploading Metal texture data via MTLTexture::replaceRegion is a source of lots of CPU hangs and jank. There may be better heuristics to determine if we should do a CPU vs GPU upload but for now preferring GPU uploads has better overall performance. This also improves the MotionMark images test: - 40 -> 100 when using Metal. - 217 -> 235 when using Metal + https://chromium-review.googlesource.com/c/chromium/src/+/4091749 Bug: angleproject:8024, angleproject:8092, angleproject:8109 Change-Id: I36b5f585884391b4cc416365ae65f8542745beee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4264963 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Yuxin Hu 29abd5a2 2023-03-06T11:35:45 Explicitly Add Aliased Memory Decoration in SpirV In GLSL, aliased memory qualifier is implicitly available, unless we explicitly specify the memory is restrict: https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Memory_qualifiers. However, in SpirV, aliased memory qualifier has to be explicitly specified: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#AliasingSection This change adds the aliased memory decorations to SSBO if the GLSL does not specify the restrict memory qualifier. This is a temporary workaround to fix the deqp test failures on some android devices. Eventually we would like to waive this test for ANGLE due to alised memory in Vulkan does not suppose to affect SSBOs that have different set/binding, please refer to this Khronos ticket for more details: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4321 Bug: b/266235549 Change-Id: Ic7afc417a5d421664b60e0413a011314787e14e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4312130 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 97897d92 2023-03-27T16:02:57 Vulkan: Work around driver bug with dynamic primitive restart This CL forces the state to be static on buggy drivers. Bug: b/275210062 Change-Id: Ia3391ecb19c3c9d19c05a83e11da8c718513a4e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374104 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Kramer Ge 888ca8d9 2023-03-21T18:56:56 Bind FBO before timer query on Mali GL driver. glBeginQuery(GL_TIME_ELAPSED/GL_TIMESTAMP) on Mali implementation assumes a complete FrameBuffer. Without it glGetQueryObject will return a meaningless value, causing some applications to misbehave. This workaround caches and binds a default FBO in this case. Bug: chromium:1356053,b/269068358 Change-Id: I756ded948c2c5aada744f9dd428ad77c37a009c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4359032 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Chris Dalton a491bbe3 2023-03-18T19:05:08 Add PLS utilities for interrupting a rendering pass Adds two more simple commands to ANGLE_shader_pixel_local_storage that allow WebGL and the command buffer to interrupt rendering passes without having to either (1) make expensive queries, or (2) track lots of complex state for validation that they are not currently equipped to track. Bug: chromium:1421437 Change-Id: I80eaef3ae6b0b4bbbecb9cd2268ac90b43675d1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355032 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>