include


Log

Author Commit Date CI Message
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>
Shahbaz Youssefi f5ad056b 2023-07-10T22:13:34 GL: Fix ScalarizeVecAndMatConstructorArgs and move to gl/ This transformation was buggy and was disabled. Originally, it was intended to be used everywhere. It is now needed for a GL driver workaround. This change reimplements this transformation and uses it as a GL workaround. Bug: chromium:1420130 Change-Id: I42d63fa5844bcf683ac41e61925aa637e033ca2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4676634 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Mohan Maiya 0fe6f282 2023-06-24T14:06:17 Reset and then populate frontend features during display initialize Overwritten features were never reset even if a display was terminated. On platforms that reuse displays for all tests in the end2end suite, overridden feature would leak into subsequent tests causing unexpected failure. Bug: angleproject:8235 Change-Id: I1b359bc762a2bca8db4e4dbc7a587604e5bd6a5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4643453 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.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>
Shahbaz Youssefi b37df0c7 2023-06-16T12:05:03 Vulkan: Don't output SPIR-V debug info in release Now that the SPIR-V transformer no longer relies on names, we can avoid generating them in the compiler in the first place. This both removes the need for stripping them out and makes the shaders (which are cached) a bit smaller. Bug: angleproject:7220 Change-Id: Ie636ac0ee62cf2730a409872041d22c066fc22ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4615238 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 24f4007b 2023-06-08T00:41:55 Vulkan: Use SPIR-V ids instead of names in the transformer This change removes the SPIR-V transformer's reliance on type and variable names. As a result: - String hashing is removed from the info map data structure and the SPIR-V transformer - The ID discovery class is entirely removed - Internal variable names have become a detail of the compiler alone (and are no longer exposed as part of the compiler interface) - Some front-end name tracking is removed ("parentStructMappedName", etc) This change also properly cleans up xfb emulation types that were previously left over. This change allows the SPIR-V compiler to emit user strings as-is instead of prefixing them with `u_` leading to more readable debug shaders. Additionally, it will make it possible not to emit debug info at all. Both of these changes will be done in follow ups. Bug: angleproject:7220 Change-Id: Iaa127496209a27aaae2e0d14c41b22fffb0b72a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600610 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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 1572f609 2023-06-09T18:39:52 Disable hashes for ANGLE features generator Features autogen files are small, fast to regenerate. Run the generator in --verify-only mode and check content every time, instead of using hashes. Bug: angleproject:8193 Change-Id: I3988ab50a6c33171b7b7252c03f34a74f09fcf18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4604579 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Shahbaz Youssefi 10380f4b 2023-06-06T11:52:08 Vulkan: Output SPIR-V ids from compiler In this change, the shader interface variables are given SPIR-V ids by the compiler before SPIR-V generation. Those ids are made available through the ShaderVariable interface. The transformer does not yet rely on this information. A follow up change will rework the backend's name->info map and the transformer to directly use ids instead of names. Bug: angleproject:7220 Change-Id: Ic0a62681d4bcf3ed171c39c3ecd83e438ea068c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600609 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 76b0e7f3 2023-06-01T11:25:54 Vulkan: Use reserved SPIR-V ids for internal variables With this change, the SPIR-V transformer does not need to discover these ids through name matching. Ultimately, user variables would also be identified by their SPIR-V ids (instead of name), removing the Vulkan backend's reliance on strings. Bug: angleproject:7220 Change-Id: I241c3247b89a28f9eed28f23c06b7c8b7fbbeaa0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4583133 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4ff41604 2023-05-31T11:12:33 Vulkan: Declare common SPIR-V ids in the compiler The SPIR-V transformer no longer needs to discover these ids. Bug: angleproject:7220 Change-Id: I7082e831308eaac97ace3c128f398ff5f5497739 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4573825 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5f833ff2 2023-05-31T00:06:24 Vulkan: Pass non-semantic info from translator to transformer The SPV_KHR_non_semantic_info extension is set up in this change to allow the translator to communicate an overview of the SPIR-V to the SPIR-V transformer as well as mark locations of interest. This would help the SPIR-V transformer avoid having to discover basic ids and such locations. In this change, a few basic types are predefined and the location where new types and variables need to be defined are marked. Bug: angleproject:7220 Change-Id: I237b9a79efa9c192b3b11f1d97bc9b6a5cc2f8fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4573823 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Shahbaz Youssefi 37698dcf 2023-05-25T14:57:21 Translator: Remove the "variables" entry from list of options This flag is unused. It is removed in a separate change to facilitate rolling ANGLE into Chromium and vice versa. Bug: chromium:1447314 Change-Id: I651f766e1c127f81c17ec46554bbdebd240f8c1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4568525 Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Alexey Knyazev 33e38862 2023-05-24T00:00:00 Vulkan: Limit clampFragDepth workaround to affected drivers Bug: angleproject:3970 Change-Id: I708591d86b8f2cb10d0cbdc7c14518fda45ac626 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4562134 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.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>
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>
Mark Lobodzinski c9ce8f33 2023-05-18T16:20:04 Revert "Don't export ANGLE platform methods." This reverts commit 7a11f4415e37ffba18023eaf1722d3f568ee12ba. Reason for revert: Running Android games using ANGLE results in crashes or hangs. Original change's description: > Don't export ANGLE platform methods. > > These functions are loaded through eglGetProcAddress. We don't need > to export these extra symbols and increase our binary size. > > Bug: chromium:1445969 > Change-Id: I494bbcb86973f167e8245b56e6eb73da7eab69f5 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4538367 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/283233503 Change-Id: I42418c0dabc440fb13ce3d48d63b2622b9edd15e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4544216 Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Geoff Lang 7a11f441 2023-05-16T11:14:44 Don't export ANGLE platform methods. These functions are loaded through eglGetProcAddress. We don't need to export these extra symbols and increase our binary size. Bug: chromium:1445969 Change-Id: I494bbcb86973f167e8245b56e6eb73da7eab69f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4538367 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 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>
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>
Scott Violet 059bfe89 2023-04-27T16:13:06 metal(ish): Adds platform function for logging cache hits/misses And adds call from metal. This way chrome can log overall cache stats. Bug: chromium:1423136 Change-Id: Iba5b3bd138adf15fe5e999d3dee0002f140edac1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4484260 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev d37c97d1 2023-04-17T00:00:00 Metal: Implement OES_shader_multisample_interpolation * Added support for sample qualifier and shader interpolation functions * Added MSL-specific AST transformations * Adjusted minimum fragment interpolation offset state query test so that accurate limits could be reported * Drive-by: Y-flip gl_SamplePosition adjustment * Renamed ANGLESampleMaskEnabled function constant to ANGLEMultisampledRendering to correctly reflect its usage Bug: angleproject:8097 Bug: angleproject:8131 Change-Id: I25c9f36487e29f05bb9fe874e146d06378fef975 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4440827 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Vikas Soni b5fa8728 2023-04-20T14:59:28 Add extension to skip texture renderability validation in ANGLE. Add a new extension to skip the texture renderability validation in ANGLE. Bug: angleproject:0000 Change-Id: Ia9e5a1eff233f5aced4706b7d3c183058d474c41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4455549 Auto-Submit: vikas soni <vikassoni@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: vikas soni <vikassoni@chromium.org>
Kimmo Kinnunen 20b6624a 2023-04-17T13:55:09 Metal: Support compiling on iOS without EAGL Makes EAGL and CGL compilation exclusive to each other. Catalyst would compile with both on ARM64, but only use EAGL. Remove use of GLSL generation in MSL. Generating GLSL for MSL compute and geometry shaders do not make sense. Remove compilation of RewriteRowMajorMatrices for Metal. It was removed from Metal in: b23bf47c9e999532a684beab9ac901552420b0b8 Reland "Metal: rewrite default uniforms and uniform blocks" Remove use of ANGLE_ENABLE_APPLE_WORKAROUNDS and gn variable angle_enable_apple_translator_workarounds. The workarounds are just unconditional business-as-usual implementation of ANGLE when ANGLE is compile for PLATFORM_APPLE. Fixed: angleproject:8129 Change-Id: I3af249708803fba816e2a7c92c35dddb84ce6946 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4428875 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Dan Glastonbury <djg@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
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>
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>
Shahbaz Youssefi 8b79410b 2023-04-02T22:25:12 Vulkan: Treat readonly SSBOs as readonly! Instead of assuming SSBOs are always written to, this change adds plumbing for the backend to know when an SSBO is declared readonly and marks the buffer readonly accordingly. With this change, BufferVk can optimize uploads and copies to and from the buffer with the knowledge that it can be safely mapped on the CPU for read while it's being used by the GPU. Bug: b/276002151 Change-Id: I75342148c07949a83436054a738395bbd88caec5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392720 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: 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>
Alexey Knyazev 1ee27fcd 2023-03-24T00:00:00 Fix translation of noperspective interpolation qualifier Auxiliary storage qualifiers used with 'noperspective' interpolation must be retained during ESSL translation * Added new qualifiers: * EvqNoPerspectiveCentroid * EvqNoPerspectiveCentroidIn * EvqNoPerspectiveCentroidOut * EvqNoPerspectiveSample * EvqNoPerspectiveSampleIn * EvqNoPerspectiveSampleOut * Adjusted GLSL and SPIR-V output * Adjusted 'sample' rank to be the same as 'centroid' Fixed: angleproject:4388 Change-Id: Iffc80a7a3b057beffd3bcbbc9446eeed77183c99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4368471 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.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>
Alexey Knyazev ad52f12e 2023-03-21T00:00:00 Implement EXT_conservative_depth Added translator frontend and GLSL backend support for gl_FragDepth redeclaration and layout qualifiers. Added mappings to DepthGreater, DepthLess, and DepthUnchanged SPIR-V execution modes. Bug: angleproject:8046 Change-Id: I23f19ff54380741107970a44055ea269eef179f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355028 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Chris Dalton 513ca723 2023-03-13T14:30:20 Delete GL_LOAD_OP_DISABLE_ANGLE from PLS This load op makes the PLS spec and WebGL implementations unnecessarily complex. Bug: chromium:1421437 Change-Id: Iab02a8b02083899c6cc345ecb25b88c5871611c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4335148 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton b468e4dd 2023-03-08T14:21:47 Add back "non-robust" PLS queries Chrome doesn't have a codegen template for queries that model the "robust" signature, so support both types. Specify that the robust variants are only supported if ANGLE_robust_client_memory is supported, so Chrome and other implementations don't have to support them. Bug: chromium:1421437 Change-Id: Icc69b69ce9ce0a2cfad0dbeed1f3b29bcfa92d20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4321867 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Dan Glastonbury aa5b97de 2023-03-06T17:59:43 ANGLE_metal_shared_event_sync: Control signaling external events It was assumed that the external MTLSharedEvent passed to eglCreateSync should be signaled by the GL. This change adds EGL_SYNC_METAL_SHARED_EVENT_SIGNALED_ANGLE, which when passed as the value for EGL_SYNC_CONDITION during eglCreateSync, changes the behavior to not insert a fence command into the command stream. Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.AngleMetalSharedEventSync_WaitSync_ExternallySignaled Bug: angleproject:8064 Change-Id: Ia1b8615b976f293d411b7d2be506b0ac87d64dee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4307152 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Chris Dalton a65f6a9d 2023-03-07T16:11:44 Make PLS queries robust There's no reason not to mirror the ANGLE_robust_client_memory API here. Bug: chromium:1421437 Change-Id: Ifb8b1a9675abe2ceb35272dc905f3c38f29dceda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317485 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Alexey Knyazev 4256c022 2023-03-01T00:00:00 Metal: Implement ANGLE_stencil_texturing Used texture views to sample stencil values from combined depth/stencil textures. Texture2DDepthStencilTestES3.TexSampleModes* tests were split into swizzled and non-swizzled variants to suppress only swizzled cases on some platforms. Added a new avoidStencilTextureSwizzle workaround to skip creating swizzled texture views of stencil-only textures on platforms that fail to sample from them. Fixed: angleproject:8051 Change-Id: I0b1148f8d30fc6459239efcdaeee6c0364633cc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4304058 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Igor Nazarov 4f87f4e9 2023-03-03T13:19:09 Vulkan: Add useResetCommandBufferBitForSecondaryPools feature. Currently ANGLE does not use "vkResetCommandBuffer()" on Vulkan Secondary Command Buffers. Instead it uses "vkFreeCommandBuffers()" and "vkAllocateCommandBuffers". According to spec, "VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" is required only for command buffer reset operations. However, some ARM drivers may not free memory in "vkFreeCommandBuffers()" without this flag. Bug: angleproject:8059 Change-Id: Ibfe45bca345dc48484b625c450369d30805cec77 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306722 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Alexey Knyazev 3fed0866 2023-02-22T00:00:00 Implement EXT_texture_mirror_clamp_to_edge Support GL_MIRROR_CLAMP_TO_EDGE_EXT address mode when native support is available. Adjusted validation, sorted switch cases by target enums order. Added new TextureMirrorClampToEdge* end2end tests. Drive-by: fixed texture address computation for integer formats with GL_MIRRORED_REPEAT on D3D11. Fixed: angleproject:7968 Change-Id: Iaf29c8b4b32a7630c2a871f832d171f4bc4e2672 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289137 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev a2efea13 2023-03-01T00:00:00 Add ANGLE_stencil_texturing This extension allows texturing of the stencil component of a packed depth stencil texture on OpenGL ES 3.0 contexts. Trivially exposed on backends that support OpenGL ES 3.1, which requires this feature. Adjusted the tests to check for the new extension string instead of the context version. Bug: angleproject:8051 Change-Id: I4d833acbc72e7374bde91d4c861598a0fdaf9b90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4295312 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Charlie Lao 6d282d62 2023-02-08T16:51:07 Vulkan: Move retireFinishedCommands/garbageCleanup to worker thread This CL separate out the logic of mLastCompletedQueueSerial update and retireFinishedCommands and garbage clean up into different functions. At submission, previously we are always check fence and update mLastCompletedQueueSerials and calling reset on finished commands and do garbage clean up. With this CL, we only do the fence check and update mLastCompletedQueueSerials. Then it request worker thread to do the command buffer reset and garbage cleanup. We uses the CommandProcessor's thread for the reset and cleanup, since async submission path needs to handle this clean up anyway. This CL also added a new feature flag asyncCommandBufferReset and it is disabled right now. This will be enabled in the follow up CL. Bug: b/255411748 Change-Id: I6da558f8d4c962eb038e2378ccc76c464101cde2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4244823 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Alexey Knyazev a1f9b9aa 2023-02-20T00:00:00 Implement more texture border color adjustments D3D11: * Exposed EXT_texture_border_clamp extension string, to ensure that the relevant CTS tests are running. * Updated StateManager11::setSamplerState to adjust the border color based on the texture format. * Refactored ShaderConstants11::updateSamplerMetadata to correctly adjust the border color for integer formats. * Removed unused SamplerMetadata.internalFormatBits D3D9: * Updated Renderer9::setSamplerState to adjust the border color value based on the current texture format. * Added borderColorSrgb feature required for some drivers. GL: * Copy alpha value to green for A and LA legacy formats to workaround driver bugs when lumaWorkaround is not used. Tests: * Added ES 2.0 tests for texture formats that require border color adjustments. Fixed: angleproject:7969 Change-Id: I3d36cce43e76e6d5069a51865152c2250ecbb017 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4291000 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 3a7904e1 2023-01-25T23:56:56 Vulkan: Use VMA suballocation for images There is a maximum limit for device memory object allocation. On some platforms, there can be an error regarding too many object allocations when 4096 device memory handles have been allocated. Suballocation can help mitigate this issue. In this CL, some images will be allocated using VMA API calls, which use suballocation. * Added a new feature (useVmaForImageSuballocation). * Added VMA allocation for ImageHelper, which is used in initMemory(). * Suballocation is used for VMA image allocation. * If enabled, mVmaAllocation will be initialized in the ImageHelper object (instead of mDeviceMemory). * It is currently used for all platforms. * Minor change to the name of an arg in CreateBuffer() declaration. * Added test to make sure we can allocate at least 4096 images on supported platforms (8000 in the test). * Skipped the test "NonZeroBaseEmulatedClear" when run on Linux/Intel if this feature is enabled (due to output color mismatch). * Skipped several tests for capture/replay on Windows. Bug: b/218891184 Change-Id: Ibf80c9c8c485b301da7d23b5ba4bcbb1a8e3194f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4191202 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jonah Ryan-Davis 8105a801 2023-02-23T10:00:17 Change enum allocation for EGL_PLATFORM_ANGLE_DISPLAY_KEY_ANGLE Changes EGL_PLATFORM_ANGLE_DISPLAY_KEY_ANGLE from 0x34DA to 0x34DC Bug: chromium:1251724 Change-Id: I609d37abd622bf0c3bbab253d4d0dea31edd1774 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4287264 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 13e8dabc 2023-02-15T14:34:05 Add EGL_PLATFORM_ANGLE_DISPLAY_KEY_ANGLE To allow the creation of multiple EGLDisplays on the same graphics device, we need a value to key for the display cache. When the display key is specified, the cache will return a new display for that key, even if there is an existing display on the same graphics device. Bug: chromium:1251724 Change-Id: I55e169776770734fc33b8bc8e1265ea6f7472fe3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4255730 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5a77200b 2023-02-08T17:10:28 Metal: Implement parallel shader linking. Update the Metal library cache to be thread safe. Change absl::flat_hash_map back to std::unordered_map because the value types now contain a mutex which must not move. Only generate async compilation tasks for shaders that were not already compiled and in the cache. Collapse some of the link methods in ProgramMtl that only had one call site. All linking is now done in ProgramMtl::link and ProgramMtl::load. Support disabling parallel linking using the new enableParallelMtlLibraryCompilation feature. Bug: chromium:1385510 Change-Id: I71ba71a34d994066729df7e4170911f88c89de4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4234153 Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kenneth Russell ee64836f 2023-02-11T17:56:06 Revert "Metal: Optimized BufferSubData per device" This reverts commit 968041b54770af8917001d8fe9b52a881cfed0b2. Includes the following patches: git revert -n 995db1f66bcf87fc9e47d908fb2a885e810d2567 \ 9a6c90c8f802b4d107a081bfccaf4be007e7af54 \ dbd47e378582ef86db52c7379cd220cf0b2c8193 \ 369b320f92f54774879e8b8faff834fc8db0793e \ 4abae6f97586448712e2dc1cced4a678b0901d7b \ 968041b54770af8917001d8fe9b52a881cfed0b2 Several conflicts with top-of-tree were resolved during this revert. The aim is to reland this with additional code which will reduce the amount of excess buffer memory allocated, and release the resources associated with temporary buffer allocations. Bug: angleproject:7544 Change-Id: Ib7a6bc2ab1c2f23cb43112cd980106e2898c3826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4240556 Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Gregg Tavares <gman@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 54951da2 2022-12-18T17:11:33 Vulkan: Refactor extension vs core version checks Extensions are now grouped based on promotion-to-core status, and initialization code is generally cleaned up. ANGLE currently doesn't attempt to use a core version above Vulkan 1.1, as extensions are always assumed to be exposed even if promoted to core in later versions. With this change, it would be simpler to use a newer core version if ever necessary. Bug: angleproject:7959 Change-Id: Ia5fd3e06c18f7289e9e5a63af0f039a6dc89c687 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4224582 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3846714 2022-11-28T11:05:05 Vulkan: Feature to make async queue slow for testing Bug: angleproject:6746 Change-Id: I2573cae2dcf42d177168c55bc2a6d8bb012dde18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4227986 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang 9b00af52 2023-02-01T11:10:32 Metal: Add an in-memory MTLLibrary cache. Add a small cache for (msl + compile parameters) -> MTLLibrary at the egl::Display level. In regular executions of Chrome, the same shaders (particularly vertex) are compiled multiple times in different programs. Tested for a regular Chrome startup + open wikipedia + motionmark 1.2: 112/282 (40%) cache hits. Several different caching methods were profiled (LinkProgram perf test) - struct key with std::map : 303309 - struct key with std::unordered_map : 308090 - binary blob key with std::map : 263595 - binary blob key with std::unordered_map : 286051 - struct key + is_transparent with std::unordered_map : 304877 - struct key + is_transparent with absl::flat_hash_map : 335686 Using is_transparent allows us to search the hash map without copying the shader source string to construct the key structure. Bug: chromium:1385510 Change-Id: Ieec4ba526fe286276a4af7114d89cde32a8f9e1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4214012 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Mohan Maiya 1d9b8d80 2023-01-24T16:50:32 Reland "Add support for glShaderBinary" This is a reland of commit 228973e73135924ddf6116e0b63eff5a1ccbf232 with the following fixes - 1. Apply patch from Yuly to fix chromium build errors 2. Fix ShaderBinaryTest instantiation call 3. Add ShaderBinaryTest to expectations file for IOS Original change's description: > Add support for glShaderBinary > > This patch adds the following - > 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. > 2. Compiler support to generate shader binaries. > 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for > Vulkan translator. > 4. Support to load GL_SHADER_BINARY_ANGLE binaries. > 5. end2end tests for glShaderBinary. > > Tests: ShaderBinaryTest* > Bug: angleproject:7833 > Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:7833 Change-Id: I21135c52e2bae955342a99aff5631ba0e687eff1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4195852 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 18657894 2023-01-25T13:05:56 Add features to dump and replace shader source. dump_shader_source writes shader source strings to files named with the hash of the source and shader type. enable_shader_substitution allows subsituting the shader source with the strings contained in a file. The same file naming scheme as dump_shader_source is used so shaders can be dumped in one run, modified and subsititued in the next run. Use the ANGLE_SHADER_DUMP_PATH and debug.angle.shader_dump_path environment variables to control where files are written. If they are unspecified, write to the temp directory. Based upon Cody's CLs: https://chromium-review.googlesource.com/c/angle/angle/+/2755841 https://chromium-review.googlesource.com/c/angle/angle/+/3961670 Bug: angleproject:7760, chromium:1385510 Change-Id: I43b9827b977079b88daa794e867637f7a126b080 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4192347 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 0c9cbf39 2023-01-26T12:07:51 Revert "Add support for glShaderBinary" This reverts commit 228973e73135924ddf6116e0b63eff5a1ccbf232. Reason for revert: breaks compile on ANGLE into Chromium roll https://cr-buildbucket.appspot.com/build/8790942326644064097 https://cr-buildbucket.appspot.com/build/8790942759045412865 https://cr-buildbucket.appspot.com/build/8790942417069789217 Leaks detected on ASAN https://cr-buildbucket.appspot.com/build/8790946657703508337 Original change's description: > Add support for glShaderBinary > > This patch adds the following - > 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. > 2. Compiler support to generate shader binaries. > 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for > Vulkan translator. > 4. Support to load GL_SHADER_BINARY_ANGLE binaries. > 5. end2end tests for glShaderBinary. > > Tests: ShaderBinaryTest* > Bug: angleproject:7833 > Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:7833 Change-Id: Ice19576acbc1351810ff0cd769ac17ad6c0abdf3 No-Try: true No-Presubmit: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4197375 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Mohan Maiya 228973e7 2023-01-24T16:50:32 Add support for glShaderBinary This patch adds the following - 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. 2. Compiler support to generate shader binaries. 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for Vulkan translator. 4. Support to load GL_SHADER_BINARY_ANGLE binaries. 5. end2end tests for glShaderBinary. Tests: ShaderBinaryTest* Bug: angleproject:7833 Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi ffbb65bc 2022-11-28T13:31:48 Vulkan: Use VK_EXT_swapchain_maintenance1 for present fences Bug: angleproject:7878 Change-Id: Ic3a43c663789a6489cff261848d9ad4a408ca53a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4088905 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Dan Glastonbury bf5a007a 2022-06-16T14:21:08 Metal: Ensure render pass has at least one valid render target. Extend MTLRenderPipelineDescriptor validation to ensure that there is at least one valid render target set for the the render pipeline. This is required for certain families of metal devices to avoid a validation failure inside the metal framework. Moving the failure here will cause the app using ANGLE to return a GL error instead of crashing the process. Bug: angleproject:7436 Change-Id: I594d92492a22a61a720dbe7021843c8460b389b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4109310 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Shahbaz Youssefi 5d1ac2e0 2023-01-17T10:21:01 Add missing include to ShaderVars.h Patch by mcatanza@redhat.com Bug: angleproject:7963 Change-Id: I1466ab227ae4e8b5703bd68bafbf12c31d441c2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4174172 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia e58e77f5 2022-11-10T12:49:03 Support timestamp behind flag enableTimestampQueries All timestamp queries happen in the same disjoint query in one Context11. The whole design is that we start a disjoint query in D3D11 at the first timestamp request and keep it continuously running in current context. Only end it and read it back when the user queries if there is a disjoint. We cache the frequency and assume it doesn't change. For the first timestamp, we create a temporary D3D disjoint query and end it so we have a frequency to convert the ticks to nanoseconds. This task is taken over from https://chromium-review.googlesource.com/c/angle/angle/+/3694732 Bug: angleproject:7367 Change-Id: I747c9b00e10ac58362df66332efd01a24aa395f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4021139 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 067ace47 2022-12-21T00:00:00 Add ANGLE_clip_cull_distance extension Added an extension spec. Trivially exposed it on GL, Vulkan, and D3D11. Adjusted tests and validation to allow no cull distance support for this extension string. Removed extra built-in variable definitions. Bug: angleproject:7904 Change-Id: Ic60772dfe28132c316eaa29aadc1afd66e3b0fa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114290 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 301ed545 2022-12-20T20:16:22 Vulkan: Pass context to layout getters In preparation for a change that optionally uses read/write depth/stencil layouts. Context is used to test for the supportsMixedReadWriteDepthStencilLayouts feature to know whether those layouts are supported or that a fallback must be chosen. Bug: angleproject:7899 Bug: b/192477489 Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Alexey Knyazev 91a5635a 2022-12-16T00:00:00 Support arbitrary clip and cull distance array sizes Removed limitSimultaneousClipAndCullDistanceUsage cap. Enhanced HLSL translator to support all valid combinations of clip and cull distances. Validate that these arrays are sized explicitly or by using only constant indices; adjusted link program error message. Enhanced tests to cover all possible combinations of implicit and explicit array sizes for both built-ins. Bug: angleproject:4452 Change-Id: I704db6dc3c8951e5ba482a3e4dad09e5b0182f9c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111645 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 28e7adca 2022-12-09T00:00:00 GL: Implement clip distance state emulation Pass the current set of enabled clip distances to vertex shaders via an internal uniform and dynamically set disabled elements to zero. Bug: angleproject:7880 Change-Id: I709d31dc7ca0606decf49adf674460a941837683 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4094314 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi cd540095 2022-12-12T13:13:14 Vulkan: Add memory log at allocation error * Added logging memory allocation information in handleError() in the event of an error from ANGLE_VK_TRY. * Used for the handleError() in ContextVk. * Updated the name and message of the function to log allocations. * checkForCurrentMemoryAllocations() * Added logging memory heap stats, including budget and usage. * logMemoryHeapStats() * In the renderer, added the feature flag indicating whether the platform supports the memory budget extension. * Uses VK_EXT_memory_budget. * Added the enum class MemoryLogSeverity, which is used to select the severity level of the memory log. * Added logging pending memory allocation information. * logPendingMemoryAllocation() * If the last unsuccessful memory allocation was unsuccessful, its information will be added to the log. Bug: b/262029018 Change-Id: I97343c1553936aed23d763f3e0c00d495f9ee810 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089531 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Kaiyi Li <kaiyili@google.com>
Shahbaz Youssefi ea36cf1c 2022-12-19T09:55:45 Vulkan: Feature for VK_EXT_rasterization_order_attachment_access This change just adds the feature. A follow up change will actually start using the extension. Bug: angleproject:7899 Bug: b/192477489 Change-Id: I19c078ebe57a7819b3aa3e95d4436cefa34ba85b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113912 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Gregg Tavares be9e8e7b 2022-12-14T14:13:39 Add EGL_ANGLE_wait_until_work_scheduled extension We're changing eglReleaseTexImage so it calls flushCommandBuffer(mtl::NoWait) instead of flushCommandBuffer(mtl::WaitUntilScheduled) and then adding an extension to allow us to WaitUntilScheduled. This is because Chrome calls eglReleaseTexImage for every canvas and having it WaitUntilScheduled per call is very slow. So instead we'll call eglWaitUntilWorkScheduledANGLE once which will effectively wait just once. Bug: angleproject:7890 Change-Id: I87bc9f9a1a7f4a0f99d93736cc3083799e76afeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4109311 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi 77c95de4 2022-11-16T21:12:28 Vulkan: Threaded monolithic pipeline creation With this change, once a pipeline is created out of libraries, a task is scheduled (if necessary) to asynchronously create a corresponding monolithic pipeline. Once the task is complete, the linked pipeline handle is replaced by the monolithic one, gaining back any performance that might have been lost due to the use of libraries. Bug: angleproject:7369 Change-Id: I525fb1e09f8bedc61b9dbef19f9cce7026ff9c53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031151 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi db9ffea3 2022-12-08T22:08:51 Vulkan: Remove the unused shadowBuffer feature Bug: angleproject:4339 Change-Id: I4f4524ba597af25bd6da3792bd7a85ae1b52962e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089448 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton eb1a13d8 2022-12-06T21:56:42 Improve PLS load and store op tokens Define more new tokens that are more clearly named, as opposed to recycling tokens that were meant for a different purpose. Bug: angleproject:7279 Change-Id: I840e5ea168235c49eec2693b2231c2d329027b0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4082057 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 9bd9c1c2 2022-11-03T11:49:33 Workaround for AMD [[raster_order_group()]] bug Metal [[raster_order_group()]] does not work for read_write textures on AMD when the render pass doesn't have a color attachment on slot 0. To work around this we attach one of the PLS textures to GL_COLOR_ATTACHMENT0, if there isn't one already. Bug: angleproject:7792 Bug: angleproject:7803 Bug: angleproject:7818 Change-Id: I7567ed28ed30c7e3ca23dc52778ed90f2fdff965 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4004529 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 8ee1b89f 2022-11-04T13:10:37 Refactor pixel local storage options The various different PLS options were getting scattered and unruly. We are also in need of more backend-specific PLS options that would be difficult to add as-is. This CL refactors them into a single "ShPixelLocalStorageOptions" struct that gets initialized all in one place, and shared between the compiler and the backends. Bug: angleproject:7279 Change-Id: Ic58dccb8d1ba350a0b6cc5848ce15bd687e30fad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4006715 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton a4db9477 2022-10-06T10:35:39 Implement pixel local storage with metal::read_write textures Metal's programmable blending feature isn't available on non-Apple Silicon, so on these devices we have to polyfill pixel local storage using read_write textures, which can also be coherent if raster_order_groups are supported. This change leverages the existing PLS transformation to images, and implements just enough shader image functionality in Metal to support the pixel local storage usecase. Missing shader image features are marked with UNIMPLEMENTED(). Bug: angleproject:7279 Bug: angleproject:7792 Bug: angleproject:7794 Bug: angleproject:7797 Bug: angleproject:7803 Change-Id: Ia96a714693d352d57351a1bae4f45437dde000e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993363 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Shahbaz Youssefi fa37af38 2022-07-12T22:47:22 Translator: Support SSO's built-in redeclaration EXT_separate_shader_objects requires that gl_Position and gl_PointSize be redeclared in the vertex shader. This is not adopted by GLES3.2, but is nevertheless required to be supported if the shader enables this extension explicitly. Bug: angleproject:6590 Change-Id: I3428851ff9f00fb63573e4322bb62fe04bf0a095 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3757918 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 1434697f 2022-11-23T14:47:38 Add a vk feature flag to only enable precision match fixer on IMG According to https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5273, RelaxedPrecision does not need to match in the interface matching rules. However, removing the precision match is causing triangle clipping issues on IMG hardware. This change adds a feature flag to only run the code path that applies precision match in SpirV if the hardware is IMG. This is a follow-up change to https://crrev.com/c/4049421. Instead of adding back the code path that handles varying precision mismatch for every hardware, only enabling the code path if the vendor is IMG. Test: On Pixel6: $ adb shell setprop debug.angle.feature_overrides_enabled varyingsRequireMatchingPrecisionInSpirv $ out/AndroidDebug/angle_end2end_tests --gtest_filter="GLSLTest_ES3.MismatchPrecision*" --verbose Bug: angleproject:7488 Change-Id: Ia0155f14d523195df2f47b852ed6642918270e2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4054100 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev 27727e50 2022-11-21T00:00:00 Fix ProvokingVertex typos Aligned the parameter name with the upstream specs Moved ValidateProvokingVertexANGLE to validationESEXT.cpp Bug: angleproject:2829 Change-Id: I820a90c20ef0a1873640c933b1de52526cac7e70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4043701 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 68b47e58 2022-11-16T10:46:59 Vulkan: Initial support for VK_EXT_graphics_pipeline_library When available, this change uses VK_EXT_graphics_pipeline_library to create pipelines. Currently, it is only used when graphicsPipelineLibraryFastLinking is available. This restricts the use of this extension to devices where monolithic pipelines are not any more performant than linked libraries. A future change adds support for other implementations by providing async pipeline creation. Bug: angleproject:7369 Change-Id: I1e3b7ac4aa56e75c7d6f4d0d5ea91cb0b862e581 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031489 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Steven Noonan <steven@valvesoftware.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 70cf2322 2022-11-16T10:25:07 Vulkan: Move async pipeline cache sync feature to backend Bug: b/246683126 Change-Id: I194e488e04580cee7055c0674091f1228984edf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031486 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Solti Ho <solti@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 44d8fef8 2022-11-01T00:00:00 Add ANGLE_provoking_vertex spec Renamed provoking vertex enums to use _ANGLE suffix. The newly defined enums alias those from the desktop OpenGL extensions. Updated tests to use the new enum names. Bug: angleproject:2829 Change-Id: I72b686773536d3d54a653114cee5292007510a55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4013700 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 9c019cb3 2022-11-08T13:29:08 Vulkan: Features for graphics pipeline library Bug: angleproject:7369 Change-Id: I561cc095dcf2d4c71d24de8a6ca08d45567ad937 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4014519 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 78e28cb8 2022-11-03T11:05:48 Vulkan: Remove glslang fallback ANGLE's SPIR-V generator is battle tested by now. Bug: angleproject:6210 Change-Id: I2ed88642e3ede435e3f906fbd701133be6873fb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4002868 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 5b218196 2022-11-06T11:39:23 Metal: Remove compilation through SPIR-V Direct metal generation is stable. Bug: angleproject:6081 Change-Id: If9e76f61ad38f2fc9963f0181dfd03c99ffa3e2b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4003675 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 9bda9a79 2022-10-22T22:05:11 Add Store Ops to pixel local storage Browsers will need the ability to pre-empt pixel local storage, which means every plane will need a backing store to dump to. Store Ops allow the app to still avoid memory transactions at the end of PLS even if their plane has a backing texture. Bug: angleproject:7279 Change-Id: I3a3efa21773f87c03cd346a996e3c638028c68ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3974652 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 3605b399 2022-10-20T17:00:02 Move PLS clear values back into context state The API that required packing raw data into a buffer was un-ergonomic for developers and difficult to implement for WebGL vendors. Bug: angleproject:7279 Change-Id: If7c98908c285462c5775e8e2d8811883be139f64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3972376 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>