util/autogen/angle_features_autogen.cpp


Log

Author Commit Date CI Message
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>
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>
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>
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>
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>
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>