415 Commits

Author SHA1 Message Date
bruvzg
dc49c9dce5 [Godot] Apply patches. 2023-09-25 14:10:55 +03:00
bruvzg
74885b152b [Godot] Custom static library config. 2023-09-25 14:10:41 +03:00
Yuxin Hu
9fc3baf5a1 Add the missing GraphicsPipelineDesc legacy dither bit update
When the app calls glEnable(GL_DITHER) or glDisable(GL_DITHER),
we need to update the legacy dither bit of the renderpass that
belongs to ContextVk::mGraphicsPipelineDesc. If not, there is a
change that the graphics pipeline will be created with a
renderpass that has outdated legacy dither bit. This results
the dither being applied to the render results incorrectly:
e.g. the app calls glDisable(GL_DITHER),
but the render results have dithering applied.

Bug: b/286921997
Bug: b/292282210
Bug: b/293349058
Bug: b/284462263
Change-Id: Ie24b95898526c9021be6e3cb7620e4050f9faaaf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722446
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-09-22 23:08:37 +00:00
Hailin Zhang
141bada9e1 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>
2023-09-22 22:54:20 +00:00
Amirali Abdolrashidi
e1d2e88ae4 Check pending garbage after some buffer releases
* Embedded BufferHelper::releaseBufferAndDescriptorSetCache() inside
  a new ContextVk method: releaseBufferAllocation()

  * After releasing the buffer, there is a check for excess pending
    garbage. If the tracked pending garbage size is larger than the
    threshold, the context will be flushed.

* Unskipped the test "BufferDataInLoopManyTimes", which was failing
  on Android devices.

Bug: b/280304441
Change-Id: Ib34319f3291dd2200fc1a92e30645f9d1da8e2b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879086
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-22 22:47:35 +00:00
Christopher Cameron
a1e3abc06b Add ES2 support for copying GL_SRGB8_ALPHA8 to GL_RGBA8
Bug: angleproject:7907
Change-Id: I02ae9785ea1f942e85983c18155cfd75ec39b5c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887271
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-22 21:10:36 +00:00
Le Hoang Quyen
7b1b8a0161 Metal: Allow using GL_RGB with either RGBA/BGRA IOSurface.
Previously we only allowed GL_RGB internal format to be used with BGRA
IOSurface and GL_RGBX8_ANGLE to be used with RGBA IOSurface
respectively.

However, there are currently many places in Chrome prefer GL_RGB to be
able to be used with both RGBA and BGRA IOSurface.

This CL allows such combinations. Instead of deducing angle::FormatID of
the IOSurface pbuffer based on the input GL internal format & type, we
will take into account the pixel format of the IOSurface as well.

For example, when we call eglCreatePbufferFromClientBuffer with GL_RGB
internal format attribute:
- if IOSurface's pixel format is 'RGBA' ->
  deduced angle::FormatID is R8G8B8A8_UNORM.
- if IOSurface's pixel format is 'BGRA' ->
  deduced angle::FormatID is B8G8R8A8_UNORM.

This CL also removes GL_RGBX8_ANGLE support from Metal backend. Because
there are many places in Chrome that use this format enum for both RGBA
& BGRA IOSurface when the extension is available. It's redundant to
support that since GL_RGB already covers most of the required cases.

Bug: angleproject:8350
Change-Id: I5a121a97e031a42d0779721d4348f373dfaee9a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4881742
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
2023-09-22 19:32:35 +00:00
angle-autoroll
63eb70a6b2 Roll VK-GL-CTS from 23a6249942af to d88f9c5772a8 (9 revisions)
23a6249942..d88f9c5772

2023-09-22 ziga@lunarg.com Remove exceptions from vkGetDeviceProcAddr
test
2023-09-22 aitor@lunarg.com Add u/int to fp spirv conversion rounding
tests
2023-09-22 dneto@google.com Exercise narrowing float conversions with
RTE, RTZ
2023-09-22 gleese@broadcom.com Reduce copy-and-paste in localsize tests
2023-09-22 ziga@lunarg.com Fix pNext chain for device create info in api
buffer tests
2023-09-22 ewerness@nvidia.com Compare the results of the shader with an
epsilon
2023-09-22 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.7
into vk-gl-cts/main
2023-09-21 lorenzo@khronosgroup.org Merge "Merge
dev/VK_EXT_frame_boundary into main" into main
2023-09-15 gleese@broadcom.com Fix misspelling of OID_LENGTH

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cnorthrop@google.com
Change-Id: Ib45b73402c26629a30424603ee9ad03a1ad08ea8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4885336
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-22 15:31:03 +00:00
angle-autoroll
4ff5beba4f Roll Chromium from 65385dc9c1b7 to 86cb232d2fc2 (626 revisions)
65385dc9c1..86cb232d2f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 480a7a59d8..3a0a70c754
* buildtools: fb8823aeb4..d53d0131e2
* testing: 625ab1c17d..f5159f7d11
* third_party/android_build_tools/manifest_merger: FlwnxEZ1wdjoQfedkF4MiZgo8pD48-_CJNA7RnU6as4C..EPmMtC5CNXQqxByKOxqF9Vk8LURwarA6qy5siWX1kRoC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/43f4530c97..99f2d536fb
* third_party/depot_tools: a45d2d4c90..af369d8962
* third_party/libc++/src: 316166f499..a75061bc37
* third_party/libc++abi/src: 82c3c02548..cb9bef1717
* third_party/libunwind/src: 244575ffb6..4027f4521c
* tools/mb: cd4546f65b..0ce20e9bb6
* tools/perf: 29f2e7dc1c..332226148d
No update to Clang.

Bug: angleproject:6430,angleproject:8317
Tbr: cnorthrop@google.com
Change-Id: I31aa962ae8747977ec2281c40ae3b0110ddb3664
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886730
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-22 09:16:46 +00:00
Charlie Lao
26148a0237 Vulkan: Minor cleanup of mPrevUploadedMutableTexture
When texture is transit from mutable to immutable, we need to remove it
from SharedGroupVk::mPrevUploadedMutableTexture if it is pointing to.
Right now we did not clear the pointer, but rely on next texImage call
to detect that mPrevUploadedMutableTexture is pointing to a immutable
texture and then set it to new tetxure. This is a bit confusing since we
only add a mutable texture to this mPrevUploadedMutableTexture pointer
but at some point it becomes immutable. This CL changes to immediately
reset the pointer when texture is respecified from mutable to immutable,
and added assertion that mPrevUploadedMutableTexture is mutable.

Bug: b/301289624
Change-Id: I97a11616887367cd4c2069419fe17d3dea052b50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879087
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-21 21:30:06 +00:00
angle-autoroll
9f94ab7f86 Roll Chromium from 82003a98b373 to 65385dc9c1b7 (649 revisions)
82003a98b3..65385dc9c1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: f474ec05a2..480a7a59d8
* buildtools: da74596ec9..fb8823aeb4
* testing: 6b95b20c49..625ab1c17d
* third_party/android_toolchain/ndk: vD5FPvy1sIu7nXcWvm7PTF4yfBbjkyJJC-AgjYEdaYQC..NSOM616pOQCfRfDAhC72ltgjyUQp9lAWCMzlmgB18dAC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/7eff3d6a1f..43f4530c97
* third_party/depot_tools: ed9a0819a4..a45d2d4c90
* third_party/fuchsia-sdk/sdk: version:15.20230909.2.1..version:15.20230920.1.1
* third_party/kotlin_stdlib: 7XCiIAlSi36gvPwOn8N4Q1GE9sMLw6V1RljM9151cWIC..as5vlzFVMpLTCQXVJqs-kifMAEQmjK_fImDy09zQB8AC
* third_party/libc++/src: 3e8a3b3c5d..316166f499
* third_party/libc++abi/src: f6a17c88dd..82c3c02548
* third_party/r8: f6AwZX-cIa-qdx2fK93cJy9cfTg9ZqO2PkBWDNUMZXQC..qLYuLt4k9raGYbeiaAh3ORseYrHh8pt9WUaeD60Yov4C
* third_party/zlib: 235986452b..b1f4a09d6f
* tools/mb: 45952a2a57..cd4546f65b
* tools/perf: 7d52128ecb..29f2e7dc1c
No update to Clang.

Bug: angleproject:6430
Tbr: cnorthrop@google.com
Change-Id: I2c0c71fe008388338dd400e58ba789131a070442
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4882004
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-09-21 18:41:36 +00:00
Igor Nazarov
73252f3498 Fix ASSERT and potential bug with UnlockedTailCall
ASSERT happened in the Instagram application.
- record REEL using camera;
- press "Next" button;
- return to the previous screen;
- ASSERT happens.

Crash details:
    pid: 31451, tid: 2938, name: mediacompositio  >>> com.instagram.android <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    Abort message: 'FATAL: entry_points_egl_autogen.cpp:437 (EGL_GetError):      ! Assert failed in EGL_GetError (../../src/libGLESv2/entry_points_egl_autogen.cpp:437):
    backtrace:
          ...
          #07 pc 0000000000627740  /vendor/lib64/egl/libGLESv2_samsung.so (gl::LogMessage::~LogMessage()+140) (BuildId: acced3587e668343)
          #08 pc 000000000027e79c  /vendor/lib64/egl/libGLESv2_samsung.so (EGL_GetError+360) (BuildId: acced3587e668343)
          #09 pc 000000000007c14c  /system/lib64/libEGL.so (android::eglGetErrorImpl()+28) (BuildId: 5b32b014e5c062afdd3d1abd3ba13dd2)
          #10 pc 0000000000079464  /system/lib64/libEGL.so (eglDestroyImageKHR+20) (BuildId: 5b32b014e5c062afdd3d1abd3ba13dd2)
          #11 pc 000000000000e540  /system/lib64/libnativedisplay.so (android::EGLConsumer::EglImage::~EglImage()+44) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
          #12 pc 000000000000e598  /system/lib64/libnativedisplay.so (android::EGLConsumer::EglImage::~EglImage()+16) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
          #13 pc 000000000000e434  /system/lib64/libnativedisplay.so (android::EGLConsumer::onFreeBufferLocked(int)+156) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
          #14 pc 000000000000bda0  /system/lib64/libnativedisplay.so (android::SurfaceTexture::freeBufferLocked(int)+48) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
          #15 pc 00000000000bc294  /system/lib64/libgui.so (android::ConsumerBase::onBuffersReleased()+172) (BuildId: f219f4196018eeed01e28ec428c73c99)
          #16 pc 000000000008d9d4  /system/lib64/libgui.so (android::BufferQueue::ProxyConsumerListener::onBuffersReleased()+92) (BuildId: f219f4196018eeed01e28ec428c73c99)
          #17 pc 0000000000099608  /system/lib64/libgui.so (android::BufferQueueProducer::disconnect(int, android::IGraphicBufferProducer::DisconnectMode)+184) (BuildId: f219f4196018eeed01e28ec428c73c99)
          #18 pc 00000000000eb3ec  /system/lib64/libgui.so (android::Surface::disconnect(int, android::IGraphicBufferProducer::DisconnectMode)+268) (BuildId: f219f4196018eeed01e28ec428c73c99)
          #19 pc 00000000000eaf04  /system/lib64/libgui.so (android::Surface::hook_perform(ANativeWindow*, int, ...)+264) (BuildId: f219f4196018eeed01e28ec428c73c99)
          #20 pc 0000000000031214  /system/lib64/libvulkan.so (vulkan::driver::DestroySurfaceKHR(VkInstance_T*, VkSurfaceKHR_T*, VkAllocationCallbacks const*)+56) (BuildId: 44c563855311012ead3ce5e7afdb9792)
          #21 pc 000000000039bb40  /vendor/lib64/egl/libGLESv2_samsung.so (void std::__Cr::__function::__policy_invoker<void (void*)>::__call_impl<std::__Cr::__function::__default_alloc_func<rx::WindowSurfaceVk::destroy(egl::Display const*)::$_0, void (void*)> >(std::__Cr::__function::__policy_storage const*, void*)+140) (BuildId: acced3587e668343)
          #22 pc 0000000000522114  /vendor/lib64/egl/libGLESv2_samsung.so (angle::UnlockedTailCall::runImpl(void*)+56) (BuildId: acced3587e668343)
          #23 pc 000000000027dcec  /vendor/lib64/egl/libGLESv2_samsung.so (EGL_DestroySurface+260) (BuildId: acced3587e668343)

This CL will fix the ASSERT as well as remove possibility of calling
same callback twice.

Bug: angleproject:8127
Change-Id: I8e56981d0db2ef5723afedc22d5286421237444b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874040
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-09-21 17:25:24 +00:00
Igor Nazarov
1833a686ff Fix FixedVector bugs and unit tests
Problems:
- test was not testing assignment operators;
- fixed compilation error in r-value assignment operator;
- r-value constructor/assignment were not resetting size.

Additionally updated FixedVector.Constructors to better test copy and
assignment operations.

Bug: angleproject:2435
Bug: angleproject:8127
Change-Id: Ic501b8d85af0280801c7abec8fb20a0ddf67580b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874039
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-21 17:23:55 +00:00
Charlie Lao
8fcd4a50ab Cleanup POD struct usage to make them more consistent
In recent months, I have made many CLs to wrap various data structures
into a trivially copy-able struct. Some of them uses different
terminology. This CL replaces all of these to use a consistent name
"pod" in the struct, and "mPod" in a class.

This CL also turns ActiveVariable methods into macros to remove the code
duplication.

This CL also moves ProgramInput/ProgramOutput struct implementations
from Program.cpp to ProgramExecutable.cpp

Bug: b/275102061
Change-Id: Ia2a4210a9ea633f3d323bebe674ee74f8b90b363
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877335
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-09-21 16:30:57 +00:00
Charlie Lao
9ca025d2b5 Flatten BufferVariable/ShaderVariableBuffer/InterfaceBlock struct
InterfaceBlock inherits from ShaderVariableBuffer, ShaderVariableBuffer
is not a trivially copyable struct, this made InterfaceBlock not
trivially copyable. InterfaceBlock is being used by some app traces for
uniform blocks. BufferVariable inherits from sh::ShaderVariable which is
very complicated and not trivially copyable. This CL flattens all of
these three structs to simple structs without inheritance, and wraps all
trivially copyable data into one POD struct, thus load/save are cheaper.

Bug: b/275102061
Change-Id: I96f89176ce3d3131cb1d3ea3280c3c36c257560f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874610
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-21 15:47:43 +00:00
Christopher Cameron
120e90eb91 Add test for copying GL_SRGB8_ALPHA8 to GL_RGBA8
The pixel values should be the same (no conversion should happen).

Include sub-tests with and without alpha premultiplication.

Bug: angleproject:7907
Change-Id: I2e3d657d5b8513cd06df357e84027572ebce03ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852258
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-21 05:51:44 +00:00
Alexey Knyazev
f58423501d Vulkan: Flatten secondary fragment output arrays
Added a SPIR-V transformation that makes them private
and copies their values into regular fragment outputs.

Fixed: angleproject:8336
Change-Id: Ide62dd183426e0de70fd4ac6d2b8c6a4b4b33994
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4875327
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-09-20 21:09:30 +00:00
Charlie Lao
44c6effdee Fix potential timeout of FixedQueue.ConcurrentPushPop test
The test some times times out in bots. I think what happens is that when
dequeue thread went to sleep and then wake up, during sleep the enqueue
thread already finished and exited (maybe because of timer runs out),
then it will forever stuck in the while loop. This CL adds the check for
other thread is finished or not and exit while loop if other thread has
finished.

Bug: b/301283364
Change-Id: Id6d846600b1749ce0bcb7b080b3b8ce3ad3d1dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879083
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-20 20:39:34 +00:00
Christopher Cameron
b480ba3001 CopySubTexture: Fix premultiplied alpha
When copying from an sRGB texture to a non-sRGB texture, un-do the
sRGB-to-linear transform independently of the premultiply vs
unpremultiply properties of the texture.

The sRGB-to-linear transform performed during sampling is performed
on the RGB part of the pixel, independent of the alpha channel's
value. Un-do this part immediately before examining the alpha
channel's value (and its premultiply vs unpremultiply state).

Bug: angleproject:7907
Change-Id: I50c8f56182a46957febcd1f7b7887b0956074bb8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4872047
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
2023-09-20 17:39:27 +00:00
Le Hoang Quyen
bfae80724e Metal: Support RGBA IOSurface pbuffer.
Currently only BGRA IOSurface is supported by ANGLE.
This CL adds RGBA IOSurface support to Metal backend.

- Added GL_RGBX8_ANGLE & GL_UNSIGNED_BYTE attributes combo to specify
that the IOSurface is RGBX. Only supported on Metal backend for now.
- Added GL_RGBA & GL_UNSIGNED_BYTE combo to specify that the IOSurface
is RGBA. Only supported on Metal backend for now.

Bug: angleproject:8350
Change-Id: I0e05762870c9c034bca78e8989aedf346406df57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874484
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
2023-09-20 15:26:18 +00:00
angle-autoroll
67350e646b Roll vulkan-deps from 640b7331b244 to b8fa58ef74a9 (7 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/640b7331b244..b8fa58ef74a9

Changed dependencies:
* spirv-tools: a996591b1c..a40483d313
* vulkan-tools: a01cfc0b78..1ecbed6db3
* vulkan-utility-libraries: 21ded6ed67..6774c9b24b
* vulkan-validation-layers: 8c7da10180..c26ff51102

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I0e0a9cdbb7404fbff02fc7b113c47b938aae39e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877343
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-20 10:59:07 +00:00
angle-autoroll
ea74cc8d49 Roll Chromium from 26ff6b8864ac to 82003a98b373 (614 revisions)
26ff6b8864..82003a98b3

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: a66b1c2c6f..f474ec05a2
* buildtools: a567506e78..da74596ec9
* testing: 0f7651344a..6b95b20c49
* third_party/android_toolchain/ndk: 3vHltFqfgIw8wZ38ggGM9c7Eyw_AHZnwCgFIVtc9gngC..vD5FPvy1sIu7nXcWvm7PTF4yfBbjkyJJC-AgjYEdaYQC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/693c3fa3c2..7eff3d6a1f
* third_party/depot_tools: 36bd52621f..ed9a0819a4
* third_party/libc++/src: 7cee6b00d3..3e8a3b3c5d
* third_party/libunwind/src: d9b4abf6b6..244575ffb6
* third_party/r8: WptUn43oi_BkFPtEyZTdUD9wZo1yy8OPVqFwdP3jmqoC..f6AwZX-cIa-qdx2fK93cJy9cfTg9ZqO2PkBWDNUMZXQC
* third_party/turbine: laSnfZnTgkmZynERrjAlU3yeqB5rN446BctGmKQsZ64C..NR31kJWll1NZz_scMvMPtPH_P3wOQ5aKBJ-n8XQ7QrYC
* tools/clang: 31a7453f89..ac34945aad
* tools/mb: 0e407d39db..45952a2a57
No update to Clang.

Bug: None
Tbr: cnorthrop@google.com
Change-Id: Ia7ec980ff68ff03aa866bb3e921d9990776a3765
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4878593
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-20 08:03:16 +00:00
Le Hoang Quyen
e305459968 Metal: Don't use implicit MSAA for render buffers.
This CL removes the usage of implicit MSAA from render buffers.
Implicit MSAA added an extra single-sampled texture & resolve step when
clients render to a multisampled render buffer. It is as if
EXT_multisampled_render_to_texture extension is always used even though
users might not request for it. Not to mention this extension's
implementation is incomplete.

Furthermore, it is hidden from users. Thus
the only way for them to use the render buffer after rendering
(presentting to screen, sampling the pixels, etc) is manually resolving
the render buffer with glBlitFramebuffer. This results in another
redudant texture copy operation.

This CL also removes no-longer used function
FrameBufferMtl::getReadableViewForRenderTarget()

Bug: angleproject:8301
Change-Id: I63053b9e1d1a5cf47a023291b8fcb31d3636d3ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4840154
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-19 23:49:25 +00:00
Cody Northrop
43130a0aba Android: Clean up from previous bad rolls
See the bug for details, but we think the presence of
previous temp directories may be preventing roller CLs.

Test: Locally ran roll_aosp.sh
Bug: angleproject:8352
Change-Id: I7851185b8c77d1b91c7289e3a13c5c0b4175745c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877189
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-09-19 22:48:31 +00:00
Amirali Abdolrashidi
ae9c785749 Suppress BufferDataInLoopManyTimes for Linux/Intel
* Skipped BufferDataInLoopManyTimes for Linux/Intel due to the long
  execution time, suspected to be causing errors on the bots.

Bug: angleproject:8351
Change-Id: Ib7b640800edf5b30e251b47cfabfd34cc1ecea28
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877693
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-19 21:45:18 +00:00
Yuxin Hu
53e3ce59b7 Add device lost handle after finishImpl
It is possible that the during context destroy,
when calling finishImpl, the vulkan device is lost,
e.g.
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6447#issuecomment-1711479164.
We should check vulkan device lost after finishImpl().

Bug: b/289544394
Change-Id: I75aa650cdd38d81815f7354770639e896e3376a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854763
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-09-19 20:04:34 +00:00
Igor Nazarov
ecf11ecaea Add ContextMutex unit tests
Test: angle_unittests --gtest_filter=ContextMutex*
Bug: angleproject:8226
Change-Id: I55b69ce8bb89d572a2bf5d28f428635505771fa1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874388
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-09-19 19:04:07 +00:00
Igor Nazarov
4b724130cb Rename SharedContexMutex into ContexMutex
Follow up after:
    Replace (Single/Shared)ContextMutex classed with ContextMutex

Renamed build option:
    angle_enable_shared_context_mutex -> angle_enable_context_mutex

Renamed because there is no more SharedContexMutex class and
ContextMutex is now used for both Shared and not Shared Contexts.

Bug: angleproject:8226
Change-Id: I68eea84aa59441d9c5b19870910b2bb499311e08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4650350
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-09-19 18:57:03 +00:00
Igor Nazarov
ca4dc52e95 Replace (Single/Shared)ContextMutex classed with ContextMutex
This CL removes `SingleContextMutex` class and not 100% safe
`Context::lockAndActivateSharedContextMutex()` method.

`SharedContextMutex<>` was replaced with `ContextMutex` with static
mutex type which is defined in "SharedContextMutex.h":
- ContextMutexType = std::mutex

Above refactoring also allows storing `State::mContext` by value,
instead by pointer. Actual mutex is referenced by `ContextMutex::mRoot`
member. This removes extra pointer indirection and slightly improves
performance.

If newly created Context uses shared textures/samplers, then it uses
`Display::mManagersMutex` root as its root.

Performance in Single/Shared cases now will be the same, and it should
be slightly faster then old Shared case (because of the reduced
complexity).

Bug: angleproject:8226
Change-Id: I7ca4d9ea008c665cbea98ace1c6e7bbc544f54b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632729
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-19 18:54:49 +00:00
Shahbaz Youssefi
eb0d59973d Move set/get uniform machinery to ProgramExecutable
This is done because some uniforms are internally added by the compiler
(draw ID, base vertex, and base instance) and are automatically set **on
the installed executable**.

This change fixes scenarios where a draw is done after a program has
failed a relink, and therefore is unable to correctly set the uniforms
(as it does not have access to the executable that is installed).

It also fixes draws that use those uniforms in a PPO.

Bug: angleproject:8297
Change-Id: Id74b4984b88aa09b5b81be1c91412d6c91711136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864693
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-19 14:55:27 +00:00
angle-autoroll
7cb117e0b0 Roll vulkan-deps from dc9947ad4d2b to 640b7331b244 (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/dc9947ad4d2b..640b7331b244

Changed dependencies:
* glslang: efc33d1ee5..4c57db1595
* vulkan-utility-libraries: 10f76f75da..21ded6ed67
* vulkan-validation-layers: 867004beac..8c7da10180

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cnorthrop@google.com
Change-Id: Iae666e69b893afe75f19bc904e1c1b40bbaecc35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874893
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-19 11:05:02 +00:00
Shahbaz Youssefi
936694e3e8 Cache isSeparable in the executable
For convenience, particularly for the next CL.

Bug: angleproject:8297
Change-Id: I55690aecf3936a51a2a2163d7c354a710b81d7f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864069
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-19 10:13:19 +00:00
Cody Northrop
c8e16b071e Vulkan: Ignore VVL errors from GOOGLE extension
We're seeing VUID-VkSamplerCreateInfo-pNext-pNext fire
when rolling vulkan-deps.

It is complaining about an unknown VkStructureType (1000264000)

The type is implemented by VK_GOOGLE_sampler_filtering_precision,
which is a private extension.

We can ignore this VVL error.

Bug: angleproject:8349
Change-Id: Ie424458873192b668371d8215dadf9788479f8dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-19 09:43:22 +00:00
angle-autoroll
d46bc77d0d Roll Chromium from 0bbd400252a4 to 26ff6b8864ac (512 revisions)
0bbd400252..26ff6b8864

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: c5658c73de..a66b1c2c6f
* buildtools: 691073acd7..a567506e78
* testing: a65c4c3a2f..0f7651344a
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/0dfa3b81d7..693c3fa3c2
* third_party/depot_tools: d7ba85d1eb..36bd52621f
* third_party/flatbuffers/src: 28861d1d7d..0343396e49
* third_party/libc++/src: 176c934642..7cee6b00d3
* third_party/r8: g3ZKfFfRYNZNHJUs07J5hb92ua_jvjdrbo7I1R585uwC..WptUn43oi_BkFPtEyZTdUD9wZo1yy8OPVqFwdP3jmqoC
* tools/mb: c73590e223..0e407d39db
* tools/perf: 44d802024e..7d52128ecb
No update to Clang.

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I66a30d8fbaaf44a1616029bcda41ad4245590362
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874892
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-19 08:03:14 +00:00
Amirali Abdolrashidi
91ef1f3cfd Move buffer suballocation callers to ContextVk
* Moved the following functions from BufferHelper to ContextVk.
  * initBufferForBufferCopy()
  * initBufferForImageCopy()
  * initBufferForVertexConversion()

Bug: b/280304441
Change-Id: I890f4396b00b0c20feb44f0ad113c55924ce1014
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854760
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-19 02:06:34 +00:00
Amirali Abdolrashidi
a1f52f1bdd Vulkan: Flush pending image garbage more often
* Added a counter to the context object to keep track of the size of
  the pending image garbage: mEstimatedPendingImageGarbageSize.

* Modified hasExcessPendingGarbage() to use the sum of the size of
  the image and and suballocation garbage.

  * RendererVk::calculatePendingGarbageSizeLimit() provides the limit.
  * Currently the limit is based on the available heap sizes. It will
    use a fraction of the largest memory heap size.
    * The portion is currently kGarbageSizeLimitCoefficient = 0.2f.

* Unskipped the test "TextureDataInLoopManyTimes", which was failing
  on Android devices.

Bug: b/280304441
Change-Id: Ibcced1d118ea8a1f347028b62d29cfbd9e38e8c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851252
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-09-19 00:56:04 +00:00
Amirali Abdolrashidi
27896999ea Vulkan: Flush pending suballoc garbage more often
* Added a counter to the renderer object to keep track of the pending
  suballocation garbage.
  * mPendingSuballocationGarbageSizeInBytes

* Once it surpasses a limit (mPendingSuballocationGarbageSizeLimit), it
  will flush the context so the pending garbages can be freed.

  * Currently the limit is based on the available heap sizes. It will
    use a fraction of the largest memory heap size.
    * The portion is currently kGarbageSizeLimitCoefficient = 0.2f.

* At the end of the render pass, it is checked if the limit has been
  reached. If so, context flush will occur.

Bug: b/280304441
Change-Id: I08e6028cfe20059ece2b2e4e971ece897544cd6d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787950
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-09-19 00:54:48 +00:00
Charlie Lao
6522025606 Add ProgramOutput struct for ProgramExecutable::mOutputVariables
Right now ProgramExecutable::mOutputVariables is a vector of
sh::ShaderVariable. ShaderVariable. itself is not a POD struct and can't
memcpy. And most of variables are not needed for mOutputVariables. This
CL adds a custom struct for mOutputVariables so that we only store what
we actually needed and data can be memcpy.

Bug: b/275102061
Change-Id: I045d0618b6dab5f8d58afe40e55147d12987cf61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4862977
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-18 22:00:59 +00:00
Shahbaz Youssefi
602cc1f1c7 Don't pack gl_TessLevelInner/Outer
Per the GL spec:

The built-in outputs gl_TessLevelOuter and gl_TessLevelInner are not
counted against the per-patch limit.

Bug: angleproject:3572
Change-Id: I9fb2255d730988e7bfd6b76f9b5fdab8c475c468
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4873400
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-09-18 20:05:58 +00:00
Charlie Lao
1b450b92c5 Vulkan: Fix buffer storage reuse bug when robustAccess is enabled
There is an optimization in vulkan backend that when the bufferData is
called and current storage size is big enough for new bufferData call,
we just reuse the storage. Mean while, when hasRobustAccess() is true,
we must use the VkBuffer with the exact user size that glBufferData call
provides so that driver can set proper access boundary. In order to
satisfy both requirement, if robust resource access is enabled, we
create a separate VkBuffer with the exact user provided size but bind to
the same memory. There is a bug here that if robustAccess is true, this
buffer of user provided size is not been recreated when storage is
reused but with different user size (both has same allocation size).
This causes we keep using the smaller VkBuffer and subsequently causes
missing triangles. This CL clears mBufferWithUserSize when size changes
and storage is reused.

The other bug here is that previously we are checking
isRobustResourceInitEnabled, which is incorrect. We should check
hasRobustAccess. This appears works for chrome possibly due to both are
enabled. This CL switches it to check hasRobustAccess.

This CL also renames mBufferForVertexArray to mBufferWithUserSize to
reflect what its true meaning.

Bug: chromium:1476475
Change-Id: I843cc3a705f8a582a97bc0307f03aa1eb9fad3ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864003
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-18 19:55:54 +00:00
Yuxin Hu
503c0db12e Add the missing multisample and rgb565-no-depth-no-stencil tests.
We need different --deqp-gl-config-name values
for different test applications, to create RenderTarget
with different properties needed for different test
applications, such as multisample, rgb formats.
This CL adds an array of
vector<const char*> gTestSuiteConfigParameters
to store the --deqp-gl-config-name
values for different test applications. Each element
in this array can hold multiple const char* values.
In the upcoming CLs, we can add more customized config
values for each test applications, such as
--deqp-screen-rotation for angle_deqp_gles*rotate*tests.

Rename the gEGLConfigName to gEGLConfigNameFromCmdLine.
The default value for gEGLConfigNameFromCmdLine is empty
string, and its value can be overwritten by specifying
--deqp-gl-config-name when running the tests from command
line. If we pass --deqp-gl-config-name from command line,
then use the value passed from the command line to replace
the values in gTestSuiteConfigParameters.

Bug: b/297901032
Change-Id: Ibf8762c55d7d0cdf7bcf33f384568587023b369c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851048
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-09-18 19:15:48 +00:00
Shahbaz Youssefi
29561184ae Remove forward-to-executable helpers from program
This helps avoid accidental usage of the executable that is in the
program instead of the installed executable in the GL context.

The program's executable is still accessed in specific cases of:

- During link
- GL program queries

Bug: angleproject:8297
Change-Id: I40a956e740944f2ecfbf6e4a3060aac08c21f7f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864448
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-18 18:34:28 +00:00
Shahbaz Youssefi
d62db89e17 Vulkan: Disable VK_EXT_host_image_copy on Fuchsia
An old version of VVL is used, causing incorrect failures.

Bug: angleproject:8341
Change-Id: I0fc605616671343a49fed6ff02ecd67eea672dca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4873440
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-09-18 18:29:24 +00:00
Igor Nazarov
f1345d1c83 Call ReleaseThread() entry point from ThreadCleanupCallback
Change relevant only for the Android platform.

Fixes problems:
1. Current code calls `thread->setCurrent(nullptr)` in
   `Display::threadCleanup()` method, while not executing other code
   that will actually unmake Context from current. This will affect
   following EGL calls from the application's side in its own thread
   cleanup callback. For example, calls to `eglMakeCurrent()` (to unmake
   from current) or `eglReleaseThread()` will be no-op. This may lead to
   memory leak if context was previously marked for destruction.

2. The `Display::threadCleanup()` did not also clears
   the `CurrentValidContext`. This may cause crashes or other UB if an
   application will call some GLES API in its thread termination
   callback (for example `glFinish()`), if ANGLE already destroyed the
   context in its ThreadCleanupCallback (use after delete).

3. Context will remain current to a thread that terminated. Current
   implementation of GLES drivers on Mali/Adreno GPUs automatically
   unmade context from current, so the application may make this context
   current to some other thread. ANGLE should mimic this behavior to
   avoid possible bugs.

All of the above problems may be fixed by simply calling from the
ThreadCleanupCallback either:
- MakeCurrent(t, d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)
- ReleaseThread(t)

This CL choose to call `ReleaseThread()` because this is the API that
the application may call in its own thread cleanup callback. And if
application's callback will be called later than ANGLE's callback, then
application's `eglReleaseThread()` call we be a no-op.

Even if the application does not have its own thread cleanup callback
(like most of the applications), there is no harm to call
`ReleaseThread()` anyway. The only difference with `MakeCurrent()` is
that it will also cleanup invalid objects and some other memory
depending on the backend.

This CL naturally replaces existing logic with Display termination when
there is no active threads thanks to the previous CL:
    "Perform Display terminate(InternalCleanup) from makeCurrent()".

Bug: angleproject:6723
Bug: angleproject:8283
Test: angle_end2end_tests --gtest_filter=EGLContextSharingTest.ThreadCleanupCallback*
Test: angle_end2end_tests --gtest_filter=EGLContextSharingTest.UnmakeFromCurrentOnThreadExit*
Change-Id: I8c5b31f34f91c4bfdac165ac30c213ff5fef992e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742383
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-09-18 17:26:47 +00:00
Igor Nazarov
c38f337477 Fix "win-asan-test" random failures and timeouts
While exact reason for the failures is unknown, it seems like disabling
Vulkan Loader DLL unloading fixes the problem. More details in the issue
8347.

This CL also sets the variable on the Linux platform, because it does
not hurt and will probably help with similar issues.

Bug: angleproject:8347
Change-Id: I398d55a7c13f1ce6790988983fdf8fee7cc5776c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868220
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-18 16:34:35 +00:00
angle-autoroll
18f1b3b8e7 Roll vulkan-deps from 33efdc70a008 to dc9947ad4d2b (13 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/33efdc70a008..dc9947ad4d2b

Changed dependencies:
* glslang: 323836e46b..efc33d1ee5
* vulkan-loader: d40385b174..9dc0e31574
* vulkan-validation-layers: e7819d8916..867004beac

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,cnorthrop@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I8f55c6837b7843166e70e9d12d7d322e0caacb92
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4872057
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-18 10:58:29 +00:00
angle-autoroll
8f703d872e Roll Chromium from 0324498f6cbf to 0bbd400252a4 (699 revisions)
0324498f6c..0bbd400252

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 7070803978..c5658c73de
* buildtools: 7d64f08b6b..691073acd7
* testing: a43f7b6121..a65c4c3a2f
* third_party/android_build_tools/lint: 8KAvewZr1XyYqD4IiuVshJeP4y3lg9IgePdsKDz8S-QC..l5GhbN0RAcpoaj1qIS43ZX7AYnLxdF-rZJ0ruGu_iWAC
* third_party/android_build_tools/manifest_merger: Qeitc2DfBrFLUfzkJ3rcI9yHQiKQKC6nNDN89RtwNGgC..FlwnxEZ1wdjoQfedkF4MiZgo8pD48-_CJNA7RnU6as4C
* third_party/android_toolchain/ndk: R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C..3vHltFqfgIw8wZ38ggGM9c7Eyw_AHZnwCgFIVtc9gngC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/1eb44db04a..0dfa3b81d7
* third_party/depot_tools: f2e3352a0e..d7ba85d1eb
* third_party/libc++/src: 55030e041c..176c934642
* tools/mb: 24e9980b2f..c73590e223
* tools/perf: b662560f84..44d802024e
* tools/skia_goldctl/linux: ESgfYW4L5Q_Q2351ztbGdFg0Ah6n00uuT_oMYgXyH8gC..O5Qnoa4MmsF8xWeyb3Q21JeZTv-xshcXDBNTFS0Pbm8C
* tools/skia_goldctl/mac_amd64: iCXL6g3XKCBXYlkzMZDeqGgTdEW9yRzsVCcs2W-37DUC..N0TF2Fb4AY_HGf_wkMFjMsShJ9KADsZEkZyxbBuGjyoC
* tools/skia_goldctl/mac_arm64: bggzdegdOzNu60PwM5sfR-MkL2LWBAHCHhsnyOuHO-UC..dhhDKAB9aDP4kBCiYZz4-8h4kkvsOmg5s9HqFtLpSqEC
* tools/skia_goldctl/win: Y82RNxTKD09wbNGEQlGS9HJf4fZRrSVq9cX6AZB7Q00C..OpzSEVB6-LaJ1-yaM5mISiNaWker0hgINXOgwOS0dGUC
No update to Clang.

Bug: None
Tbr: ianelliott@google.com
Change-Id: I3037471a7edd3894829684063a38f224227433fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4869949
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-18 08:24:50 +00:00
Alexey Knyazev
22b6ca1c61 Remove obsolete EXT_blend_func_extended expectations
Bug: angleproject:5981
Bug: angleproject:6585
Bug: angleproject:7177
Change-Id: I25da401f03ff0bfa7a77c3ce7a3fecd0a119d6a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4870916
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-18 01:18:53 +00:00
Shahbaz Youssefi
9d99f85fd9 Add multithreaded texture upload test
Bug: angleproject:8341
Change-Id: I8561a64fb28681509a1d65c490888dfa1a423835
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864467
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-17 04:23:54 +00:00
Shahbaz Youssefi
b2e6a19666 Vulkan: Use VK_EXT_host_image_copy for texture uploads
Of all the scenarios where host image copy may be useful, this is likely
the most common case.  There are numerous conditions for when the copy
may be done on the host:

- The image format must support it,
- It must be unused by the GPU,
- It must not have any pending updates (this can potentially be
  mitigated if needed), and
- It must be in a host-copyable layout.

However, many texture uploads are done:

- To compressed formats, where support is highly likely,
- On init, where:
  - the image is never previously used,
  - the image has no previous uploads
  - the image is in the UNDEFINED layout

which satisfies the conditions above.

As a result of this change, when the upload is done on the host,
creation of a temp buffer is avoided which greatly reduces memory
pressure (specially during app loading which is when most texture data
is uploaded) and may even improve performance (due to avoiding a double
copy).

Testing the first 3 frames of the following traces with a SwiftShader
implementation shows the amount of buffer allocated for staged uploads
changed as such:

- Black Desert:    185MB -> 65MB
- Genshin Impact:  125MB -> 12MB
- Asphalt 9:       138MB -> 0MB

Bug: angleproject:8341
Change-Id: Id71dcc4a7a0f8b67960d2d283fe9d19ce7429a03
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856676
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-16 03:32:41 +00:00
Amirali Abdolrashidi
92218933df Add VMA version to logcat
This is a temporary CL. It will be used to confirm that Android
uses VMA 3.0 with ANGLE as the default driver.

* Added the VMA version log when the renderer is being initialized.

Bug: b/295208838
Change-Id: I054a4e0e080aa5d06533bd7785eea608e14bba39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868086
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-15 21:16:55 +00:00
Jonah Ryan-Davis
cd8495b0b3 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>
2023-09-15 18:49:23 +00:00
Yuxin Hu
ffd6ec26a2 Reland "Make egl surface uncurrent when being destroyed"
This relands commit 497440cdcb.

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>
2023-09-15 17:22:47 +00:00
angle-autoroll
cc242e7236 Roll VK-GL-CTS from 58e66c9d2857 to 23a6249942af (8 revisions)
58e66c9d28..23a6249942

2023-09-15 slawomir.cygan@intel.com Fix image layouts for storage image
descriptor and barrier stages
2023-09-15 michal.jakubek@mobica.com Treat DeviceIndex like ViewIndex.
2023-09-15 ziga@lunarg.com Add logs for vkCmdBindVertexBuffers2 tests
2023-09-15 piotr.byszewski@mobica.com Handle multidimensional arrays in
gen_framework
2023-09-15 ziga@lunarg.com Add tests for VK_EXT_host_image_copy
2023-09-15 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.7
into vk-gl-cts/main
2023-09-12 lorenzo@khronosgroup.org Allow Vulkan CTS 1.3.7.0
2023-09-11 lorenzo@khronosgroup.org Split image.txt and
shader-object.txt mustpass into multiple files

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ianelliott@google.com
Change-Id: If3ebdd660f35e9f46d373103caeead85dfa88f3f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868080
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-15 15:15:25 +00:00
angle-autoroll
d6af497722 Roll vulkan-deps from f64a38bd0c7a to 33efdc70a008 (19 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f64a38bd0c7a..33efdc70a008

Changed dependencies:
* spirv-headers: d790ced752..fc7d246276
* spirv-tools: fc54e178e9..a996591b1c
* vulkan-loader: e2e3cb97b8..d40385b174
* vulkan-utility-libraries: ba0d57a514..10f76f75da
* vulkan-validation-layers: 9ced253f51..e7819d8916

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ianelliott@google.com
Change-Id: If256396fe02e825386cafba4b5c927a765483862
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868077
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-15 10:41:40 +00:00
angle-autoroll
e379496703 Roll Chromium from a50e493e11b5 to 0324498f6cbf (556 revisions)
a50e493e11..0324498f6c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 7aea0d4843..7070803978
* buildtools: 692dc363e0..7d64f08b6b
* testing: 5cf0cb5238..a43f7b6121
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/e407b66e5f..1eb44db04a
* third_party/depot_tools: 4a4428445d..f2e3352a0e
* third_party/libc++/src: 68a6f0b882..55030e041c
* third_party/r8: 3kYZB8oSh1P15bfu_s8B4M_5KPhjLhyidp2lyRVqWroC..g3ZKfFfRYNZNHJUs07J5hb92ua_jvjdrbo7I1R585uwC
* tools/luci-go: git_revision:fcec56a73e7375ba26e10e053cee92e06b4636ca..git_revision:8b73cff3b780a7136c4904103f19124d2be3dee1
* tools/luci-go: git_revision:fcec56a73e7375ba26e10e053cee92e06b4636ca..git_revision:8b73cff3b780a7136c4904103f19124d2be3dee1
* tools/mb: 18e77c0dbd..24e9980b2f
* tools/skia_goldctl/linux: FdyOkAznuQ7k2iieFXsUTpz6jBaUHPGw8fNxb1-0JLMC..ESgfYW4L5Q_Q2351ztbGdFg0Ah6n00uuT_oMYgXyH8gC
* tools/skia_goldctl/mac_amd64: 9RuiM5HJiEHkr27MLsTx04jOTEYQG-D_3P1BCrM03q4C..iCXL6g3XKCBXYlkzMZDeqGgTdEW9yRzsVCcs2W-37DUC
* tools/skia_goldctl/mac_arm64: tDNHYe-tSHHr68Th6urfIcXLngT2yJ2jCyZBQLAB5mYC..bggzdegdOzNu60PwM5sfR-MkL2LWBAHCHhsnyOuHO-UC
* tools/skia_goldctl/win: 3VsnMzWsw1jy9-ZgvgPjR5emUA1IwrCNkX8xYK8oxFgC..Y82RNxTKD09wbNGEQlGS9HJf4fZRrSVq9cX6AZB7Q00C
No update to Clang.

Bug: angleproject:8317
Tbr: ianelliott@google.com
Change-Id: Ia07bc5caac8acd337ea5f4725301b45371369347
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4867445
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-15 09:06:43 +00:00
Shahbaz Youssefi
b4852ef95e 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>
2023-09-14 17:49:43 +00:00
Shahbaz Youssefi
68bfa1edf5 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>
2023-09-14 15:47:54 +00:00
angle-autoroll
3c5728f19c Roll Chromium from 459a6b238bc8 to a50e493e11b5 (596 revisions)
459a6b238b..a50e493e11

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 4420c4de06..7aea0d4843
* buildtools: b2043d4f43..692dc363e0
* testing: f79e60f037..5cf0cb5238
* third_party/abseil-cpp: d7df3f77cd..c2ac88e292
* third_party/android_platform: 4b4eee2d24..eeb2d566f9
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/ddbdff3f20..e407b66e5f
* third_party/depot_tools: bcba178212..4a4428445d
* third_party/libc++/src: 84fb809dd6..68a6f0b882
* third_party/libc++abi/src: d3ed8c086c..f6a17c88dd
* third_party/r8: oP1tOCigL9cN6j-dfqmgRtMV5zOSZQ2IgaG11GSyNP0C..3kYZB8oSh1P15bfu_s8B4M_5KPhjLhyidp2lyRVqWroC
* third_party/zlib: f5fd0ad266..235986452b
* tools/android: 4bead2e08b..f1c4d9a146
* tools/clang: 7dff576917..31a7453f89
* tools/luci-go: git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66..git_revision:fcec56a73e7375ba26e10e053cee92e06b4636ca
* tools/luci-go: git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66..git_revision:fcec56a73e7375ba26e10e053cee92e06b4636ca
No update to Clang.

Bug: angleproject:8317
Tbr: ianelliott@google.com
Change-Id: Iafba04bdadd91a3d70f566e648be5ce88be366a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4865949
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-14 09:15:16 +00:00
Jonah Ryan-Davis
5afc76e317 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>
2023-09-13 18:45:08 +00:00
Geoff Lang
d3d81498ed Add metrics for shader compilation time and shader blob size
Log the time it takes for the system compiler to compile Metal and D3D
shaders.

Log the D3D shader blob size to get a sense of storage size needed.

Bug: chromium:1481238
Change-Id: I300102dcb035f42e91d7819cd9465ff18436abf3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851196
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-09-13 18:08:36 +00:00
Yuxin Hu
8a7ad933a2 Revert "Make egl surface uncurrent when being destroyed"
This reverts commit 497440cdcb.

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>
2023-09-13 15:12:15 +00:00
angle-autoroll
297877bc20 Roll vulkan-deps from 822425619cd5 to f64a38bd0c7a (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/822425619cd5..f64a38bd0c7a

Changed dependencies:
* vulkan-loader: 1c827fd79c..e2e3cb97b8
* vulkan-tools: d3c1c1ade0..a01cfc0b78
* vulkan-validation-layers: b8609302c8..9ced253f51

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ianelliott@google.com
Change-Id: Ia38fa3b7c1bd4de491b8ca0da3300ea0d07f7f4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4860377
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-13 10:48:10 +00:00
angle-autoroll
b4848e85b6 Roll Chromium from c661891ca003 to 459a6b238bc8 (608 revisions)
c661891ca0..459a6b238b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 1a25429fe3..4420c4de06
* buildtools/linux64: git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4..git_revision:991530ce394efb58fcd848195469022fa17ae126
* buildtools/mac: git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4..git_revision:991530ce394efb58fcd848195469022fa17ae126
* buildtools/win: git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4..git_revision:991530ce394efb58fcd848195469022fa17ae126
* testing: ce02ccbb6e..f79e60f037
* third_party/android_sdk: ff414082cc..7ebbd1ea9b
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/4ca9d0910a..ddbdff3f20
* third_party/depot_tools: 8babcb7e2e..bcba178212
* third_party/libc++abi/src: d5209a75b3..d3ed8c086c
* third_party/libunwind/src: 0568576055..d9b4abf6b6
* third_party/r8: fR4aBtFTaohfSjV_Y54-1MC5dV2cTK7iZrFUiGoVivgC..oP1tOCigL9cN6j-dfqmgRtMV5zOSZQ2IgaG11GSyNP0C
* third_party/siso: git_revision:d967f854b8fcd36e484df1b6677fb003a8f48a8b..git_revision:412571deccd76eb54f681963ca14e13c3efc63e1
* tools/android: 438abc2caa..4bead2e08b
* tools/mb: bea2565145..18e77c0dbd
No update to Clang.

Bug: angleproject:8315
Tbr: ianelliott@google.com
Change-Id: Ica0a5bc156efd51b6b8ea07c28113944b15a40f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4860376
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-13 09:02:41 +00:00
angle-autoroll
e1b80fac8b Manual roll SwiftShader from 4e40d502c440 to 7f4d495c89c2 (1 revision)
Manual roll requested by syoussefi@google.com

https://swiftshader.googlesource.com/SwiftShader.git/+log/4e40d502c440..7f4d495c89c2

2023-09-12 syoussefi@google.com Implement VK_EXT_host_image_copy

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC
angle-team@google.com,ianelliott@google.com,syoussefi@google.com on the
revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: angleproject:8341
Tbr: ianelliott@google.com,syoussefi@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I1c6d4da1861d5cc52cc94fd9a7100d3b5ed8620e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859398
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-13 02:13:55 +00:00
Amirali Abdolrashidi
e7a770532b Update VulkanMemoryTest after adding context flush
After adding context flushing to the memory allocation fallbacks
in a previous CL (https://crrev.com/c/4787949), some tests in the
VulkanMemoryTest suite no longer test the success path of the fallback
to wait for submitted commands to finish.

* Updated AllocateVMAImageAfterFreeing2DGarbageWhenDeviceOOM
  * The test now uses an additional allocation and draw after the
    first sync, followed by a second sync. During the allocation
    of the last texture, it would wait to finish the submitted
    command and free the garbage without flushing the whole context.

Bug: b/280304441
Change-Id: Idc583e120b8d9e1cc550f6cba4cb0b2b197e4944
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4860367
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-09-13 01:25:49 +00:00
Yuxin Hu
497440cdcb 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>
2023-09-13 01:08:41 +00:00
Amirali Abdolrashidi
e7418836e4 Vulkan: Add context flushing as OOM fallback
* As a new fallback for out-of-memory errors, if an allocation results
  in device OOM, the context is flushed and the allocation is retried.

* Functions related to buffer/image allocations now return a VkResult
  value instead of angle::Result, which will be bubbled up to a higher
  level for safer handling.

  * The OOM is no longer handled at the level where the allocation
    happens, but is moved up to the context.

* Added two functions to ContextVk for allocating memory for images and
  buffer suballocations, which also include the fallback options.

  * initBufferAllocation(): Uses BufferHelper::initSuballocation()
  * initImageAllocation(): Uses ImageHelper::initMemory()

* Moved initNonZeroMemory() out of the following functions:
  * BufferHelper::initSuballocation()
    * Moved to ContextVk::initBufferAllocation().
  * ImageHelper::initMemory()
    * Moved to ContextVk::initImageAllocation().
    * Also moved to new function:
      ImageHelper::initMemoryAndNonZeroFillIfNeeded().
      This function replaced the rest of initMemory() usages outside
      initImageAllocation().

* New macros for memory allocation
  * VK_RESULT_TRY()
    * If the output of the command inside it is not VK_SUCCESS, it will
      return with the error result from the command.

  * VK_RESULT_CHECK()
    * If the output of the command inside it is not VK_SUCCESS, it will
      return with the input error.

* Added a test in which allocation would fail due to too much pending
  garbage without the fix on some platforms. The test ends once there
  has been a submission.
  * New suite: UniformBufferMemoryTest

* Added a similar test for flushing texture-related pending garbage.
  * New suite: Texture2DMemoryTestES3

Bug: b/280304441
Change-Id: I60248ce39eae80b5a8ffe4723d8a1c5641087f23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787949
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-12 21:02:27 +00:00
Mark Lobodzinski
2fe7bbae6a Tests: Add Oxenfree trace
Test: angle_trace_tests --gtest_filter=TraceTest.oxenfree
Bug: b/298613720
Change-Id: Ie577dff75faf58ee97c0898a28766e9ed7c87459
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851250
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-09-12 20:48:01 +00:00
Mohan Maiya
ce263437ca Vulkan: Perform CPU wait in clientWait outside the global lock
Leverage UnlockedTailCall and move the CPU side wait
during a clientWait outside of the global mutex lock.

Bug: angleproject:8340
Tests: FenceSyncTest.BasicOperations*
Tests: EGLSyncTest.EglClientWaitSync*
Change-Id: I8c05e62e74cc64d38bf8797d28faaf49135e71fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851649
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-12 20:23:27 +00:00
Shahbaz Youssefi
b185c3eada 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>
2023-09-12 19:57:13 +00:00
Shahbaz Youssefi
6553225d39 Vulkan: Refactor image usage/flags support check logic
The function that checks whether a format supports a specific usage is
moved to ImageHelper.  For VK_EXT_host_image_copy, Renderbuffer, AHB etc
may also use this function.

Bug: angleproject:8341
Change-Id: I6ebc06f97fd29e66aa8d43fcf045f51717d27864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856144
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-12 19:35:28 +00:00
Yuly Novikov
a469a5d3f5 Hide mac-exp-test from LUCI console
Experiments were finished

Bug: chromium:1456549, chromium:1462473, chromium:1464635
Change-Id: I55f3da2578c84f3d622a5027c07aafed6d02241b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859442
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
2023-09-12 18:00:04 +00:00
Yuly Novikov
8cca7db3d4 Stop Mac experimental bots, restore CQ testing on NVIDIA
Mac NVIDIA machines were upgraded from 10.14 to 11.7.9 and are stable on
experimental bot, so CQ testing can resume.

Mac Intel and AMD were upgraded to 13.5 on stable bots,
experimental testing can be shut down.

Bug: chromium:1456549, chromium:1462473, chromium:1464635
Change-Id: Iea572008ac7edc494df657f02ed063a83096de37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859441
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
2023-09-12 17:19:36 +00:00
Shahbaz Youssefi
d4e1493ca0 Optimize compressed texture loads
Similar to LoadToNative, which has a fast-path for when the pitches
align (and a single memcpy is used), LoadCompressedToNative is made to
use a single memcpy when the pitches align.

Bug: angleproject:8341
Change-Id: I4893f9ec26bb80d83593fc102990bd84c38bd12b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856674
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-12 16:52:38 +00:00
Geoff Lang
f57b0c3a53 Merge GetAndroidSdkLevel and GetAndroidSDKVersion
Now we funnel all the Android property queries through the one utility
funciton in android_utils.

Bug: chromium:1479277
Change-Id: I7313064208895f095319ed129b6f7d2edf31b427
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852681
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-09-12 15:37:25 +00:00
Shahbaz Youssefi
e4d0db327b Mark native compressed data uploads as not requiring conversion
The requiresConverion flag in LoadImageFunctionInfo is used to choose
faster paths during data upload (when it's false).  This flag was set on
native compressed image load functions, even though they are simple
memcpys.

Bug: angleproject:8341
Change-Id: I81c217eb2e92b3c33b65bf4ff295b68a7a5814f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856675
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-12 15:18:55 +00:00
angle-autoroll
c0ba92bc07 Manual roll vulkan-deps from fcc5a5e242db to 822425619cd5 (54 revisions)
Manual roll requested by syoussefi@google.com

https://chromium.googlesource.com/vulkan-deps.git/+log/fcc5a5e242db..822425619cd5

Changed dependencies:
* glslang: 0bbe74c709..323836e46b
* spirv-cross: 54997fb4bc..5e963d62fa
* spirv-tools: 440f018cc4..fc54e178e9
* vulkan-headers: 2634c969d7..4f51aac14f
* vulkan-loader: e95fee0b8e..1c827fd79c
* vulkan-tools: e50622314d..d3c1c1ade0
* vulkan-utility-libraries: dd26ae7065..ba0d57a514
* vulkan-validation-layers: 71da22274a..b8609302c8

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC
angle-team@google.com,ianelliott@google.com,syoussefi@google.com on the
revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ianelliott@google.com,syoussefi@google.com
Change-Id: Ic210d58b486c9ffff78ad85226207f5562a6fcfb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859259
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-12 15:01:23 +00:00
Christopher Cameron
58c8fc8b21 CopySubTexture: Handle sRGB source in Metal backend
CopySubTexture should ignore the color encoding of both the source
and destination. The implementation currently ignores the color
encoding of the destination (and CopyTextureVariationsTest tests
this).

The implementation does not always ignore the color encoding of the
source. As an example of the consequences of this, an RGBA pixel
value of 0xFF/80/00/FF, when copied from a GL_SRGB8_ALPHA8 texture
to a GL_RGBA8 texture may result in a value of 0xFF/37/00/FF, if the
copy was executed using a shader (in which case the sRGB-to-linear
function was applied 0x80, resulting in the 0x37).

Update the Metal shaders that do this blit, adding an option to apply
a linear-to-sRGB transformation to undo the transformation applied by
the sampler.

The linear-to-sRGB transformation must be applied on unpremultiplied
values. Ensure that the sequence of operations in all shaders is
first unpremultiply, then linear-to-sRGB, then premultiply. Also
remove optimizations to have the unpremultiply and premultiply
cancel each other out, if there is also a linear-to-sRGB being applied.

Bug: angleproject:7907
Change-Id: I7237bde1c61251a2f83968755e98a139ba949b59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4848327
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-12 14:43:14 +00:00
angle-autoroll
712ade9f3a Roll SwiftShader from 9b300a6d6747 to 4e40d502c440 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/9b300a6d6747..4e40d502c440

2023-09-11 dneto@google.com Avoid "var set but not used" warnings in
math tests
2023-09-11 syoussefi@google.com Update Vulkan headers to version 1.3.238

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: angleproject:8341
Tbr: ianelliott@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I2c9927be3afdbc1e7c1e2257823936a95279bed7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4857934
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-12 11:56:10 +00:00
angle-autoroll
0bc2f9ed35 Roll Chromium from 9cc28010e63d to c661891ca003 (545 revisions)
9cc28010e6..c661891ca0

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ianelliott@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 75d51b6a24..1a25429fe3
* testing: ded28ebda2..ce02ccbb6e
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2d15e4bbe7..4ca9d0910a
* third_party/depot_tools: 80226254ea..8babcb7e2e
* third_party/libc++abi/src: e9c37571a1..d5209a75b3
* third_party/r8: fBg5UVKZ-YCVie2gVbsVuh6YoknsrBf6z4-Ca61O2p8C..fR4aBtFTaohfSjV_Y54-1MC5dV2cTK7iZrFUiGoVivgC
* third_party/siso: git_revision:50cf1b4292c8c1398608409f5c79db3ecae0dab8..git_revision:d967f854b8fcd36e484df1b6677fb003a8f48a8b
* third_party/turbine: ZlMS4BOYyYmbU8BuBDGyW7QrkvZ_-pTkm4lH4jKjTi4C..laSnfZnTgkmZynERrjAlU3yeqB5rN446BctGmKQsZ64C
* tools/clang: 5c46fabf81..7dff576917
* tools/mb: 2508903706..bea2565145
No update to Clang.

Bug: None
Tbr: ianelliott@google.com
Change-Id: I0284a77c43e75a523e4ec3fa6bd06a577edec2a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4857468
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-12 08:40:26 +00:00
Mohan Maiya
ec89b1a2bd Vulkan: Bugfix in waitForResourceUseToFinishWithUserTimeout
The commit 6d282d62b3
introduced a bug where <result> was not being set
in all code paths, now we do.

Bug: b/255411748
Bug: angleproject:8340
Change-Id: Ic191f9e09c35a64ae2393d9670a3a9e33cd5e102
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854941
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-12 02:57:55 +00:00
Charlie Lao
c5d19d7643 Reland "Load mUniformLocations using loadVector"
This is a reland of commit 6f526b8f52

Original change's description:
> Load mUniformLocations using loadVector
>
> Bug: b/275102061
> Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
> Reviewed-by: Roman Lavrov <romanl@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>

Bug: b/275102061
Change-Id: If501db97a37b00104a9d16fc40200f772ffcd2fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856749
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-11 20:25:13 +00:00
Yuxin Hu
ee7f6ed5e6 Refactor dEQP test classes
Rename dEQP to dEQPTest.

Move the static functions and variables that
are shared between all individual dEQP tests
in the same test suite into the dEQPTestSuiteStat
class.

This new dEQPTestSuiteStat class is responsible
for updating the test counts, succeeded tests,
and failed tests of a test suite. Add a static member
of type dEQPTestSuiteStat to the dEQPTest class,
so that all of the dEQPTest instances shared the
same instance of dEQPTestSuiteStat, and as each dEQPTest
TestBody() executes, it can update the data in the same
dEQPTestSuiteStat.

Each deqp test application will create multiple
dEQPTest instances based tests listed in one of the
mustpass list in gCaseListFiles array. And each
deqp test application will only create one test suite.
This is done through testing::RegisterTest(). The
testSuiteName passed to testing::RegisterTest()
for each dEQP test application remains
the same for all of the dEQP tests created.

This change also replaces the below legacy function
names with the new function names:

SetUpTestCase() --> SetUpTestSuite()
TearDownTestCase() --> TearDownTestSuite()

Bug: b/297901032
Change-Id: I9439d7ac314d70a9a5d9ad72c0a3f58cd11e559b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851047
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-09-11 17:22:39 +00:00
Cody Northrop
eb5acc3ee9 Tests: Add ONE PIECE TREASURE CRUISE trace
Test: angle_trace_tests --gtest_filter="*one_piece_treasure_cruise*"
Bug: b/299681746
Change-Id: I3b5a9de18613df37181feb3c207105dba411d2a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854449
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-09-11 15:14:45 +00:00
Roman Lavrov
1249fc1ff7 Tests: Support capture_tests on Android and enable on CI
Enables angle_with_capture_by_default = true on Android bots
similarly to Linux and Windows.

Enables the capture test on Pixel 4 and 6 bots (it takes only a few
seconds to run)

Enables support for capture in android_helper in general.
For example, this now works the same way it would on say Linux, but
runs the capture on the device an pulls files to OUT_DIR.

    % ANGLE_CAPTURE_LABEL=gacha_club ANGLE_CAPTURE_OUT_DIR=/tmp/capt2 ANGLE_CAPTURE_FRAME_START=16 ANGLE_CAPTURE_FRAME_END=16 out/AndroidPerformance/angle_trace_tests --gtest_filter=TraceTest.gacha_club --use-angle=vulkan --retrace-mode --max-steps-performed=20

For end2end tests it's a bit trickier as we're still using the Chromium
wrappers for e.g. out/AndroidPerformance/angle_end2end_tests - which is
why capture_tests.py is currently using angle_android_test_runner.py

Bug: b/296397568
Change-Id: I2606e74a17c90e381bb49ec8d555a6d24851b4f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850889
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-09-11 14:35:14 +00:00
Ho Cheung
0510fb4993 [code health] Use more standard enumerator names
Use more standard enumerator names in ANGLE

https://google.github.io/styleguide/cppguide.html#Enumerator_Names

There are still some non-standard enumerator names in the //cc
directory, which will be modified in subsequent patches.

Bug: chromium:1480233
Change-Id: I96d534f0eb74a8583237c754f6ef867bd1b33d4a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4853030
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Ho Cheung <uioptt24@gmail.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-11 14:12:17 +00:00
angle-autoroll
c7b7972d8d Roll Chromium from 5a5b1cec68d0 to 9cc28010e63d (748 revisions)
5a5b1cec68..9cc28010e6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: d674d1e8c1..75d51b6a24
* testing: 05a91b5126..ded28ebda2
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/6bd9179603..2d15e4bbe7
* third_party/depot_tools: 7f5b53ff8d..80226254ea
* third_party/fuchsia-sdk/sdk: version:14.20230902.2.1..version:15.20230909.2.1
* third_party/libc++abi/src: 331847d7a5..e9c37571a1
* third_party/r8: 3phdyAHwQKjlTdh7tE5hbtnIUOYawn0ewGrKJdykjf8C..fBg5UVKZ-YCVie2gVbsVuh6YoknsrBf6z4-Ca61O2p8C
* tools/android: 7cd7332af2..438abc2caa
* tools/clang: 193e3617a6..5c46fabf81
* tools/mb: 3895d9dc40..2508903706
* tools/perf: 8bed384b0f..b662560f84
Clang version changed llvmorg-17-init-16420-g0c545a44:llvmorg-18-init-4631-gd50b56d1
Details: 193e3617a6..5c46fabf81/scripts/update.py

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ic03ac056ca4d1eeec11bd675898f841204335224
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856257
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-11 08:07:38 +00:00
Alexey Knyazev
1f1b5ee82e GL: Disable clip distance state when unused
Some OpenGL drivers experience runtime failures
when clip distances are enabled but the program
does not statically use them.

Bug: angleproject:4452
Change-Id: I90fc4ccf1aa669f1b202a1726be49b1e5401a435
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4853743
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-09-10 19:44:14 +00:00
Shahbaz Youssefi
796914004e Revert "Load mUniformLocations using loadVector"
This reverts commit 6f526b8f52.

Reason for revert: Suspected cause of MSAN failure. See:
https://chromium-review.googlesource.com/c/angle/angle/+/4851776

Original change's description:
> Load mUniformLocations using loadVector
>
> Bug: b/275102061
> Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
> Reviewed-by: Roman Lavrov <romanl@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>

Bug: b/275102061
Bug: chromium:1480543
Change-Id: I50c39758d180320465b152ad32ba9447878f7d8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4855538
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-10 02:10:51 +00:00
Mohan Maiya
9740b01b4e Enhance UnlockedTailCall run method
UnlockedTailCall::CallType is now std::function<void(void *)>
This is in preparation for upcoming changes where unlocked
tail calls need access to objects outside block and namespace
scope.

Bug: angleproject:8340
Tests: UnlockedTailCall*
Change-Id: Ida6822b701c5c11ce4b8f6e3aae53108755e2cad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852021
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2023-09-09 21:56:12 +00:00
Shahbaz Youssefi
e234c1825f 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>
2023-09-09 02:09:59 +00:00
Shahbaz Youssefi
48e2c605ad More instances of program usage converted to executable
Bug: angleproject:8297
Change-Id: I8e4eeef8f4f20610bbe0f994ce1141c17d588765
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850888
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-09 01:06:10 +00:00
Shahbaz Youssefi
1bd9fc2429 D3D: Remove more usages of program instead of executable
Only usage of getProgram() and getLinkedProgram() in the d3d backend
remains for multidraw, which will be fixed separately as it involves
setting uniforms (currently done through the program).

Bug: angleproject:8297
Change-Id: I48b3ec66837888c8ebf58f43a6d8a2f483dd4659
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846954
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-09 00:16:50 +00:00
Cody Northrop
fce1e57401 FrameCapture: Skip output dir check if disabled
* In order to improve performance and avoid errors when running
  with capture support, change the output dir checks to be optional.

* The checks are expensive on Android due to reading the process
  name and filesystem locations.

* We want want to continue emitting errors if the user wants to
  capture but didn't create the output dir.

Test: Android apps with and without capture enabled via properties
Bug: b/296397568
Change-Id: If3adbe0c569db49fd8e8e430b7c57ae8585ca4d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854443
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-09-08 22:17:52 +00:00
Geoff Lang
74b7ec0357 GL: Don't use system info for Android SDK queries.
It can be queried directly from the system property without fully
gathering system info. System info often uses Vulkan which is known
to be unstable on some older devices.

Bug: chromium:1479277
Change-Id: Ic6ee1d0182b047b0a3210dd1067f6b7250e3da02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851775
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-09-08 21:18:47 +00:00
Charlie Lao
57761d856f Attempt to fix the MSan failure on chromium bots
struct BlockMemberInfo was not tightly packed. This CL makes it packed.

Bug: b/296433003
Change-Id: I38da3e463cf304028236e651b6b4e334ce9220e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851063
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-08 20:28:13 +00:00
Peter McNeeley
98b0855b9a Add drm format ABGR16161616F to linux
We need to support drm 16f formats for lacros HDR.

Bug: chromium:1473267
Change-Id: Idd3cb5e75e1fabf046c8aa21a6b7f51aafde15e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851773
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-09-08 20:13:43 +00:00
Arman Uguray
765bca2f81 Add <cstring> include to FastVector.h
This resolves the call to `std::memcpy` which was failing in recent skia
skia rolls with an error that looked like this:

    error: no member named 'memcpy' in namespace 'std'; did you mean simply 'memcpy'?

Bug: None
Change-Id: If54ed266812315cfea35d95a57c758f75bcb270b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851062
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Arman Uguray <armansito@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-08 18:17:38 +00:00
angle-autoroll
a507f31285 Roll VK-GL-CTS from 385ae8bed1f9 to 58e66c9d2857 (11 revisions)
385ae8bed1..58e66c9d28

2023-09-08 rgarcia@igalia.com Test drawing outside XFB section with no
state change
2023-09-08 rgarcia@igalia.com Test not storing every location component
in the XFB buffer
2023-09-08 pdaniell@nvidia.com Fix regression in all statistic_query
tessellation tests
2023-09-08 ziga@lunarg.com Fix validation errors in shader object tests
2023-09-08 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-09-07 lorenzo@khronosgroup.org Increase Vulkan CTS fractions to 16
in the README
2023-09-07 ziga@lunarg.com Set ignored samplers to null
2023-09-07 boris.zanin@amd.com VK_KHR_cooperative_matrix - fix subgroup
size
2023-09-07 seasonl@nvidia.com Add mesh and task shader to
s_resultItemMap for result parsing
2023-09-07 chrisglover@google.com Add tests for recently added HLG
format
2023-09-07 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: I1d0ee66c27766c89d524c53d1885ca82a015a126
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851061
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-08 16:47:19 +00:00
Roman Lavrov
83030fed59 Tests: rename isolated_scripts groups
isolated_scripts_group_pixel6 currently has one item but more is coming

Bug: b/296397568
Change-Id: I404cc24331c8d31a51e21c15d28040a7c7507945
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850870
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-09-08 15:06:57 +00:00
angle-autoroll
65ec697f41 Roll SwiftShader from 32f9332d1d7a to 9b300a6d6747 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/32f9332d1d7a..9b300a6d6747

2023-09-07 aredulla@google.com [ssci] Uplift subzero/bloat third party
metadata
2023-09-07 natsu@google.com Use AHardwareBuffer_* APIs in
prepareForExternalUseANDROID()

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I818d2789d27be69df55e8c305a146da6f125883a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852770
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-08 10:59:14 +00:00
angle-autoroll
e60556f75b Roll Chromium from 4ae31457f4f5 to 5a5b1cec68d0 (469 revisions)
4ae31457f4..5a5b1cec68

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: aeaf972223..d674d1e8c1
* buildtools/reclient: re_client_version:0.113.0.8b45b89-gomaip..re_client_version:0.114.2.81e819b-gomaip
* testing: 5b92cc5301..05a91b5126
* third_party/android_build_tools/lint: 2ilHXL8jElnQimOXXEaawIQ9Gn2FY6ZWfBl34Ico_owC..8KAvewZr1XyYqD4IiuVshJeP4y3lg9IgePdsKDz8S-QC
* third_party/android_build_tools/manifest_merger: ki-ikxybU11aNNE3tvffa5JaDIUy7dGTBAtWRz_O6Q4C..Qeitc2DfBrFLUfzkJ3rcI9yHQiKQKC6nNDN89RtwNGgC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/3e023e6fe1..6bd9179603
* third_party/depot_tools: 68ccac685a..7f5b53ff8d
* third_party/kotlin_stdlib: 6cGkpHi3fSRhpRfq2b1mjmzfFmShvtQe6gy4g2nFQd0C..7XCiIAlSi36gvPwOn8N4Q1GE9sMLw6V1RljM9151cWIC
* third_party/r8: LrWtF7Gfts11G550w5xD61mhL5_0R9IxcPm-0bj735EC..3phdyAHwQKjlTdh7tE5hbtnIUOYawn0ewGrKJdykjf8C
* tools/mb: 8656ad6936..3895d9dc40
* tools/perf: 346d862fa0..8bed384b0f
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: I4cd277a97d9b31eebc4f6e50f6733fa8b50b4db7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4853438
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-08 07:53:17 +00:00
Geoff Lang
99d39241ad Metal: Increase the size of the default uniform block
Use a buffer pool per shader type and size it to be a nice multiple of
the block that will be allocated for each uniform update.

Set the buffer pool size to unbounded. When the pool runs out of
buffers it currently does a full CPU/GPU sync which is catastrophic
for performance when uniforms are updated every draw call.

Bug: angleproject:8301
Change-Id: I7f826feb4e766fd1cf1b2db01954af7089e3fe90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850950
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-09-07 23:24:52 +00:00
Yuxin Hu
a412b149d5 Suppress out of bounds on no robust contexts tests
dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.uniform_block.vertex
failed occasionally due to VVL error.
The test first results in vulkan device lost,
which is an acceptable behavior. When we clean up the
vulkan resources, the VVL is complaning the resources
have not finished execution. However, VVL should check
if the vulkan device is already lost, as there is no way to
finish resource execution when device is lost.

Will remove the test from the skip list when the VVL
issue filed
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6310
is resolved.

Bug: b/289544394
Change-Id: Ideb676e6629cc17a4f8101ccc083a331a1d3c864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851049
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-09-07 20:37:55 +00:00
Charlie Lao
6f526b8f52 Load mUniformLocations using loadVector
Bug: b/275102061
Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-07 20:23:02 +00:00
Roman Lavrov
cdbc45a9f3 Tests: capture_tests: remove ANGLE_FEATURE_OVERRIDES_ENABLED
Unnecessary for this test, should only matter for tests involving
serialization etc.

Bug: b/296397568
Change-Id: I1b3e12b11358778cf23dd6d7a5aab69be41c1ab4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850548
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-09-07 20:18:51 +00:00
Charlie Lao
204c07a56b Initialize bitfield using constructor
default member initializer for bit-field is a C++20 extension. This CL
changes it to use constructor to avoid build failure.

Bug: b/296433003
Change-Id: I33a45394644719b160f71eadca3a85a4d92f5c4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849554
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-07 18:58:28 +00:00
Mark Lobodzinski
9c0748d36b Capture/Replay: Trim inactive Texture resources
As is done with Shader and Program objects, trim inactive Texture
objects from default trace execution playback and update
CapturedTest with new use cases.

Bug: b/297031925
Change-Id: I734d8f1fa66a24be7790391deaeee24cf570d12a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802281
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
2023-09-07 17:13:56 +00:00
Shahbaz Youssefi
fc7a28530e Revert "Verify shader link correctness after looking up in program cache"
This reverts commit 60b56591de.

Reason for revert: Flakiness if the attached shaders are not compiled

Original change's description:
> Verify shader link correctness after looking up in program cache
>
> Since the program cache takes shader sources into account, if the cache
> is hit the shaders should have been correct for link.
>
> Bug: angleproject:8297
> Change-Id: I115c7eb807ed620d30b9e30669c99fffb5c7912d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817830
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:8297
Change-Id: Icf4058e4bea471f097caed950b18f690d8d0456d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846389
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-07 17:12:15 +00:00
angle-autoroll
265f3d3641 Roll Chromium from e89c33139c50 to 4ae31457f4f5 (1177 revisions)
e89c33139c..4ae31457f4

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: b60aaa976e..aeaf972223
* testing: 6830d4d2f7..5b92cc5301
* third_party/abseil-cpp: 7affa303ea..d7df3f77cd
* third_party/android_build_tools: 23d868f674..801bc6657b
* third_party/android_build_tools/lint: Bd9m0RpzuCbbURLUADcdPsU2Yrrfg453Djw_jY7kVEYC..2ilHXL8jElnQimOXXEaawIQ9Gn2FY6ZWfBl34Ico_owC
* third_party/android_build_tools/manifest_merger: kkbYOGsVRXhtxBiXuTufY0puTnG5QAfyxvFTBHFWL08C..ki-ikxybU11aNNE3tvffa5JaDIUy7dGTBAtWRz_O6Q4C
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/f16ca3c78e..3e023e6fe1
* third_party/depot_tools: 6715758ed9..68ccac685a
* third_party/libunwind/src: a321409e66..0568576055
* third_party/r8: pPu68_FQSs0xNMEZVIArwK8p8SkQ5XgGXxrBGVOI5FQC..LrWtF7Gfts11G550w5xD61mhL5_0R9IxcPm-0bj735EC
* third_party/siso: git_revision:c15d52005df612e58accf13efde4d99ffcdfe38f..git_revision:50cf1b4292c8c1398608409f5c79db3ecae0dab8
* tools/android: c6b57c49ce..7cd7332af2
* tools/clang: 9fc887ccde..193e3617a6
* tools/mb: 51e8fbac5d..8656ad6936
* tools/perf: 702d2ac502..346d862fa0
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ied7e09db45636194269e80dcdf04e1a6f68f1c1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849368
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-07 17:05:25 +00:00
Shahbaz Youssefi
06411d1623 GL: Use the executable instead of program
In a few places, the program was still being directly referenced instead
of the executable (in particular when dealing with multiview).

Bug: angleproject:8297
Change-Id: I15d0865bf58376a9f85efeec739dd93b49ceaea7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846475
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-07 16:50:43 +00:00
Charlie Lao
632ded9e0a Load ShaderInterfaceVariableInfoMap data members with readStruct
This CL groups the remaining data members of
ShaderInterfaceVariableInfoMap into a POD (plain old data) struct and
load it with readSTruct call (and save it with writeStruct).

This CL also uses readVector for
mDefaultUniformBlocks[shaderType]->uniformLayout instead of individual
reads of each basic elements.

Bug: b/296433003
Change-Id: I48b508822cb414cea75a6e384a0794f245460f57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833690
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-07 16:10:16 +00:00
Charlie Lao
014e584f75 Vulkan: Separate out XFB data from ShaderInterfaceVariableInfo
Right now the transform feedback data is embedded in the
ShaderInterfaceVariableInfo. This caused ShaderInterfaceVariableInfo
becomes non-trivial copy-able. This CL moves transform feedback related
data out and into its own array, and entire vector of
ShaderInterfaceVariableInfo is now memcpied. Further, most programs
don't use transform feedback. Right now because transform feedback data
is embedded in the ShaderInterfaceVariableInfo, it bloated the size of
ShaderInterfaceVariableInfo even if you do not use XFB. This CL makes
transform feedback variable info data a std::unique_ptr so that if not
used, it is just a nullptr. When we load/save the structure, the ones
that has nullptr gets skipped.

Bug: b/296433003
Change-Id: I61940a683611717ab0445fcbf44b89b1b7166ee4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799344
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-09-07 16:05:15 +00:00
Shahbaz Youssefi
60b56591de Verify shader link correctness after looking up in program cache
Since the program cache takes shader sources into account, if the cache
is hit the shaders should have been correct for link.

Bug: angleproject:8297
Change-Id: I115c7eb807ed620d30b9e30669c99fffb5c7912d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817830
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-06 21:00:27 +00:00
Cody Northrop
00daa45132 Vulkan: Include minImageCount in swapchain check
The following VVL error has been firing for traces run in
landscape mode:

[ VUID-VkSwapchainCreateInfoKHR-presentMode-02839 ]
vkCreateSwapchainKHR(): pCreateInfo.minImageCount 4, which is outside
the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR()
(i.e. minImageCount = 5, maxImageCount = 64).

On Android, rotation can cause minImageCount to change.
We need to detect this as an out of date swapchain.

Test: angle_trace_test --gtest_filter=TraceTest.among_us
Bug: b/289274676
Change-Id: Ie75adec5f5318b73c0c27efc134f10f53485692d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819790
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-06 18:46:08 +00:00
Shahbaz Youssefi
7b0bb0f6e7 Properly "install" program executables
According to GL:

- The program has an executable
- The executable is overwritten during link.
  - After a failed link, queries of the executable may return
    half-linked information
- On glUseProgram, the executable is installed in the context
- On glUseProgramStages, the executable is installed in the program
  pipeline
- After a successful link, the executable is updated wherever the
  previous executable of the program was installed.

This change implements exactly the above:

- The program's and the program pipeline's executables are now
  shared_ptr.  References to an executable in the context and PPO are
  also through a shared_ptr.  Installing an executable thus translates
  to sharing the executable.
- The context and PPOs are made to not reference the program directly,
  but work solely through the executable.  As a result, the program is
  free to create a new executable for link.

With this change, the link job will be free to modify the executable as
necessary because that will not be accessed until the link is done.
Note that previous changes made the backend executable accessed through
the frontend one, and moved all link results to the frontend and backend
executables as appropriate.

Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ie636b23ff7420ad284d18b525ec4f5fb559dd9d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823089
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-09-06 17:40:19 +00:00
Christopher Cameron
9f332fe7ef rx::mtl::ColorBlitUtils: Use a hash map for shaders
We're going to be adding another parameter here (linear-to-sRGB
conversion). Prepare the ground by moving this to a hash map.

See the similar operation in https://crrev.com/443362.

Bug: angleproject:7907
Change-Id: I33f815c55f209927fc7c24e5d8459e337f70cfb4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4847067
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-09-06 15:26:22 +00:00
Geoff Lang
1b8ab5382f Metal: Use a flat hash map for tracking resource ids.
This set is very mutable. It makes many insertions, allocating
memory each time. Useing a absl::flat_unordered_set we can avoid
allocating memory at insertion time.

This was a hotspot for Google Earth, taking up about 10% of ANGLE's
CPU time.

Bug: angleproject:8301
Change-Id: I7363ea8fdc5ff230a289af7c1ae25dc577188a18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4843709
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-06 14:54:30 +00:00
angle-autoroll
55d3636b66 Roll vulkan-deps from f2f4bb6f20ec to fcc5a5e242db (14 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f2f4bb6f20ec..fcc5a5e242db

Changed dependencies:
* glslang: e3a711b6fc..0bbe74c709
* spirv-tools: 3cc7e1c4c3..440f018cc4
* vulkan-loader: d34bfafff2..e95fee0b8e
* vulkan-tools: 389110e460..e50622314d
* vulkan-validation-layers: bea5beb302..71da22274a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ib29eb50a9fc979c1a55a6aabc7a952c90442b473
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4845988
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-06 11:04:46 +00:00
Christopher Cameron
5116f54eca CopySubTexture: Handle sRGB source in GL backend
CopySubTexture should ignore the color encoding of both the source
and destination. The implementation currently ignores the color
encoding of the destination.

The implementation does not always ignore the color encoding of the
source. As an example of the consequences of this, an RGBA pixel
value of 0xFF/80/00/FF, when copied from a GL_SRGB8_ALPHA8 texture
to a GL_RGBA8 texture may result in a value of 0xFF/37/00/FF, if the
copy was executed using a shader (in which case the sRGB-to-linear
function was applied 0x80, resulting in the 0x37).

Update the OpenGL and shaders that do this blit, adding an option
to apply a linear-to-sRGB transformation to undo the transformation
applied by the sampler.

The linear-to-sRGB transformation must be applied on unpremultiplied
values. Ensure that the sequence of operations in all shaders is
first unpremultiply, then linear-to-sRGB, then premultiply. Also
remove optimizations to have the unpremultiply and premultiply
cancel each other out, if there is also a linear-to-sRGB being applied.

Bug: angleproject:7907
Change-Id: Iad5537e6b98f75d32a33be419a320129493e53a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4839262
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
2023-09-06 09:52:45 +00:00
Shahbaz Youssefi
d664543f3e Metal: Move setupDraw and associated code to executable
Last bits of state left in ProgramMtl that are now moved to
ProgramExecutableMtl, and now ContextMtl does not reference the program
at all.

This fix was necessary for a follow up change that allows the program to
be modified while the executable is installed, and the metal backend was
crashing after a failed relink due its direct access to the program.

Bug: angleproject:8297
Change-Id: Iadf623bf6baf612767ff372adee2e7f4eeedb593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833624
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-06 02:13:27 +00:00
Geoff Lang
0ff71d5ecd D3D: Fix FramebufferD3D reading the wrong program executable
Read the currently bound program executable instead of the possibly
incomplete one from the currently bound program.

Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ieda50767b20562436ea9f9bf541965205b578017
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4842929
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-09-05 18:52:47 +00:00
Geoff Lang
93402d6f9a D3D: Move the program serial into ProgramExecutableD3D
The program executable tracks the specific shaders being used which are
no longer tied to the ProgramD3D.

Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ic34b4f229de7fb7daea8c6ef906bf87d8c0b37d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4842930
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-05 18:51:52 +00:00
Roman Lavrov
dcd62fc41c Trace perf: clear blob cache before each test
Cache eviction can happen during warmup causing cache misses
while testing. Significant cycles are being spent evicting cache entries
and throwing off power measurement. Since this is already a synthetic
environment where we're lumping in a bunch of caches together,
clear it between tests so that warmup correctly populates
and no cache misses occur within the test run.

If we clear the cache before warmup and everything fits, no eviction
happens and we hit the cache every time post-warmup. This also improves
reproducibility of perf results as they no longer depend on the
specific cache state before running a particular test, the order in
which tests are run etc.

Also fixes acessing unset var when running without --power.

Bug: b/298028816
Change-Id: I704073f70d8859e19a78b23d397e68f5836f3bb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834073
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-09-05 17:06:15 +00:00
Alexey Knyazev
9666d4d5f7 Disallow dynamic indexing of SecondaryFragData in WebGL 2.0
WebGL 2.0 disallows dynamic indexing
of gl_FragData in ESSL 1.00 shaders.

By extension, this rule should also
apply to gl_SecondaryFragDataEXT.

Bug: angleproject:1085
Change-Id: I5859356f72d25c4ffd1db92466dffc6eeacb6a64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4843628
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-05 16:04:54 +00:00
Alexey Knyazev
17c4741d70 Metal: Disable blending for masked out attachments
Avoid pipeline failure when the following conditions
are simultaneously true for the same color attachment:

* Dual-source blending is enabled

* All color channels are masked out

* There is no bound fragment output

Bug: angleproject:8015
Change-Id: Ie60f4f6dff5a9023677ea9b581e920b0e1e53532
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4836558
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-09-05 14:59:18 +00:00
angle-autoroll
e72efa276c Roll vulkan-deps from 4b7a5f2a3522 to f2f4bb6f20ec (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4b7a5f2a3522..f2f4bb6f20ec

Changed dependencies:
* spirv-tools: 4c16c35b16..3cc7e1c4c3
* vulkan-validation-layers: b89f48ae89..bea5beb302

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: Id8da060d2c5e329f688d7822e5c5f7836e0ca5f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4841854
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-05 10:50:26 +00:00
angle-autoroll
b622160471 Roll Chromium from 97f14c8287da to e89c33139c50 (340 revisions)
97f14c8287..e89c33139c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: e14e0cc3b6..b60aaa976e
* testing: 59ea31a9c9..6830d4d2f7
* third_party/depot_tools: 693e0b3121..6715758ed9
* third_party/r8: W1_I3qPD8AUfHBTSgUNJHz0yx3HgtIRHttr8eSt81wsC..pPu68_FQSs0xNMEZVIArwK8p8SkQ5XgGXxrBGVOI5FQC
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: I32ad0d444ace090e6d66294362c9b9deeb02cd6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4841315
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-05 08:36:33 +00:00
Yuly Novikov
e691a4edb1 Delete obsolete VUID
VUID-VkGraphicsPipelineCreateInfo-topology-08890
was renamed to
VUID-VkGraphicsPipelineCreateInfo-topology-08773

Bug: angleproject:8237
Change-Id: Icb3f3f28664d0beac31f2541d90d5dbbada9a3b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4840195
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-05 02:33:12 +00:00
angle-autoroll
ab9bbb9b11 Roll vulkan-deps from 15007d22798e to 4b7a5f2a3522 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/15007d22798e..4b7a5f2a3522

Changed dependencies:
* glslang: a1f8cd429f..e3a711b6fc
* spirv-tools: 9b923f7cc3..4c16c35b16
* vulkan-headers: a0c76b4ef7..2634c969d7
* vulkan-validation-layers: 8dbf1df09f..b89f48ae89

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ib7b43e2f8c5c845dba770b1e4815d125a66d9300
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4838127
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-04 11:10:25 +00:00
angle-autoroll
1fb5363941 Roll Chromium from 613933d34730 to 97f14c8287da (765 revisions)
613933d347..97f14c8287

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 0d534543c1..e14e0cc3b6
* testing: 5c6cc93b87..59ea31a9c9
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/dd422858c3..f16ca3c78e
* third_party/depot_tools: e7c4e2ade9..693e0b3121
* third_party/fuchsia-sdk/sdk: version:14.20230826.1.1..version:14.20230902.2.1
* third_party/libc++abi/src: aae4ca0f54..331847d7a5
* third_party/r8: TBaeKaSTY2ttKx2JSFuWiQ8Na80KHZwLEgSAvT1DBJ0C..W1_I3qPD8AUfHBTSgUNJHz0yx3HgtIRHttr8eSt81wsC
* third_party/siso: git_revision:8283bbc1ae9d742d22d3a6e98b7e356b3065a497..git_revision:c15d52005df612e58accf13efde4d99ffcdfe38f
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: I7212a3e4eea4ab3e95802f7713bb84f4d31c9e16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4838117
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-04 08:01:35 +00:00
Shahbaz Youssefi
ebf1e71632 Cache transform feedback varying names in the executable
Currently, ANGLE actually does a full link of the programs inside PPOs.
This was never the intention of the spec (hence why an explicit link
doesn't exist).  During this link operation, the transform feedback
varying names are used, and they are retrieved from the program itself.

This is not correct, because the transform feedback varyings may have
changed, the program may have failed to relink, and the program pipeline
is expected to continue functioning using the "installed" executable.

Bug: angleproject:5486
Bug: angleproject:8297
Change-Id: I583dbd2abcc51e8536b4c460b92211bdddebda16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834055
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-02 02:40:27 +00:00
Alexey Knyazev
179bd7762f GL: Adjust disableRenderSnorm condition
Current Mesa drivers do not pass the
tests when using OpenGL ES contexts.

Bug: angleproject:8315
Change-Id: I00e931d0b97917fd7fe02890290f2938d7c872e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834483
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-09-02 00:12:52 +00:00
Charlie Lao
962fdf7b78 Add templated BinaryOutputStream::writeVector and writeStruct
To avoid repeated code pattern, this CL adds templated
BinaryInputStream::readVector and readStruct and
BinaryOutputStream::writeVector and writeStruct, that does the static
assertion to ensure they are trivially copyable.
readIntVector/writeIntVector is removed.

This CL also padding warning for ProgramExecutable::PODStruct to avoid
potential Msan complain.

Bug: b/296433003
Change-Id: I8e718b41cde898960b9e86a2d7d1bc5a837fe561
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834700
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-01 21:04:44 +00:00
Mark Lobodzinski
4e1053b966 Tests: Limit CapturedTest to Vulkan backend
Test: angle_end2end_tests --gtest_filter=CapturedTest.MultiFrame
Bug: b/298612441
Change-Id: I865186ba544d3b72af700a9f2cf22aef719e875a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834704
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-09-01 16:36:16 +00:00
Roman Lavrov
55054e7684 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>
2023-09-01 16:33:11 +00:00
angle-autoroll
c4c880ad2d Roll VK-GL-CTS from a745d5c29c56 to 385ae8bed1f9 (7 revisions)
a745d5c29c..385ae8bed1

2023-09-01 lorenzo@khronosgroup.org Update externals and fix mesh_shader
tests with fragment_shading_rate
2023-09-01 ziga@lunarg.com Fix tessellation shaders support check in
shader object linked tests
2023-08-31 ziga@lunarg.com Add pipeline variation of shader object misc
tests
2023-08-31 syoussefi@google.com Prepare for automated clean up
2023-08-31 ziga@lunarg.com Fix nextStage in shader object linked tests
2023-08-31 ziga@lunarg.com Fix initializing glsl tests
2023-08-31 ziga@lunarg.com Fix gen_framework.py using unsupported
extensions

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ynovikov@google.com
Change-Id: Ib582b26d1ee123a6f533cdfb67e5a1ad95106618
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833688
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-01 14:55:44 +00:00
Roman Lavrov
18e2038eb1 Revert "Gold tests: add temporary logging of angledata hashes"
This reverts commit 4fffc99383.

Reason for revert: Hashes are ok - http://b/296921272#comment3

Original change's description:
> Gold tests: add temporary logging of angledata hashes
>
> Should allow us to determine whether corruption happens between CAS and
> local files on bots or something's wrong with the test harness.
>
> Bug: angleproject:8307
> Change-Id: I8a599777a38d7a1b5c56143eb8d02829895175a7
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777836
> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
> Auto-Submit: Roman Lavrov <romanl@google.com>

Bug: angleproject:8307
Change-Id: Idae3bf3bac810af63e44c0c7553e0c6e9bb6af5b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834062
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-09-01 14:15:57 +00:00
Roman Lavrov
2ef238bcb6 Revert "Traces: add temporary debug info to LoadBinaryData"
This reverts commit 0d701c81d0.

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>
2023-09-01 13:49:09 +00:00
angle-autoroll
7df4aa1057 Roll vulkan-deps from 988fe1c529b0 to 15007d22798e (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/988fe1c529b0..15007d22798e

Changed dependencies:
* glslang: adfcaba7ae..a1f8cd429f
* vulkan-validation-layers: 70be16c58d..8dbf1df09f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ynovikov@google.com
Change-Id: I6a64d990a68d842c61d7fb66e3531b43f01d70af
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834703
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-01 11:56:35 +00:00
angle-autoroll
5f36f55a00 Roll Chromium from f59e85c23631 to 613933d34730 (499 revisions)
f59e85c236..613933d347

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 115a707991..0d534543c1
* testing: ff8dee88bc..5c6cc93b87
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/b8c4f2d99a..dd422858c3
* third_party/depot_tools: 427f0f43ad..e7c4e2ade9
* third_party/libc++abi/src: 3d83ca7bd2..aae4ca0f54
* third_party/libunwind/src: 76e621a897..a321409e66
* tools/perf: ec53b06251..702d2ac502
* tools/protoc_wrapper: 30392509cf..b5ea227bd8
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: If21513bdaef0cc71c51f286f7188434749764684
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834702
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-09-01 08:26:44 +00:00
Alexey Knyazev
9624db05ed Validate missing fragment outputs for dual-source blending
* A secondary fragment output must be declared when
  dual-source blending is enabled in WebGL contexts.

* Omitting locations for multiple fragment
  outputs is not allowed in WebGL contexts.

Bug: angleproject:1085
Change-Id: I57febdc02c9ccc571971a81b6671869f19b0aa96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834672
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-09-01 04:49:41 +00:00
Charlie Lao
7c3c7b7b9f Add more test for GL_SRGB8 format
And follow up changes from crrev.com/c/4819053

Bug: b/298037344
Change-Id: Ib27cc2fb8418d05d0b25f4abbdcf052d1f51c9ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824046
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-09-01 01:46:32 +00:00
Yuly Novikov
262edaccc2 Skip 2 DrawCallPerfBenchmark tests on Pixel 6
angle_perftests.DrawCallPerfBenchmark.Run/gles_offscreen_attrib_change
angle_perftests.DrawCallPerfBenchmark.Run/gles_offscreen_prog_change

Bug: b/298407224
Change-Id: I03e9f5daead86447cea456abc01cb46b229c8bbe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834211
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-31 19:19:21 +00:00
angle-autoroll
1192e5e8b1 Manual roll vulkan-deps from a446c6320b6b to 988fe1c529b0 (28 revisions)
Suppress new VUIDs:
VUID-VkGraphicsPipelineCreateInfo-topology-08773
VUID-VkDescriptorImageInfo-imageView-07796

Manual roll requested by ynovikov@google.com

https://chromium.googlesource.com/vulkan-deps.git/+log/a446c6320b6b..988fe1c529b0

Changed dependencies:
* spirv-tools: b6893ccdfb..9b923f7cc3
* vulkan-tools: 6087a58444..389110e460
* vulkan-validation-layers: b2f5094203..70be16c58d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: angleproject:8318, angleproject:8237, angleproject:8334
Change-Id: I4b868b67b0c8158179fee61018933104c4ed55d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4832731
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2023-08-31 18:58:20 +00:00
Shahbaz Youssefi
33be259082 Move transform feedback buffer mode to program state
This is link input and should persist between relinks.  A copy of it is
still left in ProgramExecutable as it is used later after the executable
is installed (and the program might get relinked; a future change
reworks things so that the installed executable and the originating
program are independent).

Bug: angleproject:8297
Change-Id: Ifba6ac18ea09fd804b89d8fdb14930ef3d839cf4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4827764
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-31 18:32:17 +00:00
angle-autoroll
74c8b74c99 Manual roll Chromium from 90200ab2e92a to f59e85c23631 (744 revisions)
Manual roll requested by ynovikov@google.com

90200ab2e9..f59e85c236

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 5455fbf6e1..115a707991
* testing: 1b199ecbed..ff8dee88bc
* third_party/abseil-cpp: 56586c9caf..7affa303ea
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/69c19224a7..b8c4f2d99a
* third_party/depot_tools: b9d7c85582..427f0f43ad
* third_party/r8: _AUNqTBtlUIMSIQEV31lcrlDaaUdwQdUUdp4BtPoOUMC..TBaeKaSTY2ttKx2JSFuWiQ8Na80KHZwLEgSAvT1DBJ0C
* tools/clang: 87404e5f97..9fc887ccde
* tools/mb: b33780b146..51e8fbac5d
* tools/perf: 0a846cd886..ec53b06251
No update to Clang.

Bug: angleproject:8318
Tbr: ynovikov@google.com
Change-Id: I81fb29eeb41aecfdbefc0cd3f1da0c6a809b6568
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4832734
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-31 18:07:13 +00:00
Shahbaz Youssefi
6ff209bc9d Clean up InfoLog usage during link
The info log doesn't really belong to ProgramExecutable; it belongs to
ProgramState.  However, it is placed there for convenience since many
functions access it.

This change cleans up usage of InfoLog so the one in ProgramExecutable
is consistently used, but also that is turned into a reference to
ProgramState's InfoLog.

This is necessary for a follow up change that restores the previous
executable on link failure (and would thus otherwise lose the info log
of the failing link).

Bug: angleproject:8297
Change-Id: I088408e3fce9ebb35b1ec4ad3dc599bdb90bf5c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4825624
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-31 18:03:32 +00:00
Jiawei Shao
d4756a94fb D3D11: Fix register index of read-only storage images
On D3D11 read-only storage images should consume SRV registers ("t")
instead of UAV registers ("u"), so baseUAVRegister shouldn't be
related to read-only storage images.

fixed: angleproject:4404
Bug: angleproject:7121
Change-Id: I3ca35497992de599d0427fae10d750aff7cf7d9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819797
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-31 16:42:42 +00:00
Shahbaz Youssefi
0df4adbd24 Remove link results from program hash
The program hash should be independent of link output.  The fragment
shader output locations were being hashed in the program hash, but that
should be unnecessary, as they are derived from the link input, which is
already entirely present in the program hash.

Bug: angleproject:1085
Bug: angleproject:8297
Change-Id: I4befd45c69c2f0d4d6d8b620167a07eedffd5098
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817829
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-31 16:38:23 +00:00
Yuly Novikov
cd3592505e Don't sync reclient on linux arm64
CIPD package not available

Bug: angleproject:8309
Change-Id: I502e55a1da00b6624e5d07b2c353ae9360dc44e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4831493
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Steven Noonan <steven@uplinklabs.net>
2023-08-31 16:28:24 +00:00
Roman Lavrov
ed7e05bed6 Cleanup: remove tests.csv
Looks like it was added accidentally in https://crrev.com/c/4189028

Bug: b/242419750
Bug: angleproject:7882
Change-Id: I1d92b4a7001a1418bfea77e2b0945ee7a070dad5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4832095
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-31 16:01:54 +00:00
Steven Noonan
0b20cd6a86 d3d11: avoid exit-time-destructor warning
Applies to use_custom_libcxx=false on Windows builds. On MSVC's C++
runtime, std::mutex has a destructor.

Bug: angleproject:8327
Change-Id: I6118753569ce0529015e82673571c961a38f30e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819793
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-31 15:48:33 +00:00
Geoff Lang
aed8ec2a8a Handle Qualcomm's Windows vendor ID.
The vendor ID chosen to represent Qualcomm was their PCI database ID.
On Windows, Qualcomm devices are ACPI and use a different ID.

Since these platforms don't inersect at all (yet), if-def the
Qualcomm vendor ID per-platform so that all the helper functions
continue to work.

Bug: chromium:1464799
Change-Id: Iee8e823ab54399ad2c2f21499b5d581be5c1c0c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804367
Reviewed-by: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
2023-08-31 15:32:05 +00:00
Jiawei Shao
33472e77b7 D3D11: Fix the compilation of vertex shader with storage image
This patch adds the missing declaration of storage images in vertex
shader. With this patch the vertex shaders with storage image
declarations can be correctly compiled on D3D11 backends.

Bug: angleproject:7121
Change-Id: I32b8c632df83a64a34318e9668e9aa8d376cca56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819792
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-31 15:22:26 +00:00
Roman Lavrov
2ed7d887ba Tests: EGLMakeCurrentPerfTest loads GLES
Following https://crrev.com/c/4812049 which makes warmup call glFinish
that requires GLES to be loaded. It's the only test that hits this -
LoadUtilEGL isn't normally called by tests. Breaks on perf bots.

Bug: b/297418214
Change-Id: Ib6a7eb863f75e6f461ea021d30dc57baf23afbdc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4832092
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-31 14:15:02 +00:00
Yiwei Zhang
6258d47955 Vulkan: disallow pbo copies when offset is incompatible with vulkan
Per spec of vkCmdCopyImageToBuffer:
If srcImage does not have either a depth/stencil or a multi-planar
format, then for each element of pRegions, bufferOffset must be a
multiple of the texel block size

This change disallows pbo copies if violating that spec vu.

Bug: b/297927542
Test: org.skia.skqp.SkQPRunner#UnitTest_TransferPixelsFromTextureTest
Change-Id: I7df4bee5fa574c44dd872f7225567049c5562a99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4827694
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-31 14:13:53 +00:00
Charlie Lao
519d330c0d Add GL_RGBX8_SRGB_ANGLEX and GL_BGRX8_SRGB_ANGLEX formats
If app creates AHB with sRGBX format, and then create a EGLImage,
Image::initialize() will retrieve the sized format from AHB, which is
GL_RGBX_ANGLE, and then try to convert to sRGB color space. The bug here
is that GetNonLinearFormat will pick GL_SRGB8 for all these formats
:GL_RGB8, GL_BGRX8_ANGLEX, GL_RGBX8_ANGLE. This means that different
AHBS with these three different format will end up createing a tetxure
with same format which sRGB. I think the reason somone did it this way
initially simply because there is no sRGB corresponding format available
for BGRX8 and RGBX8. This CL adds sRGB internal version of these two
formats, thus make it straight forward to pick the correct sRGB format.

The other change here is for AHBs, right now we are always force
mRequiredImageAccess to be Renderable. This actually workedaround the
bug that mentioned earlier that we are picking the wrong format. Because
of forced renderable, we end up with SRGB fallback to SRGBA. But
external images should not fallback, we should use its existing format
as is since it can be accessed via AHB interface directly.

Bug: b/298037344
Change-Id: I6119c4015cc5bf0effdf0530cb756b6c4656c38f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819053
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-30 18:45:34 +00:00
Geoff Lang
3e333c7be0 Check that postTask is non-null before calling it.
ANGLE's platform methods are global but Chrome treats them as if they
are per-display. If multiple displays are created, Chrome can reset the
methods for all displays during angle::ResetPlatform.

ANGLE checks that postTask is non-null before creating
DelegateWorkerPool but not before each use of postTask.

Bug: chromium:1476679
Bug: chromium:1475471
Change-Id: Ie84db48d6c85a1befa604224af6c30bd3515aadf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4827983
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 18:36:04 +00:00
Josip Sokcevic
8330fcd33f [DEPS] Use Var instead of {} in DEPS
New presubmit checks in DEPS need to efficiently parse DEPS file in
order to detect drifts between DEPS and Git submodules.

Bug: chromium:1476115
Change-Id: Ie62762a88073a098068fc76690ea9c95be98de73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4827482
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 16:06:17 +00:00
Jonah Ryan-Davis
1ab5d01d9b Metal: Fix dropped out arguments from functions with many args.
RewriteOutArgs has an early-exit if it spots a potentially aliased
arg. It's also responsible for marking out args as references,
which caused an issue in Google Earth.
Removing the early-exit fixes both issues.

Bug: chromium:1474736
Change-Id: Ib68dd3f3e2e0a1e773e4e09edcdfa3a4bdfc1ef2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823006
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 15:57:19 +00:00
Mohan Maiya
0d67d1bb23 Vulkan: Support EGL_EXT_gl_colorspace_bt2020
Add support for following 3 BT2020 colorspace extensions
1. EGL_EXT_gl_colorspace_bt2020_hlg
2. EGL_EXT_gl_colorspace_bt2020_linear
3. EGL_EXT_gl_colorspace_bt2020_pq

Bug: angleproject:8330
Tests: EGLSurfaceTest.CreateWithEGLConfig1010102Support*
Change-Id: I3a6ca0daa9ad4400da3834f43678b0db816ba6e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824045
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2023-08-30 15:49:26 +00:00
Phan Quang Minh
e408fc534f Add support for EGL_MESA_platfrom_surfaceless extension
This adds support for the EGL_PLATFORM_SURFACELESS_MESA platform type to
allow applications to obtain an EGLDisplay that's independent of any
native windowing systems. This will be used in Ozone/Wayland to create
surfaceless EGLDisplays.

Bug: angleproject:8331
Change-Id: If2ae7a811cfa63ab9f49d54d78f5a3782c8c2fed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749337
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 15:46:34 +00:00
Phan Quang Minh
c8fe53ab0a egl: Fix device fallback if native display eglInitialize fails
Mesa's EGL implementation may return an EGLDisplay that fails to
initialize (e.g. an X11-backed EGLDisplay for `EGL_DEFAULT_DISPLAY` that
fails to eglInitialize if the X server is inaccessible). Handle this
case properly to ensure that ANGLE will properly fall back to using EGL
devices.

Bug: angleproject:8331
Change-Id: I629e95fc22f5618d10be082a3897857bcc79f890
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749335
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 13:43:09 +00:00
angle-autoroll
bc7fc3997b Roll Chromium from e2ad2e99dc98 to 90200ab2e92a (420 revisions)
e2ad2e99dc..90200ab2e9

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 7710487af5..5455fbf6e1
* testing: 475ae9f346..1b199ecbed
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..69c19224a7
* third_party/depot_tools: 6c8d2a9ce5..b9d7c85582
* third_party/jdk: GCFtf5t6M4HlrHj6NXedHbpHp2xjgognF8ptNci4478C..0yjD6s5XYtcGAQoObIys7xs2ThkudwxJwS-2ZNP0SFEC
* tools/clang: 13a5d4e170..87404e5f97
* tools/perf: 4719a5511c..0a846cd886
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: Ib5d8236b95cf9393a8aa394d6e18aeaaa7041215
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824754
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-30 08:03:04 +00:00
Shahbaz Youssefi
b9e9c58bbd Move pre-link program state to ProgramState
Bug: angleproject:8297
Change-Id: I2522bbe6250a0527112fc8161f62c94f2457555b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817828
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-30 04:19:38 +00:00
Alexey Knyazev
8b0af482db Validate active draw buffers for dual-source blending
Fail if more than MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT
draw buffers are enabled when dual-source blending
is used.

Drive-by:
  Do not invalidate draw state on changing blend
  equations if KHR_blend_equation_advanced is
  not enabled.

Bug: angleproject:1085
Bug: angleproject:7177
Change-Id: Ieff80ce777c53b1d8183e1d0a52b7d2224347448
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823164
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-08-30 03:31:26 +00:00
Shahbaz Youssefi
6698fb69b0 Vulkan: Stop passing both ProgramExecutable and ...Vk around
Now that ProgramExecutableVk is accessible through ProgramExecutable.

Bug: angleproject:8297
Change-Id: Ie08770ef97400195d63b87f2d4b7e2a2c8f4ad24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812147
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-30 03:13:41 +00:00
Shahbaz Youssefi
ae67a24b4e Metal: Move program state to ProgramExecutableMtl
Bug: angleproject:8297
Change-Id: I1d13f7aee1ff5b0ce799b486d8a57c83c4481983
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812047
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-30 03:10:25 +00:00
Shahbaz Youssefi
4c0c837e6a GL: Move program state to ProgramExecutableGL
Bug: angleproject:8297
Change-Id: Ie6a1d536c93f841c792052c58249952e8468348d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4811439
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-30 02:47:53 +00:00
Shahbaz Youssefi
d9672adae7 Move left over link state to ProgramExecutable
Previously, only things that needed sharing with ProgramPipeline was
moved to ProgramExecutable, and in particular only state that the Vulkan
backend needed to access.  In truth, everything that's a result of
link needs moving.

Bug: angleproject:8297
Change-Id: I1ca01c5dedbfc62ddcfb4ef945336ceb8ad0f1c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812044
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-30 02:37:57 +00:00
Geoff Lang
7c72fbe95c Return the vendor string as hex when it is unknown.
ANGLE's vendor strings would include the generic "Unknown" when we
did not recognize the driver's vendor ID. Print the vendor ID so that
we can future-proof ourselves against new GPU vendors.

Bug: chromium:1464799
Change-Id: Idac67b369bc95c3c49eb754e8c681d5930a1f494
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804365
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
2023-08-29 23:42:04 +00:00
Mike Schuchardt
4d4795b249 Add build overrides for Vulkan Utility Libraries
This is a new dependency for Vulkan-ValidationLayers

Bug: angleproject:8318
Change-Id: I9e7b68e4a4fc0605d328c0a69c73d3e884b86cf1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4798194
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-29 22:46:30 +00:00
Shahbaz Youssefi
3822ea3a40 D3D: Move program state to ProgramExecutableD3D
Bug: angleproject:8297
Change-Id: Ieead87d2f0ebe5937f262f598443a00504ea1492
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812139
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-29 21:58:21 +00:00
Mohan Maiya
af30f36b84 EGL: Update EGL headers
In order to support EGL_EXT_gl_colorspace_bt2020_hlg
we need the EGL_GL_COLORSPACE_BT2020_HLG_EXT enum which
got added to the eglext.h header recently.

There were non-upstreamed changes to eglplatform.h
in commits 88d3b8cb73 and
2bdcbb9a37, retain them.

Bug: angleproject:8330
Change-Id: Ia56513ff7ed36a9d0c436220bf25eab25f9df169
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824044
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2023-08-29 21:28:42 +00:00
Shahbaz Youssefi
bb135f0ebe Make ProgramExecutableImpl managed by ProgramExecutable
This change allows both parts of the program executable to be safely
backed up and swapped on link.

Bug: angleproject:8297
Change-Id: I17e4b6c05e4e481a66a227d6047dbf943d2c2603
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812138
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-29 20:45:56 +00:00
angle-autoroll
13a87d0bb4 Manual roll Chromium from 2f13938f5894 to e2ad2e99dc98 (165 revisions)
Manual roll requested by ynovikov@google.com

2f13938f58..e2ad2e99dc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 6a782d94b3..7710487af5
* buildtools: 0b103f5670..b2043d4f43
* testing: 88f1060bea..475ae9f346
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..599ca89cf4
* third_party/r8: EubvNlgGEftTjKSDVWoqPEnamR95-ATV-Ei6RhcyvJIC.._AUNqTBtlUIMSIQEV31lcrlDaaUdwQdUUdp4BtPoOUMC
* third_party/siso: git_revision:07d585d17bdd3c521080e2aa5f7b9f6a12f18ded..git_revision:8283bbc1ae9d742d22d3a6e98b7e356b3065a497
* tools/mb: 533fb78ca6..b33780b146
* tools/perf: 8b952caced..4719a5511c
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: I3db7e3119d94aed0a8cf42fcdef02eb0f942517c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823158
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-29 19:47:29 +00:00
angle-autoroll
6a960369aa Roll vulkan-deps from d213632452c2 to a446c6320b6b (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/d213632452c2..a446c6320b6b

Changed dependencies:
* spirv-cross: 7ba6f5ce90..54997fb4bc
* spirv-tools: 1b3c4cb685..b6893ccdfb
* vulkan-headers: 9085224a1b..a0c76b4ef7
* vulkan-validation-layers: 8366ffa972..b2f5094203

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ynovikov@google.com
Change-Id: Iac30cf0d241a3c11f6bb77e2c1351925ccadc200
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819801
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-29 14:55:25 +00:00
angle-autoroll
6d1c0932fd Roll Chromium from 92b28610c8f3 to 2f13938f5894 (510 revisions)
92b28610c8..2f13938f58

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: e75405437c..6a782d94b3
* buildtools: 5237ac61e3..0b103f5670
* testing: ff57564628..88f1060bea
* third_party/android_sdk: 528931048c..ff414082cc
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..599ca89cf4
* third_party/depot_tools: b8164180d2..6c8d2a9ce5
* third_party/libc++abi/src: 6a8358a142..3d83ca7bd2
* tools/clang: 00a267ce41..13a5d4e170
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: Idece055836db99252f1025ee10b8baad27dc96b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819560
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-29 07:53:12 +00:00
Roman Lavrov
d6fd7eafb2 Trace/perf tests: remove calibration and most warmup options
This removes calibration and warmup except for --warmup
(which does what --warmup-steps=-1 used to do: render each frame once
with glFinish)

Trace and perf tests now default to no warmup.

Unchanged by this CL:
--fixed-test-time=x runs a single trial for x seconds.
--fixed-test-time-with-warmup=x is effectively the above flag coupled
with --warmup-steps=-1
--run-to-key-frame runs to the key frame (no longer disables warmup as
it's now off by default)

Bug: b/297418214
Change-Id: I7a0d3e490067dbde57c5f519c1b9092ba70b1480
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812049
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-08-28 21:21:53 +00:00
Alexey Knyazev
558df6f175 Fix fragment output variables validation
* Reject fragment shaders that assign
  out-of-range fragment locations

* Reject fragment shaders that assign
  output variables of different types
  to the same location

* Apply similar validation for fragment
  outputs bound via API calls

* Ensure that masks for active output
  variables and draw buffer types are
  set after processing all fragment
  output bindings

Bug: angleproject:1085
Change-Id: If29cbb58be1981279fc97c67739fe4136b0cdc98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4813656
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-28 17:27:20 +00:00
angle-autoroll
181ec0a554 Roll vulkan-deps from 5ed8fabd1030 to d213632452c2 (14 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/5ed8fabd1030..d213632452c2

Changed dependencies:
* spirv-cross: 633dc30135..7ba6f5ce90
* vulkan-loader: 7dca451d88..d34bfafff2
* vulkan-tools: c536182ca9..6087a58444
* vulkan-validation-layers: 2d736834b1..8366ffa972

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ynovikov@google.com
Change-Id: Ie3a6f5f047770c5659c69d0f6e91a23ce3003fb0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4816488
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-28 17:12:26 +00:00
angle-autoroll
f895440586 Roll SwiftShader from a147f6c5192a to 32f9332d1d7a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a147f6c5192a..32f9332d1d7a

2023-08-25 dcheng@chromium.org Update google/benchmark to
dfc8a92abc88a9d630a9f8e01c678fedde4c3090.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: ynovikov@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: Ib4e708f610d85d5d0005dce28a4ce42d6181ba3b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4816667
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-28 17:10:17 +00:00
angle-autoroll
b54b4a893f Roll Chromium from 3b473fe59c6b to 92b28610c8f3 (662 revisions)
3b473fe59c..92b28610c8

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 4cee92ef22..e75405437c
* buildtools: f6e67ef3b2..5237ac61e3
* testing: 7ece0f7260..ff57564628
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..5ddb43f42b
* third_party/depot_tools: c7aca34c8e..b8164180d2
* third_party/fuchsia-sdk/sdk: version:14.20230818.1.3..version:14.20230826.1.1
* third_party/r8: yG6aCoW-nKG7aqWMZkE1TsvMCxvP7KxJ9PsaRbytuyEC..EubvNlgGEftTjKSDVWoqPEnamR95-ATV-Ei6RhcyvJIC
* tools/clang: 46d57cd9ee..00a267ce41
* tools/mb: 3e89e7b60b..533fb78ca6
No update to Clang.

Bug: None
Tbr: ynovikov@google.com
Change-Id: Ia6b727a4fc12182bf743d828fe8c64cad6fe6e99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4816191
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-28 16:58:57 +00:00
Yuly Novikov
0f7c39a2ab Temporarily remove trace bots from CQ
Reclient doesn't work yet
Goma is slower than local today

Bug: angleproject:8309
Change-Id: I03c337dab5ee82adc8e03d4f5f52bf2b26aa7cad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4818506
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-28 16:47:05 +00:00
Shahbaz Youssefi
57388ab2e2 Vulkan: Make sure ProgramVk has no members other than executable
The program is really just an interface to the executable.  It should
not hold on to any data on its own.  The SpvProgramInterfaceInfo member
did not even need to be a member, and was left over from previous
refactorings.

Bug: angleproject:8297
Change-Id: I4edb53c1c8b27e242a62fb4fc253ade58bd8dde1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812137
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-25 18:11:14 +00:00
Charlie Lao
e066b68967 Ensure struct SamplerBinding is tightly packed without padding
crrev.com/c/4798195 might have caused MSan bot failure in chromium due
 to use of memcpy on the struct. TextureType and SamplerFormat are both
uint8_t, which means extra paddings added for the struct. This CL adds
warning for struct padding and fixes the warning as well.

Bug: b/275102061
Bug: chromium:1475844
Change-Id: Ia3f8a7e7697c6e354efb8a8dc5dfc7861118a818
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812245
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-25 18:10:23 +00:00
angle-autoroll
fc6bf90d5a Roll VK-GL-CTS from c04e157100c1 to a745d5c29c56 (8 revisions)
c04e157100..a745d5c29c

2023-08-25 lorenzo@khronosgroup.org Merge "Merge
dev/VK_KHR_cooperative_matrix into main" into main
2023-08-25 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-08-25 lorenzo@khronosgroup.org Merge "Merge branch
dev/VK_EXT_depth_bias_control into main" into main
2023-08-25 aitor@lunarg.com Enforce Android SDK33/34 build for SDK33/34
devices
2023-08-25 michal.jakubek@mobica.com Dynamic state line width tests.
2023-08-25 amber@igalia.com Use baseArrayLayer in renderpass resolve
tests
2023-08-25 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-cts-4.6.3
into vk-gl-cts/main
2023-08-25 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9
into vk-gl-cts/main

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: I261fb54d1d26d931dc42614225548b984a5d7acc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4810854
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-25 16:24:25 +00:00
angle-autoroll
98b710e67b Roll vulkan-deps from 8f3cfbeff2e9 to 5ed8fabd1030 (11 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/8f3cfbeff2e9..5ed8fabd1030

Changed dependencies:
* glslang: f1cb8608b3..adfcaba7ae
* spirv-tools: abd548b817..1b3c4cb685
* vulkan-headers: 85c2334e92..9085224a1b
* vulkan-loader: dd8332d253..7dca451d88
* vulkan-tools: b441f434a0..c536182ca9
* vulkan-validation-layers: abe0666e91..2d736834b1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: I3cc3e291eb7d43c1161fb69cfb0b1c69d83f320d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812244
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-25 12:17:05 +00:00
angle-autoroll
8a173e54a1 Roll SwiftShader from 97bdc453fbed to a147f6c5192a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/97bdc453fbed..a147f6c5192a

2023-08-24 dcheng@chromium.org Don't spam stdout when `git describe`
fails.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I56edf75470f9dd0b7fc67e1981c1aeb19b0c843a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4811751
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-25 11:12:35 +00:00
angle-autoroll
2776754867 Roll Chromium from cbda6c2d6318 to 3b473fe59c6b (518 revisions)
cbda6c2d63..3b473fe59c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: e04720d46f..4cee92ef22
* buildtools: a93fb7650a..f6e67ef3b2
* testing: 57ae489e9b..7ece0f7260
* third_party/android_build_tools/lint: qaZOeTY-k9wAZ1vkdqCZIbppqQFgc4IM5T5dKj3_2xIC..Bd9m0RpzuCbbURLUADcdPsU2Yrrfg453Djw_jY7kVEYC
* third_party/android_build_tools/manifest_merger: Nc9kYyTsw69N7yKSw_Sc2fJtUJ2zXUhSGjXbIkDVXuIC..kkbYOGsVRXhtxBiXuTufY0puTnG5QAfyxvFTBHFWL08C
* third_party/android_sdk: 996d3d5271..528931048c
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..95899ca948
* third_party/depot_tools: caeef7ba32..c7aca34c8e
* third_party/r8: 5fmK4ltjLHNRPbUQ34VE7o4hXrmeRbwpUTtUPadhj0wC..yG6aCoW-nKG7aqWMZkE1TsvMCxvP7KxJ9PsaRbytuyEC
* tools/mb: 3748929a3d..3e89e7b60b
* tools/perf: 145add6eab..8b952caced
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ie320fd2e49332a29aaf92fe8b61b6fe17a3d2388
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4810852
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-25 08:06:26 +00:00
Roman Lavrov
7e41c5bc02 Remove scripts/perf_test_runner.py and references to it
src/tests/run_perf_tests.py is similar and is maintained (runs on CI)

Bug: b/297418214
Change-Id: I6fb12ac1fb856672b3bb83c0a4e34eb68afa1475
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812135
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-25 05:07:56 +00:00
Shahbaz Youssefi
c8ec8739ec Frontend: Remove link job dependence to context
The part of link that needs the context is moved up.  Usage of
gl::Context is eliminated from the rest of the link (whatever is done in
the front-end).

Bug: angleproject:8297
Change-Id: Ifa71d2b2c0c0bc7c0c0b7ee89e1cbb203c3018cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4803109
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-25 02:11:16 +00:00
Shahbaz Youssefi
4376a8c879 Metal: Reduce link job dependence to context
The dependence on ContextMtl is not entirely removed, though it seems
feasible.  In particular, ContextDevice is passed around while only the
real underlying device is needed.  Some refactoring is needed here to
address that.

Additionally, I haven't verified if all that is accessed through the
display is thread-safe, which would be a pre-requisite to moving the
entire link job to a worker thread on this backend.

Bug: angleproject:8297
Change-Id: Ifd4b02694b0997a33d17aad0b47eb7ac4de104e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4784667
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-25 01:52:56 +00:00
Shahbaz Youssefi
44b5715c40 D3D: Remove link job dependence to context
The part of link that needs the context is moved up.  Usage of
gl::Context and gl::State is eliminated from the rest of the link.

Bug: angleproject:8297
Change-Id: I2064b21a6724d602f6a84f53a8ae5fe42fe4e837
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781566
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-24 21:31:22 +00:00
Shahbaz Youssefi
571b4cdb11 Vulkan: Move pipeline/desc-set layout creation to link job
The pipeline and desc-set layout caches are consequently made
thread-safe.  The reference counter on the layouts are also made atomic.

With this change, practically all of the link in the Vulkan backend is
moved to the link job.

Bug: angleproject:8297
Change-Id: Iba694ece5fc5510d34cce2c34441ae08ca5bb646
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774787
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-24 19:36:27 +00:00
Charlie Lao
b8d5a423d5 Add static_assert(std::is_trivially_copyable<LinkedUniform>(),"")
Since we are using memcpy for LinkedUniform, it is desirable to utilize
compile time assertion to ensure that in future if anyone modifies POD
struct (and the class of data members of POD struct) and made it that no
longer memcopy-able, we would immediately caught at compile time.
std::is_trivially_copyable<>is exactly for this reason. In order to make
this work, the POD struct and any data it uses can not have user defined
copy constructor. The problem is that right now ANGLE is using
clang_use_chrome_plugins=true, and chrome-style generates warnings if
the complex struct (has more than 10 data members) does not define a
copy constructor, and that warning causes build failure with -Werror. So
clang_use_chrome_plugins=true and std::is_trivially_copyable have this
conflicting requirements that I can not apply both. This has been raised
to compiler team, but before we get a solution from them, if we have to
make a choice, I think the better choice is to disable
clang_use_chrome_plugins and apply std::is_trivially_copyable, since the
later is more critical to ensure safety, while chrome-style is mostly
trying to minimize the code size, but won't affect
correctness/robustness. This CL sets clang_use_chrome_plugins to false,
and removes the copy constructor and copy assignment operator from
BitSetT and LinkedUniform and added static assertion
is_trivially_copyable for LinkedUniform. Same thing applied to
ProgramInput as well.

In future once we have a better solution from compile team, we can
re-enable clang_use_chrome_plugins and disable only for structs that
requires is_trivially_copyable assertion.

Bug: b/275102061
Change-Id: If33415ea61deda568d855a7dd6a4fd6042058be5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799342
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-24 17:25:53 +00:00
Charlie Lao
03f9dff61b Separate out std::vector<GLuint> boundTextureUnits from SamplerBinding
SamplerBinding struct is trivial copy-able except the
std::vector<GLuint> boundTextureUnits.  This CL moves boundTextureUnits
out of the SamplerBinding struct and becomes a vector in
ProgramExecutable. This means all of sampler binding's texture units
will be stored in one vector and SamplerBinding will remember where its
own texture units is stored in that vector by keeping
textureUnitsStartIndex and textureUnitsCount. In other word,
SamplerBinding::boundTextureUnits (before this CL) is equivalent to
mSamplerBoundTextureUnits[SamplerBinding.textureUnitsStartIndex], ...,
mSamplerBoundTextureUnits[SamplerBinding.textureUnitsStartIndex +
SamplerBinding.textureUnitsCount - 1] after this CL. With this,
ProgramExecutable::mSamplerBindings are load/stored with one
readBytes/writeBytes call since it is trivially copyable.

Bug: b/275102061
Change-Id: I0974cf940875ecbcf655b4469b3bbc910717f1ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4798195
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-24 17:24:21 +00:00
Charlie Lao
a8d77dc4cd Vulkan: Move mVariableInfoMap load/save to its own class
This is mechanical change only. This CL moves mVariableInfoMap load/save
logic from ProgramExecutableVk to ShaderInterfaceVariableInfoMap class.

Bug: b/296433003
Change-Id: I9a934fd2223c559fba899f166e40efc17fa1be2e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794752
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-24 16:41:21 +00:00
Charlie Lao
607f2636af Vulkan: Switch ShaderInfo::load to use readBytes
Right now it is using readIntVector<uint32_t>, which end up doing a for
loop and memcpy each integer. This CL switch to readBytes so that one
memcpy is used.

Bug: b/296433003
Change-Id: Ibb10f97af4a86a4e93abb825007847a65f934237
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4790827
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-24 16:05:23 +00:00
Roman Lavrov
9f4bddd840 Cleanup: remove unused ANGLE_ASSERT_IMPL
Bug: b/297343154
Change-Id: Iccde6b93fd26aa5b575a11d0ac61c59f03508567
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4810192
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-08-24 15:38:52 +00:00
Cody Northrop
98e351cf55 Traces: Update steps for upgrading traces
We've settled on a streamlined method of upgrading traces.

We consider the upgraded trace good if:
- gets the same pixels for all frames, including after Reset
- gets the same frame time and memory usage (or better)

This moves away from using serialization, which is useful, but has
become too heavyweight. We've preserved the steps as they are
still useful in some scenarios.

Also formalize a couple of scripts we've been using to compare
trace screenshots.

It supports two scenarios:
- comparing screenshots between ANGLE and native
- verifying screenshots after an upgrade

Example usages:
compare_trace_screenshots.py versus_upgrade \
    --before <path> --after <path> --outdir <path>
compare_trace_screenshots.py versus_native \
    --screenshot-dir /tmp/screenshots
    --trace-list-path src/tests/restricted_traces

Bug: b/294882956
Change-Id: Ifc59d8b31648abb3614da2d8919a1f90a0b6b68f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791916
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-24 15:27:17 +00:00
Roman Lavrov
893325b862 Perf tests: call base class SetUp in all tests
https://crrev.com/c/4799388 moved code to SetUp assuming base class
SetUp was always called but a few cases were missing this.

Changes ASSERT to a check that is enabled in release builds (e.g. perf
bots)

Bug: b/291604008
Change-Id: I1c3fb123903f09631ef348e311f3dc1c77b4e221
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4810187
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-24 15:21:04 +00:00
angle-autoroll
feb0d11b45 Roll vulkan-deps from 1fb2f09080d7 to 8f3cfbeff2e9 (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/1fb2f09080d7..8f3cfbeff2e9

Changed dependencies:
* glslang: db8719ae07..f1cb8608b3
* spirv-headers: b8b9eb8640..d790ced752
* spirv-tools: 2601f644ee..abd548b817
* vulkan-validation-layers: a615ccf41b..abe0666e91

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: If5b80c23ae8456d9c50b8e10cef390ecf4f79972
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4809205
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-24 11:31:22 +00:00
angle-autoroll
e2eea7b7de Roll Chromium from 0e1c462e01ac to cbda6c2d6318 (567 revisions)
0e1c462e01..cbda6c2d63

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 2146585667..e04720d46f
* testing: b81abd96f2..57ae489e9b
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..b9f2ef143e
* third_party/depot_tools: 3dce403ca3..caeef7ba32
* third_party/kotlin_stdlib: Z1gsqhL967kFQecxKrRwXHbl-vwQjpv0l7PMUZ0EVO8C..6cGkpHi3fSRhpRfq2b1mjmzfFmShvtQe6gy4g2nFQd0C
* third_party/libunwind/src: d92e619eaa..76e621a897
* third_party/r8: AFFvlihFtRPPn_wcq43THY3FtMLV5gyPG3aK7-UOoygC..5fmK4ltjLHNRPbUQ34VE7o4hXrmeRbwpUTtUPadhj0wC
* tools/perf: 67b49b3833..145add6eab
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: Iba21ee276f3cd873b142348c4e5e397dd4cf473d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4809203
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-24 08:29:34 +00:00
Shahbaz Youssefi
0b64825203 GL: Fix EAGL build
Bug: angleproject:3031
Change-Id: Id6e30804d8eb066cc2353830cbefb798e08e3c0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4808979
Commit-Queue: Solti Ho <solti@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Solti Ho <solti@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-23 22:44:27 +00:00
Yuxin Hu
f0d3e8b383 Remove test skips on dEQP-EGL.functional.swap_buffers*
Below changes fixed dEQP-EGL.functional.swap_buffers*
on pixel devices, too:
https://chromium-review.googlesource.com/c/angle/angle/+/4794979.

Update the tests to only skip on Win OS.
The tests running on other platforms will be
reported as Not Supported due to lack of readScreenPixels()
implementation on other platforms.

Tests failures on Win OS needs further investigations.

Bug: angleproject:2341
Bug: b/224537784
Change-Id: I46a59dd8708e621b2d91ac3c46584bdad4ff759e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804568
Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-08-23 22:09:23 +00:00
Alexey Knyazev
0688a940c8 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>
2023-08-23 20:53:06 +00:00
Shahbaz Youssefi
68f2c10cdf Remove program executable backup during link
This was added in
https://chromium-review.googlesource.com/c/angle/angle/+/2181450/30 to
support the case where a program fails to relink, but needs to still be
usable.

However, this does not seem to be an issue anymore.  New tests are
specifically added for this, and they, along with every other test,
pass.

If this needs to be reintroduced, it needs to be rethought.  It does not
play well with parallel link as it changes the executable pointer while
link is in progress (and it was done on the assumption that everything
needing the executable is linked serially).  A better solution would
likely be an `mLastSuccessfullyLinkedExecutable` that normally points to
`mExecutable`, but not during link.  On `resolveLink`, it would either
make `mExecutable` point back to `mLastSuccessfullyLinkedExecutable`, or
the other way around based on whether the link was successful or not.

Bug: angleproject:8297
Change-Id: Ic9d55bccb75fff0253fe299a244bf1e4bbc416a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781632
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-23 19:07:56 +00:00
Shahbaz Youssefi
cfd9ccd008 Reland: Vulkan: Move SPIR-V set up to link job
This is a reland of 10f54902e8

Bug: angleproject:8297
Change-Id: I701b750a13ac5b17df67dee5b6c37c13c60f5b10
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793219
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-23 17:46:05 +00:00
Shahbaz Youssefi
711db27554 Translator: remove usage of contains()
It's not available pre-C++20

Bug: angleproject:8311
Change-Id: I41940b5f8e6a90bc0224852aefe54643f2be9cb5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4806924
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-23 16:18:10 +00:00
Cody Northrop
b0777def38 Traces: Upgrade octopath_traveler
Test: angle_trace_tests --gtest_filter=TraceTest.octopath_traveler
Bug: b/294882956
Change-Id: I690f4f6ad65542cd015ce61ee246f009f0907740
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794728
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
2023-08-23 16:09:42 +00:00
Shahbaz Youssefi
8f64b51d22 Reland: Vulkan: Move default uniform init to link job
This is a reland of d8cd4dcdc9

Bug: angleproject:8297
Change-Id: Ib4f8e9dd258da71d44983bbb619b6b4abda0b109
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793218
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-23 16:00:09 +00:00
Roman Lavrov
865eceaa2a Trace perf: power metric uWs/frame -> W, exclude startup&teard
Switching from uWs/frame to W, which is easier to measure as we don't
need to know how many frames were rendered between the measurements and
just need to avoid warmup, turndown. Also, W is a more "natural" metric
as it reports actual power usage that can be reasoned about in terms of
device thermals etc.

Changing starting point to post-warmup by waiting for test message in
logcat. The logcat -> script delay seems very small in my tests.
Turndown also shows spikes in some traces so avoiding that by shifting
the time for end point collection to 1s before the test is expected to
finish (which makes this only compatible with --fixedtime)

Also made device selection set env var instead of a global variable and
passing via args it slighlty simplifies subprocess(adb) handling.

Bug: b/291604008
Change-Id: I2109da0d75eba167eec939df88a34d9a9b7f330b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799391
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-23 15:04:31 +00:00
Cody Northrop
72c0088542 Tests: Skip injustice_2 on Windows/Nvidia
Bug: angleproject:8316
Change-Id: I5bdef9df9bc6f922a15f3377e4af31cc60db73a3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4807130
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-23 14:53:37 +00:00
Alexey Knyazev
9f258f8a03 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>
2023-08-23 14:17:38 +00:00
angle-autoroll
4723a32df4 Roll Chromium from dd175d86ee90 to 0e1c462e01ac (1385 revisions)
dd175d86ee..0e1c462e01

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 35d9bb8611..2146585667
* buildtools: c4a369c9b6..a93fb7650a
* buildtools/reclient: re_client_version:0.112.0.ffc95d4-gomaip..re_client_version:0.113.0.8b45b89-gomaip
* testing: 4ac1a5873d..b81abd96f2
* third_party/abseil-cpp: 4ef9b33175..56586c9caf
* third_party/android_deps: 26fdb68fe1..297421bd46
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..e8ae187c6d
* third_party/depot_tools: 3aeb682373..3dce403ca3
* third_party/protobuf: c468546c25..b2f4cca357
* third_party/r8: crtFbDFNOQ4YZT_MQmz65TmbaQo5-URl1at11okEGTUC..AFFvlihFtRPPn_wcq43THY3FtMLV5gyPG3aK7-UOoygC
* third_party/siso: git_revision:c349fcb5f693249d938e2d4ce4c4b4d037dceb5b..git_revision:07d585d17bdd3c521080e2aa5f7b9f6a12f18ded
* tools/clang: 86670f0684..46d57cd9ee
* tools/luci-go: git_revision:77c9b09de8f234ae9c47d9d865a5d860ff390ed0..git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66
* tools/luci-go: git_revision:77c9b09de8f234ae9c47d9d865a5d860ff390ed0..git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66
* tools/perf: ffa3bdd3ba..67b49b3833
* tools/skia_goldctl/linux: UFlmhX6-Qb8IgDGznrPTinozgZ41Ul69CJEw_37d5Q0C..FdyOkAznuQ7k2iieFXsUTpz6jBaUHPGw8fNxb1-0JLMC
* tools/skia_goldctl/mac_amd64: UjktW10Ah81eMdqbYaUevQNFJozJWoGy33MmF1BdM18C..9RuiM5HJiEHkr27MLsTx04jOTEYQG-D_3P1BCrM03q4C
* tools/skia_goldctl/mac_arm64: obLm-ouXMf1S3hnZaO-yUAG5CoeW2qzVWy2fhz3WXWIC..tDNHYe-tSHHr68Th6urfIcXLngT2yJ2jCyZBQLAB5mYC
* tools/skia_goldctl/win: jMrnfAAYCvmmOPZpirRZ6xWBdRaWW7g85mdjTFvq_HsC..3VsnMzWsw1jy9-ZgvgPjR5emUA1IwrCNkX8xYK8oxFgC
No update to Clang.

Bug: None
Tbr: syoussefi@google.com
Change-Id: I11596be2c5e14079bbb3264e6b2e180963219682
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4805556
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-23 13:47:35 +00:00
Shahbaz Youssefi
d8f088e034 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 a100d8f471.

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>
2023-08-23 13:40:50 +00:00
angle-autoroll
d1d41e11d2 Roll vulkan-deps from 2cb515574109 to 1fb2f09080d7 (15 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/2cb515574109..1fb2f09080d7

Changed dependencies:
* spirv-tools: 714966003d..2601f644ee
* vulkan-validation-layers: ebab3bc86c..a615ccf41b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: Ib02a734b88e82dda7ca32781b3c915e805204209
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4805814
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-23 13:31:47 +00:00
Roman Lavrov
0ef565c50e end2end test with --use-gl fails with a note
Bug: None
Change-Id: I7e6e40c912910d0ffc8d4690e9b9b4c8599342db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804368
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-08-22 22:23:33 +00:00
Roman Lavrov
d41ac4dac3 Cleanup: 'am instrument' readability and consistency
Reconcile android_helper and restricted_trace_perf formatting of
'am instrument' command. The only real difference is that
restricted_trace_perf uses 'shell=True' in subprocess which requires
escaping spaces inside ""

Bug: b/292249127
Change-Id: I002e49ae5b2913db46b92a7b643bc12d21abce1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794430
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-22 21:56:00 +00:00
Roman Lavrov
84576a5bf7 Trace perf: log script args in the spreadsheet
Excludes the --output-tag flag

Example:
    ...
    Source: raw_data.android.20230818.csv
    Args: -f *blade_and_soul_revolution --fixedtime 1 --power --loop-count 2 --sleep 1

Bug: b/292249127
Change-Id: Ic40666921fe49845032d47f32ecda9609ba7b044
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794431
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-22 21:23:29 +00:00
Roman Lavrov
9e2d4c0b18 Trace perf: add test crash handling
When missing time and no '[  PASSED  ]' tag in stdout,
assume test crashed.

Example stdout:

trace                                    wall_time       gpu_time  ...
Starting run 1 with native at 2023-08-18 10:23:17
native_blade_and_soul_revolution         crashed         0         ...

raw_data:

trace,wall_time(ms),gpu_time(ms),...
native_blade_and_soul_revolution,crashed,0,...

summary:

1,blade_and_soul_revolution,-1.000,-0.00%,-1.000,...

Set cpu_time to 0 on a crash for consistency with other metrics.

Bug: b/292249127
Change-Id: I9533c0ee7aa9a3b45f360ad1618984eb620d657f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794428
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-22 21:22:08 +00:00
Roman Lavrov
864de574bb Trace perf: subprocess.wait() -> subprocess.communicate()
subprocess.wait() deadlocks when enough output is produced by the
command to fill the stdout/stderr buffers.
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.wait
recommends .communicate() instead.

Replaced result.process.stdout with result.stdout which is a string
rather than a stream.

Bug: b/292249127
Change-Id: I172ac058ebc6aafda82edab7c45787252d612013
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794288
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-22 20:41:47 +00:00
Mark Lobodzinski
823de3a30c Tests: Add Injustice 2 trace
Test: angle_trace_tests --gtest_filter=TraceTest.injustice_2
Bug: b/296913308
Change-Id: I35f1e17767f924c4f31d4e00a2c9f737c6c4822b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802266
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-08-22 19:19:10 +00:00
Shahbaz Youssefi
cb1c5ca425 Manual roll vulkan-deps from aa121378c102 to 2cb515574109 (9 revisions)
Includes an adjustment to syncval message format.

https://chromium.googlesource.com/vulkan-deps.git/+log/aa121378c102..2cb515574109

Changed dependencies:
* glslang: c5117b328a..db8719ae07
* spirv-tools: bfc94f63a7..714966003d
* vulkan-tools: 300d9bf6b3..b441f434a0
* vulkan-validation-layers: d1ff40512a..ebab3bc86c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Change-Id: I94f05554452f1c8b97a1426fb4b61ac1a1fa4b1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802525
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-22 18:30:50 +00:00
Shahbaz Youssefi
f3c1de3636 Make shader recompile while parallel linking safe
Prior to this change, Program* objects held references to Shader*
objects.  This poses a problem where a shader recompile can race with a
program link, if the program link is done in parallel.

As a result, a good chunk of the link job is done serially and under the
share group lock.  After this change, that is no longer a problem, and
most of the link can be made lockless/parallelized.

This change separates out the "compiled state" from the rest of the
shader state.  This was already done for the front-end state (for the
sake of caching), but is also now done for the backends that need it.
The compiled state in turn is placed in a shared_ptr, and is shared with
the program.  When a shader is compiled, its own shared_ptr is replaced
with a new object, leaving all programs currently compiling unaffected
and using the previous compilation results.

Once a program is linked, its references to compiled shader states is
updated.

Bug: angleproject:8297
Change-Id: Iff7094a37088fbad99c6241f1c48b0bd4c820eb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791065
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-22 18:17:26 +00:00
Jeff Vigil
1bd45c4ffb Add tiling mode for GL_EXT_memory_objects
Add set and get TexParameter for pName GL_TEXTURE_TILING_EXT
Add test case to VulkanImageTest for import LINEAR memory object

Bug: angleproject:8274
Change-Id: I4432093e41f45e3926a27e3dee00d48c0438cae5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752793
Reviewed-by: Jeff Vigil <j.vigil@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
2023-08-22 18:02:52 +00:00
Yuxin Hu
d0730eba99 Disable NativeWindow screen read capability on non-win32 platform
NativeWindow::readScreenPixels() only returns true
on win32 platform.
Enable CAPABILITY_READ_SCREEN_PIXELS on DE_OS_WIN32
only.

Bug: b/296487949
Bug: angleproject:8261
Change-Id: I964870a3a5c6911a16382e2b9bb9d2cecea2b706
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794979
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-08-22 17:18:58 +00:00
Alexey Knyazev
27836f2181 Metal: Support incomplete integer textures
Ensure that a compatible placeholder
texture is created for sampling from
an incomplete texture.

Covered by these tests with Metal API Validation:
* IncompleteTextureTestES3.IntegerType
* IncompleteTextureTestES3.UnsignedIntegerType

Bug: angleproject:5594
Change-Id: Ib7322b7cf32cadabf40eb6050476c1bde98ee404
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4801369
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-08-22 17:05:26 +00:00
Geoff Lang
084643d94c EGL: Make sure unitialize values don't leak into configs
Old Android emulators did not implement many of the eglGetConfigAttrib
parameters, including EGL_COLOR_BUFFER_TYPE. They return EGL_SUCCESS
without writing the attribute value and DisplayEGL::getConfigAttrib
would write an uninitialized temporary value to the config in this
case.

Make sure the default config value is stored when eglGetConfigAttrib
behaves this way.

Add more logging about unexpected color buffer types to diagnose issues
like this from logcat more easily.

Bug: chromium:1442132
Change-Id: Ifbbbbfba43658bcd59c73cbb6586b76f636479e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791066
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
2023-08-22 15:51:42 +00:00
Jonah Ryan-Davis
280e79e1fa Rescope globals only used in one function to function-local.
We can demote global variables when they are only used in one function.
This has performance implications on Metal.

Bug: angleproject:8311
Change-Id: Id666e6b167be771c14768cd73efa61fdacd897d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771215
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-22 15:22:50 +00:00
Peiyong Lin
bbf083e0b6 Revert "Move ANGLE binaries to /system/${LIB}."
This reverts commit 86d128c0f3.

Reason for revert: Need more work in AOSP and to figure out a way to
properly land this. Revert now to unblock autoroller.

Bug: b/293503000
Test: boot with Pixel

Original change's description:
> Move ANGLE binaries to /system/${LIB}.
>
> Previously ANGLE binaries were built into /vendor/${LIB}/egl, but since
> ANGLE is in AOSP and we would like to make sure shipping ANGLE is not
> blocked by vendor partition update, this patch moves ANGLE to
> /system/${LIB}. Relative path is eliminated as subdirectory is not
> preferred unless necessary.
>
> Bug: b/293503000
> Test: boot with Pixel
> Change-Id: I51561e20344c5b714fb22a2afc7871477eb2637e
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750441
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Commit-Queue: Solti Ho <solti@google.com>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>

Bug: b/293503000
Change-Id: Ib7c678b0088543a091f269639259ee2fc9871757
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802268
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Peiyong Lin <lpy@google.com>
2023-08-22 14:51:13 +00:00
Li Hao
aaeeea0c42 D3D11: Add device id to the render string
To get device id from GL_RENDER string when using D3D11 backend.

Bug: angleproject:3026
Change-Id: Ied666a481575ece077126c3e1177b150e7358a01
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4786902
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-22 03:28:43 +00:00
Mike Frysinger
71c90dfd30 gtest: disable legacy test case API
Remove APIs that upstream has deprecated so we make sure no one uses
them anymore in new tests.

Bug: chromium:1474588
Change-Id: Ic760439ec41131a5bb5a30a59e23b9166c7fd23d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794112
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
2023-08-22 02:34:58 +00:00
Peiyong Lin
86d128c0f3 Move ANGLE binaries to /system/${LIB}.
Previously ANGLE binaries were built into /vendor/${LIB}/egl, but since
ANGLE is in AOSP and we would like to make sure shipping ANGLE is not
blocked by vendor partition update, this patch moves ANGLE to
/system/${LIB}. Relative path is eliminated as subdirectory is not
preferred unless necessary.

Bug: b/293503000
Test: boot with Pixel
Change-Id: I51561e20344c5b714fb22a2afc7871477eb2637e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750441
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Solti Ho <solti@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-22 00:06:25 +00:00
Roman Lavrov
54770d8241 Perf tests: move calibration out of run() to SetUp()
calibrateStepsToRun is called from SetUp for ANGLERenderTest subclasses,
but direct ANGLEPerfTest subclasses call it from run() instead.
Moving it to SetUp for consistency - just need a check to avoid doing
this for render tests and we already have a hack to do that.

Bug: b/291604008
Change-Id: Ifddb60d55c6404660b0dff938a079fcd0545a6fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799388
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-21 22:26:55 +00:00
Roman Lavrov
2c624a5e05 android_helper cleanup: remove smoke test and timeout
This was added to help debug cases of stuck tests on bots, but this
doesn't seem to have happened in over a year and the code (and timeout)
keeps getting in the way.

Bug: angleproject:7242
Change-Id: Ic30d976408bd32a745d830921f6e4d98d17e863c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789845
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-21 22:18:38 +00:00
Arthur Eubanks
30c9bd21cc 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>
2023-08-21 21:05:55 +00:00
Mike Schuchardt
8f5a61243e Tests: Add Stumble Guys trace
Test: angle_trace_tests --gtest_filter=TraceTest.stumble_guys

Bug: b/296557360
Change-Id: Iebf81920eaaf8a3b52a3ffed0027aeb01ebed16b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794756
Commit-Queue: Mike Schuchardt <mikes@lunarg.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-21 17:37:41 +00:00
Yuly Novikov
1add0786f4 Don't roll siso into AOSP
Not needed, takes space.

Bug: angleproject:8309
Change-Id: I3ebe501e18280bd59c183330f89e9766c6c21a6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4798289
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
2023-08-21 12:58:02 +00:00
angle-autoroll
e698aee0c3 Roll vulkan-deps from 14d9936ef38c to aa121378c102 (8 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/14d9936ef38c..aa121378c102

Changed dependencies:
* glslang: 3805888a57..c5117b328a
* spirv-tools: b12fc2904a..bfc94f63a7
* vulkan-loader: 4830af39dc..dd8332d253
* vulkan-validation-layers: 948bffe545..d1ff40512a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: syoussefi@google.com
Change-Id: I7da657c7ba7dc30c3cd2e4dff225a1f116046494
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4797175
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-21 11:28:30 +00:00
angle-autoroll
ee0df29eae Roll Chromium from 19b3acaded0d to dd175d86ee90 (646 revisions)
19b3acaded..dd175d86ee

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: e9f9f56b0d..35d9bb8611
* testing: fa612350fe..4ac1a5873d
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..3517008e56
* third_party/depot_tools: 978f43dd52..3aeb682373
* third_party/fuchsia-sdk/sdk: version:14.20230811.1.1..version:14.20230818.1.3
* third_party/libunwind/src: b113f23e4c..d92e619eaa
* third_party/r8: tDdXJHu3mdHCZRM7rVC6e0OajNZJy8FGLqu9ItFtnUwC..crtFbDFNOQ4YZT_MQmz65TmbaQo5-URl1at11okEGTUC
* tools/clang: 74786020a9..86670f0684
No update to Clang.

Bug: angleproject:3686
Tbr: syoussefi@google.com
Change-Id: Ic2f584390ffc436af1ec0ca74ceaaeb662dc5593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4797174
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-21 08:43:29 +00:00
Charlie Lao
3479f4a180 Move more ProgramExecutable basic type vars to mBasicDataTypeStruct
They can be just load/saved along with mBasicDataTypeStruct, no need to
do them separately:

mLinkedShaderVersions was previously only saved if
it is separate program, now it is always saved along with
mBasicDataTypeStruct, since the extra cost of a few more bytes of memcpy
is ignorable, but will make it more consistent.

mActiveUniformBlockBindings was previously updated instead of load, now
it is load (and verified with ASSERT)

mCanDrawWith was previously updated, now chnaged to load.

Bug: b/275102061
Change-Id: I4e15b955606f34966d56b1c5e3d9d2f22ddeb14d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4786308
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-18 23:12:47 +00:00
Roman Lavrov
99e3e65221 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>
2023-08-18 22:51:47 +00:00
Roman Lavrov
0d701c81d0 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>
2023-08-18 22:36:04 +00:00
Mike Schuchardt
be60f87972 Workaround for tex buffer type mismatch
In the event of a mismatch between a texture buffer format (eg GL_R32F)
and the shader sampler type (eg usamplerBuffer), adjust the tex buffer
format to match the sampler (eg GL_R32UI).

Test: angle_end2end_tests \
  --gtest_filter="TextureBufferTestES31.TexBufferFormatMismatch*"

Bug: b/233119699
Change-Id: I3461bcecabfe1d96be6350c43c15b32d35265b23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4769137
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Mike Schuchardt <mikes@lunarg.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-18 22:01:36 +00:00
Charlie Lao
c34f83d9a3 Group all ProgramExecutable basic data type members into a struct
So that we can load/save with a simple memcpy.

Bug: b/275102061
Change-Id: I178404fd72b615174a7a0412ea5482ae2bea2f80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4785567
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-18 21:27:33 +00:00
Amirali Abdolrashidi
cf2c9c5607 Vulkan: Add VMA 3.0 support in ANGLE
* Updated the VMA hash in the dependencies to the 3.0 version.

* Updated ANGLE_VMA_VERSION in the build_override GN file to 3.0.
  * The ANGLE_VMA_VERSION in the root BUILD.gn is unchanged.

* The flags and thresholds for the buddy algorithm are only used when
  the used VMA version is less than 3.0.
  * The general algorithm is used for all cases for VMA 3.0.

Bug: b/295208838
Change-Id: I00a95a2c2513112f8888c40931da4e2e5db97e2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777337
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-08-18 17:53:26 +00:00
angle-autoroll
2768c8c489 Roll VK-GL-CTS from 532cf9c253c0 to c04e157100c1 (17 revisions)
532cf9c253..c04e157100

2023-08-18 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9
into vk-gl-cts/main
2023-08-18 javed@igalia.com Add tests for view mask iteration.
2023-08-18 ziga@lunarg.com Enable missing dynamicRendering feature in
shader object tests
2023-08-18 ziga@lunarg.com Add missing check for shader objects support
in compute tests
2023-08-18 ziga@lunarg.com Fix tessellation evaluation shader nextStage
in shaderObject tests
2023-08-18 ziga@lunarg.com Add missing nextStages bit in shader object
linked test
2023-08-18 ziga@lunarg.com Add tests filling buffer before copying query
pool results
2023-08-18 pdaniell@nvidia.com Fix compile warning about missing return
2023-08-18 jbolz@nvidia.com Query device features/properties for
promoted extensions
2023-08-18 ziga@lunarg.com Optimize tests initialization when using
deqp-case
2023-08-18 rgarcia@igalia.com Disable depth clamp + clip extended
dynamic state tests
2023-08-18 rgarcia@igalia.com Test XFB draws preceded by other indirect
draws
2023-08-18 rgarcia@igalia.com Fix shader object dynamic depth clamp/clip
tests
2023-08-18 rgarcia@igalia.com Remove ESO + shader_fragment_mask illegal
variants
2023-08-18 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-08-17 lorenzo@khronosgroup.org Merge "Merge branch
dev/VK_EXT_dynamic_rendering_unused_attachments to main" into main
2023-08-17 lorenzo@khronosgroup.org Merge "Merge branch
dev/VK_EXT_attachment_feedback_loop_dynamic_state into main" into main

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: geofflang@google.com
Change-Id: Ic61282b050ecb1cebb53800cb21807ede31f7ea4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794729
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-18 17:30:35 +00:00
Mark Lobodzinski
d85de0e9c6 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>
2023-08-18 15:32:27 +00:00
Takuto Ikuta
7ede4232fd infra: switch angle builders to use reclient
Bug: angleproject:8309
Change-Id: I1270611d13e9c8041414b2e00dfd3eec1b616bc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787412
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-18 12:40:41 +00:00
Yuxin Hu
88341a5208 Update deqp_gles31 test expectations files
Skip below test on Pixel 4 vulkan backend only

dEQP-GLES31.functional.atomic_counter.*

Bug: angleproject:5185
Bug: b/224537784
Change-Id: Ibc8e93f2dbe483fa6ef07104d14eaeab9d069ead
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4782155
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-18 11:15:30 +00:00
angle-autoroll
3629eeee8d Roll vulkan-deps from cffce1cd0b9e to 14d9936ef38c (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/cffce1cd0b9e..14d9936ef38c

Changed dependencies:
* glslang: b70669a059..3805888a57
* spirv-cross: 637c211c6f..633dc30135
* vulkan-validation-layers: 32a97f8626..948bffe545

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: geofflang@google.com
Change-Id: I3c5725e4578e397a880ecd20fabc05d572b82139
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793281
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-18 11:05:18 +00:00
angle-autoroll
3058ed4414 Roll Chromium from 6edc18195fd8 to 19b3acaded0d (512 revisions)
6edc18195f..19b3acaded

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 4439c8aa49..e9f9f56b0d
* testing: 5b14522559..fa612350fe
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..2c0142037d
* third_party/depot_tools: 07289ce941..978f43dd52
* third_party/libc++abi/src: 4c1ff08698..6a8358a142
* third_party/r8: _xu0hxSo_cEnMJPA-S-noLhx1IRAhNKER0h_icp-hSYC..tDdXJHu3mdHCZRM7rVC6e0OajNZJy8FGLqu9ItFtnUwC
* tools/android: 83b9ac2821..c6b57c49ce
* tools/mb: 988a4dec39..3748929a3d
No update to Clang.

Bug: None
Tbr: geofflang@google.com
Change-Id: I0acb512574e3f26172ca362e1295a1b620730f19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4792411
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-18 10:00:45 +00:00
Charlie Lao
5217beb287 Reland "Tightly pack LinkedUniform by using int16_t"
This is a reland of commit 152cf62b38

Original change's description:
> Tightly pack LinkedUniform by using int16_t
>
> There is a check of vector size when we link uniforms and the maximum
> vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
> reality, if we exceeds this number, program link will take really long
> time and then hit failure. So there is no real need to keep all the
> variables in 32 bit integer. This CL changes to 16 bit integer. Further,
> sh::BlockMemberInfo and ActiveVariable data members are embeded into
> LinkedUniform struct as well so that the unused variables can be removed
> and data can be tightly packed. This also makes LinkedUniform easier to
> maintain as a simple struct with basic data types. With this change,
> LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
> reduction. Given some apps has 200-ish uniforms, this CL reduces 48
> bytes x 200 = ~9K memory just for uniforms per program (which goes
> through hash compute and decompression and file reads).
>
> Bug: b/275102061
> Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>

Bug: b/275102061
Change-Id: I1cdec9407e930608d3239a104dcbf77c8d8e2113
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791661
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-18 00:04:58 +00:00
Roman Lavrov
d85b29053d Android: improve error message due to missing trace libs
I think this only happens when angle_restricted_traces wasn't set in gn
args, resulting in traces outside of the apk.

Previously we'd get a confusing error about missing gen/tracegz...
files, now we get this:

    I15:55:48.527742Z Syncing harry_potter_hogwarts_mystery trace (1/1)
    Error: missing library: libangle_restricted_traces_harry_potter_hogwarts_mystery.so
    Is angle_restricted_traces set in gn args?

Also removed swallowing errors in _PushLibToAppDir, crashing seems
better than running with out of date files.

Bug: b/294861737
Change-Id: I5696f35a910f6db2310d90e112a83881af3a8f50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781569
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-17 21:02:48 +00:00
Yuly Novikov
78f95b1e6a Add reclient and siso dependencies
Bug: angleproject:8309
Change-Id: I4bac3f500b58b8881131c0f3679813e5adca09bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4683452
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-17 18:32:01 +00:00
Yuxin Hu
d425a6bb7b Update deqp_gles3* test expectations
Restrict below test failure expectation on vulkan backend,
nvidia driver only:
dEQP-GLES3.functional.rasterization.flatshading.*

Add buganizer ticket to track the progress of below test
failure investigation:
dEQP-EGL.functional.color_clears*other
dEQP-EGL.functional.render*other

Bug: angleproject:3430
Bug: b/295394803
Bug: b/224537784
Change-Id: I14c064a55ab81764c7dc7e4bdb894c964bc46858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4782154
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-08-17 18:28:10 +00:00
Charlie Lao
1e1c9d9de8 Pack and reduce Program::mProgramInput size
Right now mProgramInput is std::vector<sh::ShaderVariable>. It really
only need a subset of ShaderVariable struct. This CL adds a ProgramInput
struct so that we can add data members that actually required. This CL
also makes bools into bitfield and some variables to uint16_t to further
compact the size. This CL also groups the data memebers other than
string to basicDataTypeStruct which only contains basic data types and
the entire struct is memcpied during program binary load and save. This
not just reduces number of memcpy calls, but also improves reliability
so that when someone adds a new member into the struct, it will
automatically load/save correctly.

Bug: b/275102061
Change-Id: Ic055c986453ed46e56057a0122c9926245fef4d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776267
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-17 18:27:03 +00:00
Roman Lavrov
124e90af14 Retrace: copy get_min_reqs data over when upgrading
Bug: angleproject:7639
Change-Id: I9a6e3a5ca75d6dcd5b537123948d2498e6bb47f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789844
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-17 18:20:43 +00:00
Roman Lavrov
8e744e9f2a Android: support dEQP in android_helper and add bundle script
Example:
    autoninja -C out/Android angle_deqp_gles31_tests && (cd out/Android; ../../src/tests/run_angle_android_test.py --suite=angle_deqp_gles31_tests --gtest_filter='dEQP-GLES31.functional.image_load_store.3d.*')

For angle_deqp_bundle.py example usage see comments at the top of the
file.

Note: this change is not supposed to have any impact on CI. dEQP tests
are still ran using Chromium's test runner, not android_helper.

Bug: b/293590167
Change-Id: I605102ebea8b135f3239ffac012ce5dc13e84943
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776109
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-17 18:04:51 +00:00
Alexey Knyazev
aa8d60aac0 D3D11: Normalize blend state for MIN/MAX operations
Use default blend factors for MIN/MAX operations to
reduce the number of unique keys and to avoid D3D11
state allocation failures.

Fixed: angleproject:8305
Change-Id: I6abcf93240653de8d7d8e174c1f8109d12de63e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776071
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-17 18:03:06 +00:00
Shahbaz Youssefi
4ba4af6160 Revert recompile blocking on link
Causing timeouts on some platforms.  An alternative implementation will
follow.

This change also reverts two changes that depend on it:

Vulkan: Move SPIR-V set up to link job
10f54902e8.

Vulkan: Move default uniform init to link job
d8cd4dcdc9.

Bug: angleproject:8297
Change-Id: I9a258460e7bcaeac214be5e63c16c20681e0bcde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789843
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-08-17 17:48:40 +00:00
Vivian Pao
9f48f9314e Revert "Tightly pack LinkedUniform by using int16_t"
This reverts commit 152cf62b38.

Reason for revert: Suspect cause of failure in for several Linux MSan Tests, e.g.
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20MSAN/22174/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview

Original change's description:
> Tightly pack LinkedUniform by using int16_t
>
> There is a check of vector size when we link uniforms and the maximum
> vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
> reality, if we exceeds this number, program link will take really long
> time and then hit failure. So there is no real need to keep all the
> variables in 32 bit integer. This CL changes to 16 bit integer. Further,
> sh::BlockMemberInfo and ActiveVariable data members are embeded into
> LinkedUniform struct as well so that the unused variables can be removed
> and data can be tightly packed. This also makes LinkedUniform easier to
> maintain as a simple struct with basic data types. With this change,
> LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
> reduction. Given some apps has 200-ish uniforms, this CL reduces 48
> bytes x 200 = ~9K memory just for uniforms per program (which goes
> through hash compute and decompression and file reads).
>
> Bug: b/275102061
> Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>

Bug: b/275102061
Change-Id: Id344e306307553731097f06edafc40bfeb73ff80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4780494
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-17 15:29:21 +00:00
Roman Lavrov
5d2a1749ce Add an assert that capture_tests isn't supported on Android
Bug: b/286067106
Change-Id: I3657faa7e2733ad28d1db844cb74e5224a6f47c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4790522
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-08-17 15:13:47 +00:00
Takuto Ikuta
3a5d67ce5e infra/config: add reclient property
This CL is no-op but updated config is used in later CL.

Bug: angleproject:8309
Change-Id: I49b6ae34ff9abc4eb30c864c5eac3d816b0a4298
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787411
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-17 15:02:37 +00:00
Takuto Ikuta
065c93dd64 infra/config: remove unused property
This is to reland https://crrev.com/c/4778427.

Bug: None
Change-Id: I01d9ee2e55a649a235a91f9e78698bd5803d5d7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787408
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-08-17 14:58:31 +00:00
Steven Noonan
be7ab4804e gles: disable MSRTT on Windows/NVIDIA
The angle_end2end_tests for MSRTT fail on Windows/NVIDIA/GLES, at least
on driver version 536.99. Let's add Windows NVIDIA to the list of known
bad configurations for disableMultisampledRenderToTexture.

Bug: angleproject:8304
Change-Id: Ic102881bb6d483d5ff2bd0e86a07bf5fe3683fcb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771740
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-17 14:44:53 +00:00
Roman Lavrov
59b0c7d718 Add regression test for VVL AlphaToCoverage bug
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5520

Bug: b/264062978
Change-Id: I0619cb28495c16d0d8d83635ad7a93f0c47cea6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374098
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-17 14:17:20 +00:00
angle-autoroll
a811356480 Roll vulkan-deps from 53e39be12b9e to cffce1cd0b9e (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/53e39be12b9e..cffce1cd0b9e

Changed dependencies:
* spirv-cross: bccaa94db8..637c211c6f
* spirv-headers: 45fc02a6c6..b8b9eb8640
* spirv-tools: 89ca3aa571..b12fc2904a
* vulkan-validation-layers: d966a60f13..32a97f8626

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: geofflang@google.com
Change-Id: I022944441857abccb1796053cfba014d0380f304
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787952
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-17 11:07:33 +00:00
angle-autoroll
a2d0062966 Roll Chromium from 28c4ab8a8264 to 6edc18195fd8 (559 revisions)
28c4ab8a82..6edc18195f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: d7d4a53f82..4439c8aa49
* buildtools: a5ad157866..c4a369c9b6
* testing: 048e8f0b6b..5b14522559
* third_party/abseil-cpp: 1ed18a0632..4ef9b33175
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..8bcfe7164c
* third_party/r8: X4k1imGXgYqjW4oVKyWAHesy7GhZBieTemaelA0yP8kC.._xu0hxSo_cEnMJPA-S-noLhx1IRAhNKER0h_icp-hSYC
* tools/clang: ad91d8af7d..74786020a9
* tools/memory: 2a4c4ba1f4..68be214291
No update to Clang.

Bug: angleproject:3031
Tbr: geofflang@google.com
Change-Id: I4a272f7f157ec43617b9d807ffaa9325b3369567
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4786903
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-17 07:54:01 +00:00
Shahbaz Youssefi
78de02ab52 Warn only once for shader recompile during link
Bug: angleproject:8297
Change-Id: Ia6ac89e4c474ff51c36fcc3506d9178f6a4aedaa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4785947
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-08-16 19:57:40 +00:00
Shahbaz Youssefi
ba41a4d85b Suppress parallel-link tests on Asan/Windows/SwiftShader
They are flaky with no clear reason.

Bug: angleproject:8306
Change-Id: I1331c6d792417edccad6b337e55b3816df2c2f12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4783055
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-16 18:38:57 +00:00
Yuly Novikov
9e056e2073 Delete .gitmodules from ANGLE dependencies when rolling into AOSP
Since git submodules aren't allowed in "external" projects,
and ANGLE is an external project.

Bug: b/40044404
Change-Id: I084530d2de47eb7b10b5d15a399312f2651b6525
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4784289
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
2023-08-16 15:41:30 +00:00
Roman Lavrov
4fffc99383 Gold tests: add temporary logging of angledata hashes
Should allow us to determine whether corruption happens between CAS and
local files on bots or something's wrong with the test harness.

Bug: angleproject:8307
Change-Id: I8a599777a38d7a1b5c56143eb8d02829895175a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777836
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-08-16 13:15:46 +00:00
angle-autoroll
7c83c6952c Roll vulkan-deps from c3ff3250b9e7 to 53e39be12b9e (10 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/c3ff3250b9e7..53e39be12b9e

Changed dependencies:
* glslang: 76b52ebf77..b70669a059
* spirv-tools: 7ddc65c722..89ca3aa571
* vulkan-headers: 450ead13e1..85c2334e92
* vulkan-validation-layers: e6bdb8d714..d966a60f13

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: geofflang@google.com
Change-Id: I5fc145145adfe673ae02545585d00de97adaccb3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781963
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-16 11:56:03 +00:00
angle-autoroll
af16982038 Roll Chromium from 9931a5544b75 to 28c4ab8a8264 (455 revisions)
9931a5544b..28c4ab8a82

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 542e6f274c..d7d4a53f82
* testing: 855bdfca01..048e8f0b6b
* third_party/android_build_tools: 0b15eb31a5..23d868f674
* third_party/android_sdk/public: EWnL2r7oV5GtE9Ef7GyohyFam42wtMtEKYU4dCb3U1YC..Sy00LuyBIUJdRGYKwg0zjWH8eAIUvgnnNiPkI8etaZYC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..8474745739
* third_party/r8: 8aJvD7uHZ0Ek4sQy5vAbHUXWujgCHOVsAsJ137sXslkC..X4k1imGXgYqjW4oVKyWAHesy7GhZBieTemaelA0yP8kC
* tools/android: 159cd0f22c..83b9ac2821
* tools/perf: b59055f932..ffa3bdd3ba
No update to Clang.

Bug: None
Tbr: geofflang@google.com
Change-Id: I618ba62d84e32aa93cf54f5afb702e690a227c01
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4782500
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-16 08:36:52 +00:00
Charlie Lao
152cf62b38 Tightly pack LinkedUniform by using int16_t
There is a check of vector size when we link uniforms and the maximum
vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
reality, if we exceeds this number, program link will take really long
time and then hit failure. So there is no real need to keep all the
variables in 32 bit integer. This CL changes to 16 bit integer. Further,
sh::BlockMemberInfo and ActiveVariable data members are embeded into
LinkedUniform struct as well so that the unused variables can be removed
and data can be tightly packed. This also makes LinkedUniform easier to
maintain as a simple struct with basic data types. With this change,
LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
reduction. Given some apps has 200-ish uniforms, this CL reduces 48
bytes x 200 = ~9K memory just for uniforms per program (which goes
through hash compute and decompression and file reads).

Bug: b/275102061
Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-15 23:15:08 +00:00
Alexey Knyazev
59f158c169 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>
2023-08-15 20:00:35 +00:00
Shahbaz Youssefi
29aae8ac96 Vulkan: Don't access the XFB object during link
The descriptor set layout set up for XFB emulation lived in
TransfromFeedbackVk, but did not access anything in that object at all.
More importantly, it doesn't make any sense to look at the current XFB
object when linking a program.

Bug: angleproject:8297
Change-Id: I8bd0e747b7d3e3783ef053f20378cc42d2c1d997
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774786
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-15 18:36:21 +00:00
Shahbaz Youssefi
10f54902e8 Vulkan: Move SPIR-V set up to link job
Bug: angleproject:8297
Change-Id: I2c7eb0281d181560c8fa3ace007b1e547b6cf18e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764619
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-15 18:00:32 +00:00
Shahbaz Youssefi
d8cd4dcdc9 Vulkan: Move default uniform init to link job
Bug: angleproject:8297
Change-Id: I5bab916f452439d92afa65b9172574000ee0b587
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762838
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-15 16:32:44 +00:00
Cody Northrop
f4e5c327d7 Tests: Upgrade blade_and_soul_revolution
Created with:

    export TRACE_GN_PATH=out/Debug
    export TRACE_NAME=blade_and_soul_revolution
    src/tests/restricted_traces/retrace_restricted_traces.py \
    upgrade $TRACE_GN_PATH retrace-wip -f $TRACE_NAME

Bug: b/291929395
Bug: b/294882956
Change-Id: I7b1e721c5a125fa695fffa6c83dd0418d5331d91
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4760425
Reviewed-by: Roman Lavrov <romanl@google.com>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-08-15 16:02:44 +00:00
Roman Lavrov
2fd33fc443 Android: Make .gz sync faster by only checking last bytes
In particular, some angledata.gz are hundreds of megabytes, which
results in multiple seconds spend on some traces which adds up to a few
minutes when running all traces.

Gzip format includes an 8-byte trailer with the CRC-32 and the length of
the uncompressed data
https://en.wikipedia.org/wiki/Gzip#File_format

Instead of checking hash(file) check hash(tail(file)). Check more than
just 8 bytes (arbitrarily picked 4096) so that in a rare event of a
collision we're still likely to see different bytes as compressed
streams tend to diverge when data changes.

This reduces the already-fully-synced sync from ~130s to ~60s
in my tests.

Bug: b/276742336
Change-Id: I899b80ac90ef4def498c8cb52d6b096d8b1ef826
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4691962
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-08-15 15:45:36 +00:00
Shahbaz Youssefi
d7d78adb2a Infra: Use more shards for SwANGLE/end2end tests on TSAN
Bug: angleproject:8297
Change-Id: I11e70e7af63abf8c1ed37dcb2812091d09cf5434
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4780391
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-15 15:16:26 +00:00
Shahbaz Youssefi
424f43e40e Prevent shaders from recompiling while a link job is in progress
This will prevent a guarantee that link jobs can take further advantage
of.  In particular, a good chunk of the link job is done serially and
under the share group lock due to this recompile-while-link issue.
After this change, that is no longer a problem, and most of the link can
be made lockless/parallelized.

Bug: angleproject:8297
Change-Id: Ic41ac62fb8c40131a69cd90fa9430584964677fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776338
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-15 15:04:36 +00:00
angle-autoroll
f9e3f67430 Roll Chromium from 2f1df67285b4 to 9931a5544b75 (548 revisions)
2f1df67285..9931a5544b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 193968ce60..542e6f274c
* testing: 99ae5bc69e..855bdfca01
* third_party/android_build_tools/lint: 5j8XlyT5HF4gyZX-d8aNswCh8iPuGAMVy9epEQVVK8YC..qaZOeTY-k9wAZ1vkdqCZIbppqQFgc4IM5T5dKj3_2xIC
* third_party/android_build_tools/manifest_merger: d1tFnzOW6H5xoDN7WWsMuAiHuhkl0kXijQGiO7IU1VQC..Nc9kYyTsw69N7yKSw_Sc2fJtUJ2zXUhSGjXbIkDVXuIC
* third_party/android_deps: 9dc45ac9ce..26fdb68fe1
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..6479b92b37
* third_party/libc++abi/src: 3cede154a6..4c1ff08698
* third_party/r8: PyEDdX7GOndyKvm6rRXizmsJg9u1b8He2JqMNPO3F-UC..8aJvD7uHZ0Ek4sQy5vAbHUXWujgCHOVsAsJ137sXslkC
* third_party/turbine: HFp7iOu-n4-CdEasFTQZvD1Vg1L-q1URqRTOM-iZ2AMC..ZlMS4BOYyYmbU8BuBDGyW7QrkvZ_-pTkm4lH4jKjTi4C
* tools/clang: 65ceb79efb..ad91d8af7d
Clang version changed llvmorg-18-init-1174-g2532b68f:llvmorg-17-init-16420-g0c545a44
Details: 65ceb79efb..ad91d8af7d/scripts/update.py

Bug: angleproject:3031
Tbr: geofflang@google.com
Change-Id: I5fe139258920b10366bce56e4f01f50a23b24a26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4780179
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-15 15:03:38 +00:00
Charlie Lao
61a5707f86 Load/Save ShaderVariableBuffer::memberIndexes in one memcpy
ShaderVariableBuffer::memberIndexes is std::vector<unsigned int>, and
can be quite huge (164 on some programs in blade_and_soul_revolution).
Right now it is calling readInt for individual index and then push_back.
This causes vector to be copied as it grows size. This CL makes one
memcpy for entire vector and increase size only once.

Bug: b/275102061
Change-Id: I983ad289b126dbfd430cf94a3772c2bfd93cb1c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4775835
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-15 00:09:05 +00:00
Charlie Lao
745023ef84 Vulkan: Ensure mComputeDirtyBits is set for potential submission.
When ContextVk::flushOutsideRenderPassCommands is called and we run out
of serial numbers reserved for outsideRPCommands (which means we have an
already started renderpass)., we will call flushCommandsAndEndRenderPass
so that we can have new queue serials for both renderPass and outsideRP
commands. When this happens, the current bug is that we will not add
mNewComputeCommandBufferDirtyBits to mComputeDirtyBits. If another
thread comes in did the submission, and then this context calls
dispatchCompute again without any state change, we will get a new
primprary command buffer without dirty bits for the new command buffer.
This CL ensures we always add mNewComputeCommandBufferDirtyBits
immediately after mRenderer->flushOutsideRPCommands call.

Bug: b/295533354
Change-Id: I1c672310b3b00cd9be25b5ee55a0a060239102a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4778445
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-14 20:07:19 +00:00
Cody Northrop
1db320c8af Docs: Update steps for using experimental CIPD
Bug: b/294882956
Change-Id: I2bcdd1874cbf44fac939d43cebd19b3e8903927b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763611
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-08-14 18:55:18 +00:00
Cody Northrop
9d7bddc1e0 Trace Replay: Allow screenshots of all frames
As part of upgrading our traces to the latest format, we want
to ensure we get the same rendering results for all frames,
including after Reset.

To do this, add the ability to pass -1 as the frame to save:

angle_trace_tests --gtest_filter=TraceTest.blade_and_soul_revolution \
--use-angle=swiftshader --max-steps-performed 200 \
--screenshot-dir retrace-wip --screenshot-frame -1

In the above solution, there are 100 frames in the trace, but
we'll get 200 screenshots (two loops).

Bug: b/294882956
Change-Id: I9169403fe716bbe3ea9ba66ce36dfd5a0c58937b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4760424
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-14 18:41:27 +00:00
Kenneth Russell
d48a0d5913 Metal: optimize emulated texture formats.
Optimize the following aspects of emulated texture formats like
luminance, luminance-alpha and RGB:

1) Redundantly clearing the emulated channels in the texture, for
example the alpha channel in RGB textures. If TexImage2D redefines the
texture and it hasn't changed format, for example, it's not necessary
to re-fill the emulated channels.

2) Clearing the emulated channels was being done on the CPU. Refactor
PreferStagedTextureUploads to allow InitializeTextureContents to take
the GPU clearing path for emulated textures assuming the texture is
renderable.

3) Row-by-row data repacking and upload was allocating a staging
buffer for each row. Forcibly disable staging buffers on the
row-by-row code paths.

Zoom's web client performs well on ANGLE's Metal backend on Intel GPUs
with these optimizations.

Fixed: chromium:1472087
Change-Id: Ie8b1e9e64fcc82797de76dd07958dd0a5aaa0203
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771988
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-14 17:32:57 +00:00
angle-autoroll
b264301d01 Roll vulkan-deps from ce76478186bc to c3ff3250b9e7 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/ce76478186bc..c3ff3250b9e7

Changed dependencies:
* spirv-tools: d6300ee92b..7ddc65c722
* vulkan-tools: 1d8188a974..300d9bf6b3
* vulkan-validation-layers: 8a3b98964a..e6bdb8d714

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: geofflang@google.com
Change-Id: I0a55f330e07c15f5d1cfc8ec1035852118ab186d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777541
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-14 10:51:58 +00:00
angle-autoroll
8b1583b0fb Roll Chromium from 99516e709be0 to 2f1df67285b4 (555 revisions)
99516e709b..2f1df67285

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,geofflang@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 4fb90f22dd..193968ce60
* buildtools: a9a6f0c49d..a5ad157866
* testing: d2f7d2908c..99ae5bc69e
* third_party/abseil-cpp: 583dc6d1b3..1ed18a0632
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..91aa9652fe
* third_party/fuchsia-sdk/sdk: version:14.20230804.1.1..version:14.20230811.1.1
* third_party/libc++abi/src: cc2a32ba83..3cede154a6
* third_party/r8: c5gwBJlApOcrNvnktaZlEXQ168Ig5dECf1tJyt5fcjwC..PyEDdX7GOndyKvm6rRXizmsJg9u1b8He2JqMNPO3F-UC
* third_party/zlib: 526382e41c..f5fd0ad266
* tools/android: e309c7523b..159cd0f22c
* tools/perf: 368a50222b..b59055f932
No update to Clang.

Bug: None
Tbr: geofflang@google.com
Change-Id: I99e64ba5281648cac3487ae249dae9c0ef47a7b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777540
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-14 10:02:39 +00:00
Amirali Abdolrashidi
f11c972b52 Update requiredFlags use for VMA image allocations
For the OOM fallbacks, we currently remove bits from the required
bits when device memory allocation is no longer possible. In doing so,
allocating on the device has become a strong preference rather than a
requirement. Therefore, we change this method a bit in this CL.

* Removed the device-local bit from the required flags when calling
  allocateAndBindMemory().

* preferredFlags is now used in lieu of requiredFlags initially within
  allocateAndBindMemory() to signal to the VMA to prioritize allocating
  on the device. If it fails, we use requiredFlags for the fallback.

Bug: b/280304441
Change-Id: Id47a224cd74dacd3fb12d4fbfd815d8cefc016c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753758
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-12 02:38:51 +00:00
Shahbaz Youssefi
16cfa28e11 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>
2023-08-12 02:04:06 +00:00
Steven Noonan
394699d3cc tests: skip SwiftShader tests when building without SwiftShader
If we are building without SwiftShader, we shouldn't be forced to add
a gtest_filter of "-*SwiftShader*" in order to run the various tests.

Bug: angleproject:8291
Change-Id: Ic3513445d5d4bb402535a6f41bba818c0d15fd7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4769826
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
2023-08-11 22:49:32 +00:00
Kenneth Russell
237ff2b71b Fix assertion failure with EGL_FOREVER_KHR.
Calling eglClientWaitSync passing EGL_FOREVER_KHR overflows
std::chrono and causes an assertion failure. This prevents
optimization of Chromium's backpressure fences. Clamp the internal
wait value to 1 day.

Bug: angleproject:8301
Change-Id: Idfc400351204dee648723a8d951ade7e56c25cb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776162
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
2023-08-11 22:44:22 +00:00
Alexey Knyazev
6092e0b75c D3D11: Ensure that clip depth mode is synced
Syncing clip depth mode driver uniform
should not depend on a viewport state.

Bug: angleproject:6554
Change-Id: I6ff2549a88fe3795eef20acfc48d0e945f19c4e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4775599
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-11 21:32:37 +00:00
angle-autoroll
987f0dfd64 Roll VK-GL-CTS from cedd20620c84 to 532cf9c253c0 (14 revisions)
cedd20620c..532cf9c253

2023-08-11 Tyler.Schneider@amd.com Callable shader test cases:
dEQP-VK.ray_tracing_pipeline.callable_shader.callable_shader*
2023-08-11 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9
into vk-gl-cts/main
2023-08-11 jbolz@nvidia.com Reenable copy_commands2 tests for VulkanSC
2023-08-11 ziga@lunarg.com Fix enabling sample shading in multisample
tests
2023-08-11 ziga@lunarg.com Fix VertexInputStateCreateInfo scope in
extended dynamic state tests
2023-08-11 ivan.briano@intel.com Add missing check for
VK_EXT_shader_object
2023-08-11 ziga@lunarg.com Fix including host query reset features
struct
2023-08-11 ziga@lunarg.com Fix primitives generated query tests with
secondary cmd buffers
2023-08-11 Tyler.Schneider@amd.com Added indirect trace version of
builtin test cases: dEQP-VK.ray_tracing_pipeline.builtin.indirect.*
2023-08-11 rgarcia@igalia.com Test GPL with pipeline robustness
2023-08-11 rgarcia@igalia.com Fix triangle strip with adjacency PGQ
tests
2023-08-11 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-08-08 lorenzo@khronosgroup.org Run vk-build-programs tests in
chunks
2023-08-07 rgarcia@igalia.com Fix build: DeviceDriver needs the API
version now as a 4th parameter

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com
Change-Id: I8f319cd13bb9d1ce2e2e74616014fed76dafbe25
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4775825
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-11 20:00:37 +00:00
Shahbaz Youssefi
4a195ce0ff Vulkan: Fix SPIR-V id assignment to user-defined webgl_* names
The code was incorrectly assuming that webgl_* names are only from ANGLE
variables.  An explicit check that the symbols are AngleInternal was
missing.

Bug: b/287166117
Change-Id: Ib8140cfabd74000492d12c11163f318a9ec3b98f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4770236
Commit-Queue: Solti Ho <solti@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Solti Ho <solti@google.com>
2023-08-11 14:58:54 +00:00
angle-autoroll
dfa065cf6e Roll SwiftShader from c315c894b9d5 to 97bdc453fbed (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c315c894b9d5..97bdc453fbed

2023-08-10 schuffelen@google.com ANDROID: strip `vulkan.pastel.so` on
the host

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: If4ac93aa60ec8cb26f86527b4cd30c3c4470358e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4772845
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-11 12:06:22 +00:00
angle-autoroll
af1541418c Roll vulkan-deps from 59b294f2797c to ce76478186bc (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/59b294f2797c..ce76478186bc

Changed dependencies:
* spirv-headers: 124a9665e4..45fc02a6c6
* spirv-tools: 3af4244ae1..d6300ee92b
* vulkan-validation-layers: a7c612e9cd..8a3b98964a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com
Change-Id: I7fa5ce1e1d134523caf420a04547263473763481
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771989
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-11 11:50:44 +00:00
angle-autoroll
7b1777e6a0 Roll Chromium from 653db97a807b to 99516e709be0 (339 revisions)
653db97a80..99516e709b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* testing: c95f0abc34..d2f7d2908c
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..598916632c
* tools/luci-go: git_revision:e608c1f557fceae8eb6cf35ae2ad6f4908e35245..git_revision:77c9b09de8f234ae9c47d9d865a5d860ff390ed0
* tools/luci-go: git_revision:e608c1f557fceae8eb6cf35ae2ad6f4908e35245..git_revision:77c9b09de8f234ae9c47d9d865a5d860ff390ed0
* tools/perf: f57cec9442..368a50222b
* tools/skia_goldctl/linux: yiBOCk-vzyyWi8kF1hfi8_yZoQb5Y5nUrgH-gKy3s_4C..UFlmhX6-Qb8IgDGznrPTinozgZ41Ul69CJEw_37d5Q0C
* tools/skia_goldctl/mac_amd64: IOfj5k7LF0hVZeJ-_iTpGovRg26fblRBMk0wLT1GJnAC..UjktW10Ah81eMdqbYaUevQNFJozJWoGy33MmF1BdM18C
* tools/skia_goldctl/mac_arm64: nAEU10uINeZnsOib3LZlcLZgRr3I8YETFJqTpMpw3ukC..obLm-ouXMf1S3hnZaO-yUAG5CoeW2qzVWy2fhz3WXWIC
* tools/skia_goldctl/win: pGeqtL9kCYQirdV-A7YpDFltq8_TFh64j6MuVoc7YswC..jMrnfAAYCvmmOPZpirRZ6xWBdRaWW7g85mdjTFvq_HsC
No update to Clang.

Bug: None
Tbr: jonahr@google.com
Change-Id: Ie8e2f88c75cdfa799cd95896fb41a7365812460a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771753
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-11 07:56:35 +00:00
Andrew Grieve
d52046c499 Remove CPEPrefix for //third_party/jdk
We don't run downloaded code, and we use it only for tools (not at
runtime), so we don't care about vulnerabilities.

Bug: b/244859623
Change-Id: Ib8edc10cafe388daf6ae29f3da0036065d39d4ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3877043
Commit-Queue: Sam Maier <smaier@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1043933}
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743602
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-10 22:26:06 +00:00
angle-autoroll
0f4317d01c Manual roll vulkan-deps from ed9dadbd89cd to 59b294f2797c (89 revisions)
Manual roll requested by ynovikov@google.com

https://chromium.googlesource.com/vulkan-deps.git/+log/ed9dadbd89cd..59b294f2797c

Changed dependencies:
* glslang: 4420f9b33b..76b52ebf77
* spirv-headers: 51b1064617..124a9665e4
* spirv-tools: c6d0b04802..3af4244ae1
* vulkan-headers: cb7b123f2d..450ead13e1
* vulkan-loader: fc8116bb5c..4830af39dc
* vulkan-tools: ab9d7a042d..1d8188a974
* vulkan-validation-layers: 907292fe35..a7c612e9cd

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com,ynovikov@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com,ynovikov@google.com
Change-Id: Ib64cf5733cf7b30611be15b0506f22f1ea5de32d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771261
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-10 21:13:49 +00:00
Steven Noonan
ffe81dd3cd 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>
2023-08-10 20:02:35 +00:00
Steven Noonan
833f7f69c8 Vulkan: improve XFB feature dependency checks
Some features need to account for the possible override of
supportsTransformFeedbackExtension == false.

Since we now frontload the overrides, we also can remove the explicit
overrides for the dependent features in TransformFeedbackTest.

Bug: angleproject:8291
Change-Id: I0ec54dc0fce440ef3e7bfe9987d0ea19fb9dafaa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763096
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-10 18:59:42 +00:00
angle-autoroll
32bcf96fb4 Manual roll Chromium from ea8b2b6926bc to 653db97a807b (714 revisions)
Manual roll requested by ynovikov@google.com

ea8b2b6926..653db97a80

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com,ynovikov@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 00a84048e0..4fb90f22dd
* buildtools/linux64: git_revision:811d332bd90551342c5cbd39e133aa276022d7f8..git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4
* buildtools/mac: git_revision:811d332bd90551342c5cbd39e133aa276022d7f8..git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4
* buildtools/win: git_revision:811d332bd90551342c5cbd39e133aa276022d7f8..git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4
* testing: 8c8e5eefdb..c95f0abc34
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..0b39a694c0
* third_party/r8: dbml4pnGIsEBy3dFYki-S8IYt4jxxqZXaUDwtY3Q-SgC..c5gwBJlApOcrNvnktaZlEXQ168Ig5dECf1tJyt5fcjwC
* tools/clang: b3308b00fe..65ceb79efb
* tools/perf: 6c7511171d..f57cec9442
Clang version changed llvmorg-17-init-16420-g0c545a44:llvmorg-18-init-1174-g2532b68f
Details: b3308b00fe..65ceb79efb/scripts/update.py

Bug: None
Tbr: jonahr@google.com,ynovikov@google.com
Change-Id: Ic005c1b5b424d8f9f85ae739ca23719369ffe80b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4769816
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-10 18:30:19 +00:00
Steven Noonan
f395f34bc0 features: frontload feature overrides
This allows us to have features that depend on the state of other
features more reliably.

For example, let's say you have two features:

    ANGLE_FEATURE_CONDITION(&mFeatures, allowX, (benefitsFromX || isSpecificHardware) && !isBadHardware);
    ANGLE_FEATURE_CONDITION(&mFeatures, supportsX, hardware.featureXSupported && mFeatures.allowX.enabled);

Before this change, if you overrode allowX, the override would be
applied too late for the supportsX test.

This also helps with disabling dependent features via overrides. For
example, if you disable "supportsRenderpass2", it will also disable
features depending on it, such as "supportsDepthStencilResolve" and
"supportsFragmentShadingRate".

By frontloading the feature overrides, we can have cross-dependencies
between "feature supported on this platform" and "allow this feature by
policy".

Bug: angleproject:8291
Change-Id: Id6da2c89428fa896d677fe8d5a41369277a21b31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749524
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-10 18:26:50 +00:00
Charlie Lao
7c69116fbb Vulkan: Fix data race with DynamicDescriptorPool
Right now DynamicDescriptorPool::destroyCachedDescriptorSet can be
called from garbage clean up thread, while simultaneously accessed from
context main thread, and data race will happen and cause bugs. This can
only happen when the buffer is not being suballocated. In this case,
suballocation owns the bufferBlock and bufferBlock gets destroyed when
suballocation is destroyed from garbage collection thread. If buffer is
suballocated, the shared group owns pool which owns bufferBlocks and
they gets destroyed from shared group with the share group lock. This CL
avoids this race problem by release the shared cacheKey when the buffer
is released, while we still had the shared group lock.

Bug: chromium:1469542
Change-Id: Ic1f99e6b6083d63e4efb9c3f408921da62c006ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4761365
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-10 17:04:32 +00:00
Geoff Lang
ae8a5cfd91 GL: Accept more config options when creating the EGL context
Some drivers fail to find any configs in ANGLE but succeed with
Chrome's config searching. Widen ANGLE's config searching to include
565 configs and configs without depth stencil.

Refactor the config search logic to be used for both backend
context and mock pbuffers instead of hard-coded pbuffer config.

Bug: chromium:1442132
Change-Id: I52378ec66542ec7aa56849ec8470f8eadb4abf58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764230
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
2023-08-10 15:22:40 +00:00
angle-autoroll
d7e914da5f Roll SwiftShader from 729e92f8ae07 to c315c894b9d5 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/729e92f8ae07..c315c894b9d5

2023-08-09 aredulla@google.com [ssci] Added Shipped field to
README.chromium

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I96a6b22fd31f5f62306bbae800e51837ec4d71be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4769500
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-10 10:55:42 +00:00
Yuxin Hu
a990ba3484 Fix write out of bounds on non robust contexts crashes
dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.*
tests are failing, because the test expectes EGL_SUCCESS
upon eglMakeCurrent(EGL_NO_CONTEXT), regardless of whether
the context was lost.

This CL:
1) Changes the validation function of eglMakeCurrent:
if the EGLContext passed to eglMakeCurrent
is EGL_NO_CONTEXT, do not return EGL_CONTEXT_LOST even if
the context is already lost.

2) Adds a lost context check in checkOneCommandBatch.
If the context is lost, do not check fence status and
assume all of the vulkan commands have finished execution,
so that we can properly destroying all
the resources before destroying the context.

3) Changes the GL error code from GL_INVALID_OPERATION
to GL_CONTEXT_LOST when there is a vulkan device lost.

Bug: b/286921997
Bug: b/289544394
Change-Id: I91e8a4105f0d7a3ec3b59bae58da80bc64ffa94a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728466
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-09 23:59:37 +00:00
Steven Noonan
fa3ecccba7 Vulkan: make fragment shading rate depend on renderpass2
The extension depends on renderpass2 and will raise a VVL failure if
it's not available and enabled.

Note that this doesn't yet work as intended if you only override
supportsRenderpass2=false. A subsequent commit will fix this.

Bug: angleproject:8291
Change-Id: I6843b342909fb9000ebdcea80e006670c865f858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763095
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-09 19:39:01 +00:00
angle-autoroll
32aecfcce7 Manual roll Chromium from e37ae34e9fdf to ea8b2b6926bc (381 revisions)
Manual roll requested by ynovikov@google.com

e37ae34e9f..ea8b2b6926

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com,ynovikov@google.com on
the revert to ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: a5321f10c9..00a84048e0
* testing: 9ae730e481..8c8e5eefdb
* third_party/android_build_tools: 02f9cdf1a9..0b15eb31a5
* third_party/android_build_tools/bundletool: 2PJKytTLILAjCO3G7sCO27FO48XB9qrRTHp420zr5G0C..2RPwohwtc6on0_96oFxokeEvnC1LbLrGuyCAw00k62AC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..dd218dfd81
* third_party/depot_tools: 2f873f7c22..07289ce941
* tools/clang: 078c92947e..b3308b00fe
No update to Clang.

Bug: None
Tbr: jonahr@google.com,ynovikov@google.com
Change-Id: Ic46d2b35b71d6eb8e8c437220f3275cd59d700b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4765261
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-09 19:28:59 +00:00
Yuly Novikov
370e9ca024 Add experimental Mac NVIDIA bot specs
Bug: chromium:1456549
Change-Id: Ia7565bf6de02e36ee82affec64f27ee591a6cce7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4765134
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-09 18:11:56 +00:00
Shahbaz Youssefi
df76f5b167 Respect KHR_parallel_shader_compile for program link
Parellel shader compilation was using the single-threaded vs
multi-threaded pool appropriately, while program link was always being
multi-threaded.

This change makes sure the program link tasks uses the same pool as
shader compilation per KHR_parallel_shader_compile.

Bug: angleproject:8297
Change-Id: I0508617678a6e875fc0719a2d447cf1a9c5ca40f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762086
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-09 16:13:51 +00:00
Geoff Lang
164ac246b1 zero-initialize all memory in LinkedUniform.
LinkedUniform is serialized directly, ensure that any padding inserted
into the struct is zero so there is no chance of uninitialized reads
during serialization.

Bug: b/275102061
Bug: chromium:1470644
Change-Id: If6b9f579938019c7e16fb306ed3b7d839953f6d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762085
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-09 15:50:47 +00:00
Kimmo Kinnunen
2d87c31da6 Revert "Metal: initialize std::arrays in mtl_render_utils"
This reverts commit c40d31b026.

Reason for revert: Invalid rationale, it does not solve the
problem. std::array does run the default constructors
of the AutoObjCPtrs held in them.

Original change's description:
> Metal: initialize std::arrays in mtl_render_utils
>
> The std::array default constructor does not initialize the memory.
> This leads to uninitialized access in mtl_render_utils *Utils.
>
> Fix by initializing them.
>
> Bug: angleproject:8293
> Change-Id: I597df067f3c19907a038bb4899a178734158302c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

Bug: angleproject:8293
Change-Id: Ibacacd70fc196b5ecb3d0bc971d6565f7f578d4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4765207
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-08-09 14:54:49 +00:00
Josip Sokcevic
c5949fe0ee Remove dummy chromium from git submodules
dummy_chromium is used by autoroller to remember previously sync state
and to sync all chromium dependencies with angle dependencies.

If angle repository has this gitlink, it will result in recursive
submodule loop (chromium -> angle -> chromium) unless git understands
gclient-condition.  We should redesign how autoroller works by storing
chromium information somewhere else.

In the meantime, this patch will give us more time to design a long term
solution. Note: Presubmit checks only check if gitlink commits are
present in DEPS file, and not if all git depepdencies have gitlinks.

Bug: chromium:1471230
Change-Id: I8638c9863517dd90b0248d9e9bc9664c66041e70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762704
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-08-09 12:10:26 +00:00
Yuly Novikov
3ad8d9127a Roll chromium_revision 2140415f50..e37ae34e9f (1179456:1181024)
Rename third_party/android_toolchain to third_party/android_toolchain/ndk
due to
https://chromium-review.googlesource.com/c/chromium/src/+/4728129

Change log: 2140415f50..e37ae34e9f
Full diff: 2140415f50..e37ae34e9f

Changed dependencies
* build: 7dd254d602..a5321f10c9
* buildtools: 79ab87fa54..a9a6f0c49d
* testing: 7a3b32e55f..9ae730e481
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..d7f301be80
* third_party/depot_tools: fc36eba70b..2f873f7c22
* third_party/fuchsia-sdk/sdk: version:14.20230727.2.1..version:14.20230804.1.1
* third_party/libc++abi/src: d4760c0af9..cc2a32ba83
* third_party/libunwind/src: e5a9c50e5e..b113f23e4c
* third_party/r8: OdhGaLChEyG23to4T8_V2aMCAZi970T4B4t8ih0tNGsC..dbml4pnGIsEBy3dFYki-S8IYt4jxxqZXaUDwtY3Q-SgC
* third_party/turbine: njzYdPKg07o6bisJmD2GAMXIi0p3KPbBy93bLGnp2TYC..HFp7iOu-n4-CdEasFTQZvD1Vg1L-q1URqRTOM-iZ2AMC
* tools/android: 7cd5bbdfe4..e309c7523b
* tools/clang: 02d5529a3f..078c92947e
* tools/mb: bee2ccad89..988a4dec39
DEPS diff: 2140415f50..e37ae34e9f/DEPS

No update to Clang.

Bug: chromium:1469911
Change-Id: I5ac8510d880a092e838c4fa797dd3748976d358c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4760727
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-08 21:04:55 +00:00
Charlie Lao
719165c8eb Remove "const UniformTypeInfo *typeInfo" from struct LinkedUniform
This is a cached pointer to the const kInfoTable. There isn't much of
performance benefit to cache here compare to directly retrieve from the
table. This cached pointer is removed in this CL, which means we do not
need to update the pointer in the ProgramExecutable::load().

This and a few earlier CLs that attempt to do memcpy for entire
mUniforms reduced average frame time of blade_and_soul_revolution app
trace 3%, from 4.3359 ms to 4.2066ms on pixel 7 pro.

Bug: b/275102061
Change-Id: I6fd34d665234e3a5cc85344924049bf5b13aaa80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753933
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-08 17:20:00 +00:00
Kimmo Kinnunen
c40d31b026 Metal: initialize std::arrays in mtl_render_utils
The std::array default constructor does not initialize the memory.
This leads to uninitialized access in mtl_render_utils *Utils.

Fix by initializing them.

Bug: angleproject:8293
Change-Id: I597df067f3c19907a038bb4899a178734158302c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-08 15:47:13 +00:00
Phan Quang Minh
d1e26fa224 gpu_info_util: Close X11 display after usage
This ensures that the X11 display connection won't leak if
GetNvidiaDriverVersionWithXNVCtrl gets called multiple times.

Bug: angleproject:8294
Change-Id: Id9fe8e6b6d5524965c1638841af88416fe28c76a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749333
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-08 14:02:22 +00:00
Kenneth Russell
f7d7be8d2f Metal: upstream "UBO convert only whole block".
Authored by Dan Glastonbury; reviewed by Dean Jackson.

This upstreams https://commits.webkit.org/264375@main .

OpenGL doesn't guarantee that the buffer backing uniform blocks needs
to be a multiple of the block size. When converting OpenGL layout
blocks to Metal layout, ConvertUniformBufferData is rounding up the
size of the backing buffer to a multiple of the block size which leads
to reading out of bounds.

To ensure we don't read outside the source buffer, this change
replaces calls to `memcpy` with `memcpy_guarded` which accepts a
pointer to the limit of available data and copies as much data as is
available, writing zeroes for any unavailable amount.

Conversion of bools didn't use memcpy, so the raw pointer is checked
against maxSrcPtr and only dereferenced if valid, otherwise zero is
used.

This has been tested with ASan and UBSan enabled against the OpenGL
dEQP tests for Uniform Buffer Objects in ANGLE.

Fixed: angleproject:8292
Change-Id: I0d472277889f073e54a9049f01bc04f6965a7b68
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754175
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2023-08-07 23:06:30 +00:00
Mohan Maiya
e50d3876ee Vulkan: Retain loadOp when there is a resolve attachment
Rendertargets with resolve attachments cannot optimize away loadOp
Load or Clear even if they are marked ResourceAccess::Unused and
storeOp is RenderPassStoreOp::DontCare.

Bug: angleproject:4836
Bug: angleproject:5981
Tests: ImageTest.SourceAHBTarget2DMSRTTInteraction*
Change-Id: I39ec67a457de6876ed0bd47d66a963cc59fab064
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753735
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-07 22:22:14 +00:00
Charlie Lao
d1117834a0 Simplify struct LinkedUniform a bit more
In earlier CL crrev.com/c/4740298, we added mFixedSizedData structure to
group the data memebrs that can be memcpy-able into one variable, so
that we can memcpy that. Since then, we have made entire LinkedUniform
struct memcpy-able (crrev.com/c/4750443 is doing memcpy of entire
std::vector<LinkedUniform>). Thus, there is no longer a need for
mFixedSizedData. This CL removes that.

This CL also removes isStruct and inArrayOfArrays from LinkedUniform,
since they are always false.

This CL also removes some unused APIs from LinkedUniform.

Bug: b/275102061
Change-Id: I6ead3d8f179efc0d383352f7ac0efa6bf3dc8a1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753932
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-07 21:55:41 +00:00
Charlie Lao
41d27ec39a load/save entire std::vector<LinkedUniform> with one call.
Now LinkedUniform is a simple data struct with only fundamental types,
we can load the entire vector at once.

Bug: b/275102061
Change-Id: I7c030677d02517f86d960de85b0e7ae2c916a26e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750443
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-07 20:52:00 +00:00
Charlie Lao
eff12c1e8d Move name and mappedName out of LinkedUniform struct
These are std::string objects. This CL moves these two data out of
LinkedUniform and into ProgramExecutable class, side by side with
mUniforms. With these two data moved out, LinkedUniform is now a simple
struct with basic data types, and I can memcpy entire vector of
uniforms.

Bug: b/275102061
Change-Id: I9ae13e7daca85f8e5f3662a4718f190bebb5f5d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750442
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-07 19:39:46 +00:00
Joanna Wang
3dbfa31479 Add Gitmodules to angle.
Commits in the gitlinks should be kept in sync with commits in DEPS.
For repos that are auto-rolled by skia, this is taken care of.
If you have your own autoroll script and it uses `gclient setdep`
to update deps commits, this is also taken care of.

For manual rolls:
1) in DEPS update the commit of some <path> to <new_commit>
2) update the gitlink:
    `git update-index --add --cacheinfo 160000,<new_commit>,<path>`

Bug: chromium:1421776
Change-Id: I70d02969b198ea6ae94d042c4ffab31b70eb88fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752314
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2023-08-07 19:32:16 +00:00
Amirali Abdolrashidi
4963febf5d Vulkan: Remove type indices with host-visible bit
Currently, the memory type index for VMA image allocations are
selected and returned by the API. However, it could potentially
choose a type index with more flags than required or preferred,
and ignore the index with exactly the flags we want. For example,
it could pick a type index with the host-visible property flag,
even if is unnecessary and a type index with a device-local flag
would suffice.

  Using memoryTypeBits during the allocation allows us to filter
the unwanted type indices out and use the other indices initially.

* Added a new function to RendererVk.cpp to try to remove the memory
  type indices with the host-visible bit for VMA image allocations
  if they should be device-local.

  * GetMemoryTypeBitsExcludingHostVisible()

    * It also removes the indices with the protected bit if it is not
      required.

  * If the allocation is unsuccessful, the fallback resets the field
  for memoryTypeBits, allowing all available type indices to be used
  for the allocation.

* Added memory type index to the pending allocation log during OOM.

Bug: b/294085818
Change-Id: Icc1b218df075170a6baa7ec57c837ed59cd4fa96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743604
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-08-07 19:26:41 +00:00
Charlie Lao
9c588180bf Change LinkedUniform::arraySizes from std::vector to unsigned int
We always flatten multiple dimensional arrays in the uniform to a one
dimensional array, so the arraySizes can be simplified to unsigned int
instead of a vector. With this, we can now move the arraySize into the
simple mFixedSizeData struct and the normal memcpy will cover the
load/save.

Bug: b/275102061
Change-Id: I24c026f783b755f7aa691a5db5746b6309a21227
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735275
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-07 18:25:03 +00:00
Brian Ho
d2a6b2a0de Use offscreen DisplayVk on ChromeOS
Currently, we always use DisplayVkHeadless on ChromeOS which can
fail if the drivers do not support VK_EXT_headless_surface (like on
Intel). At the end of the day, CrOS never really uses Vulkan WSI, so
it shouldn't need a WSI extension anyways.

This CL introduces a simple DisplayVkOffscreen that requires no WSI.
We then configure CrOS to use this new DisplayVk.

Bug: b/292249282
Change-Id: I1fcbb48d187eb656c6e03bc7ac7b15ac8ad0a4ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752416
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-07 18:06:34 +00:00
Geoff Lang
f4e901b447 Validate program binaries are the same CPU bit-ness.
ANGLE's program binary serialize/deserialize logic uses size_t and
other non-fixed sized integer types. This can cause crashes if the
CPU architecture changes between saving and loading of binaries.

Bug: chromium:1470074
Bug: angleproject:8223
Change-Id: Ib2529e0e6e66e28a184aa1ec94075e343e1f1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752265
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-07 17:09:03 +00:00
angle-autoroll
e7eba55905 Roll VK-GL-CTS from 00cccd7cf562 to cedd20620c84 (11 revisions)
00cccd7cf5..cedd20620c

2023-08-07 lorenzo@khronosgroup.org Add check for maximum file size of
100MB
2023-08-07 ruoyu@amd.com Support FP16 CPU Rendering for GLES2
2023-08-07 Tyler.Schneider@amd.com Acceleration structures update test
cases: dEQP-VK.ray_tracing_pipeline.acceleration_structures.update.*
2023-08-07 ziga@lunarg.com Add vkCmdCopyQueryPoolResults tests with
multiview
2023-08-07 amber@igalia.com Test that the number of GS invocations is 0
for VS and TES
2023-08-07 pdaniell@nvidia.com Use the correct imageSize() component for
"width"
2023-08-07 rgarcia@igalia.com Allow selecting a subset of targets at
configuration time
2023-08-07 rgarcia@igalia.com Disable device robustBufferAccess in
pipeline robustness tests
2023-08-07 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-08-07 lorenzo@khronosgroup.org Update vulkan-docs to current
version
2023-08-07 lorenzo@khronosgroup.org Merge dev/VK_EXT_shader_object into
main

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,jonahr@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: jonahr@google.com
Change-Id: I7dfec313f0d5ec605ee0980bf973f7634d5cd115
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4757222
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-07 16:51:25 +00:00
Kenneth Russell
8ba04f1c29 Metal: disable fastmath less often.
Stop disabling fastmath if atan is used in the shader. Application
developers will surely prefer the significant performance improvement
of the fastmath optimizations over corner-case differences in
precision.

Make disabling fastmath more precise: only if it's forcibly disabled
as a driver bug workaround, or if the shader uses invariance and
preserveInvariance is not available.

Suppress the test:
dEQP-GLES[23].functional.shaders.invariance.lowp.loop_2
which fails when fastmath is enabled for shaders using atan and
invariance.

Fixed: chromium:1320111
Change-Id: I6e33b14b1d05faedc15373f24af3e22a4074a35b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754018
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-07 16:35:18 +00:00
Steven Noonan
30bd0149fc ANGLETest: fix crashes when switching between GLESDriverTypes
The condition for mLastLoadedDriver was incorrect. We never initialized
it, so it never switched to the correct EGL implementation when
alternating between tests using different GLESDriverTypes.

This was reproducible with:

    angle_end2end_tests.exe --gtest_filter="SimpleOperationTest.DrawSingleSampleWithAlphaToCoverage/ES3_D3D11:SimpleOperationTest.DrawSingleSampleWithAlphaToCoverage/ES3_ANGLE_Vulkan_Secondaries_SwiftShader:SimpleOperationTest.DrawSingleMultiSampleWithAlphaToCoverage/ES3_D3D11"

The above does three tests:

    - D3D11 test (using GLESDriverType::AngleEGL)
    - Vulkan test (using GLESDriverType::AngleVulkanSecondariesEGL)
    - D3D11 test (using GLESDriverType::AngleEGL)

What would happen is this:

    - the first test would initialize a D3D11 EGLDisplay
    - the second test would switch the API entry points to use
      AngleVulkanSecondariesEGL
    - the third test begins reuses the first test's EGLDisplay, but
      fails to notice the GLESDriverType change and uses the
      AngleVulkanSecondariesEGL entry points
    - when eglQueryString is called with the D3D11 EGLDisplay, the
      VulkanSecondaries library has no knowledge of this display and
      fails the call

Bug: angleproject:8286
Change-Id: I1f22060e2c5725dad5e410a76385e2802b627844
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749296
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-07 16:25:06 +00:00
Solti
135a24fc37 update Wrangler runbook
Test: default presubmit

Bug: b/289824244
Change-Id: Ia3e91196a6b1ede51d1ae55b7a2f76357010e782
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753732
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Solti Ho <solti@google.com>
2023-08-04 22:06:33 +00:00
Charlie Lao
22438ad8e2 Embed ActiveVariable into BufferVariable and ShaderVariableBuffer
This CL embeds ActiveVariable into BufferVariable and
ShaderVariableBuffer struct instead of subclass. This allows us to
remove the virtual function of ~ActiveVariable(), which means
ActiveVariable is a simple struct with basic types and memcpy can be
used for load/save. Thus, in this CL, I also moved activeVariables to
LinkedUniform::mFixedSizeData structure and let memcpy handle the
load/save.

Bug: b/275102061
Change-Id: I8d21080cfdd72d4d22cef927d136ca428d9b12e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722265
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-04 21:29:23 +00:00
Charlie Lao
ee019f5809 Group fixed sized data of LinkedUniform into a struct
Most of gl::LinkedUniform struct is a basic types and can be simply
initialized with memcpy. This CL groups these together and encapsulate
them with get APIs. The load/save is now a single memcpy for the entire
fixed size data structure of basic types.

Bug: b/275102061
Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-04 20:24:30 +00:00
Charlie Lao
7bb132261a Pack booleans inside struct LinkedUniform into bitfields
Right now every bool is load/stored as integer, which itself is a
memcpy. This CL moves them into a bitfield and load/store with one
uint32_t, thus improves efficiency of cache load/save.

Bug: b/275102061
Bug: angleproject:8223
Change-Id: Id8e8e8861c8fcbd75dbef6056e4ff6c8ad2fc4a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740292
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-04 18:55:09 +00:00
Joanna Wang
0581a81c8f Gitmodules: Remove unused androidx_browser.
Also use commit hash for third_party/wayland.

Bug: chromium:1421776
Change-Id: I406b875e65c42413c4841227ce32035f6c004f78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753352
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-08-04 17:54:46 +00:00
angle-autoroll
68b0a8c2a9 Roll Chromium from 5b2aecb232a1 to 2140415f507f (1184 revisions)
5b2aecb232..2140415f50

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,yuxinhu@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 5885d3c248..7dd254d602
* testing: 5bb46c40d0..7a3b32e55f
* third_party/abseil-cpp: 2288062eef..583dc6d1b3
* third_party/android_build_tools/lint: cLtgSrpk1a4zUb-XNIAaxmKn2OAZ-fnG9kZBqI3n9XEC..5j8XlyT5HF4gyZX-d8aNswCh8iPuGAMVy9epEQVVK8YC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..f8b55bb945
* third_party/depot_tools: 70d971a135..fc36eba70b
* third_party/libunwind/src: 6c0013015b..e5a9c50e5e
* third_party/r8: l5dYfHmu8G4vGM9POQl7UoH_PVAssdiMEQNUmpxsNIAC..OdhGaLChEyG23to4T8_V2aMCAZi970T4B4t8ih0tNGsC
* tools/android: 3bb8a70706..7cd5bbdfe4
* tools/mb: 1fceefa905..bee2ccad89
No update to Clang.

Bug: angleproject:5509
Tbr: yuxinhu@google.com
Change-Id: I35fda185499dd596e01c194f331cb6469e939053
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749174
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-04 08:09:38 +00:00
Joanna Wang
95d88a5bb1 Update llvm repo paths.
Bug: chromium:1458042
Change-Id: Ibb7fa0ba9008c341e3f38eece86fa0ca4ffc2210
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4746862
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-08-04 01:16:23 +00:00
Alexey Knyazev
2a950c63fb Adjust ANGLE_stencil_texturing specification
STENCIL_INDEX enum is not defined in GLES/gl3.h,
so the extension has to provide its value.

Bug: angleproject:8051
Change-Id: Ia383162afee8cdcffc1d68ddf833fbd91a87b1f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748399
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-03 21:34:11 +00:00
Kimmo Kinnunen
34a99db4b0 Metal: Check the full generated default shader in
Add the default MSL shader text in the repo.

Fix an error with include path setup to make the script runnable
from an arbitrary directory, for WebKit purposes.

WebKit would compile that to a compile-specific metallib and then
attach that metallib to the compilation as .h.

Current upstream behavior is to compile the metallib once few platforms.

Bug: angleproject:8284
Change-Id: Icbf7c0055718496cb380fad0b73d5b9b0d0abb0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748400
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2023-08-03 20:39:27 +00:00
Geoff Lang
1b94197ab0 Metal: Enable fast math based on runtime OS version checks.
Chrome compiled with a recent SDK but a low minimum required OS version
so fast math was always disabled at compile time. Turn this into a two-
part check: Use macros to make sure preserveInvariance can be compiled
and @available to do the runtime OS check.

Fix the UseFastMathForShaderCompilation check. It was incorrectly
inverting two negative conditions.

Mark some dEQP precision tests as failing due to fast math. We would
prefer to have the performance improvement over some precision loss.

Bug: chromium:1468346
Bug: angleproject:8287
Change-Id: I31d9c732a12841cb4d0bc1a555ea1f1ea8a434fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750199
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-08-03 20:33:00 +00:00
Steven Noonan
dbae1804db Display: remove redundant 'metal' ANGLE_DEFAULT_PLATFORM
This one is already handled only a few lines before.

Bug: angleproject:8285
Change-Id: Ib62ce6062551faf39360371c46a05f9cc4a70b07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749295
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-03 20:11:23 +00:00
Solti
95f09c883b Vulkan: Drop VkAHBFormatPropertiesANDROID for BLOB
VkAndroidHardwareBufferFormatPropertiesANDROID is only valid for
images.

Test: details in ag/24283178
Bug: b/293592961
Change-Id: I72077ceac867da8522620a67d81f7093efa591f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4739718
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Solti Ho <solti@google.com>
2023-08-03 19:50:14 +00:00
Charlie Lao
7997375034 Let UniformLinker uses its own struct instead of LinkedUniform
UniformLinker itself needs more detailed information than the final
linked uniforms. Right now they are using the same data structure. This
CL adds a new structure for linker to use. Since the linker data
structure is temporary, we never needs to load/save from cache, we have
more freedom here to use complex data types. The benefit of separate out
intermediate structure from LinkedUniform is that it allows us to
further simplify LinkedUniform structure without change much of
ProgramLinkedResource implementation. As result of this, this CL removes
field and outerArraySizes (both are std::vector type) from
LinkedUniform.

Bug: b/275102061
Change-Id: Ic1291b51b8906ac586a2f25eb1dbbe74eae8fdc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727742
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-03 18:48:56 +00:00
Charlie Lao
f24ea41e11 Embed sh::ShaderVariable data member into gl::LinkedUniform
ProgramExecutable::load and save function is load/save each individual
data members. Uniform can be quite large as shown in some app traces and
this causes performance problem even when program memory has a cache
hit. This CL flattens gl::LinkedUniform structure by embedding
sh::ShaderVariable data members so that we can remove unrelated members
and also prepare for further optimization in future CLs.

Bug: b/275102061
Change-Id: I7c18cb73e359fba7cd6375b4b1635e9040ef140d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735152
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-08-03 18:45:54 +00:00
Charlie Lao
7b0c78bac0 Remove unused code in ProgramPipeline
shaderUniforms is set but never used.

Bug: b/275102061
Change-Id: Ided52748f6e8925cdbbb996d70966de2d1fc2c9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727743
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-08-03 18:35:50 +00:00
Igor Nazarov
c95ffadf76 Perform Display terminate(InternalCleanup) from makeCurrent()
Current state:
- Call to `eglTerminate()` is canceled if there are Contexts current.
- All not current Contexts are invalidated in `eglTerminate()` call.
- Full Display termination will happen only when last Context is
  actually destroyed in `eglDestroyContext()` or last active thread
  terminates (Android only).

Problem:
- Context is not marked invalid after it is unmade from current when
  `eglTerminate()` was already called.
- If `eglDestroyContext()` was called while context was current, it
  will be destroyed when unmade from current - in this case actual
  Display termination will NOT happen.

After this change:
- Context immediately invalidated after it is unmade from current when
  `eglTerminate()` was already called.
- Full Display termination will happen after the last Context is unmade
  from current (all Contexts are invalid).

Bug: angleproject:6798
Test: angle_end2end_tests --gtest_filter=EGLDisplayTest.ContextLeakAfterTerminate*
Change-Id: Idcce94b041649db58d3d879858fba99109347baf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4708328
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-03 16:05:50 +00:00
Kenneth Russell
6fb3295db8 Metal: expand shader dumping documentation for WebKit/Safari.
Bug: angleproject:8280
Change-Id: Ie3ee5522bec662bcc186dfc787c17d6376995dce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4744739
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-03 15:14:26 +00:00
Igor Nazarov
959ccb9630 Add EGL_BAD_ACCESS validation into ValidateMakeCurrent
Current code does not generate EGL_BAD_ACCESS in `eglMakeCurrent()`
according to the specification:
- If context is current to some other thread, or if either draw or read
  are bound to contexts in another thread, an EGL_BAD_ACCESS error is
  generated.

Additional changes:
- replace `Context::getRefCount()` with `isReferenced()` for
  consistency with added `Surface::isReferenced()` method.
- remove duplicate `ValidateSurface` call for the
  `drawSurface` in case if `readSurface` is the same.
- remove duplicate `ValidateCompatibleSurface()` call for the
  `readSurface` in case if `drawSurface` is different.
- Fix EGLContextASANTest.DestroyContextInUse test.
- Fix EGLContextSharingTestNoSyncTextureUploads.NoSync test.

Bug: angleproject:8282
Change-Id: I2af0d7f50019c2445b42279bdd0e0197dd8ad20f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742382
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-08-03 13:34:21 +00:00
Avi Drissman
6a09e41ce6 Remove "enable_arc2" from ANGLE
"enable_arc2" was a temporary config in Chromium. Now that it's
removed (https://crrev.com/c/4727002), remove references to it
from ANGLE.

Bug: chromium:1280317
Change-Id: I796cd17a760de800300a03fb96fc3a5f3b62b818
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734577
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
2023-08-02 22:15:54 +00:00
Shahbaz Youssefi
6c1bab0702 Add surface to eglAcquireExternalContextANGLE
Bug: angleproject:5509
Change-Id: I51284ae4dc865dc31d1c5540c24e1e0abb95fe0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743719
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-02 18:41:04 +00:00
Alexey Knyazev
335c6b86d7 D3D11: Do not specialize HLSL for multisampled rendering
Pass the required state as a driver uniform instead of
triggering fragment shader recompilation at draw calls.

Bug: angleproject:8097
Bug: angleproject:8131
Fixed: chromium:1468993
Change-Id: I15825c0522b29d48eb2c3b341ba96f139ef26460
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742579
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-08-02 18:32:50 +00:00
Cody Northrop
cb9dd1c9b9 Tests: Add Tesla trace
Test: angle_trace_tests --gtest_filter=TraceTest.tesla
Bug: b/294106875
Change-Id: Ice844dd989a29cbef5190acf077f0484f17c7e3f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4739721
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-08-02 16:57:01 +00:00
Shahbaz Youssefi
01ee134bb2 Revert "GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE"
This reverts commit 4e0250f192.

Reason for revert: Chromium change was reverted. crbug.com/1468956

Original change's description:
> GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE
>
> Now that Chromium no longer uses it.
>
> Bug: angleproject:5509
> Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768
> Reviewed-by: Peng Huang <penghuang@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:5509
Change-Id: Id8143b1715ec8162be9351437fbd34a2aa4c2e00
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742521
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-02 14:58:42 +00:00
Igor Nazarov
d29f946d61 Reland "Fix ExternalImageTarget EGLImage race"
This is a reland of commit 8aa3ca9d17

Previous submission was reverted because of a failure in
Android's "testDrawingHardwareBitmapNotLeaking" test.

Bug was not in the reverted CL itself and is fixed by CL:
    https://chromium-review.googlesource.com/c/angle/angle/+/4733831

Original change's description:
> Fix ExternalImageTarget EGLImage race
>
> Race may happen when ExternalImageTarget EGLImage is destroyed while its
> GLES Texture/Renderbuffer target is modified/destroyed.
>
> Fixed by providing `egl::Image` with `egl::ContextMutex` even when
> `context` is `nullptr`.
>
> This CL also changes `SharedContextMutex` merging rules when `mRank` is
> equal - now priority goes to the `lockedMutex`. This is done to prevent
> unnecessary `mRoot` update of Context mutex when merging with
> `egl::Image` only mutex.
>
> Bug: angleproject:6957
> Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>

Bug: angleproject:6957
Change-Id: Ia698dbea64b8d51ea78f3af6558efc7266f8bdc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732892
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-02 14:46:39 +00:00
Igor Nazarov
d61a50c155 Add "angle_enable_context_mutex_recursion" build option
Option is for Android Vulkan.

Fixes the recursion problem:
    #00 pc 000000000004d69c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    #01 pc 0000000000051e84  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    #02 pc 00000000000b41b4  /apex/com.android.runtime/lib64/bionic/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+236) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a)
    #03 pc 00000000003d8274  /vendor/lib64/egl/libGLESv2_angle.so (std::__Cr::mutex::lock()+12) (BuildId: 203fee8f1cfe9c18)
    #04 pc 0000000000336494  /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::doLock()+132) (BuildId: 203fee8f1cfe9c18)
    #05 pc 000000000033668c  /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::lock()+124) (BuildId: 203fee8f1cfe9c18)
    #06 pc 00000000001d6e08  /vendor/lib64/egl/libGLESv2_angle.so (EGL_ClientWaitSyncKHR+100) (BuildId: 203fee8f1cfe9c18)
    #07 pc 00000000000674f0  /system/lib64/libEGL.so (android::eglClientWaitSyncKHRImpl(void*, void*, int, unsigned long)+112) (BuildId: c4698b8b366f6519dbd7bd3a5f6239f2)
    #08 pc 0000000000086648  /system/lib64/libgui.so (android::BufferQueueProducer::dequeueBuffer(int*, android::sp<android::Fence>*, unsigned int, unsigned int, int, unsigned long, unsigned long*, android::FrameEventHistoryDelta*)+3240) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    #09 pc 00000000000e24fc  /system/lib64/libgui.so (android::Surface::dequeueBuffer(ANativeWindowBuffer**, int*)+392) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    #10 pc 0000000000755770  /system/lib64/libhwui.so (android::uirenderer::renderthread::ReliableSurface::hook_dequeueBuffer(ANativeWindow*, int (*)(ANativeWindow*, ANativeWindowBuffer**, int*), void*, ANativeWindowBuffer**, int*)+80) (BuildId: 0ab7d7584ac800860c4d180557441d1b)
    #11 pc 00000000000e0b48  /system/lib64/libgui.so (android::Surface::hook_dequeueBuffer(ANativeWindow*, ANativeWindowBuffer**, int*)+92) (BuildId: ff35b91736084ee7c49efe908fb9f8f3)
    #12 pc 000000000002cc8c  /system/lib64/libvulkan.so (vulkan::driver::AcquireNextImageKHR(VkDevice_T*, VkSwapchainKHR_T*, unsigned long, VkSemaphore_T*, VkFence_T*, unsigned int*)+280) (BuildId: 0c72f8685858f73fbb13fd68d401bba5)
    #13 pc 0000000000266f08  /vendor/lib64/egl/libGLESv2_angle.so (rx::(anonymous namespace)::TryAcquireNextImageUnlocked(VkDevice_T*, VkSwapchainKHR_T*, rx::impl::ImageAcquireOperation*)+128) (BuildId: 203fee8f1cfe9c18)
    #14 pc 000000000026495c  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::acquireNextSwapchainImage(rx::vk::Context*)+140) (BuildId: 203fee8f1cfe9c18)
    #15 pc 0000000000265800  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::doDeferredAcquireNextImageWithUsableSwapchain(gl::Context const*)+148) (BuildId: 203fee8f1cfe9c18)
    #16 pc 0000000000267bb4  /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::getBufferAge(gl::Context const*, int*)+196) (BuildId: 203fee8f1cfe9c18)
    #17 pc 000000000034143c  /vendor/lib64/egl/libGLESv2_angle.so (egl::Surface::getBufferAge(gl::Context const*, int*)+36) (BuildId: 203fee8f1cfe9c18)
    #18 pc 000000000036c354  /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurfaceAttrib(egl::Display const*, gl::Context const*, egl::Surface*, int, int*)+812) (BuildId: 203fee8f1cfe9c18)
    #19 pc 00000000001d1674  /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurface(egl::Thread*, egl::Display*, egl::SurfaceID, int, int*)+176) (BuildId: 203fee8f1cfe9c18)
    #20 pc 00000000001d3658  /vendor/lib64/egl/libGLESv2_angle.so (EGL_QuerySurface+200) (BuildId: 203fee8f1cfe9c18)

Happens only on platforms that use "EGL_KHR_fence_sync" instead of
"EGL_ANDROID_native_fence_sync" for synchronization. Happens only on
specific Surface types, that using `EGLConsumer`/`GLConsumer`, such as
`SurfaceTexture`.

The Android's "testDrawingHardwareBitmapNotLeaking" test may be used for
testing the issue. Note: in order to reproduce, `SingleContextMutex`
must not be used by context. The "Fix ExternalImageTarget EGLImage race"
CL will achieve that.

To check what extension is used, call:
    adb shell "dumpsys SurfaceFlinger | grep 'Sync configuration'"
Possible results:
    Sync configuration: [using: EGL_KHR_fence_sync EGL_KHR_wait_sync]
    Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]

Bug: angleproject:4354
Change-Id: I915a2c026b59af0a2098ae6b3300f773b29cbfbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4733831
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-08-02 13:30:09 +00:00
angle-autoroll
11cef17b53 Roll SwiftShader from 9fbca2df22a8 to 729e92f8ae07 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/9fbca2df22a8..729e92f8ae07

2023-08-01 avi@google.com Remove "enable_arc2" from Swiftshader

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,yuxinhu@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: yuxinhu@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I1a8e0b04162ff17afae80148095bbe1707fe339a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4741594
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-02 10:59:30 +00:00
angle-autoroll
a21631c02e Roll Chromium from d27b5fe3e6fd to 5b2aecb232a1 (636 revisions)
d27b5fe3e6..5b2aecb232

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,yuxinhu@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* buildtools/linux64: git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74..git_revision:811d332bd90551342c5cbd39e133aa276022d7f8
* buildtools/mac: git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74..git_revision:811d332bd90551342c5cbd39e133aa276022d7f8
* buildtools/win: git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74..git_revision:811d332bd90551342c5cbd39e133aa276022d7f8
* testing: 32a858d0c6..5bb46c40d0
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..2643aac1be
* third_party/clang-format/script: f97059df7f..e5337933f2
* third_party/depot_tools: a8946f3d83..70d971a135
* third_party/r8: 5zBwrOBV6XLXneCTZuxcrWGyYYZ25ZZC0t4dVtUEnFwC..l5dYfHmu8G4vGM9POQl7UoH_PVAssdiMEQNUmpxsNIAC
* tools/mb: aaaca01444..1fceefa905
No update to Clang.

Bug: angleproject:7904
Tbr: yuxinhu@google.com
Change-Id: If56510d542fbeffea0b5d3b5c6da758e5df0eb99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4738186
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-02 08:00:56 +00:00
Alan Zhao
5d4b3645d0 Fix a missing symbol with ANGLE e2e tests
angle_end2end_tests has the same issue as CaptureRelayTests which was
fixed in https://crrev.com/c/4728461 where a symbol was not found during
link-time on Windows due to __declspec(dllimport).

Bug: chromium:1468150
Change-Id: Id943967b0f32d30ff69dfc013aafa69bd812ccaf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735273
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-08-01 20:05:55 +00:00
angle-autoroll
b53d99d87e Roll Chromium from 1cd9335ae38e to d27b5fe3e6fd (523 revisions)
1cd9335ae3..d27b5fe3e6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,yuxinhu@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* testing: 300fe30c80..32a858d0c6
* third_party/android_build_tools/manifest_merger: 8fr-1Vf_pfxN9ulzWVaZvIXggDgWDs-0dtlGA1Sue48C..d1tFnzOW6H5xoDN7WWsMuAiHuhkl0kXijQGiO7IU1VQC
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..fae769bddf
* third_party/depot_tools: 8424103c4e..a8946f3d83
* third_party/r8: QJNQAx1B3aL7NHHWyWAOLYCzEWfggtFhljm4b2wNk0wC..5zBwrOBV6XLXneCTZuxcrWGyYYZ25ZZC0t4dVtUEnFwC
* third_party/turbine: 2I2Nz480QsuCxpQ1lMfbigX8l5HAhX3_ykWU4TKRGo4C..njzYdPKg07o6bisJmD2GAMXIi0p3KPbBy93bLGnp2TYC
* tools/android: 43f8a41f8f..3bb8a70706
* tools/clang: 236e66ffd6..02d5529a3f
* tools/mb: 19f0f9d6bf..aaaca01444
* tools/perf: 2c5f3235ed..6c7511171d
No update to Clang.

Bug: angleproject:6430
Tbr: yuxinhu@google.com
Change-Id: I875617e13047c35727029fac7437fe928681ce21
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735569
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-08-01 08:00:48 +00:00
Brian Ho
6dc0c9d627 Revert "Use DisplayVkSimple on ChromeOS"
This reverts commit b8ddba2a67.

Reason for revert: Breaks Chromium

Original change's description:
> Use DisplayVkSimple on ChromeOS
>
> Currently, we always use DisplayVkHeadless on ChromeOS which can fail
> if the drivers do not support VK_EXT_headless_surface (e.g. Intel).
> This CL changes the default to use DisplayVkSimple which requires
> VK_KHR_display which is better supported. At the end of the day, CrOS
> never really uses Vulkan WSI, so the actual WSI extension used
> doesn't matter.
>
> Bug: b/292249282
> Change-Id: I0f8cfafa635405850cda97c84ad45d3f6aec5103
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727450
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Brian Ho <hob@chromium.org>

Bug: b/292249282
Change-Id: If3ab1a39cb86dae1bf0652ca16bba323f497fcc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734578
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Brian Ho <hob@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-07-31 23:14:32 +00:00
Shahbaz Youssefi
4e0250f192 GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE
Now that Chromium no longer uses it.

Bug: angleproject:5509
Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-31 22:47:38 +00:00
angle-autoroll
cb4b1f3641 Manual Roll VK-GL-CTS from e7b180ad5366 to 00cccd7cf562 (37 revisions)
e7b180ad53..00cccd7cf5

2023-07-28 jbolz@nvidia.com Remove early-outs that break
objectreservation counts in VulkanSC
2023-07-28 syoussefi@google.com Fix fence status check in
VK_EXT_swapchain_maintenance1 test
2023-07-28 jbolz@nvidia.com Fix extended_dynamic_state tests to run in
VulkanSC
2023-07-28 jbolz@nvidia.com Fix shaderexecutor and subgroup supported
stage checks
2023-07-28 rgarcia@igalia.com Test PGQ with the availability bit
2023-07-28 rgarcia@igalia.com Check Vulkan version before getting device
function pointers
2023-07-28 rgarcia@igalia.com Test dynamic depth clamp and static depth
clip
2023-07-28 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9
into vk-gl-cts/main
2023-07-28 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-cts-4.6.3
into vk-gl-cts/main
2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9
into vk-gl-cts/main
2023-07-21 ziga@lunarg.com Add dynamic state stencil op tests with
multiple pipelines
2023-07-21 rgarcia@igalia.com Check acceleration structure creation does
not touch buffers
2023-07-21 rgarcia@igalia.com Test
VkDescriptorSetVariableDescriptorCountLayoutSupport
2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-07-20 aitor@lunarg.com Advance glslang to fix link error for ndk26
2023-07-14 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-07-14 rgarcia@igalia.com Test strides smaller than vertex attribute
sizes
2023-07-14 rgarcia@igalia.com Test RGBA expansion in vertex inputs
2023-07-14 rgarcia@igalia.com Vertex input attribute offset tests
2023-07-14 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-07-14 javed@igalia.com Add tests for 128b multisample color
attachments
2023-07-14 rgarcia@igalia.com Test queries with multiview and
availability bit
2023-07-14 dneto@google.com Test round-to-zero behaviour of
OpConvertFToU
2023-07-14 dneto@google.com Test round-to-zero behaviour of
OpConvertFToS
2023-07-10 slawomir.cygan@intel.com Fix checking support in cooperative
matrix test
2023-07-07 rgarcia@igalia.com Test sample shading with dynamic sample
counts
2023-07-07 ziga@lunarg.com Add more primitives generated query tests
2023-07-07 ewerness@nvidia.com Add testing for
VK_KHR_ray_tracing_position_fetch
2023-07-07 aitor@lunarg.com Add required defines for Android builds with
SDK33+
2023-07-07 piotr.byszewski@mobica.com Test pipeline statistics when
blitting
2023-07-07 mohd.faisal@arm.com Fix validation errors in
ext_shader_tile_image CTS
2023-07-07 michal.jakubek@mobica.com Removal of copying protected image
to host visible buffer
2023-07-07 rgarcia@igalia.com More dynamic rasterization sample count
tests
2023-07-07 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6
into vk-gl-cts/main
2023-07-05 ziga@lunarg.com Update vulkan-docs to current version
2023-07-04 slawomir.cygan@intel.com Build fix for MSVC C++

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll
Please CC angle-team@google.com,yuxinhu@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: yuxinhu@google.com
Change-Id: Ib62a4c52e37902c8f605068f6ca1a786ae58bc49
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732743
Reviewed-by: Solti Ho <solti@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-07-31 22:17:26 +00:00
Brian Ho
1967137670 Reland "Search for system libvulkan on CrOS"
Currently, ANGLE searches in the "module" directory for libvulkan
during init on CrOS. The library doesn't exist at this location
(/opt/google/chrome/libvulkan.so), and we should instead just call
dlopen(libvulkan.so) to search the system library paths.

The original CL was reverted because it broke MSAN builds of
ChromeOS-on-Linux (CrOS UI that runs on a generic Linux machine).
The original CL caused these builds to use the Linux system Vulkan
loader library which is most likely not built with MSAN. This caused
MSAN violations when combined with an ANGLE built with MSAN [1]. The
reland fixes this issue by only using the system libvulkan on real
ChromeOS devices.

[1] go/msan#false-positives

Bug: b/292249282, chromium:1467779
Change-Id: Iafcd8d315a0baddcfbb847c3ad198f267887c8f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727448
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
2023-07-31 21:34:13 +00:00
Kenneth Russell
d2236b5837 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>
2023-07-31 21:25:14 +00:00
Lei Zhang
704469ca9f Remove unused BrokenClampThatShouldNotBeUsed()
It has no references.

Bug: chromium:1231569,chromium:1373621
Change-Id: Id1477100ed9ec4df28f7d28b09c9e04c1a49125c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734693
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-07-31 21:03:35 +00:00
Kenneth Russell
28a23231fc Metal: document how to print MSL shaders.
I consistently forget how to do this, so writing it down for myself
and others.

Bug: chromium:1423136
Bug: angleproject:8280
Change-Id: Ibe328f2c154380b49b7d70d810b90fc15a373cb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727744
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
2023-07-31 20:30:00 +00:00
Mark Lobodzinski
0d886b62d3 Check that MRTSS bit is supported by format
Bit was added without checking ImageFormatProperties causing
failures in some end2end tests.

Bug: angleproject:8262
Test: Texture2DTestES3.TexStorage2D*/ES3_Vulkan*
Change-Id: I7f9a4ee7c14610ee239ab1f86e4ba2c649ce76b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684549
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-31 20:20:53 +00:00
Brian Ho
b8ddba2a67 Use DisplayVkSimple on ChromeOS
Currently, we always use DisplayVkHeadless on ChromeOS which can fail
if the drivers do not support VK_EXT_headless_surface (e.g. Intel).
This CL changes the default to use DisplayVkSimple which requires
VK_KHR_display which is better supported. At the end of the day, CrOS
never really uses Vulkan WSI, so the actual WSI extension used
doesn't matter.

Bug: b/292249282
Change-Id: I0f8cfafa635405850cda97c84ad45d3f6aec5103
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727450
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
2023-07-31 20:18:20 +00:00
Geoff Lang
7f6e535421 Vulkan: Skip vertex conversion if the draw has 0 vertices.
If the draw call start vertex is beyond the end of the buffer, vertex
conversion will no-op and no conversion buffer is created. Just skip
the entire conversion process in this case and bind the empty buffer.

Fix GetVertexCount not taking 0 stride into account.

Bug: chromium:1464690
Change-Id: Iaffcd329595c3319fe9cd5317aef2402f9db6b1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734811
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-31 19:22:43 +00:00
Igor Nazarov
faca95f7e8 Fix memory leak destroying never current Context
Regression from the very old CL:
    Fix gl::Context::unMakeCurrent crashes
    https://chromium-review.googlesource.com/c/angle/angle/+/3017210

Memory leak may happen when releasing invalid Contexts in
`destroyInvalidEglObjects()`.

Bug: chromium:1171371
Change-Id: I282baa92cf3ce7faf1b4239c7ed4b85bd52543a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732893
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-07-31 19:11:55 +00:00
angle-autoroll
2755f73a34 Manual roll vulkan-deps from 6f1c3384ecb6 to ed9dadbd89cd (23 revisions)
Manual roll requested by romanl@google.com

https://chromium.googlesource.com/vulkan-deps.git/+log/6f1c3384ecb6..ed9dadbd89cd

Changed dependencies:
* glslang: 4aa56496d6..4420f9b33b
* spirv-cross: b43c1a1e63..bccaa94db8
* spirv-tools: ec90d2872a..c6d0b04802
* vulkan-loader: 220a00bf95..fc8116bb5c
* vulkan-tools: ed6820d508..ab9d7a042d
* vulkan-validation-layers: e5f54cc2ea..907292fe35

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: romanl@google.com
Change-Id: Ib116f06c547e5036bf1e06e4c0195ace3b9e3f6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4730039
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-31 15:31:05 +00:00
angle-autoroll
fb37e0542c Roll Chromium from be53e6b6e597 to 1cd9335ae38e (654 revisions)
be53e6b6e5..1cd9335ae3

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* testing: 7cb37ad9c1..300fe30c80
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..fae769bddf
* third_party/depot_tools: 4e005d51f0..8424103c4e
* third_party/zlib: 031cdd075f..526382e41c
* tools/clang: 12a3758d0c..236e66ffd6
* tools/luci-go: git_revision:a1060b42fa0de9c0d4f1880258b1ad0472155277..git_revision:e608c1f557fceae8eb6cf35ae2ad6f4908e35245
* tools/luci-go: git_revision:a1060b42fa0de9c0d4f1880258b1ad0472155277..git_revision:e608c1f557fceae8eb6cf35ae2ad6f4908e35245
* tools/mb: a38186e7c6..19f0f9d6bf
No update to Clang.

Bug: None
Tbr: romanl@google.com
Change-Id: I24503bce61ba90b127bfd66bbb424fc3d6f6e447
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732491
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-31 09:03:55 +00:00
Alexey Knyazev
143fa68f50 Disallow read type conversions for signed 16-bit color buffers
Signed 16-bit color buffers should not be converted
to unsigned or 8-bit pixel types during readPixels
operations.

Bug: angleproject:8048
Change-Id: I27eaeb3d543732b5079bd53ef4fad1711ce3c3ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727392
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-29 21:52:57 +00:00
Cody Northrop
0abd6f549f Vulkan: Enable dynamic state on working Android drivers
Fixes are flowing out in different channels and versions, so add
a bit of Pixel specific logic.

Test: angle_trace_tests, deqp
Bug: b/287318431, b/285196249, b/286224923, b/285124778
Change-Id: Ifc73e2a42d1d060a83a2fb83bcf8bb999f0990b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4726502
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-28 19:06:52 +00:00
Roman Lavrov
35605ca795 VVL VUID-VkDescriptorImageInfo-imageView update
b6c0e88b9f

the case that we hit as
VUID-VkDescriptorImageInfo-imageView-06711
is now
VUID-VkDescriptorImageInfo-descriptorType-06713

Bug: angleproject:7865
Change-Id: Ib2981b49890491719df5b474aad2a7b4e597793a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727624
Commit-Queue: Solti Ho <solti@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Solti Ho <solti@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-07-28 18:45:00 +00:00
Alan Zhao
391bfa3579 Fix a missing symbol issue with CaptureReplayTests
The constructor for PlatformMethods is declared with
__declspec(dllimport) when included in CaptureReplayTests.cpp,
Ordinarily, this would fail to link on Windows because this test doesn't
link against a library that has an exported definition. This test
currently builds on Windows because Clang generates an
available_externally definition in the object file for
CaptureReplayTests.cpp for inlining. However, this doesn't build if
inlining is disabled, and will no longer build once an upcoming Clang
change is rolled in. To fix this, we add the config libANGLE_config to
the test to change the symbol declaration to __declspec(dllexport),
which appears to be what other ANGLE tests do.

Bug: chromium:1468150
Change-Id: Ia92dde31ab624bbfe64d2e81fad18956abebc41b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728461
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-07-28 17:53:52 +00:00
Roman Lavrov
c319f34c4c Add VUID-vkCmdDraw-None VUID-vkCmdDrawIndexed-None VUIDs
08753 is now renamed to 09003
https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/6215
as it's being split into multiple cases

Bug: angleproject:8242
Change-Id: I64aa75736fdb6ca9664da39f642e64f9f674b696
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727623
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
2023-07-28 16:45:01 +00:00
angle-autoroll
99f1178a9e Roll Chromium from 1d3454a69e91 to be53e6b6e597 (257 revisions)
1d3454a69e..be53e6b6e5

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* testing: bf0b71be5b..7cb37ad9c1
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..fae769bddf
* third_party/fuchsia-sdk/sdk: version:13.20230714.0.1..version:14.20230727.2.1
* third_party/r8: j866pGqnqFZXTZR0_vWJw2l1LxO2IXjZVwihbQd3jMkC..QJNQAx1B3aL7NHHWyWAOLYCzEWfggtFhljm4b2wNk0wC
* third_party/zlib: 1f457ec480..031cdd075f
* tools/perf: 7095bf4005..2c5f3235ed
No update to Clang.

Bug: None
Tbr: romanl@google.com
Change-Id: I7bb62acc74d0696d0d36b366452fe44e09ff0038
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728185
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-28 08:26:35 +00:00
Steven Noonan
613eefa3a7 D3D11: fix invalidation of depth/stencil attachments
This caused a crash when invalidating the depth/stencil attachments of
the default framebuffer. But for non-default framebuffers, discarding
depth/stencil just did nothing because "rtv.valid()" would be false.

Bug: angleproject:8228
Change-Id: Ic22a29f521256af0ed4fc9c203cd6d750fcc00e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639494
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
2023-07-27 23:03:15 +00:00
Roman Lavrov
179924cbfa Revert "Fix ExternalImageTarget EGLImage race"
This reverts commit 8aa3ca9d17.

Reason for revert: Confirmed to break Android's testDrawingHardwareBitmapNotLeaking in this single-commit roll: https://r.android.com/2679397

Original change's description:
> Fix ExternalImageTarget EGLImage race
>
> Race may happen when ExternalImageTarget EGLImage is destroyed while its
> GLES Texture/Renderbuffer target is modified/destroyed.
>
> Fixed by providing `egl::Image` with `egl::ContextMutex` even when
> `context` is `nullptr`.
>
> This CL also changes `SharedContextMutex` merging rules when `mRank` is
> equal - now priority goes to the `lockedMutex`. This is done to prevent
> unnecessary `mRoot` update of Context mutex when merging with
> `egl::Image` only mutex.
>
> Bug: angleproject:6957
> Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>

Bug: angleproject:6957
Change-Id: I860a8bfd6dd66eb549045391755a83483109ebbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727621
Commit-Queue: Roman Lavrov <romanl@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-07-27 20:48:26 +00:00
angle-autoroll
13842e1c33 Manual roll Chromium from a78d58d81a3c to 1d3454a69e91 (938 revisions)
Manual roll requested by romanl@google.com

a78d58d81a..1d3454a69e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* buildtools/linux64: git_revision:fae280eabe5d31accc53100137459ece19a7a295..git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74
* buildtools/mac: git_revision:fae280eabe5d31accc53100137459ece19a7a295..git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74
* buildtools/win: git_revision:fae280eabe5d31accc53100137459ece19a7a295..git_revision:3fccef9033b950e8935e8debeba9fbd71617bc74
* testing: b946312a89..bf0b71be5b
* third_party/abseil-cpp: 9544eb36c9..2288062eef
* third_party/android_deps: a91b365204..9dc45ac9ce
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..fae769bddf
* third_party/depot_tools: 54e86436a8..4e005d51f0
* third_party/r8: O1BBWiBTIeNUcraX8STMtQXVaCleu6SJJjWCcnfhPLkC..j866pGqnqFZXTZR0_vWJw2l1LxO2IXjZVwihbQd3jMkC
* third_party/zlib: 75c09362db..1f457ec480
* tools/clang: 9e679731de..12a3758d0c
* tools/luci-go: git_revision:f02582af78f530a7bbfe2f059fa5d211c9517756..git_revision:a1060b42fa0de9c0d4f1880258b1ad0472155277
* tools/luci-go: git_revision:f02582af78f530a7bbfe2f059fa5d211c9517756..git_revision:a1060b42fa0de9c0d4f1880258b1ad0472155277
* tools/mb: 4b377433d0..a38186e7c6
* tools/perf: e392c02236..7095bf4005
No update to Clang.

Bug: angleproject:5509,angleproject:8277,angleproject:8278
Tbr: romanl@google.com
Change-Id: I78bdbe9e57abd44be6e219d42737fc3a0f586975
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724521
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-27 20:10:26 +00:00
Charlie Lao
5446e87edb Improve ProgramExecutable::load performance
We are calling push_back for each vector inside ProgramExecutable. This
causes c++ run time to constantly re-allocate storage and copy the
vector over to new storage, and impacts performance negatively. Since
the vector size is know when we load program from cache, this CL calls
resize to the correct size first and then update each element as we walk
over, thus reduces the vector storage reallocation. This CL reduces
blade_and_soul_revolution frame time from 4.48 ms to 4.35 ms on pixel 7
pro.

This CL also changes ProgramBinaryTest tests to use slightly more
complicated program instead of the simplest program.

Bug: b/275102061
Change-Id: I8d92117b07a9ad2d0851850e473ea1b86f9868f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713685
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-27 18:36:32 +00:00
Yuly Novikov
d5ddb710e5 Suppress 2 end2end tests on iOS Metal
GLSLTest_ES3.LiteralInfinityOutput/ES3_Metal
GLSLTest_ES3.LiteralNegativeInfinityOutput/ES3_Metal

Started failing when testing was switched to iPhone 14 iOS 17.0

Bug: angleproject:8278
Change-Id: Ieca08edd02ea4350fc8362cf98d43d8ab4f0adb5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4725466
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-07-27 16:01:07 +00:00
Igor Nazarov
8aa3ca9d17 Fix ExternalImageTarget EGLImage race
Race may happen when ExternalImageTarget EGLImage is destroyed while its
GLES Texture/Renderbuffer target is modified/destroyed.

Fixed by providing `egl::Image` with `egl::ContextMutex` even when
`context` is `nullptr`.

This CL also changes `SharedContextMutex` merging rules when `mRank` is
equal - now priority goes to the `lockedMutex`. This is done to prevent
unnecessary `mRoot` update of Context mutex when merging with
`egl::Image` only mutex.

Bug: angleproject:6957
Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
2023-07-27 10:05:09 +00:00
Brian Ho
af5bf5b824 Revert "Search for system libvulkan on CrOS"
This reverts commit b0b71d5939.

Reason for revert: Broke MSAN build on ChromeOS-for-Linux

Original change's description:
> Search for system libvulkan on CrOS
>
> Currently, ANGLE searches in the "module" directory for libvulkan
> during init on CrOS. The library doesn't exist at this location
> (/opt/google/chrome/libvulkan.so), and we should instead just call
> dlopen(libvulkan.so) to search the system library paths.
>
> Bug: b/292249282
> Change-Id: I7ab4803fe294e69f0ab8533ebc2fa43e25f189eb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4716242
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Brian Ho <hob@chromium.org>

Bug: chromium:1467779
Change-Id: Ib3095b51559660ac438ba9af4327b08d334d19b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722705
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Brian Ho <hob@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-07-26 22:11:49 +00:00
Mohan Maiya
451b3c31a1 Account for overridden features in ANGLEPlatformDisplay key
Overridden features were not included in ANGLEPlatformDisplay key
causing false cache hits when querying for displays with different
feature override requirements. On platforms that reuse displays
across end2end test runs it resulted in the tests using the wrong
display.

Bug: angleproject:8275
Change-Id: Id67f3cefb821d4d0be5945f66e34f366d0768346
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720468
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
2023-07-26 19:23:04 +00:00
angle-autoroll
58cb5c8396 Roll Chromium from 0143d0520f3f to a78d58d81a3c (602 revisions)
0143d0520f..a78d58d81a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* testing: 184b068a94..b946312a89
* third_party/android_build_tools/manifest_merger: UwtCH6usmvLSrqbzGSTrjqJ1AJnNh-Vkq4hCEKvDM5oC..8fr-1Vf_pfxN9ulzWVaZvIXggDgWDs-0dtlGA1Sue48C
* third_party/android_deps: f588938604..a91b365204
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..84e3795d98
* third_party/depot_tools: d3e43dd431..54e86436a8
* tools/mb: 1b748bc9cb..4b377433d0
* tools/perf: ac82fc7dd9..e392c02236
No update to Clang.

Bug: None
Tbr: romanl@google.com
Change-Id: Ie5eb2c2fb0ef1c963d98533fdc9397a4cd99ecad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4719475
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-26 07:53:03 +00:00
Yuxin Hu
a09773110c Disable the usage of VK_EXT_legacy_dithering
Disable the usage of extension VK_EXT_legacy_dithering
on ARM until the bugs in this extension is addressed.

Bug: b/293136916
Bug: b/292282210
Change-Id: I1a548a2f6c44a78f8c66f706588a9985326217cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4718306
Reviewed-by: Solti Ho <solti@google.com>
Commit-Queue: Solti Ho <solti@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
2023-07-26 00:12:02 +00:00
Geoff Lang
84f5295c97 Metal: Flush with NoWait when hitting renderpass count limits
This flush was added as an optimization to handle a specific use case
where many expensive GPU operations (clears and uploads) were queued
without being flushed. The GPU would be idle during these periods.

WaitUntilScheduled forced CPU/GPU synchronization when it was not
needed. We just want to make sure the work is flushed so the GPU can
pick it up later, not synchronize with anything external.

WaitUntilScheduled is used on iOS still because the Chrome waterfall
does not have coverage of iOS performance.

Bug: chromium:1466696
Change-Id: Ia8938eddf5be5ce586a91ad759d1563182176dba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4717367
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-25 22:02:40 +00:00
Hailin zhang
4cae3b09ab Vulkan: disable pipline cache serialization
In old NV drivers, Vulkan pipeline cache will only
generate one single huge cache for one process
shared by all graphics piplines in the same process,
which can be huge.

This is temp solution for nvidia driver cache issue.
after driver version 520. nvidia fix the cache issue.
this might affect second running performance.

Bug: b/258207403
Change-Id: I3ea3e9196ad18fb1cec16c931eb744300d6cfdb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713207
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2023-07-25 22:01:16 +00:00
Geoff Lang
05707391dc Metal: Re-add flush to eglBindTexImage but as NoWait
Removing the flush entirely caused performance regressions on a couple
of benchmarks because the GPU became idle waiting for work. Re-add
the flush but with NoWait so there is no CPU/GPU sychronization.

Bug: chromium:1466696, chromium:1467392
Change-Id: I5e2d1ca7b7a4590e3e668d2cd214d09d28c4b085
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4718007
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2023-07-25 20:53:36 +00:00
Brian Ho
b0b71d5939 Search for system libvulkan on CrOS
Currently, ANGLE searches in the "module" directory for libvulkan
during init on CrOS. The library doesn't exist at this location
(/opt/google/chrome/libvulkan.so), and we should instead just call
dlopen(libvulkan.so) to search the system library paths.

Bug: b/292249282
Change-Id: I7ab4803fe294e69f0ab8533ebc2fa43e25f189eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4716242
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
2023-07-25 17:52:54 +00:00
Shahbaz Youssefi
7ea61cb3a1 GL: Complete EGL_ANGLE_external_context_and_surface
This change implements two new entry points added for
EGL_ANGLE_external_context_and_surface: glAcquireExternalContextANGLE
and glReleaseExternalContextANGLE.

These functions remove the need to overload eglMakeCurrent for the
purposes of syncing to and from the external context.

Bug: angleproject:5509
Change-Id: I5d46299ee0c8addaef7066914a8a8aacb0ea2c17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706027
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-25 17:07:56 +00:00
Shahbaz Youssefi
2d5fb09d7f 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>
2023-07-25 16:16:54 +00:00
Geoff Lang
19dbaf1121 Mention the SwiftShader -> Chromium autoroller for Wranglers
The ANGLE team should make sure that the SwiftShader -> Chromium
autoroller stays green. If it gets too far out of sync, ANGLE's testing
within the ANGLE waterfall and Chromium waterfall will diverge.

Keeping this roller green is also critical for security issues fixes
to propogate to Chrome.

Bug: None
Change-Id: I650d906bbbd8c522b85082965f128a1bf071ae78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711827
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-25 16:16:02 +00:00
Joanna Wang
7ae6458b66 Temporarily remove repos involved in llvm builds.
Add these deps back once the change in chromium/src is merged:
https://chromium-review.googlesource.com/c/chromium/src/+/4666325

Bug: chromium:1458042
Change-Id: I63b5b80e5a5a594ce61e9b72eaffb3a87d6719c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706819
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-07-25 13:36:54 +00:00
angle-autoroll
e8c8c56512 Roll SwiftShader from 66d6b0dd0c39 to 9fbca2df22a8 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/66d6b0dd0c39..9fbca2df22a8

2023-07-24 bclayton@google.com LLVMReactor: Support LLVM 17+
2023-07-24 bclayton@google.com LLVMReactor: Remove CreateFreeze() call

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: romanl@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I7f76a349321e23f85f8bd72eb4903163c1cb8bb4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713596
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-25 11:07:53 +00:00
angle-autoroll
0b41e4edd7 Roll vulkan-deps from 7db08a9e0a29 to 6f1c3384ecb6 (24 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/7db08a9e0a29..6f1c3384ecb6

Changed dependencies:
* glslang: 65397339c5..4aa56496d6
* spirv-headers: 14914db17a..51b1064617
* spirv-tools: 17d9669d51..ec90d2872a
* vulkan-headers: 6eee20744f..cb7b123f2d
* vulkan-loader: fdae336d4f..220a00bf95
* vulkan-tools: c5ac1413f0..ed6820d508
* vulkan-validation-layers: 34a5dd9aec..e5f54cc2ea

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: romanl@google.com
Change-Id: Ia8e2491d99cd90b6e68e0b8e62fdde0d55c7e6ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713573
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-25 10:57:56 +00:00
angle-autoroll
1b17c91e42 Roll Chromium from 6eba95b5d89b to 0143d0520f3f (584 revisions)
6eba95b5d8..0143d0520f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC angle-team@google.com,romanl@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 7fb08159d8..860dae780c
* testing: 7a04c5b9df..184b068a94
* third_party/android_deps: 9ce3e620bd..f588938604
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..fa05d995e1
* third_party/depot_tools: d411904b84..d3e43dd431
* third_party/r8: Sz7S7AlqFPYB_t29P5b6i5K80Wq00mpvN2y8aNUAqo0C..O1BBWiBTIeNUcraX8STMtQXVaCleu6SJJjWCcnfhPLkC
* tools/mb: f819d02e6f..1b748bc9cb
* tools/memory: 9a047fd494..2a4c4ba1f4
* tools/skia_goldctl/linux: Q5cqdj5BQE3eWNCe2CqhLT13X-o0w1ta7V2XnmXIrnEC..yiBOCk-vzyyWi8kF1hfi8_yZoQb5Y5nUrgH-gKy3s_4C
* tools/skia_goldctl/mac_amd64: YieDEr0s0SH8j_1Os9w89pblPmGHE2vvLJtvdTYamfAC..IOfj5k7LF0hVZeJ-_iTpGovRg26fblRBMk0wLT1GJnAC
* tools/skia_goldctl/mac_arm64: isJD0ZhCCqmn1h8q6_12lvDCcKt_M-8v548oOoQwpN4C..nAEU10uINeZnsOib3LZlcLZgRr3I8YETFJqTpMpw3ukC
* tools/skia_goldctl/win: OzmCj3mfsBuDD-gOktZNf1BcL8eg8Ewi8ekcYDI4tsAC..pGeqtL9kCYQirdV-A7YpDFltq8_TFh64j6MuVoc7YswC
No update to Clang.

Bug: angleproject:7904
Tbr: romanl@google.com
Change-Id: I4e89898b8961c7be2a3d85f97101270ddf5efab2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713571
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-25 08:23:27 +00:00
Roman Lavrov
2d999f7448 Android: Add a way to prepare traces without running tests
Example:
    % out/Android/angle_trace_tests --gtest_filter='*gacha_life' --prepare-only
    ...
    Prepared traces: {'gacha_life'}

Can be used as a setup for running restricted_trace_perf.py

Bug: b/292249127
Change-Id: I901c086a19e1d182c64ec4150ced98c198e21c4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711826
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-24 18:41:32 +00:00
Igor Nazarov
5e21d7f024 Vulkan: Remove dead code
Dead code remained after this CL:
    https://chromium-review.googlesource.com/c/angle/angle/+/3998747
    Vulkan: Remove unused ShaderAndSerial

Bug: b/257116399
Change-Id: Ica3b941fa98886dff309b5eb1734a1718fa8f6fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711585
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-24 17:08:26 +00:00
Geoff Lang
5a06559231 Metal: Don't flush on eglBindTexImage.
There is nothing that needs synchronization at this point. About 30% of
ANGLE's CPU time is spent here.

Bug: chromium:1466696
Change-Id: I4993804823790ee9cc38530dea334a6fa3abe7f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706926
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
2023-07-24 15:48:43 +00:00
Roman Lavrov
e1a34cbfce Android.bp generation: vulkan-headers LICENSE.txt -> .md
Bug: angleproject:8271
Change-Id: I7e31ce26afcf8da22f6aa8518433bb131be4e74b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711825
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-24 14:36:07 +00:00
angle-autoroll
a6c751f6dd Roll SwiftShader from 4a260c12b8c1 to 66d6b0dd0c39 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4a260c12b8c1..66d6b0dd0c39

2023-07-23 bclayton@google.com LLVMReactor: Clamp RHS of bit shifts
using type width
2023-07-22 bclayton@google.com Fix another 'sign-compare' warning as
error
2023-07-22 bclayton@google.com Fix 'sign-compare' warning as error
2023-07-21 bclayton@google.com LLVMReactor: Clamp RHS of bit shifts.
2023-07-21 swiftshader.regress@gmail.com Regres: Update test lists @
4a260c12
2023-07-21 bclayton@google.com ExecutableMemory: Use VirtualAlloc()
instead of `new` on windows

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-angle-autoroll
Please CC abdolrashidi@google.com,angle-team@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in SwiftShader:
https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: abdolrashidi@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I20955bd6b2b74e9a6696848623e010680905cdb3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4709812
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-24 11:26:22 +00:00
angle-autoroll
e28575f66a Roll Chromium from 986ed21b8935 to 6eba95b5d89b (527 revisions)
986ed21b89..6eba95b5d8

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-angle-autoroll
Please CC abdolrashidi@google.com,angle-team@google.com on the revert to
ensure that a human
is aware of the problem.

To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Changed dependencies
* build: 76d3034c73..7fb08159d8
* testing: 1f5c4581ad..7a04c5b9df
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..b119dc414e
* third_party/depot_tools: 82e4859614..d411904b84
* third_party/fuchsia-sdk/sdk: version:13.20230721.1.1..version:13.20230714.0.1
* third_party/zlib: d3b3d64f7d..75c09362db
* tools/mb: 0a7e1f1b7a..f819d02e6f
No update to Clang.

Bug: None
Tbr: abdolrashidi@google.com
Change-Id: I02990ac903582a30943da0f32f44be4c7f274afc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706095
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-24 10:08:41 +00:00
3612 changed files with 1629702 additions and 1640 deletions

59
.clang-format Normal file
View File

@@ -0,0 +1,59 @@
# Defines the ANGLE style for automatic reformatting.
# https://code.google.com/p/angleproject/wiki/CodingStandard
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# Allow double brackets such as std::vector<std::vector<int>>.
Standard: Cpp11
# Indent 4 spaces at a time.
IndentWidth: 4
# Keep lines under 100 columns long.
ColumnLimit: 100
# Always break before braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# Keeps extern "C" blocks unindented.
AfterExternBlock: false
# Indent case labels.
IndentCaseLabels: true
# Right-align pointers and references
PointerAlignment: Right
# ANGLE likes to align things as much as possible.
AlignOperands: true
AlignConsecutiveAssignments: true
# Use 2 space negative offset for access modifiers
AccessModifierOffset: -2
# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
AllowShortCaseLabelsOnASingleLine: false
# Useful for spacing out functions in classes
KeepEmptyLinesAtTheStartOfBlocks: true
# Indent nested PP directives.
IndentPPDirectives: AfterHash
# Include blocks style
IncludeBlocks: Preserve

21
.gitattributes vendored Normal file
View File

@@ -0,0 +1,21 @@
* text=auto
*.sln eol=crlf
*.vcxproj eol=crlf
*.vcxproj.filters eol=crlf
*.bat eol=crlf
*.rc eol=crlf
**/compiled/*.h eol=crlf
**/shaders/gen/*.inc eol=lf
*.sh eol=lf
*.gn eol=lf
*.gni eol=lf
*.star eol=lf
infra/config/generated/*.cfg eol=lf
infra/config/generated/*.pyl eol=lf
src/compiler/preprocessor/preprocessor_*.* eol=lf
src/compiler/translator/glslang_*.* eol=lf
src/tests/capture_tests/expected/*.* eol=lf
# Git conflict markers in the json file break the code generator.
# Using a binary merge strategy forces conflicts without changing file contents.
scripts/code_generation_hashes/*.json merge=binary

View File

@@ -1,248 +0,0 @@
name: Godot ANGLE static libs
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
strategy:
matrix:
include:
# macOS and iOS
- name: 🍎 macOS x86_64
platform: macos
os: macos-13
xcode: "15.0"
artifact-name: godot-angle-static-x86_64-macos-release
artifact-path-angle: bin/libANGLE.macos.x86_64.a
artifact-path-egl: bin/libEGL.macos.x86_64.a
artifact-path-gles: bin/libGLES.macos.x86_64.a
flags: arch=x86_64
- name: 🍎 macOS arm64
platform: macos
os: macos-13
xcode: "15.0"
artifact-name: godot-angle-static-arm64-macos-release
artifact-path-angle: bin/libANGLE.macos.arm64.a
artifact-path-egl: bin/libEGL.macos.arm64.a
artifact-path-gles: bin/libGLES.macos.arm64.a
flags: arch=arm64
- name: 🍏 iOS x86_64 simulator
platform: ios
os: macos-13
xcode: "15.0"
artifact-name: godot-angle-static-x86_64-ios-sim-release
artifact-path-angle: bin/libANGLE.ios.x86_64.simulator.a
artifact-path-egl: bin/libEGL.ios.x86_64.simulator.a
artifact-path-gles: bin/libGLES.ios.x86_64.simulator.a
flags: arch=x86_64 ios_simulator=yes
- name: 🍏 iOS arm64 simulator
platform: ios
os: macos-13
xcode: "15.0"
artifact-name: godot-angle-static-arm64-ios-sim-release
artifact-path-angle: bin/libANGLE.ios.arm64.simulator.a
artifact-path-egl: bin/libEGL.ios.arm64.simulator.a
artifact-path-gles: bin/libGLES.ios.arm64.simulator.a
flags: arch=arm64 ios_simulator=yes
- name: 🍏 iOS arm64 device
platform: ios
os: macos-13
xcode: "15.0"
artifact-name: godot-angle-static-arm64-ios-release
artifact-path-angle: bin/libANGLE.ios.arm64.a
artifact-path-egl: bin/libEGL.ios.arm64.a
artifact-path-gles: bin/libGLES.ios.arm64.a
flags: arch=arm64
# MinGW/LLVM libs using UCRT
- name: 🏁 Windows - MinGW/LLVM (UCRT) x86_64
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_64-llvm-release
artifact-path-angle: bin/libANGLE.windows.x86_64.a
artifact-path-egl: bin/libEGL.windows.x86_64.a
artifact-path-gles: bin/libGLES.windows.x86_64.a
flags: use_mingw=yes arch=x86_64 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
llvm: yes
- name: 🏁 Windows - MinGW/LLVM (UCRT) x86_32
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_32-llvm-release
artifact-path-angle: bin/libANGLE.windows.x86_32.a
artifact-path-egl: bin/libEGL.windows.x86_32.a
artifact-path-gles: bin/libGLES.windows.x86_32.a
flags: use_mingw=yes arch=x86_32 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
llvm: yes
- name: 🏁 Windows - MinGW/LLVM (UCRT) arm64
platform: windows
os: windows-2019
artifact-name: godot-angle-static-arm64-llvm-release
artifact-path-angle: bin/libANGLE.windows.arm64.a
artifact-path-egl: bin/libEGL.windows.arm64.a
artifact-path-gles: bin/libGLES.windows.arm64.a
flags: use_mingw=yes arch=arm64 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
llvm: yes
# MSVC libs
- name: 🏁 Windows - MSVC x86_64
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_64-msvc-release
artifact-path-angle: bin/libANGLE.windows.x86_64.lib
artifact-path-egl: bin/libEGL.windows.x86_64.lib
artifact-path-gles: bin/libGLES.windows.x86_64.lib
flags: use_mingw=no arch=x86_64
- name: 🏁 Windows - MSVC x86_32
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_32-msvc-release
artifact-path-angle: bin/libANGLE.windows.x86_32.lib
artifact-path-egl: bin/libEGL.windows.x86_32.lib
artifact-path-gles: bin/libGLES.windows.x86_32.lib
flags: use_mingw=no arch=x86_32
- name: 🏁 Windows - MSVC arm64
platform: windows
os: windows-2019
artifact-name: godot-angle-static-arm64-msvc-release
artifact-path-angle: bin/libANGLE.windows.arm64.lib
artifact-path-egl: bin/libEGL.windows.arm64.lib
artifact-path-gles: bin/libGLES.windows.arm64.lib
flags: use_mingw=no arch=arm64
# MinGW/GCC libs using MSVCRT
- name: 🏁 Windows - MinGW/GCC (MSVCRT) x86_64
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_64-gcc-release
artifact-path-angle: bin/libANGLE.windows.x86_64.a
artifact-path-egl: bin/libEGL.windows.x86_64.a
artifact-path-gles: bin/libGLES.windows.x86_64.a
flags: use_mingw=yes arch=x86_64
mingw: yes
msys: mingw64
msysenv: x86_64
- name: 🏁 Windows - MinGW/GCC (MSVCRT) x86_32
platform: windows
os: windows-2019
artifact-name: godot-angle-static-x86_32-gcc-release
artifact-path-angle: bin/libANGLE.windows.x86_32.a
artifact-path-egl: bin/libEGL.windows.x86_32.a
artifact-path-gles: bin/libGLES.windows.x86_32.a
flags: use_mingw=yes arch=x86_32
mingw: yes
msys: mingw32
msysenv: i686
runs-on: ${{ matrix.os }}
env:
XCODE_DEV_PATH: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Select Xcode version
if: ${{ matrix.platform == 'macos' || matrix.platform == 'ios' }}
run: sudo xcode-select -switch "${XCODE_DEV_PATH}"
- name: Install SCons (Native env)
if: ${{ matrix.mingw != 'yes' }}
run: |
python -m pip install scons==4.0.0
- name: Install mako
run: |
python -m pip install mako
- name: Setup MinGW/LLVM
if: ${{ matrix.platform == 'windows' && matrix.llvm == 'yes' }}
run: |
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20240619/llvm-mingw-20240619-ucrt-x86_64.zip
unzip -q llvm-mingw-*.zip
rm llvm-mingw-*.zip
mv llvm-mingw-* "$HOME/llvm-mingw"
echo "$HOME/llvm-mingw/bin" >> $GITHUB_PATH
- name: Setup MinGW/MSYS2
if: ${{ matrix.mingw == 'yes' }}
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{matrix.msys}}
install: mingw-w64-${{matrix.msysenv}}-gcc mingw-w64-${{matrix.msysenv}}-scons
- name: Prepare ANGLE source
shell: bash
run: |
./update_angle.sh
- name: Build ANGLE (Native env)
if: ${{ matrix.mingw != 'yes' }}
run: |
scons platform=${{ matrix.platform }} ${{ matrix.flags }} optimize=speed
- name: Build ANGLE (MSYS2 env)
if: ${{ matrix.mingw == 'yes' }}
shell: msys2 {0}
run: |
scons platform=${{ matrix.platform }} ${{ matrix.flags }} optimize=speed
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: |
${{ matrix.artifact-path-angle }}
${{ matrix.artifact-path-egl }}
${{ matrix.artifact-path-gles }}
if-no-files-found: error
release:
name: 'Release'
needs: [build]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: ZIP Artifacts
run: |
for i in */; do (cd "${i%/}"; zip -r "../${i%/}.zip" .; cd ..); done
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
removeArtifacts: true
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
artifacts: "*.zip"
artifactErrorsFailBuild: true

139
.gitignore vendored
View File

@@ -1,4 +1,139 @@
.DS_Store
.cipd
.gclient*
.git_cl_description_backup
.idea/
.vs
.vscode
.reproxy_cache
.sw*
.*.sw*
*.Makefile
*.ncb
*.nvuser
*.opensdf
*.orig
*.psess
*.pyc
*.rej
*.sdf
*.sln
*.suo
*.target.mk
*.TMP
*.VC.db
*.VC.opendb
*.vcproj
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*.vsp
*~
/src/tests/third_party/gles_conformance_tests
/testing
/third_party/abseil-cpp
/third_party/android_build_tools
/third_party/android_deps
/third_party/android_platform
/third_party/android_sdk
/third_party/android_system_sdk/*.jar
/third_party/android_toolchain
/third_party/astc-encoder/src
/third_party/bazel/desugar/*.jar
/third_party/catapult
/third_party/cherry
/third_party/clang-format/script
/third_party/colorama/src
/third_party/cpu_features/src
/third_party/depot_tools
/third_party/EGL-Registry/src
/third_party/flatbuffers/src
/third_party/fuchsia-sdk
/third_party/gles1_conform
/third_party/glmark2/src
/third_party/googletest
/third_party/ijar
/third_party/jdk/current
/third_party/jdk/extras/java_8
/third_party/jinja2
/third_party/jsoncpp
/third_party/kotlin_stdlib
/third_party/libdrm
/third_party/libc++/src
/third_party/libc++abi/src
/third_party/libjpeg_turbo
/third_party/libpng/src
/third_party/libunwind/src
/third_party/llvm-build
/third_party/markupsafe
/third_party/meson
/third_party/nasm
/third_party/ninja
/third_party/OpenCL-Docs/src
/third_party/OpenCL-ICD-Loader/src
/third_party/OpenGL-Registry/src
/third_party/proguard/lib
/third_party/protobuf
/third_party/Python-Markdown
/third_party/siso
/third_party/qemu-linux-x64
/third_party/qemu-mac-x64
/third_party/r8/d8
/third_party/r8/lib
/third_party/rapidjson/src
/third_party/requests/src
/third_party/six
/third_party/SwiftShader
/third_party/turbine/*.jar
/third_party/VK-GL-CTS/src
/third_party/vulkan-deps
/third_party/vulkan_memory_allocator
/third_party/wayland
/third_party/zlib
/tools/android
/tools/clang
/tools/flex-bison/linux/bison
/tools/flex-bison/linux/flex
/tools/flex-bison/windows/bison.exe
/tools/flex-bison/windows/flex.exe
/tools/flex-bison/windows/m4.exe
/tools/flex-bison/windows/msys*.dll
/tools/glslang/glslang_validator
/tools/glslang/glslang_validator.exe
/tools/luci-go
/tools/mb
/tools/md_browser
/tools/memory
/tools/perf
/tools/protoc_wrapper
/tools/python
/tools/skia_goldctl
/tools/valgrind
angle.iml
angle_debug.txt
/build
/buildtools
debug.txt
Debug/
Debug_ARM/
Debug_Win32/
Debug_x64/
diag.txt
ipch
lib/*
out
patches-*
Release/
Release_ARM/
Release_Win32/
Release_x64/
TestResults.qpa
# Any temporary files will confuse code generation.
!scripts/code_generation_hashes/*
# Godot scons files.
*.obj
.sconsign.dblite
bin/
godot-angle/
*.pyc
*.o

219
.gitmodules vendored
View File

@@ -1,10 +1,221 @@
[submodule "angle"]
path = angle
url = https://chromium.googlesource.com/angle/angle
branch = chromium/6601
[submodule "build"]
path = build
url = https://chromium.googlesource.com/chromium/src/build.git
gclient-condition = not build_with_chromium
[submodule "buildtools"]
path = buildtools
url = https://chromium.googlesource.com/chromium/src/buildtools.git
gclient-condition = not build_with_chromium
[submodule "third_party/clang-format/script"]
path = third_party/clang-format/script
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git
gclient-condition = not build_with_chromium
[submodule "testing"]
path = testing
url = https://chromium.googlesource.com/chromium/src/testing
gclient-condition = not build_with_chromium
[submodule "third_party/abseil-cpp"]
path = third_party/abseil-cpp
url = https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp
gclient-condition = not build_with_chromium
[submodule "third_party/android_build_tools"]
path = third_party/android_build_tools
url = https://chromium.googlesource.com/chromium/src/third_party/android_build_tools
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/android_deps"]
path = third_party/android_deps
url = https://chromium.googlesource.com/chromium/src/third_party/android_deps
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/android_platform"]
path = third_party/android_platform
url = https://chromium.googlesource.com/chromium/src/third_party/android_platform
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/android_sdk"]
path = third_party/android_sdk
url = https://chromium.googlesource.com/chromium/src/third_party/android_sdk
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/astc-encoder/src"]
path = third_party/astc-encoder/src
url = https://chromium.googlesource.com/external/github.com/ARM-software/astc-encoder
gclient-condition = not build_with_chromium
[submodule "third_party/catapult"]
path = third_party/catapult
url = https://chromium.googlesource.com/catapult.git
gclient-condition = not build_with_chromium
[submodule "third_party/cherry"]
path = third_party/cherry
url = https://android.googlesource.com/platform/external/cherry
gclient-condition = not build_with_chromium
[submodule "third_party/colorama/src"]
path = third_party/colorama/src
url = https://chromium.googlesource.com/external/colorama.git
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/cpu_features/src"]
path = third_party/cpu_features/src
url = https://chromium.googlesource.com/external/github.com/google/cpu_features.git
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/depot_tools"]
path = third_party/depot_tools
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
gclient-condition = not build_with_chromium
[submodule "third_party/EGL-Registry/src"]
path = third_party/EGL-Registry/src
url = https://chromium.googlesource.com/external/github.com/KhronosGroup/EGL-Registry
gclient-condition = not build_with_chromium
[submodule "third_party/flatbuffers/src"]
path = third_party/flatbuffers/src
url = https://chromium.googlesource.com/external/github.com/google/flatbuffers.git
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/gles1_conform"]
path = third_party/gles1_conform
url = https://chrome-internal.googlesource.com/angle/es-cts.git
gclient-condition = checkout_angle_internal
[submodule "third_party/glmark2/src"]
path = third_party/glmark2/src
url = https://chromium.googlesource.com/external/github.com/glmark2/glmark2
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://chromium.googlesource.com/chromium/src/third_party/googletest
gclient-condition = not build_with_chromium
[submodule "third_party/ijar"]
path = third_party/ijar
url = https://chromium.googlesource.com/chromium/src/third_party/ijar
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/libdrm"]
path = third_party/libdrm
url = https://chromium.googlesource.com/chromiumos/third_party/libdrm
gclient-condition = checkout_angle_mesa
[submodule "third_party/libjpeg_turbo"]
path = third_party/libjpeg_turbo
url = https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git
gclient-condition = not build_with_chromium
[submodule "third_party/libpng/src"]
path = third_party/libpng/src
url = https://android.googlesource.com/platform/external/libpng
gclient-condition = not build_with_chromium
[submodule "third_party/jinja2"]
path = third_party/jinja2
url = https://chromium.googlesource.com/chromium/src/third_party/jinja2
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/jsoncpp"]
path = third_party/jsoncpp
url = https://chromium.googlesource.com/chromium/src/third_party/jsoncpp
gclient-condition = not build_with_chromium
[submodule "third_party/libc++/src"]
path = third_party/libc++/src
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git
gclient-condition = not build_with_chromium
[submodule "third_party/libc++abi/src"]
path = third_party/libc++abi/src
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git
gclient-condition = not build_with_chromium
[submodule "third_party/libunwind/src"]
path = third_party/libunwind/src
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git
gclient-condition = not build_with_chromium
[submodule "third_party/markupsafe"]
path = third_party/markupsafe
url = https://chromium.googlesource.com/chromium/src/third_party/markupsafe
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/mesa/src"]
path = third_party/mesa/src
url = https://chromium.googlesource.com/external/github.com/Mesa3D/mesa
gclient-condition = checkout_angle_mesa
[submodule "third_party/meson"]
path = third_party/meson
url = https://chromium.googlesource.com/external/github.com/mesonbuild/meson
gclient-condition = checkout_angle_mesa
[submodule "third_party/nasm"]
path = third_party/nasm
url = https://chromium.googlesource.com/chromium/deps/nasm.git
gclient-condition = not build_with_chromium
[submodule "third_party/OpenCL-Docs/src"]
path = third_party/OpenCL-Docs/src
url = https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenCL-Docs
gclient-condition = not build_with_chromium
[submodule "third_party/OpenCL-ICD-Loader/src"]
path = third_party/OpenCL-ICD-Loader/src
url = https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenCL-ICD-Loader
gclient-condition = not build_with_chromium
[submodule "third_party/OpenGL-Registry/src"]
path = third_party/OpenGL-Registry/src
url = https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry
gclient-condition = not build_with_chromium
[submodule "third_party/protobuf"]
path = third_party/protobuf
url = https://chromium.googlesource.com/chromium/src/third_party/protobuf
gclient-condition = not build_with_chromium
[submodule "third_party/Python-Markdown"]
path = third_party/Python-Markdown
url = https://chromium.googlesource.com/chromium/src/third_party/Python-Markdown
gclient-condition = not build_with_chromium
[submodule "third_party/rapidjson/src"]
path = third_party/rapidjson/src
url = https://chromium.googlesource.com/external/github.com/Tencent/rapidjson
[submodule "third_party/requests/src"]
path = third_party/requests/src
url = https://chromium.googlesource.com/external/github.com/kennethreitz/requests.git
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/six"]
path = third_party/six
url = https://chromium.googlesource.com/chromium/src/third_party/six
gclient-condition = checkout_android and not build_with_chromium
[submodule "third_party/SwiftShader"]
path = third_party/SwiftShader
url = https://swiftshader.googlesource.com/SwiftShader
gclient-condition = not build_with_chromium
[submodule "third_party/VK-GL-CTS/src"]
path = third_party/VK-GL-CTS/src
url = https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS
[submodule "third_party/vulkan-deps"]
path = third_party/vulkan-deps
url = https://chromium.googlesource.com/vulkan-deps
gclient-condition = not build_with_chromium
[submodule "third_party/vulkan_memory_allocator"]
path = third_party/vulkan_memory_allocator
url = https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
gclient-condition = not build_with_chromium
[submodule "third_party/wayland"]
path = third_party/wayland
url = https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland
gclient-condition = not build_with_chromium and host_os == "linux"
[submodule "third_party/zlib"]
path = third_party/zlib
url = https://chromium.googlesource.com/chromium/src/third_party/zlib
gclient-condition = not build_with_chromium
[submodule "tools/android"]
path = tools/android
url = https://chromium.googlesource.com/chromium/src/tools/android
gclient-condition = checkout_android and not build_with_chromium
[submodule "tools/clang"]
path = tools/clang
url = https://chromium.googlesource.com/chromium/src/tools/clang.git
gclient-condition = not build_with_chromium
[submodule "tools/mb"]
path = tools/mb
url = https://chromium.googlesource.com/chromium/src/tools/mb
gclient-condition = not build_with_chromium
[submodule "tools/md_browser"]
path = tools/md_browser
url = https://chromium.googlesource.com/chromium/src/tools/md_browser
gclient-condition = not build_with_chromium
[submodule "tools/memory"]
path = tools/memory
url = https://chromium.googlesource.com/chromium/src/tools/memory
gclient-condition = not build_with_chromium
[submodule "tools/perf"]
path = tools/perf
url = https://chromium.googlesource.com/chromium/src/tools/perf
gclient-condition = not build_with_chromium
[submodule "tools/protoc_wrapper"]
path = tools/protoc_wrapper
url = https://chromium.googlesource.com/chromium/src/tools/protoc_wrapper
gclient-condition = not build_with_chromium
[submodule "tools/python"]
path = tools/python
url = https://chromium.googlesource.com/chromium/src/tools/python
gclient-condition = checkout_android and not build_with_chromium
[submodule "tools/valgrind"]
path = tools/valgrind
url = https://chromium.googlesource.com/chromium/src/tools/valgrind
gclient-condition = not build_with_chromium

56
.gn Normal file
View File

@@ -0,0 +1,56 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file is used when gn runs in this directory (or a lower directory
# and searching upward ends here). See "gn help dotfile."
# As a result this file will only affect stand-alone ANGLE builds,
# not chromium builds.
import("//build/dotfile_settings.gni")
import("//dotfile_settings.gni")
# Location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"
# The python interpreter to use by default. On Windows, this will look
# for python3.exe and python3.bat.
script_executable = "python3"
# These are the targets to check headers for by default. The files in targets
# matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
check_targets = [ "*" ]
# These are the list of GN files that run exec_script. This allowlist exists
# to force additional review for new uses of exec_script, which is strongly
# discouraged except for gypi_to_gn calls.
exec_script_whitelist = angle_dotfile_settings.exec_script_whitelist +
build_dotfile_settings.exec_script_whitelist +
[
"//build/config/sysroot.gni",
"//build/config/win/BUILD.gn",
"//build/config/win/visual_studio_version.gni",
"//build/gn_helpers.py",
"//build_overrides/build.gni",
]
default_args = {
clang_use_chrome_plugins = false
build_angle_deqp_tests = true
use_sysroot = true
# Saves on importing extra dependencies and ANGLE doesn't use JS.
enable_js_protobuf = false
# Saves on importing extra dependencies and ANGLE doesn't use Rust.
enable_rust = false
# Disable location tags in isolates.
tests_have_location_tags = false
# Use base level API level 29 support for AHardwareBuffer ANGLE tests.
android32_ndk_api_level = 29
android64_ndk_api_level = 29
}

4
.style.yapf Normal file
View File

@@ -0,0 +1,4 @@
[style]
based_on_style = yapf
column_limit = 99
indent_width = 4

394
.vpython Normal file
View File

@@ -0,0 +1,394 @@
# This is a vpython "spec" file.
#
# It describes patterns for python wheel dependencies of the python scripts in
# the chromium repo, particularly for dependencies that have compiled components
# (since pure-python dependencies can be easily vendored into third_party).
#
# When vpython is invoked, it finds this file and builds a python VirtualEnv,
# containing all of the dependencies described in this file, fetching them from
# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`,
# this never requires the end-user machine to have a working python extension
# compilation environment. All of these packages are built using:
# https://chromium.googlesource.com/infra/infra/+/main/infra/tools/dockerbuild/
#
# All python scripts in the repo share this same spec, to avoid dependency
# fragmentation.
#
# If you have depot_tools installed in your $PATH, you can invoke python scripts
# in this repo by running them as you normally would run them, except
# substituting `vpython` instead of `python` on the command line, e.g.:
# vpython path/to/script.py some --arguments
#
# Read more about `vpython` and how to modify this file here:
# https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md
#
# For the definition of this spec, see:
# https://chromium.googlesource.com/infra/luci/luci-go/+/main/vpython/api/vpython/spec.proto
python_version: "2.7"
# Used by:
# build/chromeos/test_runner.py
wheel: <
name: "infra/python/wheels/jsonlines-py2_py3"
version: "version:1.2.0"
>
wheel: <
name: "infra/python/wheels/subprocess32/${vpython_platform}"
version: "version:3.5.0rc1"
# Only download for linux since we shouldn't be running CrOS tests on mac/win.
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
>
# Used by:
# build/chromeos/test_runner.py
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.2.2"
>
# Used by:
# build/lacros/test_runner.py
wheel: <
name: "infra/python/wheels/parameterized-py2_py3"
version: "version:0.7.1"
>
# Used by:
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
#
# This version must also be compatible with the "numpy" version, as "cv2"
# depends on "numpy". In this case, OpenCV@2.4.13.2 has been built against
# numpy@1.11.3.
wheel: <
name: "infra/python/wheels/opencv_python/${vpython_platform}"
version: "version:2.4.13.2"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
# Used by:
# third_party/catapult
#
# This version must be compatible with the version range specified by
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
wheel: <
name: "infra/python/wheels/numpy/${vpython_platform}"
version: "version:1.11.3"
>
# Used by:
# third_party/catapult
wheel: <
name: "infra/python/wheels/pypiwin32/${vpython_platform}"
version: "version:219"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>
# Used by:
# chrome/test/data/android/upload_download_utils_test.py
wheel: <
name: "infra/python/wheels/pyfakefs-py2_py3"
version: "version:3.7.2"
>
# Used by:
# tools/perf/fetch_benchmark_deps.py
wheel: <
name: "infra/python/wheels/google_compute_engine-py2_py3"
version: "version:2.6.2"
>
wheel: <
name: "infra/python/wheels/boto-py2_py3"
version: "version:2.48.0"
>
# Used by:
# testing/buildbot/generate_buildbot_json_coveragetest.py
wheel: <
name: "infra/python/wheels/coverage/${vpython_platform}"
version: "version:4.3.4"
>
# Used by:
# build/android/pylib/local/emulator/avd.py
wheel: <
name: "infra/python/wheels/protobuf-py2_py3"
version: "version:3.6.1"
>
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel: <
name: "infra/python/wheels/pyftpdlib-py2_py3"
version: "version:0.7.0"
>
wheel: <
name: "infra/python/wheels/simplejson/${vpython_platform}"
version: "version:3.13.2"
>
# Used by:
# tools/perf/core/results_dashboard.py
wheel: <
name: "infra/python/wheels/httplib2-py2_py3"
version: "version:0.10.3"
>
# Used by:
# tools/perf/flakiness_cli
wheel: <
name: "infra/python/wheels/pandas/${vpython_platform}"
version: "version:0.23.4"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
wheel: <
name: "infra/python/wheels/pytz-py2_py3"
version: "version:2018.4"
>
wheel: <
name: "infra/python/wheels/python-dateutil-py2_py3"
version: "version:2.7.3"
>
# Used by:
# content/test/gpu/gpu_tests/color_profile_manager_mac.py
# Note: there's a version of this wheel for even older OS versions,
# but we don't need it for the GPU tests, and it looks like there are
# bugs in the not_match_tag implementation.
wheel: <
name: "infra/python/wheels/pyobjc/${vpython_platform}"
version: "version:4.1"
match_tag: < platform: "macosx_10_10_intel" >
>
# Used by:
# third_party/catapult
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel: <
name: "infra/python/wheels/pbr-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
# Used by:
# chrome/test/chromedriver/test/run_webdriver_tests.py
wheel <
name: "infra/python/wheels/pytest-py2_py3"
version: "version:3.6.2"
>
wheel <
name: "infra/python/wheels/attrs-py2_py3"
version: "version:17.4.0"
>
wheel <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel <
name: "infra/python/wheels/more-itertools-py2_py3"
version: "version:4.1.0"
>
wheel <
name: "infra/python/wheels/scandir/${vpython_platform}"
version: "version:1.7"
>
wheel <
name: "infra/python/wheels/pluggy-py2_py3"
version: "version:0.7.1"
>
wheel <
name: "infra/python/wheels/py-py2_py3"
version: "version:1.5.3"
>
wheel <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.2.2"
>
# Used by:
# tools/infra
wheel: <
name: "infra/python/wheels/requests-py2_py3"
version: "version:2.13.0"
>
wheel: <
name: "infra/python/wheels/colorama-py2_py3"
version: "version:0.4.1"
>
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/atomicwrites-py2_py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/pathlib2-py2_py3"
version: "version:2.3.3"
>
# Used by Web Platform Tests (WPT) codebase in
# //third_party/blink/web_tests/external/wpt/tools/
wheel: <
name: "infra/python/wheels/html5lib-py2_py3"
version: "version:1.0.1"
>
wheel: <
name: "infra/python/wheels/mozdebug-py2_py3"
version: "version:0.1.1"
>
wheel: <
name: "infra/python/wheels/mozinfo-py2_py3"
version: "version:1.1.0"
>
wheel: <
name: "infra/python/wheels/mozlog-py2_py3"
version: "version:5.0"
>
wheel: <
name: "infra/python/wheels/mozprocess-py2_py3"
version: "version:0.26"
>
wheel: <
name: "infra/python/wheels/urllib3-py2_py3"
version: "version:1.22"
>
wheel: <
name: "infra/python/wheels/blessings-py2_py3"
version: "version:1.7"
>
wheel: <
name: "infra/python/wheels/mozfile-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/mozterm-py2_py3"
version: "version:1.0.0"
>
wheel: <
name: "infra/python/wheels/webencodings-py2_py3"
version: "version:0.5.1"
>
wheel: <
name: "infra/python/wheels/certifi-py2_py3"
version: "version:2018.11.29"
>
wheel: <
name: "infra/python/wheels/chardet-py2_py3"
version: "version:3.0.4"
>
wheel: <
name: "infra/python/wheels/idna-py2_py3"
version: "version:2.8"
>
wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:6.0.0"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
# Used by:
# //third_party/blink/tools/blinkpy/web_tests/port/server_process.py
wheel: <
name: "infra/python/wheels/pywin32/${vpython_platform}"
version: "version:227"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>

530
.vpython3 Normal file
View File

@@ -0,0 +1,530 @@
# This is a vpython "spec" file.
#
# It describes patterns for python wheel dependencies of the python scripts in
# the chromium repo, particularly for dependencies that have compiled components
# (since pure-python dependencies can be easily vendored into third_party).
#
# When vpython is invoked, it finds this file and builds a python VirtualEnv,
# containing all of the dependencies described in this file, fetching them from
# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`,
# this never requires the end-user machine to have a working python extension
# compilation environment. All of these packages are built using:
# https://chromium.googlesource.com/infra/infra/+/main/infra/tools/dockerbuild/
#
# All python scripts in the repo share this same spec, to avoid dependency
# fragmentation.
#
# If you have depot_tools installed in your $PATH, you can invoke python scripts
# in this repo by running them as you normally would run them, except
# substituting `vpython` instead of `python` on the command line, e.g.:
# vpython path/to/script.py some --arguments
#
# Read more about `vpython` and how to modify this file here:
# https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md
python_version: "3.8"
# Used by:
# build/android/pylib/local/emulator/avd.py
wheel: <
name: "infra/python/wheels/protobuf-py3"
version: "version:3.20.0"
>
# TODO(https://crbug.com/898348): Add in necessary wheels as Python3 versions
# become available.
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
# These wheels are necessary to run pytype, i.e. enforce Python 3 type hinting.
# We currently use 2021.11.2 instead of the 2022.5.5 available in CIPD because
# 2022.5.5 seems to have issues when analyzing code that imports the asyncio
# module. 2021.11.2 only has Linux wheels available, so restrict to that
# platform.
wheel: <
name: "infra/python/wheels/pytype/${vpython_platform}"
version: "version:2021.11.2"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/importlab-py3"
version: "version:0.6.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/networkx-py3"
version: "version:2.5"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/decorator-py3"
version: "version:5.0.9"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/libcst-py3"
version: "version:0.3.19"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/pyyaml/${vpython_platform}"
version: "version:5.4.1.chromium.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typing-inspect-py3"
version: "version:0.7.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typing-extensions-py3"
version: "version:4.0.1"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/tabulate-py3"
version: "version:0.8.9"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/typed-ast/${vpython_platform}"
version: "version:1.5.3"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/ninja/${vpython_platform}"
version: "version:1.10.0.post2"
match_tag: <
platform: "manylinux1_x86_64"
>
>
wheel: <
name: "infra/python/wheels/mypy-extensions-py3"
version: "version:0.4.3"
match_tag: <
platform: "manylinux1_x86_64"
>
>
# Common utilities.
# Use the same versions specified by //third_party/catapult/.vpython3 so that
# Chromium tests using Telemetry function properly.
wheel: <
name: "infra/python/wheels/numpy/${vpython_platform}"
version: "version:1.2x.supported.1"
>
wheel: <
name: "infra/python/wheels/pexpect/${vpython_platform}"
version: "version:4.8.0.chromium.1"
>
wheel: <
name: "infra/python/wheels/psutil/${vpython_platform}"
version: "version:5.8.0.chromium.3"
>
wheel: <
name: "infra/python/wheels/requests-py3"
version: "version:2.31.0"
>
wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:8.3.1"
# There is currently no Linux arm/arm64 version in CIPD.
not_match_tag <
platform: "linux_aarch64"
>
>
wheel: <
name: "infra/python/wheels/opencv_python/${vpython_platform}"
version: "version:4.5.3.56.chromium.4"
# There is currently no Linux arm/arm64 version in CIPD.
not_match_tag <
platform: "linux_aarch64"
>
>
# Used by various python unit tests.
wheel: <
name: "infra/python/wheels/mock-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/parameterized-py2_py3"
version: "version:0.7.1"
>
wheel: <
name: "infra/python/wheels/pbr-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/pyfakefs-py2_py3"
version: "version:3.7.2"
>
# Used by:
# build/chromeos/test_runner.py
wheel: <
name: "infra/python/wheels/jsonlines-py2_py3"
version: "version:1.2.0"
>
wheel: <
name: "infra/python/wheels/python-dateutil-py2_py3"
version: "version:2.7.3"
>
# Used by WPT importer
wheel: <
name: "infra/python/wheels/charset_normalizer-py3"
version: "version:2.0.4"
>
wheel: <
name: "infra/python/wheels/pyasn1-py2_py3"
version: "version:0.4.5"
>
wheel: <
name: "infra/python/wheels/pyasn1_modules-py2_py3"
version: "version:0.2.4"
>
wheel: <
name: "infra/python/wheels/rsa-py2_py3"
version: "version:3.4.2"
>
wheel: <
name: "infra/python/wheels/cachetools-py2_py3"
version: "version:2.0.1"
>
wheel: <
name: "infra/python/wheels/uritemplate-py2_py3"
version: "version:3.0.0"
>
wheel: <
name: "infra/python/wheels/google-auth-py2_py3"
version: "version:1.25.0"
>
wheel: <
name: "infra/python/wheels/googleapis-common-protos-py2_py3"
version: "version:1.52.0"
>
wheel: <
name: "infra/python/wheels/google-api-core-py3"
version: "version:1.31.5"
>
wheel: <
name: "infra/python/wheels/google-auth-httplib2-py2_py3"
version: "version:0.1.0"
>
wheel: <
name: "infra/python/wheels/google-api-python-client-py3"
version: "version:2.2.0"
>
wheel: <
name: "infra/python/wheels/oauth2client-py2_py3"
version: "version:3.0.0"
>
# Used by:
# //third_party/blink/tools/wpt_upload.py
wheel: <
name: "infra/python/wheels/crcmod/${vpython_platform}"
version: "version:1.7.chromium.3"
>
wheel: <
name: "infra/python/wheels/grpcio/${vpython_platform}"
version: "version:1.44.0"
>
wheel: <
name: "infra/python/wheels/grpc-google-iam-v1-py3"
version: "version:0.12.3"
>
wheel: <
name: "infra/python/wheels/proto-plus-py3"
version: "version:1.20.3"
>
wheel: <
name: "infra/python/wheels/google-cloud-kms-py3"
version: "version:2.11.1"
>
# Used by Web Platform Tests (WPT) codebase in
# //third_party/wpt_tools
wheel: <
name: "infra/python/wheels/html5lib-py2_py3"
version: "version:1.0.1"
>
wheel: <
name: "infra/python/wheels/mozdebug-py3"
version: "version:0.3.0"
>
wheel: <
name: "infra/python/wheels/mozinfo-py2_py3"
version: "version:1.2.2"
>
wheel: <
name: "infra/python/wheels/mozlog-py2_py3"
version: "version:7.1.0"
>
wheel: <
name: "infra/python/wheels/mozprocess-py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/urllib3-py2_py3"
version: "version:1.24.3"
>
wheel: <
name: "infra/python/wheels/blessings-py2_py3"
version: "version:1.7"
>
wheel: <
name: "infra/python/wheels/mozfile-py2_py3"
version: "version:2.0.0"
>
wheel: <
name: "infra/python/wheels/mozterm-py2_py3"
version: "version:1.0.0"
>
wheel: <
name: "infra/python/wheels/webencodings-py2_py3"
version: "version:0.5.1"
>
wheel: <
name: "infra/python/wheels/certifi-py2_py3"
version: "version:2020.11.8"
>
wheel: <
name: "infra/python/wheels/chardet-py2_py3"
version: "version:3.0.4"
>
wheel: <
name: "infra/python/wheels/idna-py2_py3"
version: "version:2.8"
>
wheel: <
name: "infra/python/wheels/distro-py2_py3"
version: "version:1.4.0"
>
wheel: <
name: "infra/python/wheels/aioquic/${vpython_platform}"
version: "version:0.9.15"
>
wheel: <
name: "infra/python/wheels/pylsqpack/${vpython_platform}"
version: "version:0.3.12"
>
wheel: <
name: "infra/python/wheels/cryptography/${vpython_platform}"
version: "version:3.3.1.chromium.1"
>
wheel: <
name: "infra/python/wheels/cffi/${vpython_platform}"
version: "version:1.14.5.chromium.7"
>
wheel: <
name: "infra/python/wheels/pycparser-py2_py3"
version: "version:2.19"
>
wheel: <
name: "infra/python/wheels/ecdsa-py2_py3"
version: "version:0.17.0"
>
# Used by:
# chrome/test/chromedriver/test/run_webdriver_tests.py
wheel: <
name: "infra/python/wheels/iniconfig-py3"
version: "version:1.1.1"
>
wheel: <
name: "infra/python/wheels/packaging-py2_py3"
version: "version:16.8"
>
wheel: <
name: "infra/python/wheels/pyparsing-py2_py3"
version: "version:2.4.7"
>
wheel: <
name: "infra/python/wheels/toml-py3"
version: "version:0.10.1"
>
wheel <
name: "infra/python/wheels/pytest-py3"
version: "version:6.2.2"
>
wheel <
name: "infra/python/wheels/pytest-asyncio-py3"
version: "version:0.14.0"
>
wheel <
name: "infra/python/wheels/attrs-py2_py3"
version: "version:21.4.0"
>
wheel <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
wheel <
name: "infra/python/wheels/more-itertools-py2_py3"
version: "version:4.1.0"
>
wheel <
name: "infra/python/wheels/pluggy-py3"
version: "version:0.13.1"
>
wheel <
name: "infra/python/wheels/py-py2_py3"
version: "version:1.10.0"
>
wheel <
name: "infra/python/wheels/funcsigs-py2_py3"
version: "version:1.0.2"
>
wheel: <
name: "infra/python/wheels/atomicwrites-py2_py3"
version: "version:1.3.0"
>
wheel: <
name: "infra/python/wheels/colorama-py2_py3"
version: "version:0.4.1"
>
# Used by:
# testing/buildbot/generate_buildbot_json_coveragetest.py
wheel: <
name: "infra/python/wheels/coverage/${vpython_platform}"
version: "version:5.5.chromium.3"
>
# Used by:
# //content/test/gpu
wheel: <
name: "infra/python/wheels/pathos/${vpython_platform}"
version: "version:0.2.7.chromium.5"
not_match_tag <
abi: "cp27mu"
platform: "manylinux1_i686"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_mips64"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_armv6l"
>
not_match_tag <
abi: "cp27mu"
platform: "linux_armv7l"
>
>
wheel: <
name: "infra/python/wheels/websockets-py3"
version: "version:10.1"
>
# Used by:
# //tools/infra/find_bad_builds.py
wheel: <
name: "infra/python/wheels/pytz-py2_py3"
version: "version:2018.4"
>
# Used by:
# //third_party/blink/tools/blinkpy/web_tests/port/server_process.py
wheel: <
name: "infra/python/wheels/pywin32/${vpython_platform}"
version: "version:300"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
>
# Used by:
# //content/test/gpu/gpu_tests/color_profile_manager_mac.py
wheel: <
name: "infra/python/wheels/pyobjc/${vpython_platform}"
version: "version:7.3.chromium.1"
match_tag: <
platform: "macosx_10_10_intel"
>
match_tag: <
platform: "macosx_11_0_arm64"
>
>
# Used by:
# tools/perf/core/results_dashboard.py
wheel: <
name: "infra/python/wheels/httplib2-py3"
version: "version:0.19.1"
>
# Used by:
# tools/perf/flakiness_cli
wheel: <
name: "infra/python/wheels/pandas/${vpython_platform}"
version: "version:1.3.2.chromium.1"
not_match_tag: <
platform: "linux_aarch64"
>
>
# Used by:
# testing/script/run_variations_smoke_tests.py
wheel: <
name: "infra/python/wheels/selenium-py3"
version: "version:3.14.0"
>
# Used by meson
wheel: <
name: "infra/python/wheels/markupsafe/${vpython_platform}"
version: "version:2.0.1"
>
wheel: <
name: "infra/python/wheels/mako-py3"
version: "version:1.2.3"
>

1
.yapfignore Normal file
View File

@@ -0,0 +1 @@
scripts/export_targets.py

86
AUTHORS Normal file
View File

@@ -0,0 +1,86 @@
# This is the official list of The ANGLE Project Authors
# for copyright purposes.
# This file is distinct from the CONTRIBUTORS files.
# See the latter for an explanation.
# Names should be added to this file as
# Name or Organization
# Email addresses for individuals are tracked elsewhere to avoid spam.
Google Inc.
TransGaming Inc.
3DLabs Inc. Ltd.
Adobe Systems Inc.
Autodesk, Inc.
BlackBerry Limited
Cable Television Laboratories, Inc.
Collabora, Ltd.
Cloud Party, Inc.
Igalia, S.L.
Imagination Technologies Ltd.
Intel Corporation
LunarG, Inc.
Mozilla Corporation
Turbulenz
Klarälvdalens Datakonsult AB
Microsoft Corporation
Microsoft Open Technologies, Inc.
NVIDIA Corporation
Opera Software ASA
The Qt Company Ltd.
Advanced Micro Devices, Inc.
LG Electronics, Inc.
IBM Inc.
AdaptVis GmbH
Samsung Electronics, Inc.
Arm Ltd.
Broadcom Inc.
Facebook, Inc.
The Khronos Group, Inc.
Numfum GmbH
Yandex LLC
Rive
Institute of Software, Chinese Academy of Sciences
Guangdong OPPO Mobile Telecommunications Corp., Ltd
Jacek Caban
Mark Callow
Ginn Chen
Tibor den Ouden
Régis Fénéon
James Hauxwell
Sam Hocevar
Pierre Leveille
Jonathan Liu
Boying Lu
Aitor Moreno
Yuri O'Donnell
Josh Soref
Ma Aiguo
Maks Naumov
Jinyoung Hur
Sebastian Bergstein
James Ross-Gowan
Nickolay Artamonov
Ihsan Akmal
Andrei Volykhin
Jérôme Duval
Руслан Ижбулатов
Thomas Miller
Till Rathmann
Nick Shaforostov
Jaime Bernardo
Le Hoang Quyen
Ethan Lee
Renaud Lepage
Artem Bolgar
Wander Lairson Costa
Stephan Hartmann
SeongHwan Park
Xiaopeng Li
Akihiko Odaki
Ho Cheung
Tao Wang
Phan Quang Minh
Hongchen Yan

2
Android.mk Normal file
View File

@@ -0,0 +1,2 @@
# This file exists purely to prevent Android.mk files in subdirectories from being automatically used
# See http://b/188491905 for more details

1830
BUILD.gn Normal file

File diff suppressed because it is too large Load Diff

237
CONTRIBUTORS Normal file
View File

@@ -0,0 +1,237 @@
# This is the official list of people who can contribute
# (and who have contributed) code to the ANGLE project
# repository.
# The AUTHORS file lists the copyright holders; this file
# lists people. For example, Google employees are listed here
# but not in AUTHORS, because Google holds the copyright.
#
TransGaming Inc.
Nicolas Capens
Daniel Koch
Geoff Lang
Andrew Lewycky
Jamie Madill
Gavriel State
Shannon Woods
Google Inc.
Brent Austin
Michael Bai
John Bauman
Peter Beverloo
Eric Binet
Steve Block
Rachel Blum
Eric Boren
Henry Bridge
Victor Costan
James Dong
Nat Duca
Courtney Goeltzenleuchter
Tobin Ehlis
Ian Elliott
Scott Graham
Peter Kasting
Vangelis Kokkevis
Charlie Lao
Jiacheng Lu
Zhenyao Mo
Daniel Nicoara
Kai Ninomiya
Cody Northrop
Justin Novosad
Alastair Patrick
Alok Priyadarshi
Kenneth Russell
Jonah Ryan-Davis
Brian Salomon
Justin Schuh
Gregg Tavares
thestig@chromium.org
Jeff Timanus
Tim Van Patten
Ben Vanik
Adrienne Walker
Corentin Wallez
Shahbaz Youssefi
Hailin Zhang
Adobe Systems Inc.
Alexandru Chiculita
Steve Minns
Max Vujovic
Apple Inc.
Dan Glastonbury
Dean Jackson
Kimmo Kinnunen
Kyle Piddington
Autodesk, Inc.
Ranger Harke
Cloud Party, Inc.
Conor Dickinson
The Qt Company Ltd.
Andrew Knight
Imagination Technologies Ltd.
Gregoire Payen de La Garanderie
Kyle Griffiths
Intel Corporation
Jin Yang
Andy Chen
Josh Triplett
Sudarsana Nagineni
Jiajia Qin
Jiawei Shao
Jie Chen
Qiankun Miao
Bryan Bernhart
Yunchao He
Xinghua Cao
Brandon Jones
Enrico Galli
Klarälvdalens Datakonsult AB
Milian Wolff
Mozilla Corp.
Dzmitry Malyshau
Ehsan Akhgari
Edwin Flores
Kelsey Gilbert
Mike Hommey
Benoit Jacob
Makoto Kato
Vladimir Vukicevic
Josh Matthews
Turbulenz
Michael Braithwaite
Ulrik Persson (ddefrostt)
Mark Banner (standard8mbp)
David Kilzer
Jacek Caban
Tibor den Ouden
Régis Fénéon
Sebastian Bergstein
James Ross-Gowan
Andrei Volykhin
Jérôme Duval
Till Rathmann
Nick Shaforostov
Microsoft Corporation
Cooper Partin
Austin Kinross
Mingyu Hu
Minmin Gong
Shawn Hargreaves
Rafael Cintron
James Clarke
Nathan Zabriskie
Patrick To
Microsoft Open Technologies, Inc.
Cooper Partin
Austin Kinross
NVIDIA Corporation
Olli Etuaho
Arun Patole
Qingqing Deng
Kimmo Kinnunen
Sami Väisänen
Martin Radev
Joonatan Saarhelo
Markus Tavenrath
Anders Leino
Opera Software ASA
Daniel Bratell
Tomasz Moniuszko
David Landell
Advanced Micro Devices, Inc.
Russ Lind
LG Electronics, Inc.
Jani Hautakangas
Ivan Murashov
IBM Inc.
Junliang Yan
AdaptVis GmbH
Sascha Kolodzey
Samsung Electronics, Inc.
Brandon Schade
Colin Peter
Hyunchang Kim
Hyunseok Ko
Jaedon Lee
Jeff Vigil
Jonah Taylor
Kevin Jung
Kyeongmin Kim
Mahmoud Kharsa
Mathew Prabakar
Minkyu Jeong
Mohan Maiya
Nirmal Singh
Peter Mowry
Sangwon Park
Saurabh Badenkal
Younggwan Kim
Sungyong Choi
Arm Ltd.
Fei Yang
Xinyi He
Sunny Sun
Xiaoxuan Liu
Ancheng Qiao
Amy Liu
Jian Li
Cheryl Wei
Guoxing Wu
Min Zhang
Broadcom Inc.
Gary Sweet
Facebook, Inc.
Artem Bolgar
The Khronos Group, Inc.
Alexey Knyazev
Igalia, S.L.
Jose Dapena Paz
Numfum GmbH
Carl Woffenden
Collabora, Ltd.
Lubosz Sarnecki
LunarG, Inc.
Mark Lobodzinski
Valve Corporation
Steven Noonan
Yandex LLC
Andrew Naumov
Rive
Chris Dalton
Institute of Software, Chinese Academy of Sciences
Wang Chen

5329
DEPS Normal file

File diff suppressed because it is too large Load Diff

4
DIR_METADATA Normal file
View File

@@ -0,0 +1,4 @@
monorail {
component: "Internals>GPU>ANGLE"
}
team_email: "angleproject@googlegroups.com"

32
LICENSE Normal file
View File

@@ -0,0 +1,32 @@
// Copyright 2018 The ANGLE Project Authors.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
// Ltd., nor the names of their contributors may be used to endorse
// or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

97
OWNERS Normal file
View File

@@ -0,0 +1,97 @@
# See https://chromium.googlesource.com/angle/angle/+/main/doc/ContributingCode.md#selecting-reviewers for more info
# Note: Owners must be split by domain to avoid git merge conflicts on platforms that cannot have
# email addresses from all platforms. Also, to avoid downstream git merge conflicts, all changes
# to this file should be done in the upstream ANGLE repository's main branch.
# @chromium.org email addresses:
geofflang@chromium.org
jmadill@chromium.org
kbr@chromium.org
syoussefi@chromium.org
ynovikov@chromium.org
# @google.com email addresses:
abdolrashidi@google.com
cclao@google.com
chrisforbes@google.com
cnorthrop@google.com
geofflang@google.com
ianelliott@google.com
jmadill@google.com
jonahr@google.com
lpy@google.com
romanl@google.com
solti@google.com
srisser@google.com
syoussefi@google.com
vantablack@google.com
ynovikov@google.com
yuxinhu@google.com
# The auto-roller can also modify autogenerated files, so we give it ownership
# over all ANGLE files.
angle-autoroll@skia-public.iam.gserviceaccount.com
per-file AUTHORS=*
per-file CONTRIBUTORS=*
per-file DEPS=*
per-file WATCHLISTS=*
# Allow anyone to update gitlinks just like DEPS.
per-file build=*
per-file buildtools=*
per-file third_party/clang-format/script=*
per-file testing=*
per-file third_party/abseil-cpp=*
per-file third_party/android_build_tools=*
per-file third_party/android_deps=*
per-file third_party/android_platform=*
per-file third_party/android_sdk=*
per-file third_party/astc-encoder/src=*
per-file third_party/catapult=*
per-file third_party/cherry=*
per-file third_party/colorama/src=*
per-file third_party/cpu_features/src=*
per-file third_party/depot_tools=*
per-file third_party/dummy_chromium=*
per-file third_party/EGL-Registry/src=*
per-file third_party/flatbuffers/src=*
per-file third_party/gles1_conform=*
per-file third_party/glmark2/src=*
per-file third_party/googletest=*
per-file third_party/ijar=*
per-file third_party/libdrm=*
per-file third_party/libjpeg_turbo=*
per-file third_party/libpng/src=*
per-file third_party/jinja2=*
per-file third_party/jsoncpp=*
per-file third_party/libc++/src=*
per-file third_party/libc++abi/src=*
per-file third_party/libunwind/src=*
per-file third_party/markupsafe=*
per-file third_party/mesa/src=*
per-file third_party/meson=*
per-file third_party/nasm=*
per-file third_party/OpenCL-Docs/src=*
per-file third_party/OpenCL-ICD-Loader/src=*
per-file third_party/OpenGL-Registry/src=*
per-file third_party/protobuf=*
per-file third_party/Python-Markdown=*
per-file third_party/rapidjson/src=*
per-file third_party/requests/src=*
per-file third_party/six=*
per-file third_party/SwiftShader=*
per-file third_party/VK-GL-CTS/src=*
per-file third_party/vulkan-deps=*
per-file third_party/vulkan_memory_allocator=*
per-file third_party/wayland=*
per-file third_party/zlib=*
per-file tools/android=*
per-file tools/clang=*
per-file tools/mb=*
per-file tools/md_browser=*
per-file tools/memory=*
per-file tools/perf=*
per-file tools/protoc_wrapper=*
per-file tools/python=*
per-file tools/valgrind=*

510
PRESUBMIT.py Normal file
View File

@@ -0,0 +1,510 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for code generation.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into depot_tools.
"""
import itertools
import os
import re
import shutil
import subprocess
import sys
import tempfile
import textwrap
import pathlib
# This line is 'magic' in that git-cl looks for it to decide whether to
# use Python3 instead of Python2 when running the code in this file.
USE_PYTHON3 = True
# Fragment of a regular expression that matches C/C++ and Objective-C++ implementation files and headers.
_IMPLEMENTATION_AND_HEADER_EXTENSIONS = r'\.(c|cc|cpp|cxx|mm|h|hpp|hxx)$'
# Fragment of a regular expression that matches C++ and Objective-C++ header files.
_HEADER_EXTENSIONS = r'\.(h|hpp|hxx)$'
_PRIMARY_EXPORT_TARGETS = [
'//:libEGL',
'//:libGLESv1_CM',
'//:libGLESv2',
'//:translator',
]
def _SplitIntoMultipleCommits(description_text):
paragraph_split_pattern = r"(?m)(^\s*$\n)"
multiple_paragraphs = re.split(paragraph_split_pattern, description_text)
multiple_commits = [""]
change_id_pattern = re.compile(r"(?m)^Change-Id: [a-zA-Z0-9]*$")
for paragraph in multiple_paragraphs:
multiple_commits[-1] += paragraph
if change_id_pattern.search(paragraph):
multiple_commits.append("")
if multiple_commits[-1] == "":
multiple_commits.pop()
return multiple_commits
def _CheckCommitMessageFormatting(input_api, output_api):
def _IsLineBlank(line):
return line.isspace() or line == ""
def _PopBlankLines(lines, reverse=False):
if reverse:
while len(lines) > 0 and _IsLineBlank(lines[-1]):
lines.pop()
else:
while len(lines) > 0 and _IsLineBlank(lines[0]):
lines.pop(0)
def _IsTagLine(line):
return ":" in line
def _CheckTabInCommit(lines):
return all([line.find("\t") == -1 for line in lines])
allowlist_strings = ['Revert', 'Roll', 'Manual roll', 'Reland', 'Re-land']
summary_linelength_warning_lower_limit = 65
summary_linelength_warning_upper_limit = 70
description_linelength_limit = 72
git_output = input_api.change.DescriptionText()
multiple_commits = _SplitIntoMultipleCommits(git_output)
errors = []
for k in range(len(multiple_commits)):
commit_msg_lines = multiple_commits[k].splitlines()
commit_number = len(multiple_commits) - k
commit_tag = "Commit " + str(commit_number) + ":"
commit_msg_line_numbers = {}
for i in range(len(commit_msg_lines)):
commit_msg_line_numbers[commit_msg_lines[i]] = i + 1
_PopBlankLines(commit_msg_lines, True)
_PopBlankLines(commit_msg_lines, False)
allowlisted = False
if len(commit_msg_lines) > 0:
for allowlist_string in allowlist_strings:
if commit_msg_lines[0].startswith(allowlist_string):
allowlisted = True
break
if allowlisted:
continue
if not _CheckTabInCommit(commit_msg_lines):
errors.append(
output_api.PresubmitError(commit_tag + "Tabs are not allowed in commit message."))
# the tags paragraph is at the end of the message
# the break between the tags paragraph is the first line without ":"
# this is sufficient because if a line is blank, it will not have ":"
last_paragraph_line_count = 0
while len(commit_msg_lines) > 0 and _IsTagLine(commit_msg_lines[-1]):
last_paragraph_line_count += 1
commit_msg_lines.pop()
if last_paragraph_line_count == 0:
errors.append(
output_api.PresubmitError(
commit_tag +
"Please ensure that there are tags (e.g., Bug:, Test:) in your description."))
if len(commit_msg_lines) > 0:
if not _IsLineBlank(commit_msg_lines[-1]):
output_api.PresubmitError(commit_tag +
"Please ensure that there exists 1 blank line " +
"between tags and description body.")
else:
# pop the blank line between tag paragraph and description body
commit_msg_lines.pop()
if len(commit_msg_lines) > 0 and _IsLineBlank(commit_msg_lines[-1]):
errors.append(
output_api.PresubmitError(
commit_tag + 'Please ensure that there exists only 1 blank line '
'between tags and description body.'))
# pop all the remaining blank lines between tag and description body
_PopBlankLines(commit_msg_lines, True)
if len(commit_msg_lines) == 0:
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure that your description summary'
' and description body are not blank.'))
continue
if summary_linelength_warning_lower_limit <= len(commit_msg_lines[0]) \
<= summary_linelength_warning_upper_limit:
errors.append(
output_api.PresubmitPromptWarning(
commit_tag + "Your description summary should be on one line of " +
str(summary_linelength_warning_lower_limit - 1) + " or less characters."))
elif len(commit_msg_lines[0]) > summary_linelength_warning_upper_limit:
errors.append(
output_api.PresubmitError(
commit_tag + "Please ensure that your description summary is on one line of " +
str(summary_linelength_warning_lower_limit - 1) + " or less characters."))
commit_msg_lines.pop(0) # get rid of description summary
if len(commit_msg_lines) == 0:
continue
if not _IsLineBlank(commit_msg_lines[0]):
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure the summary is only 1 line and '
'there is 1 blank line between the summary '
'and description body.'))
else:
commit_msg_lines.pop(0) # pop first blank line
if len(commit_msg_lines) == 0:
continue
if _IsLineBlank(commit_msg_lines[0]):
errors.append(
output_api.PresubmitError(commit_tag +
'Please ensure that there exists only 1 blank line '
'between description summary and description body.'))
# pop all the remaining blank lines between
# description summary and description body
_PopBlankLines(commit_msg_lines)
# loop through description body
while len(commit_msg_lines) > 0:
line = commit_msg_lines.pop(0)
# lines starting with 4 spaces, quotes or lines without space(urls)
# are exempt from length check
if line.startswith(" ") or line.startswith("> ") or " " not in line:
continue
if len(line) > description_linelength_limit:
errors.append(
output_api.PresubmitError(
commit_tag + 'Line ' + str(commit_msg_line_numbers[line]) +
' is too long.\n' + '"' + line + '"\n' + 'Please wrap it to ' +
str(description_linelength_limit) + ' characters. ' +
"Lines without spaces or lines starting with 4 spaces are exempt."))
break
return errors
def _CheckChangeHasBugField(input_api, output_api):
"""Requires that the changelist have a Bug: field from a known project."""
bugs = input_api.change.BugsFromDescription()
if not bugs:
return [
output_api.PresubmitError('Please ensure that your description contains:\n'
'"Bug: angleproject:[bug number]"\n'
'directly above the Change-Id tag.')
]
# The bug must be in the form of "project:number". None is also accepted, which is used by
# rollers as well as in very minor changes.
if len(bugs) == 1 and bugs[0] == 'None':
return []
projects = [
'angleproject:', 'chromium:', 'dawn:', 'fuchsia:', 'skia:', 'swiftshader:', 'tint:', 'b/'
]
bug_regex = re.compile(r"([a-z]+[:/])(\d+)")
errors = []
extra_help = None
for bug in bugs:
if bug == 'None':
errors.append(
output_api.PresubmitError('Invalid bug tag "None" in presence of other bug tags.'))
continue
match = re.match(bug_regex, bug)
if match == None or bug != match.group(0) or match.group(1) not in projects:
errors.append(output_api.PresubmitError('Incorrect bug tag "' + bug + '".'))
if not extra_help:
extra_help = output_api.PresubmitError('Acceptable format is:\n\n'
' Bug: project:bugnumber\n\n'
'Acceptable projects are:\n\n ' +
'\n '.join(projects))
if extra_help:
errors.append(extra_help)
return errors
def _CheckCodeGeneration(input_api, output_api):
class Msg(output_api.PresubmitError):
"""Specialized error message"""
def __init__(self, message, **kwargs):
super(output_api.PresubmitError, self).__init__(
message,
long_text='Please ensure your ANGLE repositiory is synced to tip-of-tree\n'
'and all ANGLE DEPS are fully up-to-date by running gclient sync.\n'
'\n'
'If that fails, run scripts/run_code_generation.py to refresh generated hashes.\n'
'\n'
'If you are building ANGLE inside Chromium you must bootstrap ANGLE\n'
'before gclient sync. See the DevSetup documentation for more details.\n',
**kwargs)
code_gen_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
'scripts/run_code_generation.py')
cmd_name = 'run_code_generation'
cmd = [input_api.python3_executable, code_gen_path, '--verify-no-dirty']
test_cmd = input_api.Command(name=cmd_name, cmd=cmd, kwargs={}, message=Msg)
if input_api.verbose:
print('Running ' + cmd_name)
return input_api.RunTests([test_cmd])
# Taken directly from Chromium's PRESUBMIT.py
def _CheckNewHeaderWithoutGnChange(input_api, output_api):
"""Checks that newly added header files have corresponding GN changes.
Note that this is only a heuristic. To be precise, run script:
build/check_gn_headers.py.
"""
def headers(f):
return input_api.FilterSourceFile(f, files_to_check=(r'.+%s' % _HEADER_EXTENSIONS,))
new_headers = []
for f in input_api.AffectedSourceFiles(headers):
if f.Action() != 'A':
continue
new_headers.append(f.LocalPath())
def gn_files(f):
return input_api.FilterSourceFile(f, files_to_check=(r'.+\.gn',))
all_gn_changed_contents = ''
for f in input_api.AffectedSourceFiles(gn_files):
for _, line in f.ChangedContents():
all_gn_changed_contents += line
problems = []
for header in new_headers:
basename = input_api.os_path.basename(header)
if basename not in all_gn_changed_contents:
problems.append(header)
if problems:
return [
output_api.PresubmitPromptWarning(
'Missing GN changes for new header files',
items=sorted(problems),
long_text='Please double check whether newly added header files need '
'corresponding changes in gn or gni files.\nThis checking is only a '
'heuristic. Run build/check_gn_headers.py to be precise.\n'
'Read https://crbug.com/661774 for more info.')
]
return []
def _CheckExportValidity(input_api, output_api):
outdir = tempfile.mkdtemp()
# shell=True is necessary on Windows, as otherwise subprocess fails to find
# either 'gn' or 'vpython3' even if they are findable via PATH.
use_shell = input_api.is_windows
try:
try:
subprocess.check_output(['gn', 'gen', outdir], shell=use_shell)
except subprocess.CalledProcessError as e:
return [
output_api.PresubmitError(
'Unable to run gn gen for export_targets.py: %s' % e.output)
]
export_target_script = os.path.join(input_api.PresubmitLocalPath(), 'scripts',
'export_targets.py')
try:
subprocess.check_output(
['vpython3', export_target_script, outdir] + _PRIMARY_EXPORT_TARGETS,
stderr=subprocess.STDOUT,
shell=use_shell)
except subprocess.CalledProcessError as e:
if input_api.is_committing:
return [output_api.PresubmitError('export_targets.py failed: %s' % e.output)]
return [
output_api.PresubmitPromptWarning(
'export_targets.py failed, this may just be due to your local checkout: %s' %
e.output)
]
return []
finally:
shutil.rmtree(outdir)
def _CheckTabsInSourceFiles(input_api, output_api):
"""Forbids tab characters in source files due to a WebKit repo requirement."""
def implementation_and_headers_including_third_party(f):
# Check third_party files too, because WebKit's checks don't make exceptions.
return input_api.FilterSourceFile(
f,
files_to_check=(r'.+%s' % _IMPLEMENTATION_AND_HEADER_EXTENSIONS,),
files_to_skip=[f for f in input_api.DEFAULT_FILES_TO_SKIP if not "third_party" in f])
files_with_tabs = []
for f in input_api.AffectedSourceFiles(implementation_and_headers_including_third_party):
for (num, line) in f.ChangedContents():
if '\t' in line:
files_with_tabs.append(f)
break
if files_with_tabs:
return [
output_api.PresubmitError(
'Tab characters in source files.',
items=sorted(files_with_tabs),
long_text=
'Tab characters are forbidden in ANGLE source files because WebKit\'s Subversion\n'
'repository does not allow tab characters in source files.\n'
'Please remove tab characters from these files.')
]
return []
# https://stackoverflow.com/a/196392
def is_ascii(s):
return all(ord(c) < 128 for c in s)
def _CheckNonAsciiInSourceFiles(input_api, output_api):
"""Forbids non-ascii characters in source files."""
def implementation_and_headers(f):
return input_api.FilterSourceFile(
f, files_to_check=(r'.+%s' % _IMPLEMENTATION_AND_HEADER_EXTENSIONS,))
files_with_non_ascii = []
for f in input_api.AffectedSourceFiles(implementation_and_headers):
for (num, line) in f.ChangedContents():
if not is_ascii(line):
files_with_non_ascii.append("%s: %s" % (f, line))
break
if files_with_non_ascii:
return [
output_api.PresubmitError(
'Non-ASCII characters in source files.',
items=sorted(files_with_non_ascii),
long_text='Non-ASCII characters are forbidden in ANGLE source files.\n'
'Please remove non-ASCII characters from these files.')
]
return []
def _CheckCommentBeforeTestInTestFiles(input_api, output_api):
"""Require a comment before TEST_P() and other tests."""
def test_files(f):
return input_api.FilterSourceFile(
f, files_to_check=(r'^src/tests/.+\.cpp$', r'^src/.+_unittest\.cpp$'))
tests_with_no_comment = []
for f in input_api.AffectedSourceFiles(test_files):
diff = f.GenerateScmDiff()
last_line_was_comment = False
for line in diff.splitlines():
# Skip removed lines
if line.startswith('-'):
continue
new_line_is_comment = line.startswith(' //') or line.startswith('+//')
new_line_is_test_declaration = (
line.startswith('+TEST_P(') or line.startswith('+TEST(') or
line.startswith('+TYPED_TEST('))
if new_line_is_test_declaration and not last_line_was_comment:
tests_with_no_comment.append(line[1:])
last_line_was_comment = new_line_is_comment
if tests_with_no_comment:
return [
output_api.PresubmitError(
'Tests without comment.',
items=sorted(tests_with_no_comment),
long_text='ANGLE requires a comment describing what a test does.')
]
return []
def _CheckShaderVersionInShaderLangHeader(input_api, output_api):
"""Requires an update to ANGLE_SH_VERSION when ShaderLang.h or ShaderVars.h change."""
def headers(f):
return input_api.FilterSourceFile(
f,
files_to_check=(r'^include/GLSLANG/ShaderLang.h$', r'^include/GLSLANG/ShaderVars.h$'))
headers_changed = input_api.AffectedSourceFiles(headers)
if len(headers_changed) == 0:
return []
# Skip this check for reverts and rolls. Unlike
# _CheckCommitMessageFormatting, relands are still checked because the
# original change might have incremented the version correctly, but the
# rebase over a new version could accidentally remove that (because another
# change in the meantime identically incremented it).
git_output = input_api.change.DescriptionText()
multiple_commits = _SplitIntoMultipleCommits(git_output)
for commit in multiple_commits:
if commit.startswith('Revert') or commit.startswith('Roll'):
return []
diffs = '\n'.join(f.GenerateScmDiff() for f in headers_changed)
versions = dict(re.findall(r'^([-+])#define ANGLE_SH_VERSION\s+(\d+)', diffs, re.M))
if len(versions) != 2 or int(versions['+']) <= int(versions['-']):
return [
output_api.PresubmitError(
'ANGLE_SH_VERSION should be incremented when ShaderLang.h or ShaderVars.h change.',
)
]
return []
def _CheckGClientExists(input_api, output_api, search_limit=None):
presubmit_path = pathlib.Path(input_api.PresubmitLocalPath())
for current_path in itertools.chain([presubmit_path], presubmit_path.parents):
gclient_path = current_path.joinpath('.gclient')
if gclient_path.exists() and gclient_path.is_file():
return []
# search_limit parameter is used in unit tests to prevent searching all the way to root
# directory for reproducibility.
elif search_limit != None and current_path == search_limit:
break
return [
output_api.PresubmitError(
'Missing .gclient file.',
long_text=textwrap.fill(
width=100,
text='The top level directory of the repository must contain a .gclient file.'
' You can follow the steps outlined in the link below to get set up for ANGLE'
' development:') +
'\n\nhttps://chromium.googlesource.com/angle/angle/+/refs/heads/main/doc/DevSetup.md')
]
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(input_api.canned_checks.CheckForCommitObjects(input_api, output_api))
results.extend(_CheckTabsInSourceFiles(input_api, output_api))
results.extend(_CheckNonAsciiInSourceFiles(input_api, output_api))
results.extend(_CheckCommentBeforeTestInTestFiles(input_api, output_api))
results.extend(_CheckShaderVersionInShaderLangHeader(input_api, output_api))
results.extend(_CheckCodeGeneration(input_api, output_api))
results.extend(_CheckChangeHasBugField(input_api, output_api))
results.extend(input_api.canned_checks.CheckChangeHasDescription(input_api, output_api))
results.extend(_CheckNewHeaderWithoutGnChange(input_api, output_api))
results.extend(_CheckExportValidity(input_api, output_api))
results.extend(
input_api.canned_checks.CheckPatchFormatted(
input_api, output_api, result_factory=output_api.PresubmitError))
results.extend(_CheckCommitMessageFormatting(input_api, output_api))
results.extend(_CheckGClientExists(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api):
return CheckChangeOnUpload(input_api, output_api)

13
README.chromium Normal file
View File

@@ -0,0 +1,13 @@
Name: ANGLE
URL: http://angleproject.org
Version: unknown
License: BSD
License File: LICENSE
Shipped: yes
Description:
The goal of ANGLE is to allow users of multiple operating systems
to seamlessly run WebGL and other OpenGL ES content by translating
OpenGL ES API calls to one of the hardware-supported APIs available
for that platform.

105
README.md Normal file
View File

@@ -0,0 +1,105 @@
# ANGLE - Almost Native Graphics Layer Engine
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other
OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available
for that platform. ANGLE currently provides translation from OpenGL ES 2.0, 3.0 and 3.1 to Vulkan,
desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Future plans include ES 3.2, translation to
Metal and MacOS, Chrome OS, and Fuchsia support.
### Level of OpenGL ES support via backing renderers
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan | Metal |
|----------------|:-------------:|:----------------:|:--------------:|:-------------:|:-------------:|:-------------:|
| OpenGL ES 2.0 | complete | complete | complete | complete | complete | complete |
| OpenGL ES 3.0 | | complete | complete | complete | complete | complete |
| OpenGL ES 3.1 | | [incomplete][ES31OnD3D] | complete | complete | complete | |
| OpenGL ES 3.2 | | | in progress | in progress | in progress | |
Additionally, OpenGL ES 1.1 is implemented in the front-end using OpenGL ES 3.0 features. This
version of the specification is thus supported on all platforms specified above that support OpenGL
ES 3.0 with [known issues][ES1].
[ES31OnD3D]: doc/ES31StatusOnD3D11.md
[ES1]: doc/ES1Status.md
### Platform support via backing renderers
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan | Metal |
|-------------:|:--------------:|:--------------:|:-------------:|:-----------:|:-----------:|:--------------------:|
| Windows | complete | complete | complete | complete | complete | |
| Linux | | | complete | | complete | |
| Mac OS X | | | complete | | | complete [1] |
| iOS | | | | | | complete [2] |
| Chrome OS | | | | complete | planned | |
| Android | | | | complete | complete | |
| GGP (Stadia) | | | | | complete | |
| Fuchsia | | | | | complete | |
[1] Metal is supported on macOS 10.14+
[2] Metal is supported on iOS 12+
ANGLE v1.0.772 was certified compliant by passing the OpenGL ES 2.0.3 conformance tests in October 2011.
ANGLE has received the following certifications with the Vulkan backend:
* OpenGL ES 2.0: ANGLE 2.1.0.d46e2fb1e341 (Nov, 2019)
* OpenGL ES 3.0: ANGLE 2.1.0.f18ff947360d (Feb, 2020)
* OpenGL ES 3.1: ANGLE 2.1.0.f5dace0f1e57 (Jul, 2020)
ANGLE also provides an implementation of the EGL 1.5 specification.
ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Firefox on Windows
platforms. Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated
Canvas2D implementation and the Native Client sandbox environment.
Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL
implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of
the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders
are accepted across browsers and platforms. The shader translator can be used to translate shaders
to other shading languages, and to optionally apply shader modifications to work around bugs or
quirks in the native graphics drivers. The translator targets Desktop GLSL, Vulkan GLSL, Direct3D
HLSL, and even ESSL for native GLES2 platforms.
## Sources
ANGLE repository is hosted by Chromium project and can be
[browsed online](https://chromium.googlesource.com/angle/angle) or cloned with
git clone https://chromium.googlesource.com/angle/angle
## Building
View the [Dev setup instructions](doc/DevSetup.md).
## Contributing
* Join our [Google group](https://groups.google.com/group/angleproject) to keep up to date.
* Join us on [Slack](https://chromium.slack.com) in the #angle channel. You can
follow the instructions on the [Chromium developer page](https://www.chromium.org/developers/slack)
for the steps to join the Slack channel. For Googlers, please follow the
instructions on this [document](https://docs.google.com/document/d/1wWmRm-heDDBIkNJnureDiRO7kqcRouY2lSXlO6N2z6M/edit?usp=sharing)
to use your google or chromium email to join the Slack channel.
* [File bugs](http://anglebug.com/new) in the [issue tracker](https://bugs.chromium.org/p/angleproject/issues/list) (preferably with an isolated test-case).
* [Choose an ANGLE branch](doc/ChoosingANGLEBranch.md) to track in your own project.
* Read ANGLE development [documentation](doc).
* Look at [pending](https://chromium-review.googlesource.com/q/project:angle/angle+status:open)
and [merged](https://chromium-review.googlesource.com/q/project:angle/angle+status:merged) changes.
* Become a [code contributor](doc/ContributingCode.md).
* Use ANGLE's [coding standard](doc/CodingStandard.md).
* Learn how to [build ANGLE for Chromium development](doc/BuildingAngleForChromiumDevelopment.md).
* Get help on [debugging ANGLE](doc/DebuggingTips.md).
* Go through [ANGLE's orientation](doc/Orientation.md) and sift through [starter projects](https://bugs.chromium.org/p/angleproject/issues/list?q=Hotlist%3DStarterBug). If you decide to take on any task, write a comment so you can get in touch with us, and more importantly, set yourself as the "owner" of the bug. This avoids having multiple people accidentally working on the same issue.
* Read about WebGL on the [Khronos WebGL Wiki](http://khronos.org/webgl/wiki/Main_Page).
* Learn about the initial ANGLE implementation details in the [OpenGL Insights chapter on ANGLE](http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-ANGLE.pdf) (this is not the most up-to-date ANGLE implementation details, it is listed here for historical reference only) and this [ANGLE presentation](https://drive.google.com/file/d/0Bw29oYeC09QbbHoxNE5EUFh0RGs/view?usp=sharing&resourcekey=0-CNvGnQGgFSvbXgX--Y_Iyg).
* Learn about the past, present, and future of the ANGLE implementation in [this presentation](https://docs.google.com/presentation/d/1CucIsdGVDmdTWRUbg68IxLE5jXwCb2y1E9YVhQo0thg/pub?start=false&loop=false).
* Watch a [short presentation](https://youtu.be/QrIKdjmpmaA) on the Vulkan back-end.
* Track the [dEQP test conformance](doc/dEQP-Charts.md)
* Read design docs on the [Vulkan back-end](src/libANGLE/renderer/vulkan/README.md)
* Read about ANGLE's [testing infrastructure](infra/README.md)
* View information on ANGLE's [supported extensions](doc/ExtensionSupport.md)
* If you use ANGLE in your own project, we'd love to hear about it!

1096
SConstruct

File diff suppressed because it is too large Load Diff

25
WATCHLISTS Normal file
View File

@@ -0,0 +1,25 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Watchlist Rules
# Refer: http://dev.chromium.org/developers/contributing-code/watchlists
# IMPORTANT: The regular expression filepath is tested against each path using
# re.search, so it is not usually necessary to add .*.
{
'WATCHLIST_DEFINITIONS': {
'vulkan': {
'filepath': 'src/libANGLE/renderer/vulkan/',
},
},
##############################################################################
# Please keep alphabetical
##############################################################################
'WATCHLISTS': {
'vulkan': ['cclao+angleWatchVk@google.com',
'jmadill+watch@chromium.org'],
},
}

View File

@@ -0,0 +1,4 @@
[
"src/common/third_party/xxhash",
"src/libANGLE/renderer/vulkan/shaders/src/third_party/ffx_spd"
]

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.android.angle">
<application android:allowBackup="false"
android:label="com.android.angle"
android:extractNativeLibs="false"
android:forceQueryable="true"
android:multiArch="true">
<activity android:name="com.android.angle.EmptyMainActivity"
android:label="Empty Main Activity"
android:visibleToInstantApps="true"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.INFO"/>
</intent-filter>
<!-- Indicate that this PKG is ANGLE. -->
<intent-filter android:priority="1">
<action android:name="android.app.action.ANGLE_FOR_ANDROID" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="{{manifest_package|default('org.chromium.angle')}}">
<application android:label="Angle for Android"
android:extractNativeLibs="{{extract_native_libs|default('false')}}"
android:multiArch="true">
</application>
</manifest>

2
android/OWNERS Normal file
View File

@@ -0,0 +1,2 @@
cnorthrop@google.com
ianelliott@google.com

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2023 The ANGLE Project Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<permissions>
<privapp-permissions package="com.android.angle">
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
</privapp-permissions>
</permissions>

111
android/angle_apk.gni Normal file
View File

@@ -0,0 +1,111 @@
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("../gni/angle.gni")
vulkan_validation_layers = [ "VkLayer_khronos_validation" ]
angle_libraries = [
"libEGL",
"libGLESv1_CM",
"libGLESv2",
"libfeature_support",
]
if (enable_java_templates) {
template("angle_apk") {
manifest_target_name = "${target_name}__manifest"
manifest_path =
"${target_gen_dir}/${target_name}/android/AndroidManifest.xml"
jinja_template(manifest_target_name) {
input = "${angle_root}/android/AndroidManifest.xml.jinja2"
output = manifest_path
variables = [
"manifest_package=${invoker.package_name}",
"extract_native_libs=${angle_extract_native_libs}",
]
}
android_assets("${invoker.package_name}_assets") {
disable_compression = true
sources = [ "src/feature_support_util/a4a_rules.json" ]
}
android_apk(target_name) {
forward_variables_from(invoker, "*")
android_manifest = manifest_path
android_manifest_dep = ":$manifest_target_name"
version_code = invoker.version_code
version_name = invoker.version_name
min_sdk_version = 26
target_sdk_version = 28
deps = [ ":${invoker.package_name}_assets" ]
if (symbol_level != 0) {
deps += [ ":compressed_symbols" ]
if (android_64bit_target_cpu &&
defined(android_secondary_abi_toolchain)) {
deps += [ ":compressed_symbols($android_secondary_abi_toolchain)" ]
}
}
if (android_64bit_target_cpu &&
defined(android_secondary_abi_toolchain)) {
if (symbol_level == 0) {
secondary_abi_shared_libraries = []
foreach(_library, angle_libraries) {
secondary_abi_shared_libraries +=
[ "$angle_root:${_library}($android_secondary_abi_toolchain)" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" +
"($android_secondary_abi_toolchain)" ]
}
}
} else {
_secondary_out_dir = get_label_info(
":compressed_symbols($android_secondary_abi_toolchain)",
"root_out_dir")
secondary_abi_loadable_modules = []
foreach(_library, angle_libraries) {
secondary_abi_loadable_modules += [ "$_secondary_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
secondary_abi_loadable_modules += [ "${_secondary_out_dir}/lib.compressed/lib${_layer}${shlib_extension}" ]
}
}
}
}
if (symbol_level == 0) {
shared_libraries = []
foreach(_library, angle_libraries) {
shared_libraries += [ "$angle_root:$_library" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
shared_libraries +=
[ "$angle_vulkan_validation_layers_dir:${_layer}" ]
}
}
} else {
loadable_modules = []
foreach(_library, angle_libraries) {
loadable_modules += [ "$root_out_dir/lib.compressed/${_library}${angle_libs_suffix}${shlib_extension}" ]
}
if (angle_enable_vulkan_validation_layers) {
foreach(_layer, vulkan_validation_layers) {
loadable_modules += [
"$root_out_dir/lib.compressed/lib${_layer}${shlib_extension}",
]
}
}
}
}
}
}

98
android/compress_symbols.py Executable file
View File

@@ -0,0 +1,98 @@
#!/usr/bin/env python
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Generate library file with compressed symbols per Android build
# process.
# https://www.ece.villanova.edu/VECR/doc/gdb/MiniDebugInfo.html
import argparse
import subprocess
import sys
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
'--objcopy', required=True, help='The objcopy binary to run', metavar='PATH')
parser.add_argument('--nm', required=True, help='The nm binary to run', metavar='PATH')
parser.add_argument('--strip', required=True, help='The strip binary to run', metavar='PATH')
parser.add_argument(
'--output', required=True, help='Final output shared object file', metavar='FILE')
parser.add_argument(
'--unstrippedsofile',
required=True,
help='Unstripped shared object file produced by linking command',
metavar='FILE')
args = parser.parse_args()
copy_cmd = ["cp", args.unstrippedsofile, args.output]
result = subprocess.call(copy_cmd)
nm_cmd = subprocess.Popen([args.nm, '-D', args.output, '--format=posix', '--defined-only'],
stdout=subprocess.PIPE)
awk_cmd = subprocess.Popen(['awk', '{ print $1}'], stdin=nm_cmd.stdout, stdout=subprocess.PIPE)
dynsym_out = open(args.output + '.dynsyms', 'w')
sort_cmd = subprocess.Popen(['sort'], stdin=awk_cmd.stdout, stdout=dynsym_out)
sort_cmd.wait()
dynsym_out.close()
funcsyms_out = open(args.output + '.funcsyms', 'w')
nm_cmd = subprocess.Popen([args.nm, args.output, '--format=posix', '--defined-only'],
stdout=subprocess.PIPE)
awk_cmd = subprocess.Popen(['awk', '{ if ($2 == "T" || $2 == "t" || $2 == "D") print $1 }'],
stdin=nm_cmd.stdout,
stdout=subprocess.PIPE)
sort_cmd = subprocess.Popen(['sort'], stdin=awk_cmd.stdout, stdout=funcsyms_out)
sort_cmd.wait()
funcsyms_out.close()
keep_symbols = open(args.output + '.keep_symbols', 'w')
comm_cmd = subprocess.Popen(
['comm', '-13', args.output + '.dynsyms', args.output + '.funcsyms'], stdout=keep_symbols)
comm_cmd.wait()
# Ensure that the keep_symbols file is not empty.
keep_symbols.write("\n")
keep_symbols.close()
objcopy_cmd = [args.objcopy, '--only-keep-debug', args.output, args.output + '.debug']
subprocess.check_call(objcopy_cmd)
objcopy_cmd = [
args.objcopy, '-S', '--remove-section', '.gdb_index', '--remove-section', '.comment',
'--keep-symbols', args.output + '.keep_symbols', args.output + '.debug',
args.output + '.mini_debuginfo'
]
subprocess.check_call(objcopy_cmd)
strip_cmd = [args.strip, '--strip-all', '-R', '.comment', args.output]
subprocess.check_call(strip_cmd)
xz_cmd = ['xz', '-f', args.output + '.mini_debuginfo']
subprocess.check_call(xz_cmd)
objcopy_cmd = [
args.objcopy, '--add-section', '.gnu_debugdata=' + args.output + '.mini_debuginfo.xz',
args.output
]
subprocess.check_call(objcopy_cmd)
# Clean out scratch files
rm_cmd = [
'rm', '-f', args.output + '.dynsyms', args.output + '.funcsyms',
args.output + '.keep_symbols', args.output + '.debug', args.output + '.mini_debuginfo',
args.output + '.mini_debuginfo.xz'
]
result = subprocess.call(rm_cmd)
return result
if __name__ == "__main__":
sys.exit(main())

1
angle

Submodule angle deleted from 468fcbe033

1
build Submodule

Submodule build added at 3a0a70c754

25
build_overrides/angle.gni Normal file
View File

@@ -0,0 +1,25 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Override for angle_root
angle_root = "//"
# True if ANGLE can access build/, testing/ and other Chrome folders.
angle_has_build = true
# Declares the maximum supported VulkanMemoryAllocator version by the client
# in format AAABBBCCC, where AAA = major, BBB = minor, CCC = patch.
# The VulkanMemoryAllocator version may be found in its CHANGELOG.md.
angle_vma_version = 3000000
# Overrides for ANGLE's dependencies
angle_abseil_cpp_dir = "//third_party/abseil-cpp"
angle_glslang_dir = "//third_party/vulkan-deps/glslang/src"
angle_googletest_dir = "//third_party/googletest/src"
angle_jsoncpp_dir = "//third_party/jsoncpp"
angle_libjpeg_turbo_dir = "//third_party/libjpeg_turbo"
angle_libpng_dir = "//third_party/libpng"
angle_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
angle_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
angle_vulkan_memory_allocator_dir = "//third_party/vulkan_memory_allocator"

61
build_overrides/build.gni Normal file
View File

@@ -0,0 +1,61 @@
# Copyright 2017 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
build_with_chromium = false
ignore_elf32_limitations = true
use_system_xcode = ""
# If true, it assumes that //third_party/abseil-cpp is an available
# dependency for googletest.
gtest_enable_absl_printers = false
}
if (host_os == "mac" && use_system_xcode == "") {
_result = exec_script("//build/mac/should_use_hermetic_xcode.py",
[ target_os ],
"value")
assert(_result != 2,
"Do not allow building targets with the default" +
"hermetic toolchain if the minimum OS version is not met.")
assert(_result != 3,
"iOS does not support building with a hermetic toolchain. " +
"Please install Xcode.")
use_system_xcode = _result != 1
}
enable_java_templates = true
# Build with fewer Android dependencies
limit_android_deps = true
# Standalone ANGLE is used in places that are extremely performance sensitive,
# such as the system graphics driver on Android. ANGLE validates arguments at
# the API boundary and assumes that all bounds, et cetera are valid elsewhere
# in internal code.
#
# Unfortunately, this means the compiler cannot optimize out the vast majority
# of hardening checks. To ensure performance remains competitive, drop the
# libc++ hardening checks, since ANGLE already makes no security guarantees in
# these situations.
if (is_win) {
# TODO(https://crbug.com/1418717): ANGLE uses Chromium's abseil-cpp directory.
# Since Abseil does not mark symbols as exported, Chromium uses an alternate
# approach to scrape the symbols that need to be exported and generates .def
# files that the ANGLE build reuses.
#
# However, these symbol names include libc++ types, and libc++ hardening
# affects ABI, so ANGLE and Chromium's libc++ hardening modes need to remain
# in sync on Windows. This is a bit of a hack but "OK" since the performance
# concerns for standalone ANGLE builds are not relevant on Windows.
enable_safe_libcxx = true
} else if (is_linux) {
# https://anglebug.com/8040: turning off safe_libcxx breaks TSAN
enable_safe_libcxx = true
} else {
enable_safe_libcxx = false
}

View File

@@ -0,0 +1,10 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Paths to glslang dependencies in ANGLE
glslang_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
# Reduce glslang's features to what the Vulkan backend of ANGLE uses. This both speeds up glslang's
# initialization and reduces binary footprint.
glslang_angle = true

17
build_overrides/gtest.gni Normal file
View File

@@ -0,0 +1,17 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Override settings for third_party integration with Google Test.
# Exclude support for registering main function in multi-process tests.
gtest_include_multiprocess = true
# Exclude support for platform-specific operations across unit tests.
gtest_include_platform_test = true
# Exclude support for testing Objective C code on OS X and iOS.
gtest_include_objc_support = true
# Exclude support for flushing coverage files on iOS.
gtest_include_ios_coverage = true

View File

@@ -0,0 +1,10 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We are building inside ANGLE
spirv_tools_standalone = false
# Paths to SPIRV-Tools dependencies in ANGLE
spirv_tools_googletest_dir = "//third_party/googletest/src"
spirv_tools_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"

View File

@@ -0,0 +1,9 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We are building SwiftShader in ANGLE
swiftshader_standalone = false
# Path to SwiftShader
swiftshader_dir = "//third_party/SwiftShader"

View File

@@ -0,0 +1,13 @@
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//gni/angle.gni")
vulkan_headers_dir = angle_vulkan_headers_dir
vulkan_data_subdir = angle_data_dir
vulkan_gen_subdir = "angle/vulkan"
vulkan_use_x11 = angle_use_x11
vulkan_use_wayland = angle_use_wayland

View File

@@ -0,0 +1,5 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -0,0 +1,7 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")
vulkan_loader_shared = angle_shared_libvulkan

View File

@@ -0,0 +1,5 @@
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -0,0 +1,5 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -0,0 +1,5 @@
# Copyright 2023 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")

View File

@@ -0,0 +1,11 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/vulkan_common.gni")
vulkan_utility_libraries_dir =
"//third_party/vulkan-deps/vulkan-utility-libraries/src"
vvl_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
vvl_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
vvl_glslang_dir = "//third_party/vulkan-deps/glslang/src"

View File

@@ -0,0 +1,11 @@
# Copyright 2022 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//gni/angle.gni")
# Path to Wayland sources
wayland_dir = angle_wayland_dir
# ANGLE standalone has no Wayland GN
wayland_gn_dir = ""

1
buildtools Submodule

Submodule buildtools added at d53d0131e2

6
codereview.settings Normal file
View File

@@ -0,0 +1,6 @@
# This file is used by git cl to get repository specific information.
CODE_REVIEW_SERVER: https://chromium-review.googlesource.com
GERRIT_HOST: True
TRYSERVER_GERRIT_URL: https://chromium-review.googlesource.com
GERRIT_SQUASH_UPLOADS: False
FORMAT_FULL_BY_DEFAULT: True

15
doc/64BitSafety.md Normal file
View File

@@ -0,0 +1,15 @@
# 64-bit Safety In the Compiler
An issue that has arisen recently for contributors making changes to the GLSL ES
grammar files has been that certain versions of flex, the lexer on which ANGLE
relies, produce outputs which are not safe in 64-bit builds.
To address this issue, ANGLE has added a step to its generation scripts to apply
64-bit safety fixes to newly regenerated outputs. This should be unnoticeable to
developers invoking flex via the generate\_parser.sh scripts in the relevant
compiler directories, as the fixes will be applied by the patch utility as part
of that script.
When making code contributions that affect the grammar files, please ensure that
you've generated the outputs using the script, to make certain that the 64-bit
safety fixes are applied.

46
doc/AddingExtensions.md Normal file
View File

@@ -0,0 +1,46 @@
# Introduction
This page describes how to add new extensions to ANGLE.
# Adding EGL extensions
Note: see also [anglebug.com/2621](http://anglebug.com/2621), linked
from the [starter project](Starter-Projects.md) doc, to simplify some
of these steps.
For extensions requiring new entry points:
* Add the extension xml to
[scripts/egl_angle_ext.xml](../scripts/egl_angle_ext.xml) .
* Note the prototypes for the new entry points must be added to the
top of the file, and the functions themselves grouped under the
extension name to the bottom of the file.
* Modify [scripts/registry_xml.py](../scripts/registry_xml.py) to add
the new extension as needed.
* Run
[scripts/run_code_generation.py](../scripts/run_code_generation.py)
.
* The entry point itself goes in
[entry_points_egl_ext.h](../src/libGLESv2/entry_points_egl_ext.h)
and
[entry_points_egl_ext.cpp](../src/libGLESv2/entry_points_egl_ext.cpp)
.
* Add the new function to [libEGL.cpp](../src/libEGL/libEGL.cpp) and
[libEGL.def](../src/libEGL/libEGL.def) .
* Update [eglext_angle.h](../include/EGL/eglext_angle.h) with the new
entry points and/or enums.
* Add members to the appropriate Extensions struct in
[Caps.h](../src/libANGLE/Caps.h) and
[Caps.cpp](../src/libANGLE/Caps.cpp) .
* Initialize extension availability in the `Display` subclass's
`generateExtensions` method for displays that can support the
extension; for example,
[DisplayCGL](../src/libANGLE/renderer/gl/cgl/DisplayCGL.mm).

View File

@@ -0,0 +1,97 @@
# How to Branch and Roll Chromium's ANGLE Dependency
ANGLE provides an implementation of OpenGL ES on top of other APIs (e.g. DirectX11, Vulkan). ANGLE
uses (i.e. depends upon) other third-party software that comes from different repositories. ANGLE specifies
its dependencies on a specific version of each of these other repositories in the [ANGLE DEPS file](https://chromium.googlesource.com/angle/angle/+/main/DEPS).
Chromium relies upon ANGLE for hardware accelerated rendering and WebGL support. Chromium similarly
specifies its dependency on a specific version of ANGLE in the [Chromium repository's src/DEPS file](http://src.chromium.org/viewvc/chrome/trunk/src/DEPS).
This document describes how to update those dependencies, and, if necessary, create an ANGLE branch
to correspond to a branched release of Chrome.
ANGLE's commit queue also runs browser-level tests which are hosted in
the Chromium repository. To reduce the chance of a Chromium-side
change breaking ANGLE's CQ, the version of Chromium against which
ANGLE changes is also snapshotted, and rolled forward into ANGLE with
appropriate testing.
## Autorollers
At present, autorollers manage both the ANGLE roll into Chromium, and
the Chromium roll into ANGLE. There is also an autoroller for ANGLE into [Android AOSP](https://android.googlesource.com/platform/external/angle/).
All of the ANGLE-related autorollers are documented in the [ANGLE Wrangling documentation](../infra/ANGLEWrangling.md#the-auto-rollers).
## Manually rolling DEPS
As mentioned above, dependencies are encoded in `DEPS` files. The process to update a given
dependency is as follows:
* Find the appropriate line in the relevant `DEPS` file that defines the dependency
* Change the [git SHA-1 revision number](http://git-scm.com/book/ch6-1.html) to be that of the commit
on which to depend upon (Note: use the full SHA-1, not a
shortened version)
* You can find the SHA-1 for a particular commit with `git log` on the appropriate branch of the
repository, or via a public repository viewer
* If using the [ANGLE public repository viewer](https://chromium.googlesource.com/angle/angle), you will need to select the branch whose log you
wish to view from the list on the left-hand side, and then click on the "tree" link at the top of
the resulting page. Alternatively, you can navigate to
`https://chromium.googlesource.com/angle/angle/+/<branch name>/` --
including the terminating forward slash. (e.g.
`https://chromium.googlesource.com/angle/angle/+/main/`)
### Rolling Vulkan Memory Allocator (VMA)
ANGLE and other Google projects (e.g. Skia, Chrome) use the open-source [Vulkan Memory Allocator][vma-upstream] (VMA)
library. As with with other external repositories, these projects do not directly use the [upstream Vulkan Memory Allocator][vma-upstream] repository.
Instead, a [Google-local repository][vma-chrome] is used, which contains Google-local changes and fixes (e.g. changes
to `BUILD.gn`). This Google-local repository repository contains the following key branches:
- `upstream/master` is automatically mirrored with the contents of the [upstream VMA][vma-upstream] repository
- `main` is manually curated by Google, with a combination of upstream and Google-local changes
ANGLE's `DEPS` file points to a git SHA-1 revision of the `main` branch.
Manual rolls of the `main` branch currently involve rebasing all of the Google-local changes on top of newer upstream changes. The current process (done in 2022) is to:
* Revert all of the Google-local changes (i.e. with a single commit)
* Merge or cherry-pick all of the upstream changes
* Cherry-pick the Google-local changes on top
* Note: it may be possible to simply merge future upstream changes directly, without reverting the Google-local changes
Manual rolls of which SHA-1 revision the ANGLE's `DEPS` file points to is done via the process
outlined above. Within an ANGLE build, you can navigate to the `third_party/vulkan_memory_allocator`
directory, check out the `main` branch, and use `git log` to select the desired Git revision.
**Please note** that cross-project coordination may be required when rolling VMA, as some projects (e.g. Chrome) builds itself with a single VMA version across Chrome, ANGLE, and Skia.
[vma-upstream]: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
[vma-chrome]: https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
Note: When ANGLE is AutoRolled to the Android AOSP source tree, Google-local
changes to the VMA `BUILD.gn` file will be converted to the ANGLE `Android.bp` file.
## Branching ANGLE
Sometimes, individual changes to ANGLE are needed for a release of Chrome which
has already been branched. If this is the case, a branch of ANGLE should be
created to correspond to the Chrome release version, so that Chrome may
incorporate only these changes, and not everything that has been committed since
the version on which Chrome depended at branch time. **Please note: Only ANGLE
admins can create a new branch.** To create a branch of ANGLE for a branched
Chrome release:
* Determine what the ANGLE dependency is for the Chrome release
by checking the DEPS file for that branch.
* Check out this commit as a new branch in your local repository.
* e.g., for [the Chrome 34 release at
chrome/branches/1847](http://src.chromium.org/viewvc/chrome/branches/1847/src/DEPS),
the ANGLE version is 4df02c1ed5e97dd54576b06964b1da67ea30238e. To
check this commit out locally and create a new branch named 'mybranch'
from this commit, use: ```git checkout -b mybranch
4df02c1ed5e97dd54576b06964b1da67ea30238e```
* To create this new branch in the public repository, you'll need to push the
branch to the special Gerrit reference location, 'refs/heads/<branch name>'. You
must be an ANGLE administrator to be able to push this new branch.
* e.g., to use your local 'mybranch' to create a branch in the public repository called
'chrome\_m34', use: ```git push origin mybranch:refs/heads/chrome_m34```
* The naming convention that ANGLE uses for its release-dedicated branches is 'chrome\_m##'.

122
doc/BufferImplementation.md Normal file
View File

@@ -0,0 +1,122 @@
# Introduction
Since Direct3D 9 only supports buffers that either contain vertex or index data,
and OpenGL buffers can contain both, ANGLE waits till a draw call is issued to
determine which resources to create/update. The generic implementation 'streams'
the data into global vertex and index buffers. This streaming buffer
implementation works in all circumstances, but does not offer optimal
performance. When buffer data isn't updated, there's no reason to copy the data
again. For these cases a 'static' buffer implementation is used.
The OpenGL ES 2.0 glBufferData() function allows to specify a usage hint
parameter (GL\_STREAM\_DRAW, GL\_DYNAMIC\_DRAW or GL\_STATIC\_DRAW). Both
GL\_STREAM\_DRAW and GL\_DYNAMIC\_DRAW use the streaming buffer implementation.
With the GL\_STATIC\_DRAW hint, ANGLE will attempt to use the static buffer
implementation. If you update the buffer data after it has already been used in
a draw call, it falls back to the streaming buffer implementation, because
updating static ones would involve creating new ones, which is slower than
updating streaming ones (more on this later).
Because some applications use GL\_STREAM\_DRAW or GL\_DYNAMIC\_DRAW even when
the data is not or very infrequently updated, ANGLE also has a heuristic to
promote buffers to use the static implementation.
# Streaming buffers
The streaming buffers implementation uses one Context-global vertex buffer
(VertexDataManager::mStreamingBuffer) and two index buffers
(IndexDataManager::mStreamingBufferShort and
IndexDataManager::mStreamingBufferInt). The streaming behavior is achieved by
writing new data behind previously written data (i.e. without overwriting old
data). Direct3D 9 allows to efficiently update vertex and index buffers when
you're not reading or overwriting anything (it won't stall waiting for the GPU
finish using it).
When the end of these streaming buffers is reached, they are 'recycled' by
discarding their content. D3D9 will still keep a copy of the data that's in use,
so this recycling efficiently renames the driver level buffers. ANGLE can then
write new data to the beginning of the vertex or index buffer.
The ArrayVertexBuffer::mWritePosition variable holds the current end position of
the last data that was written. StreamingVertexBuffer::reserveRequiredSpace()
allocates space to write the data, and StreamingVertexBuffer::map() actually
locks the D3D buffer and updates the write position. Similar for index buffers.
# Static buffers
Each GL buffer object can have a corresponding static vertex or index buffer
(Buffer::mVertexBuffer and Buffer::mIndexBuffer). When a GL buffer with static
usage is used in a draw call for the first time, all of its data is converted to
a D3D vertex or index buffer, based on the attribute or index formats
respectively. If a subsequent draw call uses different formats, the static
buffer is invalidated (deleted) and the streaming buffer implementation is used
for this buffer object instead. So for optimal performance it's important to
store only a single format of vertices or indices in a buffer. This is highly
typical, and even when in some cases it falls back to the streaming buffer
implementation the performance isn't bad at all.
The StreamingVertexBuffer and StaticVertexBuffer classes share a common base
class, ArrayVertexBuffer. StaticVertexBuffer also has access to the write
position, but it's used only for the initial conversion of the data. So the
interfaces of both classes are not that different. Static buffers have an exact
size though, and can't be changed afterwards (streaming buffers can grow to
handle draw calls which use more data, and avoid excessive recycling).
StaticVertexBuffer has a lookupAttribute() method to retrieve the location of a
certain attribute (this is also used to verify that the formats haven't changed,
which would result in invalidating the static buffer). The descriptions of all
the attribute formats a static buffer contains are stored in the
StaticVertexBuffer::mCache vector.
StaticIndexBuffer also caches information about what's stored in them, namely
the minimum and maximum value for certain ranges of indices. This information is
required by the Direct3D 9 draw calls, and is also used to know the range of
vertices that need to be copied to the streaming vertex buffer in case it needs
to be used (e.g. it is not uncommon to have a buffer with static vertex position
data and a buffer with streaming texture coordinate data for skinning).
# Constant attributes
Aside from using array buffers to feed attribute data to the vertex shader,
OpenGL also supports attributes which remain constant for all vertices used in a
draw call. Direct3D 9 doesn't have a similar concept, at least not explicitly.
Constant attributes are implemented using separate (static) vertex buffers,
and uses a stride of 0 to ensure that every vertex retrieves the same data.
Using a stride of 0 is not possible with streaming buffers because on some
hardware it is incompatible with the D3DUSAGE\_DYNAMIC flag. We found that with
static usage, all hardware tested so far can handle stride 0 fine.
This functionality was implemented in a ConstantVertexBuffer class, and it
integrates nicely with the rest of the static buffer implementation.
# Line loops
Direct3D 9 does not support the 'line loop' primitive type directly. This is
implemented by drawing the 'closing' line segment separately, constructing a
tiny temporary index buffer connecting the last and first vertex.
# Putting it all together
glDrawElements() calls IndexDataManager::prepareIndexData() to retrieve a
Direct3D index buffer containing the necessary data. If an element array is used
(i.e. a buffer object), it has static usage, and it hasn't been invalidated, the
GL buffer's static D3D index buffer will be returned. Else the updated streaming
index buffer is returned, as well as the index offset (write position) where the
new data is located. When prepareIndexData() does find a static index buffer,
but it's empty, it means the GL buffer's data hasn't been converted and stored
in the D3D index buffer yet. So in the convertIndices() call it will convert the
entire buffer. prepareIndexData() will also look up the min/max value of a range
of indices, or computes it when not already in the static buffer or when a
streaming buffer is used.
Similarly, both glDrawElements() and glDrawArrays() both call
VertexDataManager::prepareVertexData() to retrieve a set of Direct3D vertex
buffers and their translated format and offset information. It's implementation
is more complicated than prepareIndexData() because buffer objects can contain
multiple vertex attributes, and multiple buffers can be used as input to the
vertex shader. So first it accumulates how much storage space is required for
each of the buffers in use. For all static non-empty buffers in use, it
determines whether the stored attributes still match what is required by the
draw call, and invalidates them if not (at which point more space is allocated
in the streaming buffer). Converting the GL buffer object's data into D3D
compatible vertex formats is still done by specialized template functions.

View File

@@ -0,0 +1,66 @@
# How to build ANGLE in Chromium for dev
## Introduction
On Windows, Linux, and Mac ANGLE now builds most core components cross platform, including the shader validator and translator as well as the graphics API translator. These parts can be built and tested inside a Chromium checkout.
ANGLE also includes some sample applications and a few other targets that don't build on Chromium. These steps describe how to build such targets within a Chromium checkout.
Prerequisite Steps:
* Checkout and build [Chromium](http://dev.chromium.org/Home).
* To setup run these commands (note similarity to [DevSetup](DevSetup.md)):
## Standalone ANGLE inside Chromium
* To sync all standalone dependencies run:
```bash
cd src/third_party/angle
python3 scripts/bootstrap.py
gclient sync
```
* To generate ANGLE standalone build files run:
```bash
cd src/third_party/angle
gn gen out/Debug
```
* To build:
```bash
cd src/third_party/angle
ninja -j 10 -k1 -C out/Debug
```
* For example, `ninja -j 10 -k1 -C out/Debug angle_gles2_deqp_tests`
* To run a sample application: `./out/Debug/hello_triangle`
* To go back to the Chromium-managed version, remove `third_party/angle/.gclient`.
## Working with ANGLE in Chromium
You will also want to work with a local version of ANGLE instead of the version that is pulled in by Chromium's [DEPS](https://chromium.googlesource.com/chromium/src/+/main/DEPS) file. To do this do the following:
* cd to `chromium/`. One directory above `chromium/src`. Add this to `chromium/.gclient`:
```python
solutions = [
{
# ...
u'custom_deps':
{
"src/third_party/angle": None,
},
},
]
```
You will have full control over your ANGLE workspace and are responsible for running all git commands (pull, rebase, etc.) for managing your branches.
If you decide you need to go back to the DEPS version of ANGLE:
* Comment out or remove the `src/third_party/angle` line in your `custom_deps` in `chomium/.gclient`.
* Se the ANGLE workspace to the version specified in Chromium's DEPS. Ensure there are no modified or new files.
* `gclient sync` your Chromium workspace.

245
doc/CaptureAndReplay.md Normal file
View File

@@ -0,0 +1,245 @@
# ANGLE OpenGL Frame Capture and Replay
ANGLE currently supports a limited OpenGL capture and replay framework.
Limitations:
* GLES capture has many unimplemented functions.
* EGL capture and replay is not yet supported.
* Mid-execution capture is supported with the Vulkan back-end.
* Mid-execution capture has many unimplemented features.
* Capture and replay is currently only tested on desktop platforms.
* Binary replay is unimplemented. CPP replay is supported.
## Capturing and replaying an application
To build ANGLE with capture and replay enabled update your GN args:
```
angle_with_capture_by_default = true
```
Once built with capture enabled by default, ANGLE supports capturing OpenGL ES calls to CPP replay
files. To enable capture, set the `ANGLE_CAPTURE_FRAME_START` and `ANGLE_CAPTURE_FRAME_END`
environment variables to define a capture frame range, or use the [capture trigger
property][CaptureTrigger] on Android. By default the replay will be stored in the current working
directory. The capture files will be named according to the pattern
`angle_capture_context{id}_frame{n}.cpp`. Each GL Context currently has its own replay sources.
ANGLE will write out data binary blobs for large Texture or Buffer contents to
`angle_capture_context{id}_frame{n}.angledata`. Replay programs must be able to load data from the
corresponding `angledata` files.
## Controlling Frame Capture
Some simple environment variables control frame capture:
* `ANGLE_CAPTURE_ENABLED`:
* Set to `0` to disable capture entirely. Default is `1`.
* `ANGLE_CAPTURE_COMPRESSION`:
* Set to `0` to disable capture compression. Default is `1`.
* `ANGLE_CAPTURE_OUT_DIR=<path>`:
* Can specify an alternate replay output directory.
* Example: `ANGLE_CAPTURE_OUT_DIR=samples/capture_replay`. Default is the CWD.
* `ANGLE_CAPTURE_FRAME_START=<n>`:
* Uses mid-execution capture to write "Setup" functions that starts a Context at frame `n`.
* Example: `ANGLE_CAPTURE_FRAME_START=2`. Default is `0`.
* `ANGLE_CAPTURE_FRAME_END=<n>`:
* Example: `ANGLE_CAPTURE_FRAME_END=4`. Default is `0` which disables capture.
* `ANGLE_CAPTURE_LABEL=<label>`:
* When specified, files and functions will be labeled uniquely.
* Example: `ANGLE_CAPTURE_LABEL=foo`
* Results in filenames like this:
```
foo.angledata.gz
foo_context1_001.cpp
foo_context1_002.cpp
foo_context1_003.cpp
foo_context1.cpp
foo_context1.h
foo.json
foo_shared.cpp
...
```
* `ANGLE_CAPTURE_SERIALIZE_STATE`:
* Set to `1` to enable GL state serialization. Default is `0`.
A good way to test out the capture is to use environment variables in conjunction with the sample
template. For example:
```
$ ANGLE_CAPTURE_FRAME_END=4 ANGLE_CAPTURE_OUT_DIR=samples/capture_replay out/Debug/simple_texture_2d --use-angle=vulkan
```
## Running the capture_replay sample (desktop only)
To run a sample replay you can use a template located in
[samples/capture_replay](../samples/capture_replay). First run your sample and ensure all capture
files are written to `samples/capture_replay`. You can conveniently use `ANGLE_CAPTURE_OUT_DIR`.
Make sure `ANGLE_CAPTURE_LABEL` is left unset during capture to use the default file names.
Then enable the `capture_replay_sample` via `gn args`:
```
angle_build_capture_replay_sample = true
```
See [samples/BUILD.gn](../samples/BUILD.gn) for details. Then build and run your replay sample:
```
$ autoninja -C out/Debug capture_replay_sample
$ out/Debug/capture_replay_sample
```
## Running a perf test replay (all platforms, including Android)
To run your capture on any platform (Windows, Linux, Android, Mac (untested)), you'll need to
compile it as part of ANGLE's Trace Replay harness, which is part of `angle_perftests`.
Create a folder under `src/tests/restricted_traces` that matches the `ANGLE_CAPTURE_LABEL` you
used above.
Place all the trace output files into it. For example, if the label was `desktop_test`:
```
src/tests/restricted_traces$ ls -1 desktop_test/
desktop_test.angledata.gz
desktop_test_context1_001.cpp
desktop_test_context1_002.cpp
desktop_test_context1_003.cpp
desktop_test_context1.cpp
desktop_test_context1.h
desktop_test.json
desktop_test_shared.cpp
```
Then add the label of your trace to
[restricted_traces.json](../src/tests/restricted_traces/restricted_traces.json).
Note it includes a version with the string. Just use the number `1` for local changes.
```
"dead_trigger_2 1",
+ "desktop_test 1",
"disney_tsum_tsum 5",
```
Now you should be able to compile and run the perf test including your trace:
```
autoninja -C out/Debug angle_perftests
ANGLE_CAPTURE_ENABLED=0 out/Debug/angle_perftests --gtest_filter="*desktop_test*" --verbose
```
## Capturing an Android application
In order to capture on Android, the following additional steps must be taken. These steps
presume you've built and installed the ANGLE APK with capture enabled, and selected ANGLE
as the GLES driver for your application.
1. Create the output directory
Determine your package name:
```
export PACKAGE_NAME com.android.gl2jni
```
Then create an output directory that it can write to:
```
$ adb shell mkdir -p /sdcard/Android/data/$PACKAGE_NAME/angle_capture
```
2. Set properties to use for environment variable
On Android, it is difficult to set an environment variable before starting native code.
To work around this, ANGLE will read debug system properties before starting the capture
and use them to prime environment variables used by the capture code.
Note: Mid-execution capture doesn't work for Android just yet, so frame_start must be
zero, which is the default. This it is sufficient to only set the end frame.
```
$ adb shell setprop debug.angle.capture.frame_end 200
```
There are other properties that can be set that match 1:1 with the env vars, but
they are not required for capture:
```
# Optional
$ adb shell setprop debug.angle.capture.enabled 0
$ adb shell setprop debug.angle.capture.out_dir foo
$ adb shell setprop debug.angle.capture.frame_start 0
$ adb shell setprop debug.angle.capture.label bar
```
3. Run the application, then pull the files to the capture_replay directory
```
$ cd samples/capture_replay
$ adb pull /sdcard/Android/data/$PACKAGE_NAME/angle_capture replay_files
$ cp replay_files/* .
```
4. Update your GN args to specifiy which context will be replayed.
By default Context ID 1 will be replayed. On Android, Context ID 2 is more typical, some apps
we've run go as high as ID 6.
Note: this solution is temporary until EGL capture is in place.
```
angle_capture_replay_sample_context_id = 2
```
5. Replay the capture on desktop
Until we have samples building for Android, the replay sample must be run on desktop.
We will also be plumbing replay files into perf and correctness tests which will run on Android.
```
$ autoninja -C out/Release capture_replay_sample
$ out/Release/capture_replay_sample
```
### Starting capture at an arbitrary frame
In some scenarios, you don't know which frame you want to start on. You'll only know when target
content is being rendered. For that we've added a trigger that can allow starting the capture at
any time.
To use it, set the following environment variable, in addition to all the setup steps above. Set
the trigger value equal to the number of frames you'd like to capture.
```
adb shell setprop debug.angle.capture.trigger 20
```
When this value is set, `ANGLE_CAPTURE_FRAME_START` and `ANGLE_CAPTURE_FRAME_END` will be ignored.
While your content is rendering, wait until you arrive at the scene you'd like to capture. Then
set the value back to zero:
```
adb shell setprop debug.angle.capture.trigger 0
```
ANGLE will detect this change and start recording the requested number of frames.
## Testing
### Regression Testing Architecture
The [python script][link_to_python_script] uses the job queue pattern. We spawn n-1 independent
worker processes, where n is the value returned by multiprocessing.cpu_count(). Whenever a worker
process finishes a job and becomes available, it grabs the next job from a shared job queue and
runs that job on its CPU core. When there are no more jobs in the queue, the worker processes
terminate and the main process reports results.
![Point-in-time snapshot of the job queue](img/RegressionTestingArchitecture.png)
### Job unit
A job unit is a test batch. Each test has to go through 3 stages: capture run, replay build, and
replay run. The test batch batches the replay build stage of multiple tests together, and the
replay run stage of multiple tests together.
![A test batch as a job unit](img/JobUnit.png)
### Running tests
From the command line, navigate to the ANGLE root folder [angle][angle_folder] then run the
command below:
```
python3 src/tests/capture_replay_tests.py --use-goma --gtest_filter=*/ES2_Vulkan --keep-temp-files --output-to-file --batch-count=8
```
* `--use-goma` to turn on/off building with goma
* `--gtest_filter` to run only specific tests
* `--keep-temp-files` to keep the trace files
* `--output-to-file` to write the log to results.txt at
[src/tests/capture_replay_tests][capture_replay_test_folder] folder.
* `--batch-count` to set the number of tests in a batch. More tests in a batch means that
the tests will finish faster, but also means a lower level of granularity.
All command line arguments can be found at the top of the [python script][link_to_python_script].
[angle_folder]: ../
[capture_replay_test_folder]: ../src/tests/capture_replay_tests/
[link_to_python_script]: ../src/tests/capture_replay_tests.py
[CaptureTrigger]: ../src/tests/restricted_traces/README.md#trigger-the-capture

View File

@@ -0,0 +1,77 @@
# Choosing an ANGLE branch for your project
ANGLE is under continuous development, and does not create release tarballs or
tag specific revisions as releases, which may make the process of choosing a
point in ANGLE's history as the dependency for your project less than obvious.
This document illustrates how to choose a branch of ANGLE which can be expected
to be updated with critical fixes, should they be needed.
## ANGLE automatic branching
Branches are created automatically in ANGLE to correspond to branches created in
Chromium. These branches are named `chromium/####`, where the number is the
matching Chromium branch. These branches will be created from the revision which
that Chromium branch points to as its dependency. So, for example, the
`chromium/2013` branch point is at r28bcf4ff, because [Chromium's dependency
file for the 2013 branch]
(http://src.chromium.org/viewvc/chrome/branches/2013/src/DEPS?revision=272741)
uses this ANGLE revision.
It isn't necessary to be familiar with how Chromium's dependency management
works to choose an appropriate ANGLE branch for your project. You will, however,
likely want to make sure that you choose a branch that is used for a relatively
stable Chromium release channel build, as those branches will be deployed with
Chromium, and receive updates if bugs are found and fixed during release
lifetime, while the more volatile channels will turn over quickly, and their
branches will be short-lived.
**We recommend choosing a branch corresponding to a Beta or Stable Chromium
release** if you are pursuing periodic, not continuous, integration of ANGLE.
## Matching a Chromium release to an ANGLE branch
In order to determine which branches are used by Chromium releases, please use
[the OmahaProxy tool](http://omahaproxy.appspot.com/), which lists build
information about current Chromium releases. Find the entry for a suitable
release channel (for now, we recommend one of the Windows desktop releases), and
note the branch listed in the `true_branch` column. This identifies the ANGLE
branch used by that Chromium release.
## Updates to release branches
If bugs (stability, security, performance, or otherwise) are discovered after a
branch has been created, and that branch is used by a Chromium release, the
fixes for those bugs will be applied to the ANGLE branches for uptake by
Chromium and any other projects using that branch. You should need only to
perform a `git pull` to check for and apply any such changes.
## Cherry-picking a change to a release branch
Occasionally a bug fix must be merged back to an earlier Chromium
release branch. To do this, first look up the branch number in
[OmahaProxy](https://omahaproxy.appspot.com/). For example, M55
corresponds to branch number 2883.
In the simple case where there are no conflicts, the merge can be done
entirely in the Gerrit UI. Click the "Cherry pick" button and enter
`chromium/[branch_number]` as the branch to merge to.
If there are conflicts, however, follow these steps:
1. `git checkout chromium/[branch_number]`
2. `git cherry-pick [commit_hash]`
3. Fix any merge conflicts.
4. `git cl upload`
Have the cherry-pick reviewed, and then land it. It's also OK to skip
the review and land it yourself with TBR= in the issue description, if
you have that ability.
There is one final step to pick up the ANGLE change into a Chromium Beta or
Stable branch. A Skia auto-roller updates the DEPS file in the corresponding
Chromium branch automatically once the ANGLE change is merged into an ANGLE
branch. To make sure that your change has made it into Chromium you can check
these auto-rollers:
1. https://autoroll.skia.org/r/angle-chromium-beta-autoroll
1. https://autoroll.skia.org/r/angle-chromium-stable-autoroll

57
doc/CodeReviewProcess.md Normal file
View File

@@ -0,0 +1,57 @@
# ANGLE's Code Review Process
This page describes the review process for ANGLE reviewers and committers. For
instructions on submitting your change list for review, please see
[ContributingCode](ContributingCode.md).
## Reviewing Changes
The author of a CL may designate reviewers. Please feel free to weigh in on
changes even if you are not a designated reviewer!
1. To review a change, you can either navigate directly to the URL for the CL,
or, if you are one of the designated reviewers, the change will appear in
your dashboard at https://chromium-review.googlesource.com/
2. Review the change listed by looking over the diffs listed in the most recent
patch set.
* You may view the diffs either side-to-side, or in unified diff format.
* You can comment on a specific line of code by double-clicking that line,
or on the file as a whole by clicking the "Add file comment" icon, which
appears above the diff, in the line number column.
* Note that, for CLs submitted as fixes to standing bugs, style issues
that pre-exist the CL are not required to be addressed in the CL. As a
reviewer, you can request a follow-up CL to address the style issue if
you desire. This exception doesn't apply for CLs which implement new
functionality, perform refactoring, or introduce style issues
themselves.
3. Once your review is complete, click the "Review" button
* If you are satisfied with the change list as it is, give a positive
review (Code-Review +1 or +2).
* If you think the change list is a good idea, but needs changes, leave
comments and a neutral review. (Code-Review 0)
* If you think the change list should be abandoned, give a negative
review. (Code-Review -1 or -2)
* A +2 code review is required before landing. Only ANGLE committers may
provide a +2 code review.
* ANGLE has a 2-reviewer policy for CLs. This means all changes should get
a positive review from more than one person before they are accepted.
This is most usually handled by reserving the +2 review for the second
reviewer to clear the CL.
* If you made comments on the files, the draft comments will appear below
the cover message. These comments are not published until you click on
the "Publish Comments" button.
4. Verification and landing:
* If the CL author is not an ANGLE committer, the CL should be verified
and landed by a committer. Once verified, the "+1 Verified" status may
be added, and the CL may be landed with the "Publish and Submit" button.
There should be no need to rebase via the "Rebase Change" button prior
to landing.
* If the CL author is an ANGLE committer, they should verify and land the
CL themselves.
* Please note: Verification and commit-queue workflow may be subject to
change in the near future.
5. Cherry-picking to other branches
* If the change is needed on other branches, you may be able to land it
using the "Cherry Pick To" button on the CL page.
* If this cherry pick fails, you will need to rebase the patch yourself
and submit a new change for review on the branch.

176
doc/CodingStandard.md Normal file
View File

@@ -0,0 +1,176 @@
# Coding Standard for the ANGLE Project
## Google Style Guide
We generally use the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) as a basis for
our Coding Standard, however we will deviate from it in a few areas, as noted
below.
Items marked {DEV} indicate a deviation from the Google guidelines. Items marked
{DO} are reiterating points from the Google guidelines.
Before you upload code to Gerrit, use `git cl format` to auto-format your code.
This will catch most of the trivial formatting errors and save you time.
### [Header Files](https://google.github.io/styleguide/cppguide.html#Header_Files)
* We use **`.h`** for C++ headers.
* {DEV} #define guards should be of the form: `<PATH>_<FILE>_H_`. (Compiler
codebase is varied, including `<PROJECT>_` makes the names excessively
long).
### [Scoping](https://google.github.io/styleguide/cppguide.html#Scoping)
* {DO} avoid globally scoped variables, unless absolutely necessary.
### [Classes](https://google.github.io/styleguide/cppguide.html#Classes)
* {DEV} Inherit (privately) from angle::NonCopyable helper class (defined in
common/angleutils.h) to disable default copy and assignment operators.
### [Other C++ Features](https://google.github.io/styleguide/cppguide.html#Other_C++_Features)
* {DO} avoid use of default arguments.
* {DONT} use C++ exceptions, they are disabled in the builds and not caught.
* {DO} use nullptr (instead of 0 or NULL) for pointers.
* {DO} use size\_t for loop iterators and size values.
* {DO} use uint8\_t pointers instead of void pointers to denote binary data.
* {DO} use C++11/14/17 according to the
[Chromium C++ features guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md).
### [Naming](https://google.github.io/styleguide/cppguide.html#Naming)
#### File Names
* {DEV} Filenames should be all lowercase and can include underscores (`_`).
If the file is an implementation of a class, the filename may be capitalized
the same as the major class.
* {DEV} We use .cpp (instead of .cc), .h and .inl (inlined files) for C++
files and headers.
#### Directory Names
* Directory names should be all lowercase, unless following an externally
imposed capitalization (eg include/EGL, or src/libGLESv2, etc)
#### Variable Names
Use the following guidelines, they do deviate somewhat from the [Google
guidelines](https://google.github.io/styleguide/cppguide.html#Naming).
* Class and type names: start with capital letter and use CamelCase.
* {DEV} Class member variables: use an **`m`** prefix instead of trailing
underscore and use CamelCase.
* Global variables (if they must be used): use a **`g`** prefix.
* {DEV} Variable names: start with lower case and use CamelCase (chosen for consistency)
* {DEV} Function names: Member functions start with lower case and use CamelCase. Non-member and static member functions start with capital letter and
use CamelCase (chosen for consistency)
* {DO} Constants: start with a **`k`** and use CamelCase
* Namespaces: short names. use all lower case
* {DEV} Enum Names: use strongly typed class enums when possible. Use CamelCase for class enum members. See [official docs][EnumsOfficial].
* Macros: all uppercase with underscores
* Exceptions to naming: use common sense!
[EnumsOfficial]: https://google.github.io/styleguide/cppguide.html#Enumerator_Names
### [Comments](https://google.github.io/styleguide/cppguide.html#Comments)
* {DO} read and follow Google's recommendations.
* Each file **must** start with the following boilerplate notice:
```
//
// Copyright $YEAR The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
```
* $YEAR should be set to the current year at the time a file is created, and not changed thereafter.
### [Formatting](https://google.github.io/styleguide/cppguide.html#Formatting)
* {DEV} Avoid excessively long lines. Please keep lines under 100 columns
long.
* Use unix-style newlines.
* {DO} use only spaces. No tab characters. Configure your editor to emit
spaces when you hit the TAB-key.
* {DEV} indent 4 spaces at a time.
* conditionals: place space outside the parenthesis. No spaces inside.
* switch statements: use the output of `git cl format`.
* class format(eg private, public, protected): indent by 2 spaces. Regular
4-space indent from the outer scope for declarations/definitions.
* pointers and references: **`*`** and **`&`** tight against the variable
* namespaces: are not indented.
* extern code blocks: are not indented.
* {DEV} braces should go on a separate line, except for functions defined in a
header file where the whole function declaration and definition fit on one
line.
Examples:
```
if (conditional)
{
stuff();
}
else
{
otherstuff()
}
```
```
switch (conditional)
{
case foo:
dostuff();
break;
case bar:
otherstuff();
break;
default:
WTFBBQ();
}
```
```
class MyClass : public Foo
{
public:
MyClass();
~MyClass() {};
private:
DISALLOW_COPY_AND_ASSIGN(MyClass);
};
```
```
char *c;
const string &str;
```
### [Exceptions to the Rules](https://google.github.io/styleguide/cppguide.html#Exceptions_to_the_Rules)
* If modifying pre-existing code that does not match the standard, the altered
portions of the code should be changed to match the standard.
### Generated Source Files
Prefer storing generated sources as baked files in the repository. Avoid using
GN actions to run Python scripts.
**Definition:**
Sometimes helper scripts can create compilable sources more easily from XML or
JSON data sources than maintaining source files by hand. These scripts are often
written in Python and output generated sources.
**Decision**
Storing generated sources in the repository makes integration easier for non-GN
users. Python scripts can be expensive and slow to run at compile-time.
Generated sources can be a pain point for messing up builds.
It could be possible to solve the build clobbering problem. And we could replace
Python with something faster. But to allow for easier integration with our tools
and customers we should bake generated files into the repository.

View File

@@ -0,0 +1,108 @@
# Introduction
There are many situations in which it's useful for WebGL applications to
transform shaders in various ways. ANGLE's shader translator can be used for
this purpose: compiling it with [Emscripten](http://emscripten.org/) allows it
to be invoked from a web page. This wiki page provides some preliminary details
about how to do this.
# Details
Pull top of tree ANGLE.
Install the Emscripten toolchain per the [instructions](http://emscripten.org/).
Symlink (preferred) or copy the ANGLE directory into ...emsdk/emscripten/master.
Put a shader to compile into a file (named with .vert or .frag suffix) in the
same directory. For example, put the following shader from the [WebGL Aquarium]
(http://webglsamples.org/aquarium/aquarium.html) into `aq-fish-nm.frag`:
```
precision mediump float;
uniform vec4 lightColor;
varying vec4 v_position;
varying vec2 v_texCoord;
varying vec3 v_tangent; // #normalMap
varying vec3 v_binormal; // #normalMap
varying vec3 v_normal;
varying vec3 v_surfaceToLight;
varying vec3 v_surfaceToView;
uniform vec4 ambient;
uniform sampler2D diffuse;
uniform vec4 specular;
uniform sampler2D normalMap; // #normalMap
uniform float shininess;
uniform float specularFactor;
// #fogUniforms
vec4 lit(float l ,float h, float m) {
return vec4(1.0,
max(l, 0.0),
(l > 0.0) ? pow(max(0.0, h), m) : 0.0,
1.0);
}
void main() {
vec4 diffuseColor = texture2D(diffuse, v_texCoord);
mat3 tangentToWorld = mat3(v_tangent, // #normalMap
v_binormal, // #normalMap
v_normal); // #normalMap
vec4 normalSpec = texture2D(normalMap, v_texCoord.xy); // #normalMap
vec3 tangentNormal = normalSpec.xyz - vec3(0.5, 0.5, 0.5); // #normalMap
tangentNormal = normalize(tangentNormal + vec3(0, 0, 2)); // #normalMap
vec3 normal = (tangentToWorld * tangentNormal); // #normalMap
normal = normalize(normal); // #normalMap
vec3 surfaceToLight = normalize(v_surfaceToLight);
vec3 surfaceToView = normalize(v_surfaceToView);
vec3 halfVector = normalize(surfaceToLight + surfaceToView);
vec4 litR = lit(dot(normal, surfaceToLight),
dot(normal, halfVector), shininess);
vec4 outColor = vec4(
(lightColor * (diffuseColor * litR.y + diffuseColor * ambient +
specular * litR.z * specularFactor * normalSpec.a)).rgb,
diffuseColor.a);
// #fogCode
gl_FragColor = outColor;
}
```
Compile the shader translator, the translator sample, and the shader all
together:
```
./emcc -Iangle/include -Iangle/src angle/samples/translator/translator.cpp angle/src/compiler/preprocessor/*.cpp angle/src/compiler/translator/*.cpp angle/src/compiler/translator/timing/*.cpp angle/src/compiler/translator/depgraph/*.cpp angle/src/third_party/compiler/*.cpp angle/src/common/*.cpp -o translator.html --preload-file aq-fish-nm.frag -s NO_EXIT_RUNTIME=1
```
Serve up the resulting translator.html via `python -m SimpleHTTPServer`.
Navigate the browser to localhost:8000.
The translator sample will run, displaying its output into the text area on the
page. Since it isn't receiving any input, it simply outputs a help message and
exits.
To invoke the translator again, processing the shader we included along with the
source code, open the JavaScript console and type:
```
Module['callMain'](['-s=w', '-u', 'aq-fish-nm.frag'])
```
The active uniforms and their types will be printed to the text area after the
translator sample processes the shader.
# Issues and Next Steps
It's clearly not useful to have to compile the shader in to the
Emscripten-translated executable. It would be helpful to define a simple wrapper
function which can easily be called from JavaScript and which defines enough
parameters to pass in a shader as a string, transform it somehow or compile it
to another language target, and return the compiled result (or other
information). A simple JavaScript library that wraps all of the interactions
with the Emscripten binary would be useful.
It's not feasible to interact with the translator's data structures, nor
traverse the AST from JavaScript. The code that operates upon the shader must be
written in C++ and compiled in to the shader translator.
emcc should be integrated better with ANGLE's build system.

272
doc/ContributingCode.md Normal file
View File

@@ -0,0 +1,272 @@
# Contributing Code
## Communicate
* Whether you're writing a new feature or fixing an existing bug, it pays to get a second opinion
before you get too far. If it's a new feature idea, post to the discussion group
([angleproject][ANGLE-website]).
* Not all bugs in our [bug system][anglebug.com] are assigned, but if the one you're interested in
fixing is, send a note to the person it's assigned to and ask if they would like a patch.
* Behavior changes and anything nontrivial (i.e. anything other than simple cleanups and style
fixes) should generally be tracked in the bug system. Please [file a bug][anglebug-new] and
describe what you're doing if there isn't one already.
* If you would like bug-editing rights, simply ask a team member via email or the discussion group.
[ANGLE-website]: https://groups.google.com/forum/?fromgroups#!forum/angleproject
[anglebug.com]: http://anglebug.com
[anglebug-new]: http://anglebug.com/new
## Get your code ready
### Code
1. Must conform to the [ANGLE style][ANGLE-style] guidelines.
2. Must be tested. (see the [Testing][Testing] section below)
3. Should be a reasonable size to review. Giant patches are unlikely to get reviewed quickly.
[ANGLE-style]: CodingStandard.md
[Testing]: #Testing
### Build maintenance
1. If you added or removed source files:
* You _must_ update the build files with your changes. See [`src/libGLESv2.gni`][libGLESv2.gni]
and [`src/compiler.gni`][compiler.gni].
2. ANGLE's BUILD.gn script is used by [Chromium's gn build][gn-build-config]. If you change build
files other than to add or remove source files be aware you could break the Chromium build.
ANGLE's commit queue (CQ) will detect such breakage. Ask a project member for help with Chromium
issues if you don't have a Chromium checkout.
3. Some generated code is baked into the repository. If you modify the source of these files, such
as the translator's [`glslang.l`][glslang.l], or one of the internal shaders in the Vulkan
backend, you will need to run [`scripts/run_code_generation.py`][run_code_generation.py] and
include the autogenerated files in your change.
`git cl upload` should warn you if you are missing this step.
[gn-build-config]: https://www.chromium.org/developers/gn-build-configuration
[compiler.gni]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/compiler.gni
[libGLESv2.gni]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/libGLESv2.gni
[glslang.l]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/src/compiler/translator/glslang.l
[run_code_generation.py]: https://chromium.googlesource.com/angle/angle/+/refs/heads/main/scripts/run_code_generation.py
### Testing
* ANGLE uses trybots to test on a variety of platforms. Please run your changes against our bots
and check the results before landing changes or requesting reviews.
* Upload your change (see [Making changes](#making-changes)).
* To kick off a try job, use the 'CQ Dry Run' button, or set the Commit-Queue +1 label to trigger
a dry run of the CQ (will not land the change).
* If you are not part of the `angle-committers` group, you will need to either ask to be added or
ask a member of the group to submit the tryjob for you. Add jmadill or geofflang as a reviewer
for assistance.
* Wait for the bots to report the result on the code review page. The bot results should be
visible in Gerrit as yellow (in-progress), green (passed), or red (failed). This can take up to
two hours for some of the debug bots. Click on the colored rectangle to open the bot log to
triage failed tests.
* If a failure is unexpected, or seems likely unrelated to your change, ask an ANGLE project
member for advice.
* We do not currently have the capability to run individual bots or tests in a run.
* Tests can also be run locally, ANGLE's main testing methods are:
* `angle_unittests`, `angle_end2end_tests` and `angle_white_box_tests` targets.
* The OpenGL CTS also known as [drawElements Quality Program (dEQP)](dEQP.md).
If you're working on a new feature, there may be some extensive tests for it already written.
* The [Top-of-Tree WebGL Conformance tests][WebGL-CTS].
* If you are a Chromium developer, see
[Building ANGLE for Chromium Development][build-ANGLE-for-chromium] for instructions on
building ANGLE within Chromium.
* If you aren't a browser developer, you should be able to drop your compiled DLLs into a
Chrome installation, in place of those distributed with Chrome, to check WebGL conformance.
[Chrome Canary][Chrome-Canary] is well-suited for this.
* If your code isn't covered by an existing test, you are *strongly encouraged* to add new test
coverage. This both ensures that your code is correct and that new contributors won't break it
in the future.
* Add new tests to `angle_end2end_tests` for OpenGL-based API tests, `angle_unittests` for
cross-platform internal tests, and `angle_white_box_tests` for rendering tests which also need
visibility into internal ANGLE classes.
* If you are submitting a performance fix, test your code with `angle_perftests` and add a new
performance test if it is not covered by the existing benchmarks. For more documentation on
`angle_perftests` see the [README][README].
* The [Chromium GPU FYI bot waterfall][Chromium-waterfall] provides continuous integration for
ANGLE patches that have been committed. There may be hardware configurations that are not
tested by the ANGLE trybots, if you notice breakage on this waterfall after landing a patch,
please notify a project member.
[WebGL-CTS]: https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html
[build-ANGLE-for-Chromium]: BuildingAngleForChromiumDevelopment.md
[Chrome-Canary]: https://www.google.com/chrome/browser/canary.html
[README]: ../src/tests/perf_tests/README.md
[Chromium-waterfall]: https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console
### Legal
1. You must complete the [Individual Contributor License Agreement][Individual-CLA]. You can do this
online, and it only takes a minute. If you are contributing on behalf of a corporation, you must
fill out the [Corporate Contributor License Agreement][Corporate-CLA] and send it to Google as
described on that page.
2. Once you've submitted the CLA, please email the following information (as entered on the CLA) to
`shannonwoods at chromium dot org` for record keeping purposes:
* Full Name:
* Email:
* Company (If applicable):
3. If you've never submitted code before, you must add your (or your organization's) name and
contact info to the [AUTHORS](../AUTHORS) file.
4. *NOTE TO REVIEWERS*: Follow the [External Contributor Checklist][Contributor-checklist].
[Individual-CLA]: https://cla.developers.google.com/about/google-individual
[Corporate-CLA]: https://cla.developers.google.com/about/google-corporate
[Contributor-checklist]: http://www.chromium.org/developers/contributing-code/external-contributor-checklist
## Life of a Change List
### <a name="getting-started-with-gerrit"></a>Getting started with Gerrit for ANGLE
1. Go to [https://chromium.googlesource.com/new-password][CR-passwd]
2. Log in with the email you use for your git commits.
3. Follow the directions on the new-password page to set up authentication with your Google account.
4. Make sure to set your real name.
* Visit [https://chromium-review.googlesource.com/#/settings][CR-settings] and check the "Full
Name" field.
5. Check out the repository (see [DevSetup](DevSetup.md)).
6. Install the Gerrit `commit_msg` hook
* Gerrit requires a hook to append a change ID tag to each commit, so that it can associate your
CL with a particular review, and track dependencies between commits.
* Download the hook from
[https://chromium-review.googlesource.com/tools/hooks/commit-msg][commit-msg-hook] and copy
this file to `.git/hooks/commit-msg` within your local repository. On non-Windows platforms,
ensure that permissions are set to allow execution.
* *BE AWARE:* Some patch management tools, such as StGit, currently bypass git hooks. They should
not currently be used with changes intended for review.
[CR-passwd]: https://chromium.googlesource.com/new-password
[CR-settings]: https://chromium-review.googlesource.com/#/settings
[commit-msg-hook]: https://chromium-review.googlesource.com/tools/hooks/commit-msg
### Making changes
1. Commit your changes locally:
* `git add src/../FileName.cpp`
* `git commit`
* A text editor will open. Add a description at the top of the file.
* Associate the CL with an issue in the issue tracker (e.g. a fix for a reported bug)
by adding the following line to the commit message: `Bug: angleproject:<issue number>`.
* If necessary please file a new bug at http://anglebug.com/new
* Save.
* Close the text editor.
* Use `git commit --amend` to update your CL with new changes.
* Use `git cl format` to amend the style of your CL. This saves both your time and the reviewers'!
2. Ensure your code is landed on top of latest changes
* `git pull --rebase`
* Resolve conflicts if necessary
3. Upload the change list
* `git cl upload`
* The change list and modified files will be uploaded to [ANGLE Gerrit][ANGLE-Gerrit].
* Follow the generated URL to the new issue.
* Take a moment to perform a self-review of your code. Gerrit's viewer makes it easy to see
whitespace errors, erroneous tabs, and other simple style problems.
* [Select reviewers](#selecting-reviewers). If you don't do this, reviewers may not realize
you're requesting a review!
* Make changes, upload and repeat as necessary.
* Project members and others will review your code as described in the
[CodeReviewProcess](CodeReviewProcess.md).
5. If your change list needs revision:
* If you have correctly installed the commit hook from the section above, Gerrit will be able to
track your changes by Change-Id.
* You should need only to update your commit with `git commit --amend` and re-upload with
`git cl upload`.
6. Landing change after it receives +2 Code Review:
* If you are a committer, you may submit the change yourself via the Gerrit web interface.
* If you are not a committer, ask your reviewer to submit the change list.
7. Pull and integrate reviewed CL:
* `git pull --rebase`
[ANGLE-Gerrit]: https://chromium-review.googlesource.com/q/project:angle/angle
### Selecting reviewers
When your CL is ready to review, you can use the "Find Owners" button in
Gerrit to select appropriate code reviewers. They will be able to route your
CL to additional reviewers as neccessary and answer any questions you may have
about the process.
### Rules for submission
* At least one **Owner** must give approval.
* The owner must be from the **most specific** directory.
* At least two **Committers** must give approval for non-trival CLs.
For trivial CLs, a single Owner approval is sufficient.
* Only **Committers** may submit CLs. If you aren't a committer please ask for help submitting.
* Committers may submit high-priority small CLs immediately using **TBR**.
See [the Chromium docs][TBR] for more info.
* There are exceptions to these rules. Use your best judgement.
[TBR]: https://chromium.googlesource.com/chromium/src/+/main/docs/code_reviews.md#tbr-to-be-reviewed
### Reverting a CL
Sometimes a change will cause an unforseen problem, e.g. on a platform that's not tested with
pre-submit testing. In those cases, a CL may be reverted; often by a "[Wrangler][wrangler]", who is
an engineer who keeps the testing infrastructure healthy/green.
[wrangler]: ../infra/ANGLEWrangling.md
The best and easiest way to create a revert change is with Gerrit's **REVERT** button, in the
upper-right corner of the original change. Pressing this will pop up a dialog with a template
commit message, and an optional checkbox for automatically sending the revert CL to CQ. Please edit
the commit message with the reason for the revert. When satisfied, press the dialog's **REVERT**
button. It is wise to add the author and reviewers of the original CL as reviewers of the revert
CL. If it's been less than 24 hours since the original CL landed, the revert Cl will land
immediately and bypass the try bots.
If you cannot use Gerrit's **REVERT** button, you can create a revert CL with the "git revert"
command. When doing so, the commit message should include a short description for why the original
commit needs to be reverted, and potentially a bug; similar to this example [revert CL][RevertCL].
[RevertCL]: https://chromium-review.googlesource.com/c/chromium/src/+/2453504
### Relanding a reverted CL
When you re-land a reverted CL, follow this process:
* Prefix the CL title with "Reland: ".
* Keep the commit message of the original CL and add a description of what changed in the re-land.
* Ensure the re-land CL has a unique Change-Id.
* First upload the reverted CL as Patchset 1 with no changes applied.
* Then, apply your fixes, and upload your CL as a new Patchset. The reviewers will be able to see
the diff between Patchset 1 and the fixed/final Patchset.
Here is an example [reland CL][RelandCL]. This [link][RelandCLDiff] shows the difference between Patchset 1
and the fixed/final Patchset. Notice how a reviewer can easily see the fix to the original CL.
[RelandCL]: https://chromium-review.googlesource.com/c/angle/angle/+/2197735
[RelandCLDiff]: https://chromium-review.googlesource.com/c/angle/angle/+/2197735/1..3
If you do not need to make any changes to your CL to re-land, you can instead use Gerrit's **CREATE
RELAND** button.
### Committer status
Similar to [Chromium's committer status][Committer-status], long-term contributors to the ANGLE
project may request to join the `angle-committers` group. This allows you to give `+2` on code
reviews and land patches without assistance. After about 6 months of regular contributions, you may
request committer status from a core ANGLE team member via email or code review. Chromium
committers and Googlers may ask at any time.
### OWNERS files and becoming an Owner
See these Chromium docs for some good guidelines: [link][Owners].
### More info
See also:
* [ANGLE Gerrit][ANGLE-Gerrit]
* [Chromium Projects: Contributing Code][Contributing-code]
* [depot_tools tutorial][depot-tools-tutorial]
* [angle_perftests README][Perftest-README]
* [ANGLE Testing and Processes](TestingAndProcesses.md)
[Committer-status]: https://dev.chromium.org/getting-involved/become-a-committer
[Contributing-code]: http://www.chromium.org/developers/contributing-code/
[depot-tools-tutorial]: http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html
[Perftest-README]: ../src/tests/perf_tests/README.md
[Owners]: https://chromium.googlesource.com/chromium/src/+/main/docs/code_reviews.md#expectations-of-owners

View File

@@ -0,0 +1,133 @@
# Debug Overlay in ANGLE's Vulkan Backend
## Motivation
A complex application has frequently changing performance characteristics due to
both a varying number of objects to draw and different effects that need to be
applied to them. When characterizing the performance of an application, it can
be easy to miss scenes which need optimization, especially if they are
ephemeral.
A debug overlay that shows on-the-fly statistics from the running application
can greatly aid the developer in finding where the bottlenecks are and which
scenes need further investigation and profiling.
ANGLE's Vulkan debug overlay implements this. The initial implementation
includes a few pieces of information for demonstration purposes. Here's the
glmark2 *terrain* scene with these overlay items enabled:
![glmark2 terrain scene](img/VangleDebugOverlay.png)
This is a screenshot of a debug build, hence the low FPS. The command graph size
widget no longer applies to current ANGLE code.
## Implementation
Overlay items are of two fundamental types:
* Text items: A single line of text with small or large font.
* Graph items: A bar graph of data. These each have a Text item attached
that is automatically rendered with the graph item.
Built on these, various overlay item types are defined that gather statistics.
Five such types are defined with one item per type as example:
* **Count**: An item that counts something. **VulkanValidationMessageCount**
is an overlay item of this type that shows the number of validation messages
received from the validation layers.
* **Text**: A generic text widget. **VulkanLastValidationMessage** is an overlay
item of this type that shows the last validation message.
* **PerSecond**: A value that gets reset every second automatically. **FPS** is
an overlay item of this type that simply gets incremented on every `swap()`.
* **RunningGraph**: A graph of the last N values. **VulkanRenderPassCount** is an
overlay of this type. This counter reports the number of RenderPasses rendered
in each vkQueueSubmit call.
* **RunningHistogram**: A histogram of last N values. Input values are in the
[0, 1] range and they are ranked to N buckets for histogram calculation.
**VulkanSecondaryCommandBufferPoolWaste** is an overlay item of this type.
On `vkQueueSubmit()`, the memory waste from command buffer pool allocations
is recorded in the histogram.
Overlay font is placed in [libANGLE/overlay/](../src/libANGLE/overlay/) which
[gen_overlay_fonts.py](../src/libANGLE/gen_overlay_fonts.py) processes to create
an array of rasterized font data, which is used at runtime to create the font
image (an image with one layer per character, and one mip level per font size).
The overlay widget layout is defined in
[overlay_widgets.json](../src/libANGLE/overlay_widgets.json)
which [gen_overlay_widgets.py](../src/libANGLE/gen_overlay_widgets.py)
processes to generate an array of widgets, each of its respective type,
and sets their properties, such as color and bounding box.
The json file allows widgets to align against other widgets as well as against
the framebuffer edges. The following is a part of this file:
```json
{
"name": "VulkanValidationMessageCount",
"type": "Count",
"color": [255, 0, 0, 255],
"coords": [10, "VulkanLastValidationMessage.top.adjacent"],
"font": "small",
"length": 25
},
{
"name": "VulkanSecondaryCommandBufferPoolWaste",
"type": "RunningHistogram(50)",
"color": [255, 200, 75, 200],
"coords": [-50, 100],
"bar_width": 6,
"height": 100,
"description": {
"color": [255, 200, 75, 255],
"coords": ["VulkanSecondaryCommandBufferPoolWaste.left.align",
"VulkanSecondaryCommandBufferPoolWaste.top.adjacent"],
"font": "small",
"length": 40
}
}
```
Negative coordinates in this file indicate alignment to the right/bottom of the
framebuffer. `OtherItem.edge.mode` lets an item be aligned with another.
If `mode` is `align`, the item has the same origin as `OtherItem` and expands
in the same direction. If `adjacent`, the item expands in the opposite
direction.
The UI is rendered in two passes, one draw call for all graph widgets and
another draw call for all text widgets. The vertex shader in these draw calls
generates 4 vertices for each instance (one instance per widget) based on the
widget bounding box. The fragment shader renders font or a graph based on widget
data. This is done once per frame on `present()`, and the result is blended into
the swapchain image.
To build ANGLE with overlay capability, `angle_enable_overlay = true` must be
placed in `args.gn`.
Currently, to enable overlay items an environment variable is used. For example:
On Desktop:
```commandline
$ export ANGLE_OVERLAY=FPS:Vulkan*PipelineCache*
$ ./hello_triangle --use-angle=vulkan
```
On Android:
```
$ adb shell setprop debug.angle.overlay FPS:Vulkan*PipelineCache*
$ ./hello_triangle --use-angle=vulkan
```
## Future Work
Possible future work:
* On Android, add settings in developer options and enable items based on those.
* Spawn a small server in ANGLE and write an application that sends
enable/disable commands remotely.
* Move the Overlay rendering functionality to the front-end to benefit all
backends.
* Add more overlay widgets.
* Implement automatic widget layout to remove the need to specify positions in
the overlay widgets JSON.

545
doc/DebuggingTips.md Normal file
View File

@@ -0,0 +1,545 @@
# Debugging Tips
There are many ways to debug ANGLE using generic or platform-dependent tools. Here is a list of tips
on how to use them.
## Running ANGLE under apitrace on Linux
[Apitrace](http://apitrace.github.io/) captures traces of OpenGL commands for later analysis,
allowing us to see how ANGLE translates OpenGL ES commands. In order to capture the trace, it
inserts a driver shim using `LD_PRELOAD` that records the command and then forwards it to the OpenGL
driver.
The problem with ANGLE is that it exposes the same symbols as the OpenGL driver so apitrace captures
the entry point calls intended for ANGLE and reroutes them to the OpenGL driver. In order to avoid
this problem, use the following:
1. Link your application against the static ANGLE libraries (libGLESv2_static and libEGL_static) so
they don't get shadowed by apitrace's shim.
2. Ask apitrace to explicitly load the driver instead of using a dlsym on the current module.
Otherwise apitrace will use ANGLE's symbols as the OpenGL driver entrypoint (causing infinite
recursion). To do this you must point an environment variable to your GL driver. For example:
`export TRACE_LIBGL=/usr/lib/libGL.so.1`. You can find your libGL with
`ldconfig -p | grep libGL`.
3. Link ANGLE against libGL instead of dlsyming the symbols at runtime; otherwise ANGLE won't use
the replaced driver entry points. This is done with the gn arg `angle_link_glx = true`.
If you follow these steps, apitrace will work correctly aside from a few minor bugs like not being
able to figure out what the default framebuffer size is if there is no glViewport command.
For example, to trace a run of `hello_triangle`, assuming the apitrace executables are in `$PATH`:
```
gn args out/Debug # add "angle_link_glx = true"
# edit samples/BUILD.gn and append "_static" to "angle_util", "libEGL", "libGLESv2"
ninja -C out/Debug
export TRACE_LIBGL="/usr/lib/libGL.so.1" # may require a different path
apitrace trace -o mytrace ./out/Debug/hello_triangle
qapitrace mytrace
```
## Enabling General Logging
Normally, ANGLE only logs errors and warnings (e.g. to Android logcat). General logging, or
additional levels of "trace" messages will be logged when the following GN arg is set:
```
angle_enable_trace = true
```
To log all GLES and EGL commands submitted by an application, including the following flag:
```
angle_enable_trace_events = true
```
## Debug Angle on Android
Android is built as an Android APK, which makes it more difficult to debug an APK that is using ANGLE. The following information can allow you to debug ANGLE with LLDB.
* You need to build ANGLE with debug symbols enabled. Assume your build variant is called Debug. Make sure you have these lines in out/Debug/args.gn
```
is_component_build = false
is_debug = true
is_official_build = false
symbol_level = 2
strip_debug_info = false
ignore_elf32_limitations = true
angle_extract_native_libs = true
```
The following local patch may also be necessary:
```
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 96a18d91a3f6..ca7971fdfd48 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -86,7 +86,8 @@ declare_args() {
# Whether an error should be raised on attempts to make debug builds with
# is_component_build=false. Very large debug symbols can have unwanted side
# effects so this is enforced by default for chromium.
- forbid_non_component_debug_builds = build_with_chromium
+ forbid_non_component_debug_builds = false
```
Build/install/enable ANGLE apk for your application following other instructions.
* Modify gdbclient.py script to let it find the ANGLE symbols.
```
diff --git a/scripts/gdbclient.py b/scripts/gdbclient.py
index 61fac4000..1f43f4f64 100755
--- a/scripts/gdbclient.py
+++ b/scripts/gdbclient.py
@@ -395,6 +395,8 @@ def generate_setup_script(debugger_path, sysroot, linker_search_dir, binary_file
vendor_paths = ["", "hw", "egl"]
solib_search_path += [os.path.join(symbols_dir, x) for x in symbols_paths]
solib_search_path += [os.path.join(vendor_dir, x) for x in vendor_paths]
+ solib_search_path += ["/your_path_to_chromium_src/out/Debug/lib.unstripped/"]
if linker_search_dir is not None:
solib_search_path += [linker_search_dir]
```
* Start your lldbclient.py from `/your_path_to_chromium_src/out/Debug` folder. This adds the ANGLE source-file paths to what is visible to LLDB, which allows LLDB to show ANGLE's source files. Refer to https://source.android.com/devices/tech/debug/gdb for how to attach the app for debugging.
* If you are debugging angle_perftests, you can use `--shard-timeout 100000000` to disable the timeout so that the test won't get killed while you are debugging. If the test runs too fast that you don't have time to attach, use `--delay-test-start=60` to give you extra time to attach.
## Enabling Debug-Utils Markers
ANGLE can emit debug-utils markers for every GLES API command that are visible to both Android GPU
Inspector (AGI) and RenderDoc. This support requires
[enabling general logging](#enabling-general-logging) as well as setting the following additional
GN arg:
```
angle_enable_annotator_run_time_checks = true
```
In addition, if the following GN arg is set, the API calls will output to Android's logcat:
```
angle_enable_trace_android_logcat = true
```
Once compiled, the markers need to be turned on.
### Turning on Debug Markers on Android
On Android, debug markers are turned on and off with an Android debug property that is
automatically deleted at the next reboot:
```
adb shell setprop debug.angle.markers 1
```
* 0: Turned off/disabled (default)
* 1: Turned on/enabled
### Turning on Debug Markers on Desktop
On desktop, debug markers are turned on and off with the ANGLE_ENABLE_DEBUG_MARKERS environment
variable (set in OS-specific manner):
* 0: Turned off/disabled (default)
* 1: Turned on/enabled
## Running ANGLE under GAPID on Linux
[GAPID](https://github.com/google/gapid) can be used to capture trace of Vulkan commands on Linux.
When capturing traces of gtest based tests built inside Chromium checkout, make sure to run the
tests with `--single-process-tests` argument.
## Running ANGLE under GAPID on Android
[GAPID](https://github.com/google/gapid) can be used to capture a trace of the Vulkan or OpenGL ES
command stream on Android. For it to work, ANGLE's libraries must have different names from the
system OpenGL libraries. This is done with the gn arg:
```
angle_libs_suffix = "_ANGLE_DEV"
```
All
[AngleNativeTest](https://chromium.googlesource.com/chromium/src/+/main/third_party/angle/src/tests/test_utils/runner/android/java/src/com/android/angle/test/AngleNativeTest.java)
based tests share the same activity name, `com.android.angle.test.AngleUnitTestActivity`.
Thus, prior to capturing your test trace, the specific test APK must be installed on the device.
When you build the test, a test launcher is generated, for example,
`./out/Release/bin/run_angle_end2end_tests`. The best way to install the APK is to run this test
launcher once.
In GAPID's "Capture Trace" dialog, "Package / Action:" should be:
```
android.intent.action.MAIN:com.android.angle.test/com.android.angle.test.AngleUnitTestActivity
```
The mandatory [extra intent
argument](https://developer.android.com/studio/command-line/adb.html#IntentSpec) for starting the
activity is `org.chromium.native_test.NativeTest.StdoutFile`. Without it the test APK crashes. Test
filters can be specified via either the `org.chromium.native_test.NativeTest.CommandLineFlags` or
the `org.chromium.native_test.NativeTest.GtestFilter` argument. Example "Intent Arguments:" values in
GAPID's "Capture Trace" dialog:
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt -e org.chromium.native_test.NativeTest.CommandLineFlags "--gtest_filter=*ES2_VULKAN"
```
or
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt --e org.chromium.native_test.NativeTest.GtestFilter RendererTest.SimpleOperation/ES2_VULKAN:SimpleOperationTest.DrawWithTexture/ES2_VULKAN
```
## Running ANGLE under RenderDoc
An application running through ANGLE can confuse [RenderDoc](https://github.com/baldurk/renderdoc),
as RenderDoc [hooks to EGL](https://github.com/baldurk/renderdoc/issues/1045) and ends up tracing
the calls the application makes, instead of the calls ANGLE makes to its backend. As ANGLE is a
special case, there's little support for it by RenderDoc, though there are workarounds.
### Windows
On Windows, RenderDoc supports setting the environment variable `RENDERDOC_HOOK_EGL` to 0 to avoid
this issue.
### Linux
On Linux, there is no supported workaround by RenderDoc. See [this
issue](https://github.com/baldurk/renderdoc/issues/1045#issuecomment-463999869). To capture Vulkan
traces, the workaround is to build RenderDoc without GL(ES) support.
Building RenderDoc is straightforward. However, here are a few instructions to keep in mind.
```
# Install dependencies based on RenderDoc document. Here are some packages that are unlikely to be already installed:
$ sudo apt install libxcb-keysyms1-dev python3-dev qt5-qmake libqt5svg5-dev libqt5x11extras5-dev
# Inside the RenderDoc directory:
$ cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H. -DENABLE_GLES=OFF -DENABLE_GL=OFF
# QT_SELECT=5 is necessary if your distribution doesn't default to Qt5
$ QT_SELECT=5 make -j -C build
# Run RenderDoc from the build directory:
$ ./build/bin/qrenderdoc
```
If your distribution does not provide a recent Vulkan SDK package, you would need to manually
install that. This script tries to perform this installation as safely as possible. It would
overwrite the system package's files, so follow at your own risk. Place this script just above the
extracted SDK directory.
```
#! /bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
ver=$1
if [ ! -d "$ver" ]; then
echo "$ver is not a directory"
fi
# Verify everything first
echo "Verifying files..."
echo "$ver"/x86_64/bin/vulkaninfo
test -f "$ver"/x86_64/bin/vulkaninfo || exit 1
echo "$ver"/x86_64/etc/explicit_layer.d/
test -d "$ver"/x86_64/etc/explicit_layer.d || exit 1
echo "$ver"/x86_64/lib/
test -d "$ver"/x86_64/lib || exit 1
echo "Verified. Performing copy..."
echo sudo cp "$ver"/x86_64/bin/vulkaninfo /usr/bin/vulkaninfo
sudo cp "$ver"/x86_64/bin/vulkaninfo /usr/bin/vulkaninfo
echo sudo cp "$ver"/x86_64/etc/explicit_layer.d/* /etc/explicit_layer.d/
sudo cp "$ver"/x86_64/etc/explicit_layer.d/* /etc/explicit_layer.d/
echo sudo rm /usr/lib/x86_64-linux-gnu/libvulkan.so*
sudo rm /usr/lib/x86_64-linux-gnu/libvulkan.so*
echo sudo cp -P "$ver"/x86_64/lib/lib* /usr/lib/x86_64-linux-gnu/
sudo cp -P "$ver"/x86_64/lib/lib* /usr/lib/x86_64-linux-gnu/
echo "Done."
```
### Android
#### Using Linux as a Local Machine
If you are on Linux, make sure not to use the build done in the previous section. The GL renderer
disabled in the previous section is actually needed in this section.
```
# Inside the RenderDoc directory:
# First delete the Cmake Cache in build/ directory
rm build/CMakeCache.txt
# Then build RenderDoc with cmake:
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H.
QT_SELECT=5 make -j -C build
```
Follow
[Android Dependencies on Linux](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Dependencies.md#android-dependencies-on-linux)
to download dependency files.
Define the following environment variables, for example in `.bashrc` (values are examples):
```
export JAVA_HOME=<path_to_jdk_root>
export ANDROID_SDK=<path_to_sdk_root>
export ANDROID_NDK=<path_to_ndk_root>
export ANDROID_NDK_HOME=<path_to_ndk_root>
```
In the renderdoc directory, create Android builds of RenderDoc:
```
mkdir build-android-arm32
cd build-android-arm32/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a ..
make -j
cd ../
mkdir build-android-arm64
cd build-android-arm64/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=arm64-v8a ..
make -j
cd ../
```
Note that you need both arm32 and arm64 builds even if working with an arm64 device. See
[RenderDoc's documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android)
for more information.
When you run RenderDoc, choose the "Replay Context" from the bottom-left part of the UI (defaults to
Local). When selecting the device, you should see the RenderDoc application running.
In ANGLE itself, make sure you add a suffix for its names to be different from the system's. Add
this to gn args:
```
angle_libs_suffix = "_ANGLE_DEV"
```
Next, you need to install an ANGLE test APK. When you build the test, a test launcher is generated,
for example, `./out/Release/bin/run_angle_end2end_tests`. The best way to install the APK is to run
this test launcher once.
In RenderDoc, use `com.android.angle.test/com.android.angle.test.AngleUnitTestActivity` as the
Executable Path, and provide the following arguments:
```
-e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt -e org.chromium.native_test.NativeTest.CommandLineFlags "--gtest_filter=*ES2_VULKAN"
```
Note that in the above, only a single command line argument is supported with RenderDoc. If testing
dEQP on a non-default platform, the easiest way would be to modify `GetDefaultAPIName()` in
`src/tests/deqp_support/angle_deqp_gtest.cpp` (and avoid `--use-angle=X`).
#### Using Windows as a Local Machine
You should be able to download the latest [RenderDoc on Windows](https://renderdoc.org/builds) and follow the
[RenderDoc Official Documentation](https://renderdoc.org/docs/how/how_android_capture.html) for instructions on how to
use RenderDoc on Android. If you would like to build RenderDoc for Android on Windows yourself, you can follow the
[RenderDoc Officual Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android).
We listed more detailed instructions below on how to set up the build on Windows.
##### Install Android Dependencies
On windows, we need to install dependencies to build android, as described in
[RenderDoc Official Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Dependencies.md#android)
1. Install [Android SDK](https://developer.android.com/about/versions/12/setup-sdk#install-sdk).
Add a new system variable:
Variable: ANDROID_SDK
Value: path_to_sdk_directory (e.g. C:\Users\test\Appdata\Local\Android\Sdk)
2. Install [Android NDK](https://developer.android.com/studio/projects/install-ndk).
Add a new system variable:
Variable: ANDROID_NDK
Value: path_to_ndk_directory (e.g. C:\Users\test\Appdata\Local\Android\Sdk\ndk\23.1.7779620)
3. Install [Java 8](https://www.oracle.com/java/technologies/downloads/#java8).
Add a new system variable:
Variable: JAVA_HOME
Value: path_to_jdk1.8_directory (e.g. C:\Program Files\Java\jdk1.8.0_311)
5. Install [Android Debug Bridge](https://developer.android.com/studio/releases/platform-tools).
Append android_sdk_platform-tools_directory to the Path system variable.
e.g. C:\Users\Test\AppData\Local\Android\Sdk\platform-tools
##### Install Build Tools
1. Install a bash shell. Git Bash comes with Git installation on Windows should work.
2. Install [make](http://gnuwin32.sourceforge.net/packages/make.htm).
Add the path to bin folder of GnuWin32 to the Path system variable.
##### Build RenderDoc Android APK on Windows
If you are using the Git Bash that comes with MinGW generator, you can run below commands to build Android APK
```
mkdir build-android-arm32
cd build-android-arm32/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a -G "MinGW Makefiles" ..
make -j
cd ../
mkdir build-android-arm64
cd build-android-arm64/
cmake -DBUILD_ANDROID=On -DANDROID_ABI=arm64-v8a -G "MinGW Makefiles" ..
make -j
cd ../
```
If the generator type of the bash shell you are using is different from MinGW, replace the "MinGW" in the above cmake
command with the generator
type you are using, as described in
[RenderDoc Official Documentation](https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md#android).
##### Build Errors And Resolutions
* **cmake command errors**
```
Error: Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe to get the value of
VCTargetsPath:
error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.
Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.
Configuration='Debug' Platform='x64'.
```
This is due to the cmake command is using Visual Studio as the generator type. Run the cmake command with the
generator type "MinGW Makefiles" or "MSYS Makefiles".
```Error: Does not match the generator used previously```
Delete the CMakeCache file in build directories build-android-arm64/ or build-android-arm32/.
* **make command errors**
```
-Djava.ext.dirs is not supported.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
Downgrade Java JDK version to [Java 8](https://www.oracle.com/java/technologies/downloads/#java8).
##### Steps to use the RenderDoc you just built
1. Build arm32 and arm64 android packages. See [instructions](#build-renderdoc-android-apk-on-windows) in the above
section.
2. Uninstall the renderdoc package.
This step is required if you have installed / used RenderDoc on the same Android device before. RenderDoc only pushes
the renderdoccmd APK to the Android device if it finds the version of the existing APK on the device is different from
the version of the APK we are going to install, and the version is dictated by the git hash it was built from. Therefore
any local modifications in the RenderDoc codebase would not get picked up if we don't uninstall the old APK first.
```
adb uninstall org.renderdoc.renderdoccmd.arm64
adb uninstall org.renderdoc.renderdoccmd.arm32
```
3. Build renderdoc on windows desktop by clicking "build solution" in visual studio.
4. Launch renderdoc from visual studio, and push the android packages to android device by selecting the connected
device at the bottom left corner.
### Add SPIRV-to-GLSL Shader View Option
RenderDoc allows us to add and configure customized shader processing tools:
https://renderdoc.org/docs/window/settings_window.html#shader-processing-tools-config.
To configure RenderDoc to display shader source code in GLSL, instead of spirv,
follow the below steps:
1. Get the SPIRV-Cross tool:
Clone the SPIRV-Cross git repo: https://github.com/KhronosGroup/SPIRV-Cross:
```
git clone https://github.com/KhronosGroup/SPIRV-Cross.git
```
Compile the SPIRV-Cross:
```
# inside SPIRV-Cross directory
make
```
2. Open Shader Viewer Settings window: RenderDoc -> Tools -> Settings, and select
Shader Viewer on the left.
3. Click Add on the bottom to add a new tool, and fill the new tool details:
| Item | Value |
|------------|-------------------------------------|
| Name | SPIRV-CROSS |
| Tool Type | SPIRV-Cross |
| Executable | <spirv-cross-repo-root>/spirv-cross |
5. Restart RenderDoc.
## Testing with Chrome Canary
Many of ANGLE's OpenGL ES entry points are exposed in Chromium as WebGL 1.0 and WebGL 2.0 APIs that
are available via JavaScript. For testing purposes, custom ANGLE builds may be injected in Chrome
Canary.
### Setup
#### Windows
1. Download and install [Google Chrome Canary](https://www.google.com/chrome/canary/).
2. Build ANGLE x64, Release.
3. Run `python scripts\update_chrome_angle.py` to replace Canary's ANGLE with your custom ANGLE
(note: Canary must be closed).
#### Linux
1. Install Google Chrome Dev (via apt, or otherwise). Expected installation directory is
`/opt/google/chrome-unstable`.
2. Build ANGLE for the running platform. `is_component_build = false` is suggested in the GN args.
3. Run `python scripts/update_chrome_angle.py` to replace Dev's ANGLE with your custom ANGLE
4. Add ANGLE's build path to the `LD_LIBRARY_PATH` environment variable.
#### macOS
1. Download and install [Google Chrome Canary](https://www.google.com/chrome/canary/).
2. Build ANGLE for the running platform; GN args should contain `is_debug = false`.
3. Run `./scripts/update_chrome_angle.py` to replace Canary's ANGLE with your custom ANGLE.
### Usage
Run Chrome:
- On Windows: `%LOCALAPPDATA%\Google\Chrome SxS\chrome.exe`
- On Linux: `/opt/google/chrome-unstable/google-chrome-unstable`
- On macOS: `./Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary`
With the following command-line options:
* `--use-cmd-decoder=passthrough --use-gl=angle` and one of
* `--use-angle=d3d9` (Direct3D 9 renderer, Windows only)
* `--use-angle=d3d11` (Direct3D 11 renderer, Windows only)
* `--use-angle=d3d11on12` (Direct3D 11on12 renderer, Windows only)
* `--use-angle=gl` (OpenGL renderer)
* `--use-angle=gles` (OpenGL ES renderer)
* `--use-angle=vulkan` (Vulkan renderer)
* `--use-angle=swiftshader` (SwiftShader renderer)
* `--use-angle=metal` (Metal renderer, macOS only)
Additional useful options:
* `--enable-logging`: To see logs
* `--disable-gpu-watchdog`: To disable Chromium's watchdog, killing the GPU process when slow (due
to a debug build for example)
* `--disable-gpu-sandbox`: To disable Chromium's sandboxing features, if it's getting in the way of
testing.
* `--disable-gpu-compositing`: To make sure only the WebGL test being debugged is run through ANGLE,
not the entirety of Chromium.

216
doc/DevSetup.md Normal file
View File

@@ -0,0 +1,216 @@
# ANGLE Development
ANGLE provides OpenGL ES 3.1 and EGL 1.5 libraries and tests. You can use these to build and run OpenGL ES applications on Windows, Linux, Mac and Android.
## Development setup
### Version Control
ANGLE uses git for version control. Helpful documentation can be found at [http://git-scm.com/documentation](http://git-scm.com/documentation).
### Required First Setup (do this first)
Note: If you are building inside a Chromium checkout [see these instructions instead](https://chromium.googlesource.com/angle/angle/+/HEAD/doc/BuildingAngleForChromiumDevelopment.md).
Required on all platforms:
* [Python 3](https://www.python.org/downloads/) must be available in your path.
* [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
* Required to download dependencies (with gclient), generate build files (with GN), and compile ANGLE (with ninja).
* Ensure `depot_tools` is in your path as it provides ninja for compilation.
* For Googlers, run `download_from_google_storage --config` to login to Google Storage before fetching the source.
On Windows:
* ***IMPORTANT: Set `DEPOT_TOOLS_WIN_TOOLCHAIN=0` in your environment if you are not a Googler.***
* Install [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/)
* Install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/).
* You can install it through Visual Studio Installer if available. It might be necessary to switch to the `Individual components` tab to find the latest version.
* The currently supported Windows SDK version can be found in [vs_toolchain.py](https://chromium.googlesource.com/chromium/src/build/+/refs/heads/main/vs_toolchain.py).
* The SDK is required for GN-generated Visual Studio projects, the D3D Debug runtime, and the latest HLSL Compiler runtime.
* (optional) See the [Chromium Windows build instructions](https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md) for more info.
On Linux:
* Dependencies will be handled later (see `install-build-deps.sh` below).
On MacOS:
* [XCode](https://developer.apple.com/xcode/) for Clang and development files.
* For Googlers on MacOS, you'll first need authorization to download macOS SDK's from Chromium
servers before running `gclient sync`. Obtain this authorization via `cipd auth-login`
and following the instructions.
### Getting the source
```
mkdir angle
cd angle
fetch angle
```
If you're contributing code, you will also need to set up the Git `commit-msg` hook. See [ContributingCode#getting-started-with-gerrit](ContributingCode.md#getting-started-with-gerrit) for instructions.
On Linux only, you need to install all the necessary dependencies before going further by running this command:
```
./build/install-build-deps.sh
```
If building for Android (which requires Linux), switch to the [Android steps](https://chromium.googlesource.com/angle/angle.git/+/HEAD/doc/DevSetupAndroid.md) at this point.
After this completes successfully, you are ready to generate the ninja files:
```
gn gen out/Debug
```
If you had trouble checking out the code, please inspect the error message. As
a reminder, on Windows, ensure you **set `DEPOT_TOOLS_WIN_TOOLCHAIN=0` in
your environment if you are not a Googler**. If you are a Googler, ensure you
ran `download_from_google_storage --config`.
GN will generate ninja files. The default build options build ANGLE with clang
and in release mode. Often, the default options are the desired ones, but
they can be changed by running `gn args out/Debug`. Some options that are
commonly overriden for development are:
```
is_component_build = true/false (false forces static links of dependencies)
target_cpu = "x64"/"x86" (the default is "x64")
is_debug = true/false (use false for release builds. is_debug = true is the default)
angle_assert_always_on = true/false (enables release asserts and runtime debug layers)
is_clang = false (NOT RECOMMENDED) (to use system default compiler instead of clang)
```
For a release build run `gn args out/Release` and set `is_debug = false`.
Optionally set `angle_assert_always_on = true` for Release testing.
On Windows, you can build for the Universal Windows Platform (UWP) by setting
`target_os = "winuwp"` in the args. Setting `is_component_build = false` is
highly recommended to support moving libEGL.dll and libGLESv2.dll to an
application's directory and being self-contained, instead of depending on
other DLLs (d3dcompiler_47.dll is still needed for the Direct3D backend). We
also recommend using `is_clang = false` with UWP.
For more information on GN run `gn help`.
Use `autoninja` to compile on all platforms with one of the following commands:
```
autoninja -C out/Debug
autoninja -C out/Release
```
`depot_tools` provides `autoninja`, so it should be available in your path
from earlier steps. Ninja automatically calls GN to regenerate the build
files on any configuration change. `autoninja` automatically specifies a
thread count to `ninja` based on your system configuration.
### Building with Goma (Google employees only)
In addition, we highly recommend Google employees use goma, a distributed
compilation system. Detailed information is available internally. To enable
Goma set the GN arg:
```
use_goma = true
```
### Building and Debugging with Visual Studio
To generate the Visual Studio solution in `out/Debug/angle-debug.sln`:
```
gn gen out/Debug --sln=angle-debug --ide=vs2022 --ninja-executable="C:\src\angle\third_party\ninja\ninja.exe"
```
In Visual Studio:
1. Open the ANGLE solution file `out/Debug/angle-debug.sln`.
2. We recommended you use `autoninja` from a command line to build manually.
3. "Build Solution" from the IDE is broken with GN. You can use the IDE to build one target or one file at a time.
Once the build completes, all ANGLE libraries, tests, and samples will be located in `out/Debug`.
### Building ANGLE for Android
See the Android specific [documentation](DevSetupAndroid.md#ANGLE-for-Android).
## Application Development with ANGLE
This sections describes how to use ANGLE to build an OpenGL ES application.
### Choosing a Backend
ANGLE can use a variety of backing renderers based on platform. On Windows, it defaults to D3D11 where it's available,
or D3D9 otherwise. On other desktop platforms, it defaults to GL. On mobile, it defaults to GLES.
ANGLE provides an EGL extension called `EGL_ANGLE_platform_angle` which allows uers to select
which renderer to use at EGL initialization time by calling eglGetPlatformDisplayEXT with special
enums. Details of the extension can be found in its specification in
`extensions/EGL_ANGLE_platform_angle.txt` and `extensions/EGL_ANGLE_platform_angle_*.txt` and
examples of its use can be seen in the ANGLE samples and tests, particularly `util/EGLWindow.cpp`.
To change the default D3D backend:
1. Open `src/libANGLE/renderer/d3d/DisplayD3D.cpp`
2. Locate the definition of `ANGLE_DEFAULT_D3D11` near the head of the file, and set it to your preference.
To remove any backend entirely:
1. Run `gn args <path/to/build/dir>`
2. Set the appropriate variable to `false`. Options are:
- `angle_enable_d3d9`
- `angle_enable_d3d11`
- `angle_enable_gl`
- `angle_enable_metal`
- `angle_enable_null`
- `angle_enable_vulkan`
- `angle_enable_essl`
- `angle_enable_glsl`
### To Use ANGLE in Your Application
On Windows:
1. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files.
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, click _C/C++_.
* Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_.
2. Configure your build environment to have access to `libEGL.lib` and `libGLESv2.lib` found in the build output directory (see [Building ANGLE](#building-with-visual-studio)).
* For Visual C++
* Right-click your project in the _Solution Explorer_, and select _Properties_.
* Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_.
* Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon.
3. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](#building-with-visual-studio)) into your application folder.
4. Code your application to the Khronos [OpenGL ES 2.0](http://www.khronos.org/registry/gles/) and [EGL 1.4](http://www.khronos.org/registry/egl/) APIs.
On Linux and MacOS, either:
- Link you application against `libGLESv2` and `libEGL`
- Use `dlopen` to load the OpenGL ES and EGL entry points at runtime.
## GLSL ES Translator
In addition to OpenGL ES and EGL libraries, ANGLE also provides a GLSL ES
translator. The translator targets various back-ends, including HLSL, GLSL
for desktop and mobile, SPIR-V and Metal SL. To build the translator, build
the `angle_shader_translator` target. Run the translator binary without
arguments to see a usage message.
### Source and Building
The translator code is included with ANGLE but fully independent; it resides
in [`src/compiler`](../src/compiler). Follow the steps above for
[getting and building ANGLE](#getting-the-source) to build the translator on
the platform of your choice.
### Usage
The ANGLE [`shader_translator`](../samples/shader_translator/shader_translator.cpp)
sample demos basic C++ API usage. To translate a GLSL ES shader, call the following
functions in the same order:
* `sh::Initialize()` initializes the translator library and must be called only once from each process using the translator.
* `sh::ContructCompiler()` creates a translator object for vertex or fragment shader.
* `sh::Compile()` translates the given shader.
* `sh::Destruct()` destroys the given translator.
* `sh::Finalize()` shuts down the translator library and must be called only once from each process using the translator.

265
doc/DevSetupAndroid.md Normal file
View File

@@ -0,0 +1,265 @@
# ANGLE for Android
**Important note**: Android builds currently require Linux.
## Setting up the ANGLE build for Android
Please follow the instructions in [DevSetup](DevSetup.md) to check out and bootstrap ANGLE with
gclient. Then edit your `.gclient` to add `target_os = ['android']` to check out Android
dependencies. Then run `gclient sync` to download all required sources and packages.
The following command will open a text editor to populate GN args for an Android Release build:
```
gn args out/Android
```
Once the editor is up, paste the following GN args to generate an Android build, and save the file.
```
target_os = "android"
target_cpu = "arm64"
is_component_build = false
is_debug = false
angle_assert_always_on = true # Recommended for debugging. Turn off for performance.
use_goma = true # Googlers-only! If you're not a Googler remove this.
```
More targeted GN arg combinations can be found [below](#android-gn-args-combinations).
If you run into any problems with the above, you can copy the canonical args from CI:
- Visit the ANGLE [CI Waterfall](https://ci.chromium.org/p/angle/g/ci/console).
- Open any recent Android build.
- Expand the for "lookup GN args" step and copy the GN args.
- Always omit the `goma_dir` flag.
- If you are not a Googler, also omit the `use_goma` flag.
## Building ANGLE for Android
Build all ANGLE targets using the following command:
```
autoninja -C out/Android
```
Most ANGLE build targets are supported. We do not support the ANGLE samples on
Android currently. ANGLE tests will be in your `out/Android` directory, and can
be run with various options. For instance, angle perftests can be run with:
```
./out/Android/angle_perftests --verbose --local-output --gtest_filter=DrawCallPerf*
```
Additional details are in [Android Test Instructions][AndroidTest].
Additional Android dEQP notes can be found in [Running dEQP on Android](dEQP.md#Running-dEQP-on-Android).
If you are targeting WebGL and want to run with ANGLE, you will need to build within a full
Chromium checkout. Please follow the [Chromium build instructions for Android][ChromeAndroid].
Also refer to the [ANGLE Guide][ANGLEChrome] on how to work with Top of Tree ANGLE in Chromium.
Build the `chrome_public_apk` target, and follow the [GPU Testing][GPU Testing] doc, using
`--browser=android-chromium`. Make sure to set your `CHROMIUM_OUT_DIR` environment variable, so
that your browser is found, otherwise the tests will use the stock browser.
[AndroidTest]: https://chromium.googlesource.com/chromium/src/+/main/docs/testing/android_test_instructions.md
[GPU Testing]: http://www.chromium.org/developers/testing/gpu-testing#TOC-Running-the-GPU-Tests-Locally
[ChromeAndroid]: https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md
[ANGLEChrome]: BuildingAngleForChromiumDevelopment.md
## Using ANGLE as the Android OpenGL ES driver
Starting with Android 10 (Q), you can load ANGLE as your device's OpenGL ES driver.
`== Important Note ==` You can only run this ANGLE with *DEBUGGABLE APPS* or when you have
*ROOT ACCESS*. Debuggable apps are [marked debuggable][Debuggable] in the manifest. For root
access, see the [Android documentation][UserDebug] for how to build from source.
To build the ANGLE APK, you must first bootstrap your build by following the steps
[above](#ANGLE-for-Android). The steps below will result in an APK that contains the ANGLE
libraries and can be installed on any Android 10+ build.
Apps can be opted in to ANGLE [one at a time](#ANGLE-for-a-single-OpenGL-ES-app), in
[groups](#ANGLE-for-multiple-OpenGL-ES-apps), or [globally](#ANGLE-for-all-OpenGL-ES-apps). The
apps must be launched by the Java runtime since the libraries are discovered within an installed
package. This means ANGLE cannot be used by native executables or SurfaceFlinger at this time.
## Building the ANGLE APK
Using `gn args` from above, you can build the ANGLE apk using:
```
autoninja -C out/Android angle_apks
```
## Installing the ANGLE APK
```
adb install -r -d --force-queryable out/Android/apks/AngleLibraries.apk
```
You can verify installation by looking for the package name:
```
$ adb shell pm path org.chromium.angle
package:/data/app/org.chromium.angle-HpkUceNFjoLYKPbIVxFWLQ==/base.apk
```
Note that `angle_debug_package` must be set to `org.chromium.angle` for this apk to be loaded.
## Selecting ANGLE as the OpenGL ES driver
For debuggable applications or root users, you can tell the platform to load ANGLE libraries from
the installed package.
```
adb shell settings put global angle_debug_package org.chromium.angle
```
Remember that ANGLE can only be used by applications launched by the Java runtime.
## ANGLE driver choices
There are multiple values you can use for selecting which OpenGL ES driver is loaded by the platform.
The following values are supported for `angle_gl_driver_selection_values`:
- `angle` : Use ANGLE.
- `native` : Use the native OpenGL ES driver.
- `default` : Use the default driver. This allows the platform to decide which driver to use.
In each section below, replace `<driver>` with one of the values above.
### ANGLE for a *single* OpenGL ES app
```
adb shell settings put global angle_gl_driver_selection_pkgs <package name>
adb shell settings put global angle_gl_driver_selection_values <driver>
```
### ANGLE for *multiple* OpenGL ES apps
Similar to selecting a single app, you can select multiple applications by listing their package
names and driver choice in comma separated lists. Note the lists must be the same length, one
driver choice per package name.
```
adb shell settings put global angle_gl_driver_selection_pkgs <package name 1>,<package name 2>,<package name 3>,...
adb shell settings put global angle_gl_driver_selection_values <driver 1>,<driver 2>,<driver 3>,...
```
### ANGLE for *all* OpenGL ES apps
`Note: This method only works on a device with root access.`
Enable:
```
adb shell settings put global angle_gl_driver_all_angle 1
```
Disable:
```
adb shell settings put global angle_gl_driver_all_angle 0
```
## Check for success
Check to see that ANGLE was loaded by your application:
```
$ adb logcat -d | grep ANGLE
V GraphicsEnvironment: ANGLE developer option for <package name>: angle
I GraphicsEnvironment: ANGLE package enabled: org.chromium.angle
I ANGLE : Version (2.1.0.f87fac56d22f), Renderer (Vulkan 1.1.87(Adreno (TM) 615 (0x06010501)))
```
Note that this might be logged by the built-in ANGLE and not the installed apk if `angle_debug_package` wasn't set.
## Clean up
Settings persist across reboots, so it is a good idea to delete them when finished.
```
adb shell settings delete global angle_debug_package
adb shell settings delete global angle_gl_driver_all_angle
adb shell settings delete global angle_gl_driver_selection_pkgs
adb shell settings delete global angle_gl_driver_selection_values
```
## Troubleshooting
If your application is not debuggable or you are not root, you may see an error like this in the log:
```
$ adb logcat -d | grep ANGLE
V GraphicsEnvironment: ANGLE developer option for <package name>: angle
E GraphicsEnvironment: Invalid number of ANGLE packages. Required: 1, Found: 0
E GraphicsEnvironment: Failed to find ANGLE package.
```
Double check that you are root, or that your application is [marked debuggable][Debuggable].
## Android GN args combinations
The [above](#angle-gn-args-for-android) GN args only modify default values to generate a Debug
build for Android. Below are some common configurations used for different scenarios.
To determine what is different from default, you can point the following command at your target
directory. It will show the list of gn args in use, where they came from, their current value,
and their default values.
```
gn args --list <dir>
```
### Performance config
This config is designed to get maximum performance by disabling debug configs and validation layers.
Note: The oddly named `is_official_build` is a more aggressive optimization level than `Release`. Its name is historical.
```
target_os = "android"
target_cpu = "arm64"
angle_enable_vulkan = true
is_component_build = false
is_official_build = true
is_debug = false
```
### Debug config
This config is useful for quickly ensuring Vulkan is running cleanly. It disables debug, but
enables asserts and allows validation errors.
```
target_os = "android"
target_cpu = "arm64"
is_component_build = false
is_debug = true
```
#### Application Compatibility
Application compatibility may be increased by enabling non-conformant features and extensions with
a GN arg:
```
angle_expose_non_conformant_extensions_and_versions = true
```
## Accessing ANGLE traces
To sync and build the ANGLE traces, jump to [ANGLE Restricted Traces](https://chromium.googlesource.com/angle/angle.git/+/HEAD/src/tests/restricted_traces/README.md#angle-restricted-traces).
## Command line for launching chrome on Android
[This Makefile](https://github.com/phuang/test/blob/main/chromium/Makefile) contains many useful
command lines for launching chrome.
Targets run_chrome_public_apk_* is for launching chrome on Android.
To use this Makefile, download it into chrome build tree, and use below commands (for more targets please check Makefile)
```
# To edit gn args
$ make args OUT=out_android/Release # The OUT can be set in Makefile instead of passing it in command line
# Build and run chrome on Android device with GLRenderer
$ make run_chrome_public_apk_gl
# Build and run chrome on Android device with SkiaRenderer
$ make run_chrome_public_apk_skia
# Run adb logcat
$ make adb_logcat
# Symbolize Android crash stack
$ make android_symbol
# Build and run gpu_unittests
$ make gpu_unittests GTEST_FILTER="gtest-filters" # If GTEST_FILTER is not specified, all tests will be run.
```
[Debuggable]: https://developer.android.com/guide/topics/manifest/application-element#debug
[UserDebug]: https://source.android.com/setup/build/building

111
doc/DirtyBits.md Normal file
View File

@@ -0,0 +1,111 @@
# Dirty Bits and State Changes
OpenGL render loops typically involve changing some render states followed by
a draw call. For instance the app might change a few uniforms and invoke
`glDrawElements`:
```
for (const auto &obj : scene) {
for (const auto &uni : obj.uniforms) {
glUniform4fv(uni.loc, uni.data);
}
glDrawElements(GL_TRIANGLES, obj.eleCount, GL_UNSIGNED_SHORT, obj.eleOffset);
}
```
Another update loop may change Texture and Vertex Array state before the draw:
```
for (const auto &obj : scene) {
glBindBuffer(GL_ARRAY_BUFFER, obj.arrayBuffer);
glBufferSubData(GL_ARRAY_BUFFER, obj.bufferOffset, obj.bufferSize, obj.bufferData);
glVertexAttribPointer(obj.arrayIndex, obj.arraySize, GL_FLOAT, GL_FALSE, 0, nullptr);
glBindTexture(GL_TEXTURE_2D, obj.texture);
glDrawElements(GL_TRIANGLES, obj.eleCount, GL_UNSIGNED_SHORT, obj.eleOffset);
}
```
Other update loops may change render states like the blending modes, the depth test, or Framebuffer
attachments. In each case ANGLE needs to validate, track, and translate these state changes to the
back-end as efficiently as possible.
## Dirty Bits
Each OpenGL Context state value is stored in [`gl::State`](../src/libANGLE/State.h). For instance
the blending state, depth/stencil state, and current object bindings. Our problem is deciding how to
notify the back-end when app changes front-end state. We decided to bundle changed state into
bitsets. Each 1 bit indicates a specific changed state value. We call these bitsets "*dirty bits*".
See [`gl::State::DirtyBitType`][DirtyBitType].
Each back-end handles state changes in a `syncState` implementation function that takes a dirty
bitset. See examples in the [GL back-end][GLSyncState], [D3D11 back-end][D3D11SyncState] and
[Vulkan back-end][VulkanSyncState].
Container objects such as Vertex Array Objects and Framebuffers also have their own OpenGL front-end
state. [VAOs][VAOState] store vertex arrays and array buffer bindings. [Framebuffers][FBOState]
store attachment state and the active read and draw buffers. These containers also have internal
dirty bits and `syncState` methods. See [`gl::Framebuffer::DirtyBitType`][FBODirtyBits] and
[`rx::FramebufferVk::syncState`][FBOVkSyncState] for example.
Dirty bits allow us to efficiently process groups of state updates. We use fast instrinsic functions
to scan the bitsets for 1 bits. See [`bitset_utils.h`](../src/common/bitset_utils.h) for more
information.
## Cached Validation and State Change Notifications
To optimize validation we cache many checks. See [`gl::StateCache`][StateCache] for examples. We
need to refresh cached values on state changes. For instance, enabling a generic vertex array
changes a cached mask of active vertex arrays. Changes to a texture's images could change a cached
framebuffer's completeness when the texture is bound as an attachment. And if the draw framebuffer
becomes incomplete it changes a cached draw call validation check.
See a below example of a call to `glTexImage2D` that can affect draw call validation:
<!-- Generated from https://bramp.github.io/js-sequence-diagrams/
participant App
participant Context
participant Framebuffer
participant Texture
App->Context: glTexImage2D
Context->Texture: setImage
Texture- ->Framebuffer: onSubjectStateChange
Note over Framebuffer: cache update
Framebuffer- ->Context: onSubjectStateChange
Note over Context: cache update
-->
![State Change Example](https://raw.githubusercontent.com/google/angle/main/doc/img/StateNotificationExample.svg?sanitize=true)
We use the [Observer pattern](https://en.wikipedia.org/wiki/Observer_pattern) to implement cache
invalidation notifications. See [`Observer.h`](../src/libANGLE/Observer.h). In the example the
`Framebuffer` observes `Texture` attachments via [`angle::ObserverBinding`][ObserverBinding].
`Framebuffer` implements [`angle::ObserverInterface::onSubjectStateChange`][FBOStateChange] to
receive a notification to update its completeness cache. The `STORAGE_CHANGED` message triggers a
call to [`gl::Context::onSubjectStateChange`][ContextStateChange] which in turn calls
[`gl::StateCache::updateBasicDrawStatesError`][StateCacheUpdate] to re-validate the draw
framebuffer's completeness. On subsequent draw calls we skip re-validation at minimal cost.
See the below diagram for the dependency relations between Subjects and Observers.
![State Change Notification Flow](https://raw.githubusercontent.com/google/angle/main/doc/img/StateChangeNotificationFlow.svg?sanitize=true)
## Back-end specific Optimizations
See [Fast OpenGL State Transitions][FastStateTransitions] in [Vulkan documents][VulkanREADME] for
additional information for how we implement state change optimization on the Vulkan back-end.
[DirtyBitType]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/State.h#483
[GLSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/gl/StateManagerGL.cpp#1576
[D3D11SyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp#852
[VulkanSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/vulkan/ContextVk.cpp#642
[VAOState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/VertexArray.h#35
[FBOState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.h#52
[FBODirtyBits]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.h#319
[FBOVkSyncState]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/renderer/vulkan/FramebufferVk.cpp#726
[StateCache]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.h#98
[ObserverBinding]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Observer.h#103
[FBOStateChange]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Framebuffer.cpp#1811
[ContextStateChange]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.cpp#7981
[StateCacheUpdate]: https://chromium.googlesource.com/angle/angle/+/5f662c0042703344eb0eef6d1c123e902e3aefbf/src/libANGLE/Context.cpp#8190
[FastStateTransitions]: ../src/libANGLE/renderer/vulkan/doc/FastOpenGLStateTransitions.md
[VulkanREADME]: ../src/libANGLE/renderer/vulkan/README.md

View File

@@ -0,0 +1,24 @@
# About
Because ANGLE can only generate full HLSL programs after we known the signatures
between the vertex and pixel stages, we can not immediately call the D3D
compiler at GL shader compile time. Moreover, we can insert additional
optimization code right at draw-time.
ESSL 1.00 shaders treat all vertex inputs as floating point. We insert a
conversion routine to transform un-normalized integer vertex attributes in the
shader preamble to floating point, saving CPU conversion time.
At draw-time, we also optimize out any unused render target outputs. This
improved draw call performance significantly on lower spec and integrated
devices. Changing render target setups may trigger a shader recompile at draw
time.
# Addendum
ANGLE is not the only program to do this kind of draw-time optimization. A
common complaint from application developers is that draw calls sometimes
perform very slowly due to dynamic shader re-compilation. A future design
direction for ANGLE, when targeting a more modern API, is to perform the vertex
conversion in a separate shader pass, which would then be linked with another
compiled shader.

22
doc/ES1Status.md Normal file
View File

@@ -0,0 +1,22 @@
# ES1 Status
ES1 is implemented entirely in the front-end using features from GLES3.0. Therefore, every backend
with GLES3 support (i.e. everything other than D3D9) supports GLES1 as well.
ANGLE passes GLES1's `MustPass`, however there are known missing features.
| Features | Status | Backends |
|:-------------------------------------|:---------------------------------------------|:------------|
| Logic Op | Implemented through extensions [1](#notes-1) | Vulkan, GL |
| Palette compressed textures | Emulated with uncompressed format | Vulkan |
| [Smooth lines][lines] | Unimplemented | None |
| [Two-sided lighting][lighting] | Unimplemented | None |
| [Matrix palette][matrix] | Unimplemented (optional) | None |
[lines]: http://anglebug.com/7950
[lighting]: http://anglebug.com/7702
[matrix]: http://anglebug.com/7951
### Notes [1]
* Logic op is implemented through the `ANGLE_logic_op` or `EXT_framebuffer_fetch` extensions.
* Currently, these are supported on the Vulkan and GL backends only.

31
doc/ES31StatusOnD3D11.md Normal file
View File

@@ -0,0 +1,31 @@
# ES31 Status on Direct3D 11
| New Features | Status | Limitations |
|:---------------------------------------------------|:-----------------------------|:------------|
| Arrays of arrays (shading language only) | Fully implemented | None |
| Compute shaders | Fully implemented | None |
| Explicit uniform location | Fully implemented | None |
| Framebuffers with no attachments | Fully implemented | None |
| Indirect draw commands | Fully implemented | None |
| Multisample formats for immutable textures | Fully implemented | None |
| Program interface queries | Fully implemented | None |
| Shader bitfield operations (shading language only) | Fully implemented | None |
| Shader layout binding (shading language only) | Fully implemented | None |
| Texture gather operations | Fully implemented | None |
| Vertex attribute binding | Fully implemented | None |
| Atomic counters | Implemented with limitations | Atomic counters in non-compute shaders are not implemented yet. |
| Shader image load/store operations | Implemented with limitations | See notes [1] [below](#notes-1) |
| Shader storage buffer objects | Implemented with limitations | See notes [2] [below](#notes-2) |
| Shader helper invocation (shading language only) | Hard to implement | The equivalent of gl_HelperInvocation is WaveIsHelperLane which requres SM6. |
| Separate shader objects | Unimplemented | It can be implemented with medium complexity. |
| Stencil texturing | Unimplemented | It can be implemented with medium complexity. Refer [here](https://stackoverflow.com/questions/34601325/directx11-read-stencil-bit-from-compute-shader). |
### Notes [1]
* Images in non-compute shaders are not implemented yet.
* Multiple image variables are not allowed to be bound to the same image unit which refers to the same layer and level of a texture image. It means image aliasing is not supported.
* The same layer and level of a texture are not allowed to be bound to multiple image units.
* When a texture is bound to an image unit, the image unit format must exactly match the texture internal format. Similarly, the format layout qualifier for an image variable must exactly match the format of the image unit. Re-interpretation is not supported. See [here](http://anglebug.com/3038).
### Notes [2]
* Shader storage blocks in non-compute shaders are not implemented yet.
* Multiple shader storage blocks are not allowed to be bound to the same buffer. See [here](http://anglebug.com/3032).

351
doc/ExtensionSupport.md Normal file
View File

@@ -0,0 +1,351 @@
# ANGLE Supported Extensions
This is a list of all extensions currently supported by ANGLE's front-end, and
support listed for some of the tested targets for ANGLE's Vulkan back-end. To
produce a list of all supported extensions in the Vulkan back-end, run
`angle_end2end_tests` with `--gtest_filter EGLPrintEGLinfoTest.PrintGLInfo/ES*_Vulkan`.
Specifications for GLES extensions can be found in the [Khronos OpenGL ES API
Registry](http://www.khronos.org/registry/gles/)
Specifications for EGL extensions can be found in the [Khronos EGL API
Registry](http://www.khronos.org/registry/egl/)
Specifications for ANGLE-specific extensions can be found in the [ANGLE
extension registry](../extensions)
This list is automatically generated by [`gen_extensions.py`](../src/libANGLE/gen_extensions.py)
using data from registry_xml.py and gl.xml.
## GLES 2.0, 3.0, 3.1 and 3.2 extension support
*Note: some data is sampled from older drivers, so might not represent the latest driver support.*
| Extension Name | NVIDIA 1660 Win10 | Intel 630 Win10 | NVIDIA 1660 Linux | Intel 630 Linux | SwiftShader Win10 | Pixel 4 Android 11 | Pixel 6 Android 13 |
| -------------- | :---------------: | :-------------: | :---------------: | :-------------: | :---------------: | :----------------: | :----------------: |
| [GL_EXT_base_instance](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_base_instance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_blend_equation_advanced](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_blend_equation_advanced.txt) | &#x2714; | | &#x2714; | | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_blend_func_extended](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_func_extended.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; | |
| [GL_EXT_blend_minmax](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_minmax.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_buffer_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_buffer_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_clip_control](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_clip_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_clip_cull_distance](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_clip_cull_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_APPLE_clip_distance](https://khronos.org/registry/OpenGL/extensions/APPLE/APPLE_clip_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_EXT_color_buffer_float](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_color_buffer_half_float](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_R11_signed_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_R11_signed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_R11_unsigned_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_R11_unsigned_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_RG11_signed_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_RG11_signed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_EAC_RG11_unsigned_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_EAC_RG11_unsigned_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_compressed_ETC1_RGB8_sub_texture](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_compressed_ETC1_RGB8_sub_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC1_RGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_punchthroughA_RGBA8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_RGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_RGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_RGBA8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_RGBA8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_sRGB8_alpha8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_sRGB8_alpha8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_ETC2_sRGB8_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC2_sRGB8_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_compressed_paletted_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_compressed_paletted_texture.txt) | | | | | | | |
| [GL_EXT_conservative_depth](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_conservative_depth.txt) | | | | | | | |
| [GL_EXT_copy_image](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_copy_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_copy_image](https://khronos.org/registry/OpenGL/extensions/OES/OES_copy_image.txt) | | | | | | | |
| [GL_KHR_debug](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_debug_label](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_debug_label.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_debug_marker](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_debug_marker.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth24](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth24.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth32](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth32.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_depth_buffer_float2](https://khronos.org/registry/OpenGL/extensions/NV/NV_depth_buffer_float2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_depth_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_depth_clamp.txt) | | | | | | | |
| [GL_ANGLE_depth_texture](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_depth_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_depth_texture_cube_map](https://khronos.org/registry/OpenGL/extensions/OES/OES_depth_texture_cube_map.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_discard_framebuffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_discard_framebuffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_disjoint_timer_query](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_disjoint_timer_query.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_buffers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_buffers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_buffers_indexed](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_buffers_indexed.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_draw_buffers_indexed](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_buffers_indexed.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_draw_elements_base_vertex](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_draw_elements_base_vertex.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_draw_elements_base_vertex](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_elements_base_vertex.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_array](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image_external](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_EGL_image_external_essl3](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external_essl3.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_external_wrap_modes](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_external_wrap_modes.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_EGL_image_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_EGL_stream_consumer_external](https://khronos.org/registry/OpenGL/extensions/NV/NV_EGL_stream_consumer_external.txt) | | | | | | | |
| [GL_OES_EGL_sync](https://khronos.org/registry/OpenGL/extensions/OES/OES_EGL_sync.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_element_index_uint](https://khronos.org/registry/OpenGL/extensions/OES/OES_element_index_uint.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANDROID_extension_pack_es31a](https://khronos.org/registry/OpenGL/extensions/ANDROID/ANDROID_extension_pack_es31a.txt) | &#x2714; | | | | | | &#x2714; |
| [GL_EXT_external_buffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_buffer.txt) | | | | | | &#x2714; | &#x2714; |
| [GL_OES_fbo_render_mipmap](https://khronos.org/registry/OpenGL/extensions/OES/OES_fbo_render_mipmap.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_fence](https://khronos.org/registry/OpenGL/extensions/NV/NV_fence.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_float_blend](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_float_blend.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_EXT_frag_depth](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_frag_depth.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_framebuffer_blit](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_framebuffer_blit.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_framebuffer_blit](https://khronos.org/registry/OpenGL/extensions/NV/NV_framebuffer_blit.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_MESA_framebuffer_flip_y](https://khronos.org/registry/OpenGL/extensions/MESA/MESA_framebuffer_flip_y.txt) | | | | | | | |
| [GL_EXT_geometry_shader](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_geometry_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_geometry_shader](https://khronos.org/registry/OpenGL/extensions/OES/OES_geometry_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_get_program_binary](https://khronos.org/registry/OpenGL/extensions/OES/OES_get_program_binary.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_gpu_shader5](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_gpu_shader5.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_ANGLE_instanced_arrays](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_instanced_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_instanced_arrays](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_instanced_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_mapbuffer](https://khronos.org/registry/OpenGL/extensions/OES/OES_mapbuffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_map_buffer_range](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_map_buffer_range.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_memory_object](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_memory_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_memory_object_fd](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_objects_fd.txt) | | | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_EXT_multi_draw_indirect](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multi_draw_indirect.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_multisample_compatibility](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisample_compatibility.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_multisampled_render_to_texture](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt) | | | | | | | |
| [GL_EXT_multisampled_render_to_texture2](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture2.txt) | | | | | | | |
| [GL_OVR_multiview](https://khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OVR_multiview2](https://khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_no_error](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_no_error.txt) | | | | | | | |
| [GL_EXT_occlusion_query_boolean](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_occlusion_query_boolean.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_packed_depth_stencil](https://khronos.org/registry/OpenGL/extensions/OES/OES_packed_depth_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_pack_reverse_row_order](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_pack_reverse_row_order.txt) | | | | | | | |
| [GL_NV_pack_subimage](https://khronos.org/registry/OpenGL/extensions/NV/NV_pack_subimage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_parallel_shader_compile](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_parallel_shader_compile.txt) | | | | | | | |
| [GL_AMD_performance_monitor](https://khronos.org/registry/OpenGL/extensions/AMD/AMD_performance_monitor.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_pixel_buffer_object](https://khronos.org/registry/OpenGL/extensions/NV/NV_pixel_buffer_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_polygon_mode](https://khronos.org/registry/OpenGL/extensions/NV/NV_polygon_mode.txt) | | | | | | | |
| [GL_EXT_polygon_offset_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_polygon_offset_clamp.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_primitive_bounding_box](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_primitive_bounding_box.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_primitive_bounding_box](https://khronos.org/registry/OpenGL/extensions/OES/OES_primitive_bounding_box.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_protected_textures](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_protected_textures.txt) | | | | | | &#x2714; | |
| [GL_EXT_pvrtc_sRGB](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_pvrtc_sRGB.txt) | | | | | | | |
| [GL_NV_read_depth](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_depth.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_read_depth_stencil](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_depth_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_read_format_bgra](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_read_format_bgra.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_read_stencil](https://khronos.org/registry/OpenGL/extensions/NV/NV_read_stencil.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_QCOM_render_shared_exponent](https://khronos.org/registry/OpenGL/extensions/QCOM/QCOM_render_shared_exponent.txt) | | | | | | | |
| [GL_EXT_render_snorm](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_render_snorm.txt) | | | | | | | |
| [GL_OES_rgb8_rgba8](https://khronos.org/registry/OpenGL/extensions/OES/OES_rgb8_rgba8.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_robust_buffer_access_behavior](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_robust_buffer_access_behavior.txt) | | | | | | | |
| [GL_EXT_robustness](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_robustness.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_robustness_video_memory_purge](https://khronos.org/registry/OpenGL/extensions/NV/NV_robustness_video_memory_purge.txt) | | | | | | | |
| [GL_OES_sample_shading](https://khronos.org/registry/OpenGL/extensions/OES/OES_sample_shading.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_sample_variables](https://khronos.org/registry/OpenGL/extensions/OES/OES_sample_variables.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_semaphore](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_semaphore.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_semaphore_fd](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_external_objects_fd.txt) | | | &#x2714; | &#x2714; | | &#x2714; | &#x2714; |
| [GL_EXT_separate_shader_objects](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_separate_shader_objects.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ARM_shader_framebuffer_fetch](https://khronos.org/registry/OpenGL/extensions/ARM/ARM_shader_framebuffer_fetch.txt) | | | | | &#x2714; | | &#x2714; |
| [GL_EXT_shader_framebuffer_fetch](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch.txt) | | | | | &#x2714; | | &#x2714; |
| [GL_EXT_shader_framebuffer_fetch_non_coherent](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch_non_coherent.txt) | | | | | &#x2714; | | |
| [GL_OES_shader_image_atomic](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_image_atomic.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_io_blocks](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_io_blocks.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_shader_io_blocks](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_io_blocks.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_shader_multisample_interpolation](https://khronos.org/registry/OpenGL/extensions/OES/OES_shader_multisample_interpolation.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_non_constant_global_initializers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_non_constant_global_initializers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_shader_noperspective_interpolation](https://khronos.org/registry/OpenGL/extensions/NV/NV_shader_noperspective_interpolation.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_texture_lod](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_texture_lod.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_QCOM_shading_rate](https://khronos.org/registry/OpenGL/extensions/QCOM/QCOM_shading_rate.txt) | | | | | | | |
| [GL_EXT_shadow_samplers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shadow_samplers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB_write_control](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB_write_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_standard_derivatives](https://khronos.org/registry/OpenGL/extensions/OES/OES_standard_derivatives.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_surfaceless_context](https://khronos.org/registry/OpenGL/extensions/OES/OES_surfaceless_context.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ARB_sync](https://khronos.org/registry/OpenGL/extensions/ARB/ARB_sync.txt) | | | | | | | |
| [GL_EXT_tessellation_shader](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_tessellation_shader.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | &#x2714; |
| [GL_OES_texture_3D](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_3D.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_border_clamp](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_border_clamp.txt) | &#x2714; | &#x2714; | | | &#x2714; | | &#x2714; |
| [GL_OES_texture_border_clamp](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_border_clamp.txt) | &#x2714; | &#x2714; | | | &#x2714; | | &#x2714; |
| [GL_EXT_texture_buffer](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_buffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_buffer](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_buffer.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_compression_astc](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt) | | | | | | | |
| [GL_EXT_texture_compression_astc_decode_mode](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_astc_decode_mode.txt) | | | | | | | |
| [GL_EXT_texture_compression_astc_decode_mode_rgb9e5](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_astc_decode_mode_rgb9e5.txt) | | | | | | | |
| [GL_KHR_texture_compression_astc_hdr](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_hdr.txt) | | | | | | | |
| [GL_KHR_texture_compression_astc_ldr](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_ldr.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_KHR_texture_compression_astc_sliced_3d](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_sliced_3d.txt) | | | | | | | |
| [GL_EXT_texture_compression_bptc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_bptc.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_compression_dxt1](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_dxt1.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_IMG_texture_compression_pvrtc](https://khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc.txt) | | | | | | | |
| [GL_IMG_texture_compression_pvrtc2](https://khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc2.txt) | | | | | | | |
| [GL_EXT_texture_compression_rgtc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_rgtc.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_compression_s3tc](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc.txt) | | | | | | | |
| [GL_EXT_texture_compression_s3tc_srgb](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc_srgb.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_EXT_texture_cube_map_array](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_cube_map_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_cube_map_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_cube_map_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_filter_anisotropic](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_filter_anisotropic.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_filter_minmax](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_filter_minmax.txt) | | | | | | | |
| [GL_OES_texture_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_float_linear](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_float_linear.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | &#x2714; |
| [GL_EXT_texture_format_BGRA8888](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_format_sRGB_override](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_sRGB_override.txt) | | &#x2714; | | | | | |
| [GL_OES_texture_half_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_half_float_linear](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_half_float_linear.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_mirror_clamp_to_edge](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_mirror_clamp_to_edge.txt) | | | | | | | |
| [GL_EXT_texture_norm16](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt) | | &#x2714; | | &#x2714; | | | |
| [GL_OES_texture_npot](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_npot.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_rg](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_rg.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_decode](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_decode.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_R8](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_R8.txt) | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_sRGB_RG8](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_RG8.txt) | | | | | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_stencil8](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_stencil8.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_storage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_storage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_texture_storage_multisample_2d_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_storage_multisample_2d_array.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_texture_type_2_10_10_10_REV](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_type_2_10_10_10_REV.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_texture_usage](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_texture_usage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_translated_shader_source](https://khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_translated_shader_source.txt) | | | | | | | |
| [GL_EXT_unpack_subimage](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_unpack_subimage.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_array_object](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_array_object.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_half_float](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_half_float.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_OES_vertex_type_10_10_10_2](https://khronos.org/registry/OpenGL/extensions/OES/OES_vertex_type_10_10_10_2.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_WEBGL_video_texture](https://khronos.org/registry/OpenGL/extensions/WEBGL/WEBGL_video_texture.txt) | | | | | | | |
| [GL_EXT_YUV_target](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_YUV_target.txt) | | | | | | | |
## ANGLE unofficial extension support
*Note: some ANGLE extensions are currently missing specifications.*
| Extension Name | NVIDIA 1660 Win10 | Intel 630 Win10 | NVIDIA 1660 Linux | Intel 630 Linux | SwiftShader Win10 | Pixel 4 Android 11 | Pixel 6 Android 13 |
| -------------- | :---------------: | :-------------: | :---------------: | :-------------: | :---------------: | :----------------: | :----------------: |
| [GL_ANGLE_base_vertex_base_instance](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_base_vertex_base_instance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_base_vertex_base_instance_shader_builtin](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_base_vertex_base_instance_shader_builtin.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_bind_generates_resource](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_bind_generates_resource.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_bind_uniform_location](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_bind_uniform_location.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_client_arrays](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_client_arrays.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_clip_cull_distance](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_clip_cull_distance.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | |
| [GL_CHROMIUM_color_buffer_float_rgb](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_color_buffer_float_rgb.txt) | | | | | | | |
| [GL_CHROMIUM_color_buffer_float_rgba](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_color_buffer_float_rgba.txt) | | | | | | | |
| [GL_ANGLE_compressed_texture_etc](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_compressed_texture_etc.txt) | | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_copy_compressed_texture](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_copy_compressed_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_copy_texture](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_copy_texture.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_copy_texture_3d](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_copy_texture_3d.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_CHROMIUM_framebuffer_mixed_samples](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_framebuffer_mixed_samples.txt) | | | | | | | |
| [GL_ANGLE_framebuffer_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_framebuffer_multisample.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_image](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_serialized_context_string](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_serialized_context_string.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_get_tex_level_parameter](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_get_tex_level_parameter.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_logic_op](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_logic_op.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | | |
| [GL_CHROMIUM_lose_context](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_lose_context.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_lossy_etc_decode](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_lossy_etc_decode.txt) | | | | | | | |
| [GL_ANGLE_memory_object_flags](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_object_flags.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_memory_object_fuchsia](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_object_fuchsia.txt) | | | | | | | |
| [GL_ANGLE_memory_size](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_memory_size.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_multi_draw](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_multi_draw.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_multiview_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_multiview_multisample.txt) | | | | | | | |
| [GL_ANGLE_polygon_mode](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_polygon_mode.txt) | | | | | | | |
| [GL_ANGLE_program_binary](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_program_binary.txt) | | | | | | | |
| [GL_ANGLE_program_cache_control](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_program_cache_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_provoking_vertex](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_provoking_vertex.txt) | | | | | | | |
| [GL_ANGLE_read_only_depth_stencil_feedback_loops](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_read_only_depth_stencil_feedback_loops.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_relaxed_vertex_attribute_type](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_relaxed_vertex_attribute_type.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_renderability_validation](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_renderability_validation.txt) | | | | | | | |
| [GL_ANGLE_request_extension](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_request_extension.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_rgbx_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_rgbx_internal_format.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_client_memory](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_client_memory.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_fragment_shader_output](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_fragment_shader_output.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_robust_resource_initialization](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_resource_initialization.txt) | | | | | | | |
| [GL_ANGLE_semaphore_fuchsia](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_semaphore_fuchsia.txt) | | | | | | | |
| [GL_ANGLE_shader_binary](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_binary.txt) | | | | | | | |
| [GL_ANGLE_shader_pixel_local_storage](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_pixel_local_storage.txt) | | | | | | | |
| [GL_ANGLE_shader_pixel_local_storage_coherent](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_shader_pixel_local_storage.txt) | | | | | | | |
| [GL_ANGLE_stencil_texturing](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_stencil_texturing.txt) | | | | | | | |
| [GL_CHROMIUM_sync_query](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_sync_query.txt) | | | | | | | |
| [GL_ANGLE_texture_compression_dxt3](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_compression_dxt3.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_ANGLE_texture_compression_dxt5](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_compression_dxt5.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | | |
| [GL_ANGLE_texture_external_update](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_external_update.txt) | | | | | | | |
| [GL_CHROMIUM_texture_filtering_hint](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/CHROMIUM_texture_filtering_hint.txt) | | | | | &#x2714; | | |
| [GL_ANGLE_texture_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_multisample.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_texture_rectangle](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_rectangle.txt) | | | | | | | |
| [GL_ANGLE_vulkan_image](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_vulkan_image.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_ANGLE_webgl_compatibility](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_webgl_compatibility.txt) | | | | | | | |
| [GL_ANGLE_yuv_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_yuv_internal_format.txt) | &#x2714; | | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
## GLES 1.0 and 1.1 extension support
| Extension Name | SwiftShader Win10 |
| -------------- | :---------------: |
| [GL_OES_draw_texture](https://khronos.org/registry/OpenGL/extensions/OES/OES_draw_texture.txt) | &#x2714; |
| [GL_OES_framebuffer_object](https://khronos.org/registry/OpenGL/extensions/OES/OES_framebuffer_object.txt) | &#x2714; |
| [GL_OES_matrix_palette](https://khronos.org/registry/OpenGL/extensions/OES/OES_matrix_palette.txt) | |
| [GL_OES_point_size_array](https://khronos.org/registry/OpenGL/extensions/OES/OES_point_size_array.txt) | &#x2714; |
| [GL_OES_point_sprite](https://khronos.org/registry/OpenGL/extensions/OES/OES_point_sprite.txt) | &#x2714; |
| [GL_OES_query_matrix](https://khronos.org/registry/OpenGL/extensions/OES/OES_query_matrix.txt) | |
| [GL_OES_texture_cube_map](https://khronos.org/registry/OpenGL/extensions/OES/OES_texture_cube_map.txt) | &#x2714; |
## EGL extension support
Currently EGL extensions are not automatically tracked by our scripting. For a
list of supported EGL extensions in ANGLE's front-end see
[`src/libANGLE/Caps.h`](../src/libANGLE/Caps.h).
## Configuration information
NVIDIA 1660 Win10:
* `GL_RENDERER` is `ANGLE (NVIDIA, Vulkan 1.2.142 (NVIDIA GeForce GTX 1660 (0x00002184)), NVIDIA-456.38.0.0)`
* `GL_VENDOR` is `Google Inc. (NVIDIA)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Intel 630 Win10:
* `GL_RENDERER` is `ANGLE (Intel, Vulkan 1.3.215 (Intel(R) UHD Graphics 630 (0x00009BC5)), Intel Corporation-101.101.)`
* `GL_VENDOR` is `Google Inc. (Intel)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
NVIDIA 1660 Linux:
* `GL_RENDERER` is `ANGLE (NVIDIA, Vulkan 1.1.119 (NVIDIA GeForce GTX 1660 (0x00002184)), NVIDIA-440.100.0.0)`
* `GL_VENDOR` is `Google Inc. (NVIDIA)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Intel 630 Linux:
* `GL_RENDERER` is `ANGLE (Intel, Vulkan 1.2.131 (Intel(R) UHD Graphics 630 (CML GT2) (0x00009BC5)), Intel open-source Mesa driver-20.0.8)`
* `GL_VENDOR` is `Google Inc. (Intel)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
SwiftShader Win10:
* `GL_RENDERER` is `ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver-5.0.0)`
* `GL_VENDOR` is `Google Inc. (Google)`
* `GL_VERSION` is `OpenGL ES 3.1.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Pixel 4 Android 11:
* `GL_RENDERER` is `ANGLE (Qualcomm, Vulkan 1.1.128 (Adreno (TM) 640 (0x06040001)), Qualcomm Technologies Inc. Adreno Vulkan Driver-512.490.0)`
* `GL_VENDOR` is `Google Inc. (Qualcomm)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
Pixel 6 Android 13:
* `GL_RENDERER` is `ANGLE (ARM, Vulkan 1.1.201 (Mali-G78 (0x92020010)), Mali-G78-36.0.0)`
* `GL_VENDOR` is `Google Inc. (ARM)`
* `GL_VERSION` is `OpenGL ES 3.2.0 (ANGLE 2.1.20572 git hash: 75901296a09f)`
* Data updated February 22, 2023
## How to update supported extension data
Supported extension data is stored in the ANGLE repo as JSON files in
[`scripts/extension_data`](../scripts/extension_data). The JSON data is
sourced from public ANGLE test runs. Look for `angle_end2end_tests` in a bot
run: [example link](https://ci.chromium.org/ui/p/angle/builders/ci/win-test/520/overview).
Search for "`angle_end2end_tests`", then click on the "cas output" and find
`GLinfo_ES3_2_Vulkan.json` or `GLinfo_ES3_1_Vulkan_SwiftShader.json` for
SwiftShader.
All data except for GLES 1 is automatically updated using
the [`update_extension_data.py`](../scripts/update_extension_data.py) script.
To use it first authenticate to the `bb` and `luci-go` tools by running `bb
auth-login` and `./tools/luci-go/swarming login`. Then run the script and
re-run [code generation][CodeGen].
The GLES 1 data is currently manually updated. Find the relevant
file from the task output (see above) and overwrite the correspoding file.
Re-run [code generation][CodeGen] and create a CL as per our normal process.
To add a new configuration, first retrieve the JSON data, modify
[`gen_extensions.py`](../src/libANGLE/gen_extensions.py) as necessary, then
run [`scripts/run_code_generation.py`][CodeGen] to refresh generated files.
Also update `update_extension_data.py` as necessary.
[CodeGen]: ../scripts/run_code_generation.py

124
doc/ExternalBenchmarks.md Normal file
View File

@@ -0,0 +1,124 @@
# Using External Benchmarks with ANGLE
This document contains instructions on how to run external benchmarks on ANGLE as the GLES renderer.
There is a section for each benchmark with subsections for each platform. The general theme is to
make the benchmark application pick ANGLE's `libGLESv2.so` and `libEGL.so` files instead of the
system ones.
On Linux, this is generally achieved with setting `LD_LIBRARY_PATH`. On Windows, ANGLE dlls may
need to be copied to the benchmark's executable directory.
## glmark2
This benchmark can be found on [github](https://github.com/glmark2/glmark2). It's written against
GLES 2.0 and supports Linux and Android. It performs tens of tests and reports the framerate for
each test.
### glmark2 on Linux
To build glmark2 on Linux:
```
$ git clone https://github.com/glmark2/glmark2.git
$ cd glmark2
$ ./waf configure --with-flavors=x11-glesv2 --data-path=$PWD/data/
$ ./waf
```
To run glmark2 using the native implementation of GLES:
```
$ cd build/src
$ ./glmark2-es2
```
To run glmark2 using ANGLE, we need to first create a few links in the build directory of ANGLE:
```
$ cd /path/to/angle/out/release
$ ln -s libEGL.so libEGL.so.1
$ ln -s libGLESv2.so libGLESv2.so.2
```
Back in glmark2, we need to make sure these shared objects are picked up:
```
$ cd /path/to/glmark2/build/src
$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ldd ./glmark2-es2
```
With `ldd`, you can verify that `libEGL.so.1` and `libGLESv2.so.2` are correctly picked up from
ANGLE's build directory.
To run glmark2 on the default back-end of ANGLE:
```
$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
```
To run glmark2 on a specific back-end of ANGLE:
```
$ ANGLE_DEFAULT_PLATFORM=vulkan LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
```
### glmark2 on Linux for Android
**Prerequisites**
Below steps are set up to use version 26.0.1 of build-tools, which can be downloaded here:
[https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip](https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip)
Tested with r19 of NDK, which can be downloaded here:
[https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip](https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip)
Tested with OpenJDK 8:
```
sudo apt-get install openjdk-8-jdk
```
Note: This is built from a branch that has fixes for Android. It only supports
32-bit ARM (armeabi-v7a). Supporting other ABIs requires more work, possibly
including a move to cmake instead of ndk-build.
**Setup**
```
export ANDROID_SDK=<path_to_Android_SDK>
export ANDROID_NDK=<path_to_Android_NDK>
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
```
**Build**
```
git clone https://github.com/cnorthrop/glmark2.git
cd glmark2/android
git checkout android_fixes
./build.sh
```
**Install**
```
adb install --abi armeabi-v7a glmark2.apk
```
**Run**
To select ANGLE as the driver on Android (requires Android Q):
```
adb shell settings put global angle_gl_driver_selection_pkgs org.linaro.glmark2
adb shell settings put global angle_gl_driver_selection_values angle
```
To switch back to native GLES driver:
```
adb shell settings delete global angle_gl_driver_selection_values
adb shell settings delete global angle_gl_driver_selection_pkgs
```

82
doc/GPUMemoryAnalysis.md Normal file
View File

@@ -0,0 +1,82 @@
# GPU Memory Reporting and Analysis
[MemRptExt]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_device_memory_report.html
[enabling-general-logging]: DebuggingTips.md#enabling-general-logging
GPU memory usage data can be reported when using the Vulkan back-end with drivers that support the
[VK_EXT_device_memory_report][MemRptExt] extension. When enabled, ANGLE will produce log messages
based on every allocation, free, import, unimport, and failed allocation of GPU memory. This
functionality requires [enabling general logging](#enabling-general-logging) as well as enabling
one or two feature flags.
## GPU Memory Reporting
ANGLE registers a callback function with the Vulkan driver for the
[VK_EXT_device_memory_report][MemRptExt] extension. The Vulkan driver calls this callback for
each of the following GPU memory events:
- Allocation of GPU memory by ANGLE
- Free of GPU memory by ANGLE
- Import of GPU memory provided by another process (e.g. Android SurfaceFlinger)
- Unimport of GPU memory provided by another process
- Failed allocation
The callback provides additional information about each event such as the size, the VkObjectType,
and the address (see the extension documentation for more details). ANGLE caches this information,
and logs messages based on this information. ANGLE keeps track of how much of each type of memory
is allocated and imported. For example, if a GLES command causes ANGLE five 4 KB descriptor set
(VK_OBJECT_TYPE_DESCRIPTOR_SET) allocations, ANGLE will add 20 KB to the total of allocated
descriptor set memory.
ANGLE supports two types of memory reporting, both of which are enabled
via feature flags:
* `logMemoryReportStats` provides summary statistics at each eglSwapBuffers() command
* `logMemoryReportCallbacks` provides per-callback information at the time of the callback
Both feature flags can be enabled at the same time. A simple way to enable either or both of these
feature flags on Android is with with the following command:
```
adb shell setprop debug.angle.feature_overrides_enabled <feature>[:<feature>]
```
where `<feature>` is either `logMemoryReportStats` or `logMemoryReportCallbacks`. Both can be
enabled by putting a colon between them, such as the following:
```
adb shell setprop debug.angle.feature_overrides_enabled logMemoryReportCallbacks:logMemoryReportStats
```
Another way to enable either or both of these feature flags is by editing the `RendererVk.cpp` file,
and changing `false` in the following lines to `true`:
```
ANGLE_FEATURE_CONDITION(&mFeatures, logMemoryReportCallbacks, false);
ANGLE_FEATURE_CONDITION(&mFeatures, logMemoryReportStats, false);
```
Note: At this time, GPU memory reporting has only been tested and used on Android, where the logged
information can be viewed with the `adb logcat` command.
## GPU Memory Analysis
GPU memory reporting can be combined with other forms of debugging in order to do analysis. For
example, for a GLES application/test that properly shuts down, the total size of each type of
allocated and imported memory should be zero bytes at the end of the application/test. If not, a
memory leak exists, and the log can be used to determine where the leak occurs.
If an application seems to be using too much GPU memory, enabling memory reporting can reveal which
type of memory is being excessively used.
Complex forms of analysis can be done by enabling logging of every GLES and EGL API command. This
can be enabled at compilation time by [enabling general logging](#enabling-general-logging) as well
as setting the following GN arg:
```
angle_enable_trace_android_logcat = true
```
Combining that with enabling the `logMemoryReportCallbacks` feature flag will allow each memory
allocation and import to be correlated with the GLES/EGL commands that caused it. If more context
is needed for the type of drawing and/or setup that is being done in a sea of GLES commands, this
can also be combined with the use of a graphics debugger such as Android GPU Inspector (AGI) or
RenderDoc. The debugger can help you understand what the application is doing at the time of the
particular GPU memory event is occuring. For example, you might determine that the application is
doing something to cause a memory leak; or you may get insight into what the game is doing that
contributes to ANGLE using excessive amounts of GPU memory.

9
doc/MANGLE.md Normal file
View File

@@ -0,0 +1,9 @@
# M(ulti-platform)ANGLE effort
Starting in early 2014, the ANGLE team has begun work on refactoring the code
with the goal of supporting translation to desktop OpenGL. In 2016, work on
supporting Vulkan as a back-end started. The new purpose of ANGLE is to
provide a consistent OpenGL ES and EGL context on as many platforms as possible.
The design doc is available [here]
(https://docs.google.com/document/d/17mxRfzXuEWyvGM3t2KqVY4svvfRj_GzysOEpmnDpqeo/edit?usp=sharing).

View File

@@ -0,0 +1,33 @@
# Metal Backend Shaders
ANGLE's Metal backend provides a couple of features for inspecting the
Metal Shading Language (MSL) produced by ANGLE's shader translator.
## printMetalShaders
The [`printMetalShaders`
feature](https://chromium-review.googlesource.com/c/angle/angle/+/4480976),
which can be enabled in Chromium via the command line argument
`--enable-angle-features=printMetalShaders`, dumps the blob cache key
and translated MSL for all shaders compiled by ANGLE. This is
currently used to [regenerate precompiled
shaders](https://crbug.com/1423136) shipped with Chrome.
## Environment variable
Setting the environment variable `ANGLE_METAL_PRINT_MSL_ENABLE` to `1`
indicates to the Metal backend to print the translated shaders as
they're compiled:
```
export ANGLE_METAL_PRINT_MSL_ENABLE=1
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --use-angle=metal
```
To pass this environment to WebKit / Safari's GPU process, set the
environment variable `__XPC_ANGLE_METAL_PRINT_MSL_ENABLE` to `1`:
```
export __XPC_ANGLE_METAL_PRINT_MSL_ENABLE=1
/Applications/Safari\ Technology\ Preview.app/Contents/MacOS/Safari\ Technology\ Preview
```

143
doc/Orientation.md Normal file
View File

@@ -0,0 +1,143 @@
# ANGLE Orientation
A basic guide to get up and running fixing bugs and performance issues in ANGLE.
## First ANGLE Compile
### Windows
- Download and install
[Visual Studio Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx).
Installing takes some time.
- Take the time to register a Microsoft account, otherwise you'll get nagged to death.
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Add the `depot_tools` dir to your system path. Open start menu, type "edit environment variables",
add it to PATH.
- (recommended) Download and install [Git for Windows](http://gitforwindows.org/).
- Open Git bash, head to C:/src and follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#Development-setup-Getting-the-source)
to set up the ANGLE solution for the first time.
- If you follow the [ANGLE wiki VS solution building and debugging guide](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#building-and-debugging-with-visual-studio), the VS solution will be in `c:/src/angle/out/Debug/angle-debug.sln`. Open and let the installation
finish. **Important**: set indent style to spaces, not tabs!
- Building should work at this point!
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
- Useful VS extensions:
1. [Build Only Startup Project](https://marketplace.visualstudio.com/items?itemName=SenHarada.BuildOnlyStartupProject)
2. [SwitchStartupProject](https://marketplace.visualstudio.com/items?itemName=vs-publisher-141975.SwitchStartupProject)
3. [Smart CommandLine Arguments](https://www.visualstudiogallery.msdn.microsoft.com/535f79b1-fbe0-4b0a-a346-8cdf271ea071)
### Linux
- Download and install Chromium's
[depot_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
for building ANGLE.
- Ensure you add `depot_tools` to your bashrc as in the wiki link above.
- Follow the steps on
[the ANGLE wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/DevSetup.md#Development-setup-Getting-the-source)
to setup ANGLE's build.
- Building should work at this point! Follow the steps on the Wiki.
- Try running `angle_end2end_tests`, `angle_unittests` or a sample program.
## Setting up the [drawElements testing suite](http://go/dEQP)
- [Cherry](https://sites.google.com/a/google.com/deqp/cherry) is the UI for viewing test results.
ANGLE checks out a copy in `<angledir>/third_party/cherry`.
- Follow the instructions in the
[installation README](https://android.googlesource.com/platform/external/cherry/+/refs/heads/main/README)
to get it running. On Windows, use 64-bit.
- Read up on testing with
[dEQP on the ANGLE Wiki](https://chromium.googlesource.com/angle/angle/+/main/doc/dEQP.md).
- Try running `angle_deqp_gles2_tests_no_gtest` with the flag
`--deqp-case=dEQP-GLES2.functional.negative_api.*` and load a test report in Cherry.
- To use Cherry, browse to [http://localhost:8080/#/results](http://localhost:8080/#/results) and
click '**Import existing batch**', loading `TestResults.qpa`. Look for the qpa file in the
current working directory, or `<angledir>/src/tests` if you ran the tests from Visual Studio.
- Note: we only use Cherry for viewing test output, not running the tests. On start, you may see
some runtime messages about unable to load case lists. These are safe to ignore. If you didn't
load the results URL directly, click the "**Results**" tab to find the Import button.
## Profiling
### With Visual Studio
- In Visual Studio 2017, look under Debug/Profiler/Performance Explorer/New Performance Session.
Right-click "Targets" and add `angle_perftests` as a Target Project.
- Run `angle_perftests` with the flag `--gtest_filter=DrawCallPerfBenchmark.Run/d3d11_null` for
D3D11, `.../d3d9_null` for D3D9, `.../gl_null` for OpenGL and `.../vulkan_null` for Vulkan.
- Make sure you close all open instances of Chrome, they use a lot of background CPU and GPU. In
fact, close every process and application you can.
### Profiling with Visual Studio + Chrome
- Install [Chrome Canary](https://www.google.com/chrome/browser/canary.html).
- Canary's install dir is usually `%APPDATA%/Local/Google/Chrome SxS/Application`
- Build ANGLE x64, Release, and run 'python scripts/update_chrome_angle.py' to replace Canary's
ANGLE with your custom ANGLE. (Note: Canary must be closed)
- Start Canary with `--gpu-startup-dialog --disable-gpu-sandbox`, wait for the dialog.
- In Visual Studio, under Debug/Profiler, choose attach to process.
- Attach to the Chrome GPU process, then immediately pause profiling.
- **IMPORTANT:** Verify ANGLE details are correct in `about:gpu`.
- In Canary, start your benchmark, then resume profiling, and exit when done. The report will load
automatically.
## Bookmark the latest Khronos specs
- [The GLES 2.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf)
- [The GLES 3.0 Spec](https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf)
- [The GLES 3.1 Spec](https://www.khronos.org/registry/gles/specs/3.1/es_spec_3.1.pdf)
- [The GLES Shading Language 1.00 Spec](https://www.khronos.org/files/opengles_shading_language.pdf)
- [The GLES Shading Language 3.00 Spec](https://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.4.pdf)
- [The WebGL Specs](https://www.khronos.org/registry/webgl/specs/latest/)
- [A modern desktop OpenGL Spec](https://www.opengl.org/registry/doc/glspec45.core.pdf)
(for reference)
- [The Vulkan Spec](https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/vkspec.html)
These specs can be found in the [OpenGL Registry](https://github.com/KhronosGroup/OpenGL-Registry)
and the [Vulkan Docs](https://github.com/KhronosGroup/Vulkan-Docs) repositories as well.
## Join Groups and Chats
- Join the `#angle` channel in `chromium.slack.com`.
### For Googlers
- Join angle-team@ for access to many important emails and shared documents.
- We have a Hangouts Chat channel. Ask for an invite.

34
doc/ResourceLimits.md Normal file
View File

@@ -0,0 +1,34 @@
# Resource Limits
OpenGL ES 2.0 API is quite powerful but there are still some features that are
optional or allow for wide variability between implementations.
Applications that need more than the minimum values for these limits should
query the capabilities of the GL device and scale their usage based on the
devices feature set. Failing to do so and assuming sufficient limits typically
results in reduced portability.
The various implementation dependent limits can be found in Tables 6.18 6.20
of the [OpenGL ES 2.0.25 specification]
(http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf).
# Capabilities
Capability | ES 2.0 Minimum | ANGLE | SM2 | SM3 | SM4+
:----------------------------------------- | :------------- | :--------------- | :---- | :------- | :-------
GL\_MAX\_VERTEX\_ATTRIBS | 8 | 16 | | |
GL\_MAX\_VERTEX\_UNIFORM\_VECTORS | 128 | 254 | | |
GL\_MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS | 0 | (fn1) | 0 | 0 | 4
GL\_MAX\_VARYING\_VECTORS | 8 | (fn1) | 8 | 10 | 10
GL\_MAX\_FRAGMENT\_UNIFORM\_VECTORS | 16 | (fn1) | 29 | 221 | 221
GL\_MAX\_TEXTURE\_IMAGE\_UNITS | 8 | 16 | | |
GL\_MAX\_TEXTURE\_SIZE | 64 | 2048-16384 (fn1) | | |
GL\_MAX\_CUBE\_MAP\_SIZE | 16 | 2048-16384 (fn1) | | |
GL\_MAX\_RENDERBUFFER\_SIZE | 1 | 2048-16384 (fn1) | | |
GL\_ALIASED\_POINT\_SIZE\_RANGE (min, max) | (1, 1) | (fn2) | (1,1) | (1, fn2) | (1, fn2)
GL\_ALIASED\_LINE\_WIDTH\_RANGE (min, max) | (1, 1) | (1, 1) | | |
## Notes
* fn1: limits vary based on the underlying hardware capabilities
* fn2: on SM3 or better hardware the max point size is D3DCAPS9.MaxPointSize

104
doc/ShaderSubstitution.md Normal file
View File

@@ -0,0 +1,104 @@
# Shader substitution
ANGLE provides two mechanisms for observing, modifying, and substituting
the application's shaders. This ability to interpose makes it easier to
diagnose bugs and to prototype new transforms in the shader translator.
## Environment variables controlling reading/writing shaders to disk
For both the source and translated shaders discussed below, the environment
variable:
```
ANGLE_SHADER_DUMP_PATH
```
and the Android property:
```
debug.angle.shader_dump_path
```
specify the directory in which shader sources and translated shaders will
be written to, and, in the case of shader substitution, read from. For
example, on non-Android platforms:
```
mkdir -p /path/to/angle_shaders
export ANGLE_SHADER_DUMP_PATH=/path/to/angle_shaders
```
will write all data to the `angle_shaders` directory.
On Android, it's necessary to set the `debug.angle.shader_dump_path` property
and set up the SD card correctly. (Help expanding this documentation is
appreciated!)
## ESSL shader dumping and substitution
The ANGLE feature `dumpShaderSource`, when enabled, writes all incoming
ESSL shader sources to disk, in the shader dump directory specified
above. File names are computed by hashing the shader sources. Shaders will
only be written to disk if they were not loaded from disk via substitution,
below.
The ANGLE feature `enableShaderSubstitution`, when enabled, looks for a
file in the shader dump directory where the filename is the hash of the
application's shader source, and substitutes its contents for the
application's shader. This allows you to dump and edit these files at your
leisure, and rerun the application to pick up the new versions of the
shaders.
In Chromium, pass the following command line arguments to enable these
features:
```
--enable-angle-features=dumpShaderSource
--enable-angle-features=enableShaderSubstitution
--enable-angle-features=dumpShaderSource,enableShaderSubstitution
```
You must also specify `--disable-gpu-sandbox` to allow ANGLE to access
these on-disk files for reading and writing. **Do not** browse the open web
with this command line argument specified!
## Translated shader dumping and substitution
The translated shaders produced by ANGLE's shader translator can be dumped
and substituted as well. This is especially useful when prototyping new
optimizations in the shader translator.
This mechanism is relatively recent and has not been thoroughly tested. It
will likely not work in the situation where ANGLE dynamically recompiles
shaders internally. It should work with all text-based shader translator
backends (ESSL, GLSL, HLSL, and Metal). See comments in
`src/libANGLE/Shader.cpp` describing the work needed to make this work with
the SPIR-V backend.
Translated shaders go into the same shader dump directory specified above
for shader sources. To enable these features:
```
--enable-angle-features=dumpTranslatedShaders,enableTranslatedShaderSubstitution --disable-gpu-sandbox
```
## Putting it all together (example: macOS)
```
mkdir -p $HOME/tmp/angle_shaders
export ANGLE_SHADER_DUMP_PATH=$HOME/tmp/angle_shaders
out/Release/Chromium.app/Contents/MacOS/Chromium --disable-gpu-sandbox --use-angle=metal --enable-angle-features=dumpShaderSource,enableShaderSubstitution,dumpTranslatedShaders,enableTranslatedShaderSubstitution
```
Run the application once to generate the shader dump. Edit source or
translated shaders as desired. Rerun with the same command line arguments
to pick up the new versions of the shaders.
Alternatively, and especially if the application doesn't work with all of
the shaders in the substitution directory, make a new directory and copy in
only those source or translated shaders you want to substitute, and run:
```
out/Release/Chromium.app/Contents/MacOS/Chromium --disable-gpu-sandbox --use-angle=metal --enable-angle-features=enableShaderSubstitution,enableTranslatedShaderSubstitution
```

15
doc/SourceAccess.md Normal file
View File

@@ -0,0 +1,15 @@
# ANGLE Source Code
# Browsing
ANGLE's source no longer resides at code.google.com! To browse the ANGLE source,
please visit https://chromium.googlesource.com/angle/angle
# Checkout
You may clone the ANGLE repository with:
> `git clone https://chromium.googlesource.com/angle/angle`
For full instructions on setting up your system with the necessary prerequisites
for development with ANGLE, please see the DevSetup page.

121
doc/TestingAndProcesses.md Normal file
View File

@@ -0,0 +1,121 @@
# Handling Test Failures
ANGLE is tested by a number of test suites, including by the ANGLE CI and Try testers, and by the
Chromium FYI testers. See pointers and explanations in the
[ANGLE Wrangling](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/infra/ANGLEWrangling.md) documentation.
We run a large number of tests for each ANGLE CL, both in ANGLE standalone and Chromium
configurations, both pre- and post- commit. Some tests will fail, crash, or timeout. If these
cannot be addressed in a timely manner, file a bug and update test expectations files. Timeliness
depends on the context. For example, a Wrangler trying to unblock an AutoRoller will typically
suppress failures immediately; where a developer will typically delay landing their CL in favor of
fixing test failures.
## Handling a Vulkan Validation Layer error
Many tests are run with an option that enables the Vulkan Validation Layers (sometimes referred to
as VVL). Validation errors will cause an otherwise-passing test to fail.
The [vulkan-deps into ANGLE AutoRoller](https://autoroll.skia.org/r/vulkan-deps-angle-autoroll)
updates ANGLE to the top-of-tree (ToT) upstream Vulkan tools and SDK. Sometimes validation errors
are the result of bugs in the Vulkan Validation Layers, sometimes because of bugs in ANGLE.
Therefore, investigate the cause of the error and determine if it's an ANGLE bug or a Vulkan
Validation Layer bug. For Vulkan Validation Layer bugs, file an
[upstream bug](https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/new), and
suppress the error. The ANGLE Wrangler will also suppress a validation error when the
`vulkan-deps` AutoRoller introduces a new validation error. The ANGLE Wrangler isn't expected to
resolve the error or diagnose an upstream bug (but it is welcome as extra credit).
Handle a validation error by doing the following:
1. [File an ANGLE bug](http://anglebug.com/new). If this is an active Wrangler issue, set the Label
`Hotlist-Wrangler` on the bug.
2. Add the VVL error tag to the
[kSkippedMessages](https://chromium.googlesource.com/angle/angle.git/+/8f8ca06dfb903fcc8517c69142c46c05e618f40d/src/libANGLE/renderer/vulkan/RendererVk.cpp#129)
array in `RendererVk.cpp` file. Follow the pattern for adding a comment with the associated bug
in the line above the VVL tag.
## dEQP test expectations
There are a set of [dEQP](dEQP.md) expectations files in the
[src/tests/deqp_support](../src/tests/deqp_support) directory. Notice the format of a line and
your choices for OS, driver, etc. This is described in the directory's
[README.md](../src/tests/deqp_support/README.md) file. This includes:
- `FLAKY` - For rare flakes
- `FAIL` - For a test that flakes often or persistently fails
- `SKIP` - For a test that crashes
- `TIMEOUT` - For a test that is very slow and may timeout
## angle_end2end_tests expectations
These expectations all live in the
[angle_end2end_tests_expectations.txt](../src/tests/angle_end2end_tests_expectations.txt) file. The file format
is the same as for the dEQP expectations. However, `FAIL` and `FLAKY` are not valid, and so the choices are:
- `SKIP` - For a test that fails or crashes
- `TIMEOUT` - For a test that is very slow and may timeout
## Rubber stamping expectations CLs
CLs that only change dEQP or angle_end2end_tests expectations don't require a human reviewer and can be
[Rubber Stamped](https://chromium.googlesource.com/infra/infra/+/refs/heads/main/go/src/infra/appengine/rubber-stamper/README.md).
The procedure is:
1. Add rubber-stamper@appspot.gserviceaccount.com as the reviewer on the expectations CL. Please also CC a human reviewer for TBR.
2. After 1 minute, Rubber Stamper should set "Bot-Commit: +1" on the CL.
3. Now you should be able to "Commit-Queue: +2" your CL.
## WebGL conformance test expectations
The expectations files are hosted in the `chromium/src` repository under
[content/test/gpu/gpu_tests/test_expectations](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/content/test/gpu/gpu_tests/test_expectations/).
Note that this is not included in local ANGLE-only source tree.
The format of the file, including the different tags, is documented at the top of the file. This
includes the following results:
- `RetryOnFailure` - For a test that rarely flakes
- `Failure` - For a test that fails consistently or flakes often
- `Skip` - For a test that causes catastrophic failures (e.g. ends an entire test run, causes a bot
to BSoD); `Skip` should be used very sparingly
You will need to contact an OWNER of the file to +1 your CL.
You have two options for creating a CL to the expectations files:
1. For trivial edits, you can edit the expectations files via
[Chromium Code Search](https://source.chromium.org/chromium/chromium/src/+/main:content/test/gpu/gpu_tests/test_expectations/):
- In the browser, press the `Edit code` button. This will bring up a new browser window/tab,
in an editor mode.
- Edit the expecations and then press the `Create change` (or `Update change` button if you
need to change your CL later), which will create a CL.
2. Otherwise please [check out the code](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/get_the_code.md)
and [upload a CL](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md#Creating-a-change)
## "internal swarming failure" on one of the test shards
This might be caused by a bad bot, clicking on link "Bot assigned to task" will show recent tasks which might look bad
(for example, lots of BOT_DIED in [crbug.com/1350556](https://crbug.com/1350556)). The best course of action in this case is to
stop the bot by clicking the "stop the bot gracefully" button which will result in a task that looks like
"Terminate build117-a9", then open a bug in the Infra>Labs component.
Googlers, see also: [go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool](http://go/gpu-pixel-wrangler-how-to#manually-taking-a-machine-out-of-the-swarming-pool)
# Requesting access to the Commit Queue and issue tracker
If you need to request access for a user (or yourself) please ask a project owner to help. Googlers, email
angle-team@google.com. External users, find a couple owners in the [OWNERS](../OWNERS) file and send a
request via email.
If you are an ANGLE owner and you want to grant a user access:
* For the Monorail issue tracker, add users via the ["People" administration console][MonorailPeople].
* For the ANGLE Commit Queue (CQ), grant try-job access via the [Chrome Infra Auth administration console][ChromeAdmin].
* The admin console also has a separate group for [CQ access][CQAccessAdmin].
[MonorailPeople]: https://bugs.chromium.org/p/angleproject/people/list
[ChromeAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-tryjob-access
[CQAccessAdmin]: https://chrome-infra-auth.appspot.com/auth/groups/project-angle-committers

119
doc/Update20120704.md Normal file
View File

@@ -0,0 +1,119 @@
# ANGLE Development Update - July 4, 2012
We haven't posted an update on the development status of ANGLE in quite some
time and we'd like to provide an update on some of the new features and
improvements that we've been working on.
## Conformance
As announced in the [Chromium Blog]
(http://blog.chromium.org/2011/11/opengl-es-20-certification-for-angle.html),
ANGLE v1.0 has passed the Khronos OpenGL ES 2.0 certification process and is now
a [conformant](http://www.khronos.org/conformance/adopters/conformant-products/)
OpenGL ES 2.0 implementation.
## Extensions
We have recently completed the implementation of depth texture support
([ANGLE\_depth\_texture]
(https://code.google.com/p/angleproject/source/browse/extensions/ANGLE_depth_texture.txt?name=master))
and earlier in the year we added support for instancing via attribute array
divisors ([ANGLE\_instanced\_arrays]
(https://code.google.com/p/angleproject/source/browse/extensions/ANGLE_instanced_arrays.txt?name=master)).
See ExtensionSupport for a complete list of extensions that are supported by
ANGLE.
## Shader Compiler
We have also made a number of improvements in the shader compiler.
* We addressed a number of defects related to scoping differences between HLSL and
GLSL and improved the scoping support in ANGLE's compiler front-end. We also
worked with The Khronos Group to get an ESSL spec bug fixed and several items
clarified.
* We addressed a number of correctness issues in the GLSL to HLSL
translation process. We fixed some bugs related to constant propagation and
comma conditional assignments. More importantly, we fully implemented support
for short-circuiting boolean logic operations. In GLSL, Boolean expressions do
short-circuit evaluation as in C, but HLSL evaluates them entirely. This only
has an observable effect if a short-circuited operation has side effects, such
as a function call that modifies global variables.
* We implemented detection
for discontinuous gradient or derivative computations inside loops and replace
them with explicitly defined continuous behaviour. HLSL and GLSL differ in their
specified behaviour for operations which compute gradients or derivatives.
Gradients are computed by texture sampling functions which don't specify a
specific mipmap LOD level, and by the OES\_standard\_derivatives built-in
functions. To determine the gradient, the corresponding values in neighbouring
pixels are differentiated. If neighbouring pixels execute different paths
through the shader this can cause a discontinuity in the gradient. GLSL
specifies that in these cases the gradient is undefined. HLSL tries to avoid the
discontinuity in the compiler by unrolling loops so that every pixel executes
all iterations. This can make the D3D HLSL compiler spend a long time generating
code permutations, and possibly even fail compilation due to running out of
instruction slots or registers. Because the GLSL specification allows undefined
behaviour, we can define such texture sampling functions to use mipmap LOD level
0, and have the derivatives functions return 0.0. To do this we examine the GLSL
code's abstract syntax tree and detect whether the shader contains any loops
with discontinuities and gradient operations. Within such loops, we generate
HLSL code that uses explicitly defined texture LODs and derivative information.
One additional consideration is that within these loops there can be calls to
user-defined functions which may contain gradient operations. In this case, we
generate variants of user-defined functions where these operations are
explicitly defined. We use these new functions instead of the original ones in
loops with discontinuities.
These fixes result in ANGLE being able successfully compile a number of the more
complex shaders. Unfortunately there are still some complex shaders which we
have not yet been able to obtain solutions for. Ultimately Direct3D 9 SM3
shaders are more restricted than what can be expressed in GLSL.  Most of the
problematic shaders we've encountered will also not compile successfully on
current ES 2.0 implementations.  We would only be able to achieve parity with
Desktop GL implementations by using Direct3D 10 or above.
## Texture Origin Changes
We have also made a major change to ANGLE in the way the origin difference
between D3D and OpenGL is handled. This difference is normally observable when
using render-to-texture techniques, and if not accounted for, it would appear
that images rendered to textures are upside down. In recent versions of ANGLE
(r536 (on Google Code)-r1161 (on Google Code)), we have been storing surfaces
following the D3D Y convention where (0, 0) is the top-left, rather than GL's
bottom-left convention. This was done by vertically flipping textures on load
and then adjusting the texture coordinates in the shaders to compensate. This
approach worked well, but it did leave the orientation of pbuffers inverted when
compared to native GL implementations. As of ANGLE r1162 (on Google Code), we
have changed this back to the original way it was implemented - textures are
loaded and stored in the GL orientation, and the final rendered scene is flipped
when it is displayed to a window by eglSwapBuffers. This should be essentially
transparent to applications except that orientation of pbuffers will change.  In
addition to fixing the pbuffer orientation, this change:
* eliminates
dependent-texture look-ups in the shaders, caused by flipping the texture
y-coordinates
* rounding of texture coordinates (while previously within spec)
will be more consistent with other implementations, and
* allows potential
faster paths for loading texture data to be implemented. The only potential
downside to this approach is that window-based rendering may be a bit slower for
simple scenes. The good news is that this path is not used by browser
implementations on most versions of Windows.
## Preprocessor
Finally, Alok P. from Google has been working on implementing a new shader
preprocessor for the last number of months and this effort is nearly complete.
This new preprocessor should be more robust and much more maintainable. It also
includes many (~5000) unit tests and passes all WebGL conformance tests. If you
wish to try this out before it is enabled by default, define
ANGLE\_USE\_NEW\_PREPROCESSOR=1 in your project settings for the
translator\_common project.
## Contributions
As always we welcome contributions either in the bug reports (preferably with an
isolated test-case) or in the form of code contributions. We have added a
[ContributingCode](ContributingCode.md) wiki page documenting the preferred
process for contributing code. We do need to ask that you sign a Contributor
License Agreement before we can integrate your patches.

26
doc/Update20130618.md Normal file
View File

@@ -0,0 +1,26 @@
# ANGLE Development Update - June 18, 2013
This week brings some significant changes to ANGLE, which we think are worth
covering in a development update.
## Migration from svn to git
We've changed our backing version control system from svn to git. Projects and
contributors pulling from the svn repository will continue to be able to do so,
but please note that this repository is now read-only, and no further updates
will be made there. To continue tracking new development and issue fixes, you'll
need to watch the git repository. Instructions on checking out code from the git
repository can be found on the [Source Checkout](https://code.google.com/p/angleproject/source/checkout) page.
## DirectX 11 Support
ANGLE now provides both a DirectX 9 and a DirectX 11-backed renderer in the same
code base. By default, support for the DirectX 11 renderer is disabled, but it
can be enabled by toggling the value of ANGLE\_ENABLE\_D3D11 as described on the
DevSetup page. On systems without DirectX 11 support, ANGLE will fall back to
DirectX 9.
This work originally appeared in our dx11proto branch, which, with the move to
the new repository, has been promoted to master. Code previously located in the
trunk of the svn repository will now be located in the git legacy branch, and
active development will now move to the newly promoted master.

15
doc/Update20131120.md Normal file
View File

@@ -0,0 +1,15 @@
# ANGLE Development Update - November 20, 2013
ANGLE has undergone a few further migrations in the past week, which we thought
it important to mention in a front-page update.
The review process for contributed code has moved from [Rietveld](https://codereview.appspot.com/)
to [Gerrit](https://chromium-review.googlesource.com). This migration allows us to more
easily support a Git-centric workflow, and eases the process of accepting
changes submitted by contributors without commit access to our repositories.
As a result of this change, our repository has also moved from its prior
location at code.google.com to https://chromium.googlesource.com/angle/angle.
The repository may still be pulled from its old location, but no further changes
will be committed there. Updates will be made only to the repository's new
location.

30
doc/Update20140325.md Normal file
View File

@@ -0,0 +1,30 @@
# ES 3.0 Development Branch merging
ANGLE will soon be merging its ES 3.0 development branch to master, to make
available (and more visible) the changes we've been making over the past several
months in support of ES 3.0, and to remove divergence between the master and
development branches.
The previous master branch will still be available as the es2only-legacy branch,
and SHAs will not change, so dependencies on individual commits of ANGLE will
continue to work as expected. However, new contributions against es2only-legacy
will generally not be considered, and future work should be done on master.
This merge doesn't signify completion of ES 3.0, as we have some features still
left to implement there, but interested developers can explore the work in
progress. A significant portion of 3.0 features have been implemented,
including:
* 2D array textures, 3D textures
* Expanded texture format support
* Uniform Buffer Objects
* Vertex Array Objects
* Sampler objects, expanded sampler types
* Transform Feedback
* Texture Swizzle
* GLSL integer support
ES 3.0 features should not yet be considered stable, even where implemented, and
some features are present only via naive implementation so far. There is still
quite a bit of work ahead of us before ES 3.0 support is complete, but this
merge should provide insight to those interested in what we've been working on!

45
doc/Update20150105.md Normal file
View File

@@ -0,0 +1,45 @@
# Multiplatform ANGLE Refactor Complete
ANGLE's [multiplatform refactoring effort](MANGLE.md) is now complete, paving
the way for additional rendering backends, allowing ANGLE to enable OpenGL ES
not just over Direct3D 9 and 11, but also desktop OpenGL.
The refactoring we've done encapsulates D3D-related assumptions and API calls at
the renderer level, so that no D3D calls are made in the renderer-agnostic
portions of the codebase, and D3D-specific feature implementations won't be
included on non-D3D platforms. For example, the creation and maintenance of
CPU-side copies of texture data, which are required to enable GL-style
per-mip-level texture creation over D3D's entire-mipchain texture creation API,
is contained entirely within the D3D renderers, allowing a GL implementation to
avoid this complication.
Work will now begin within ANGLE to add a desktop OpenGL renderer, and EGL
implementations compatible with OS X and Linux.
# ES 3.0 Development Status
Our ES 3.0 development branch was merged into mainline ANGLE in April 2014, but
ES 3.0 support is not yet complete. The majority of API functionality has been
implemented; features still pending include:
* ETC2/EAC support
* primitive restart index
* drawRangeElements
* full GetProgramBinary support in core
Additional work remains in the compiler, including:
* Array .length()
* inf/nan detection
* math utility functions, rounding
* VertexID/InstanceID support
* floating point packing functions
* operators new in ES 3.0
* name redeclaration
* relaxed array indexing
* switch statement support
* loop & iteration improvements
ES 3.0 features should not be considered stable, even where implemented, and
some features are present only via naive implementation so far, but we welcome
bugs filed against this functionality, and thank all our contributors!

76
doc/VTF.md Normal file
View File

@@ -0,0 +1,76 @@
# Vertex Texture Fetch
This page details the steps necessary to implement vertex texture fetch in ANGLE
and documents some of the pitfalls that may be encountered along the way.
# Details
Tasks to implement vertex texture support.
1. add/enable vertex shader texture look up functions in compiler & HLSL
translator.
* add texture2DLod, texture2DProjLod (2 variants), textureCubeLod (these
are **only** valid in vertex shaders)
* ensure other (non-bias/non-LOD) texture functions work in vertex shaders
* non-mipmapped textures use the only level available
* mipmapped textures use only the base level (ie level 0).
2. update implementation-dependent constants in Context.h
* MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS = 4
* MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS =
MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS + MAX\_TEXTURE\_IMAGE\_UNITS (ie 20).
* these limits have to change based on the d3d device characteristics. For
example we likely don't want to advertise vertex image units on SM2.0
cards (unless we end up using software vertex processing).
* detection of hardware support for various formats, types, etc.
* As a first pass, use the "hasVertexTextures" check that Aras suggested
to only enable VTF on DX10 NVIDIA and AMD parts, and SM3 Intel parts.
* If this proves insufficient, there are other things we can do, but it
involves using software vertex processing for unsupported formats and
system memory copies of textures -- all stuff which is rather annoying
and likely to hurt performance (see point 4. below).
3. add support and handling for vertex textures/samplers in the API.
* any textures used in a vertex shader need to get assigned to the special
samplers in d3d9
* there are only 4 of them (D3DVERTEXTEXTURESAMPLER0..
D3DVERTEXTEXTURESAMPLER3)
* if a texture is used in both vertex & fragment it counts twice against
the "MAX\_COMBINED" limit (validated in Program::validateSamplers)
* there are a number of places in our code where we have arrays of size,
or iterate over, MAX\_TEXTURE\_IMAGE\_UNITS. These will need to be
changed to operate on MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS instead. A
(possibly incomplete & outdated) list of areas that need to be updated
is as follows:
* Program.h - increase size of mSamplers
* Context.h - increase size of samplerTexture
* glActiveTexture needs accept values in the range
0..MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS-1
* Context::~Context
* GetIntegerv (2D\_BINDING, CUBE\_BINDING)
* Context::applyTextures
* Context::detachTexture
* Program::getSamplerMapping
* Program::dirtyAllSamplers
* Program::applyUniform1iv
* Program::unlink
* Program::validateSamplers
4. handling the nasty corner cases: texture formats, filtering and cube
textures.
* OpenGL doesn't provide any restrictions on what formats and/or types of
textures can used for vertex textures, or if filtering can be enabled,
whereas D3D9 does.
* Reference Rasterizer / Software Vertex Processing: all formats & types
supported (including filtering)
* ATI R500 (on Google Code) cards do not support VTF (even though they are
SM 3.0)
* ATI R600 (on Google Code) (and later) and in theory the Intel 965+,
claim to support all texture formats/types we care about and some with
filtering
* NVIDIA cards fall into two camps:
* dx9 SM3 (6&7 series): only R32F & A32B32G32R32F supported for 2D and no
filtering, CUBE or VOL texture support
* dx10 (8+ series): only float texture formats for 2D, CUBE & VOLUME. no
filtering (according to caps)
* further info from Aras P. suggests that all formats are supported on
DX10 hardware, but are just not advertised.
* unsure what they do on these cards under OpenGL. Need to do more
testing, but suspect software fallback.

View File

@@ -0,0 +1,50 @@
# How to write ANGLE shader translator AST transformations
Usually, a shader AST transformation is structured as such:
**.h file**: one function taking a node to transform, often the root node. If the transformation needs to create new variables or functions, you need to pass a pointer to the TSymbolTable as well (all functions and variables need an id number that's based on a counter in TSymbolTable).
class TIntermBlock;
TransformAST(TIntermBlock *root)
**.cpp file**: implementation of the transformation, with all the implementation code in an anonymous namespace.
## Utilities to implement a transformation
The utilities for implementing AST transformations are in **src/compiler/translator/tree_util/**
**TIntermTraverser**: This traverses the tree recursively, visiting all nodes. Override the visit* functions you need.
**TLValueTrackingTraverser**: If you need to know if the node that is being visited is a target of a write (used as an l-value), use TLValueTrackingTraverser and its isLValueRequiredHere() function.
If you're only interested in function declarations or global variables, they're all in the global scope, so you can get away with just iterating over the root block instead of using a traverser.
TIntermTraverser has member functions to insert and replace nodes. To remove a node, replace it with an empty list. Usually visit functions queue replacements and then updateTree() is called after the traversal is complete - this way the replacement doesn't affect the current traversal. For some transformations of nested AST structures you may need to do multiple traversals.
**BuiltIn.h**: With the helpers here you can easily and cheaply create references to built-in variables that are stored as constexpr.
**IntermNode_utils.h**: These utilities can do things like create a zero node with an arbitrary type, create bool nodes, index nodes, or operations on temporary variables.
**RunAtTheEndOfShader.h**: Use this when you need to run code at the end of the shader so you don't need to worry about corner cases like return statements in main().
**ReplaceVariable.h**: Replace all references to a specific variable in the AST. Useful if a type of a variable needs to be changed, for example.
**FindMain.h**: Find the main() function in the AST.
**FindSymbolNode.h**: Find a particular symbol in the AST.
**IntermNodePatternMatcher.h**: This helper matches certain AST patterns that are needed in more than one different transformation, such as expressions returning an array.
**StaticType.h**: Create TType objects that are initialized at compile time.
Some member functions of AST nodes can also be useful:
* **deepCopy()** creates a copy of any typed node, including its children.
* **hasSideEffects()** determines whether an expression might have side effects. Usually we want to avoid removing nodes with side effects unless there's certainty they would never be executed.
## Checklist
When implementing traversers, be careful that:
* Each node will only have one parent (multiple parents could mess up further AST transformations)
* You take into account some less common AST structures, such as declarations inside a loop header.
* You run the transformation at the right stage of compilation. You don't want to reintroduce AST structures that have already been pruned away for example, and on the other hand you can depend on earlier transformations to clean up some inconvenient structures from the AST, like empty declarations or multiple variables declared on the same line.
* Make sure that any functions you add are marked with SymbolType::AngleInternal so they exist in a separate namespace from user-defined names and can't conflict with them.

124
doc/dEQP-Charts.md Normal file
View File

@@ -0,0 +1,124 @@
# Charts
These charts are generated nightly from the [chrome GPU waterfall bots](https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console?limit=200). The output of dEQP tests are parsed by [generate_stats.py](https://chromium.googlesource.com/angle/angle/+/HEAD/scripts/generate_stats.py) and collected into a Sheet here: https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek
Warning: the charts below that are wrapped by iframe tags may not display
properly on GitHub Markdown. The charts can be viewed best on the
[Chromium repo page](https://chromium.googlesource.com/angle/angle/+/HEAD/doc/dEQP-Charts.md).
[TOC]
## Win Desktop OpenGL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=2131794282](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=2131794282)
<iframe id="GLES 2.0 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2017908944&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1311087567&format=interactive"></iframe>
<iframe id="GLES 3.1 Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=786488695&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=485763259&format=interactive"></iframe>
## Win Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=88272764](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=88272764)
<iframe id="GLES 2.0 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1224536816&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=470578632&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=304442659&format=interactive"></iframe>
<iframe id="EGL Vulkan Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=907538347&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1264555977&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=884611147&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=441071086&format=interactive"></iframe>
## Win D3D11 Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1236517289](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1236517289)
<iframe id="GLES 2.0 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2018286499&format=interactive"></iframe>
<iframe id="GLES 3.0 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=725892266&format=interactive"></iframe>
<iframe id="GLES 3.1 D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=415437873&format=interactive"></iframe>
<iframe id="EGL D3D11 Win10 NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1558331750&format=interactive"></iframe>
## Mac Desktop Open GL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=745187740](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=745187740)
<iframe id="GLES 2.0 Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=405516565&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1993001882&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Mac AMD" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=718088219&format=interactive"></iframe>
## Linux Desktop Open GL Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=518000832](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=518000832)
<iframe id="GLES 2.0 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1000752961&format=interactive"></iframe>
<iframe id="GLES 3.0 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=658136720&format=interactive"></iframe>
<iframe id="GLES 3.1 Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=637777434&format=interactive"></iframe>
<iframe id="EGL Desktop OpenGL Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1262725407&format=interactive"></iframe>
## Linux Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1271046732](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=1271046732)
<iframe id="GLES 2.0 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=2098104121&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1985365791&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=288024561&format=interactive"></iframe>
<iframe id="EGL Vulkan Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1792478091&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1734147637&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1396798929&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Linux NVIDIA" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=383448866&format=interactive"></iframe>
## Android Vulkan Charts
[https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=703637628](https://docs.google.com/spreadsheets/d/1uttk1z8lJ4ZsUY7wMdFauMzUxb048nh5l52zdrAznek/edit#gid=703637628)
<iframe id="GLES 2.0 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1563521823&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=330631789&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1089048598&format=interactive"></iframe>
<iframe id="EGL Vulkan Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=345901518&format=interactive"></iframe>
### KHR
<iframe id="GLES 2.0 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=1369552559&format=interactive"></iframe>
<iframe id="GLES 3.0 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=211294637&format=interactive"></iframe>
<iframe id="GLES 3.1 Vulkan khr Android 64 Pixel 2" width="1200px" height="371px" class="noborder" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubchart?oid=679956702&format=interactive"></iframe>
## Unexpected Passes/Failures
The latest list of unexpected passed/failed tests on HEAD.
Each test is followed by a list of links to any builds on which they passed/failed unexpectedly.
<iframe id="Unexpected Passed Tests" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubhtml?gid=227024905&single=true&widget=true&headers=false" width="100%" height="600px"></iframe>
<iframe id="Unexpected Failed Tests" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQKyd5j9B0BOl-SuEYeJfIdhYF8EZzASSA7M3nZeLL54i-7iAfEMx0kX7SF_CiwU7DrX8THgn6VKX8a/pubhtml?gid=101098052&single=true&widget=true&headers=false" width="100%" height="600px"></iframe>

88
doc/dEQP.md Normal file
View File

@@ -0,0 +1,88 @@
# ANGLE + dEQP
drawElements (dEQP) is a very robust and comprehensive set of open-source
tests for GLES2, GLES3+ and EGL. They provide a huge net of coverage for
almost every GL API feature. ANGLE by default builds dEQP testing targets for
testing against GLES 2, GLES 3, EGL, and GLES 3.1 (on supported platforms).
## How to build dEQP
You should have dEQP as a target if you followed the [DevSetup](DevSetup.md)
instructions. Current targets:
* `angle_deqp_gles2_tests` for GLES 2.0 tests
* `angle_deqp_gles2_no_gtest` for GLES 2.0 tests without google test suite
* `angle_deqp_gles3_tests` for GLES 3.0 tests
* `angle_deqp_gles3_no_gtest` for GLES 3.0 tests without google test suite
* `angle_deqp_egl_tests` for EGL 1.x tests
* `angle_deqp_egl_no_gtest` for EGL 1.x tests without google test suite
* `angle_deqp_gles31_tests` for GLES 3.1 tests (currently very experimental)
* `angle_deqp_gles31_no_gtest` for GLES 3.1 tests (currently very experimental) without google test suite
## How to use dEQP
Note:
To run an individual test, use the `--deqp-case` flag on any of the `no_gtest` targets.
It supports simple wildcard support. For example: `--deqp-case=dEQP-
GLES2.functional.shaders.linkage.*`.
The `gtest` targets support wildcards via the `--gtest_filter` argument,
but have different test names.
The tests lists are sourced from the Android CTS masters in
`third_party/VK-GL-CTS/src/android/cts/master`. See `gles2-master.txt`,
`gles3-master.txt`, `gles31-master.txt` and `egl-master.txt`.
If you're running a full test suite, it might take very long time. Running in
Debug is only useful to isolate and fix particular failures, Release will give
a better sense of total passing rate.
### Choosing a Renderer
By default ANGLE tests with D3D11 on Windows, GLES on mobile and Desktop GL otherwise.
To specify the exact platform for ANGLE + dEQP, use the arguments:
* `--deqp-egl-display-type=angle-d3d11` for D3D11 (highest available feature level)
* `--deqp-egl-display-type=angle-d3d9` for D3D9
* `--deqp-egl-display-type=angle-d3d11-fl93` for D3D11 Feature level 9_3
* `--deqp-egl-display-type=angle-gl` for OpenGL Desktop (OSX, Linux and Windows)
* `--deqp-egl-display-type=angle-gles` for OpenGL ES (Android/ChromeOS, some Windows platforms)
* `--deqp-egl-display-type=angle-metal` for Metal (Mac)
* `--deqp-egl-display-type=angle-swiftshader` for Vulkan with SwiftShader as driver (Android, Linux, Mac, Windows)
* `--deqp-egl-display-type=angle-vulkan` for Vulkan (Android, Linux, Windows)
The flag `--use-angle=X` has the same effect as `--deqp-egl-display-type=angle-X`.
### Check your results
If run from Visual Studio 2015, dEQP generates a test log to
`out/sln/obj/src/tests/TestResults.qpa`. To view the test log information, you'll need to
use the open-source GUI
[Cherry](https://android.googlesource.com/platform/external/cherry). ANGLE
checks out a copy of Cherry to `angle/third_party/cherry` when you sync with
gclient. Note, if you are using ninja or another build system, the qpa file
will be located in your working directory.
See the [official Cherry README](https://android.googlesource.com/platform/external/cherry/+/master/README)
for instructions on how to run Cherry on Linux or Windows.
### GoogleTest, ANGLE and dEQP
ANGLE also supports the same set of targets built with GoogleTest, for running
on the bots. We don't currently recommend using these for local debugging, but
we do maintain lists of test expectations in `src/tests/deqp_support` (see
[Handling Test Failures](TestingAndProcesses.md)). When
you fix tests, please remove the suppression(s) from the relevant files!
### Running dEQP on Android
When you only need to run a few tests with `--gtest_filter` you can use Android wrappers such as `angle_deqp_egl_tests` directly but beware that Android test runner wipes data by default (try `--skip-clear-data`).
Running the tests not using the test runner is tricky, but is necessary in order to get a complete TestResults.qpa from the dEQP tests when running many tests (since the runner shards the tests, only the results of the last shard will be available when using the test runner). First, use the runner to install the APK, test data and test expectations on the device. After the tests start running, the test runner can be stopped with Ctrl+C. Then, run
```
adb shell am start -a android.intent.action.MAIN -n org.chromium.native_test/.NativeUnitTestNativeActivity -e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt
```
After the tests finish, get the results with (requires `adb root`)
```
adb pull /data/data/com.android.angle.test/TestResults.qpa .
```
Note: this location might change, one can double-check with `adb logcat -d | grep qpa`.

BIN
doc/img/JobUnit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

10
dotfile_settings.gni Normal file
View File

@@ -0,0 +1,10 @@
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contains variables that can be imported into a repo's dotfile (.gn)
# to make it easier to roll new versions of ANGLE in.
angle_dotfile_settings = {
exec_script_whitelist = [ get_path_info("BUILD.gn", "abspath") ]
}

View File

@@ -0,0 +1,226 @@
Name
ANGLE_base_vertex_base_instance
Name Strings
GL_ANGLE_base_vertex_base_instance
Contributors
Shrek Shao, Google Inc.
Contributors to the OES_draw_elements_base_vertex specification
Contributors to the EXT_draw_elements_base_vertex specification
Contributors to the EXT_multi_draw_arrays specification
Contributors to the ARB_shader_draw_parameters specification
Contact
Shrek Shao (shrekshao 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Nov 19, 2021
Author Revision: 3
Number
OpenGL ES Extension XX
Dependencies
OpenGL ES 3.1 is required.
This extension is written against the OpenGL ES 3.1 specification, the
OpenGL ES 3.2 specification, and the OpenGL ES Shading Language 3.0
specification.
GL_ANGLE_multi_draw is required.
Overview
This extension exposes the *BaseVertex* draw call in
OES_draw_elements_base_vertex/EXT_draw_elements_base_vertex together with
their newly added *BaseInstance and MultiDraw* variants in addition to the
vertex shader builtins <gl_BaseVertex> and <gl_BaseInstance> exposed by
ARB_shader_draw_parameters for OpenGL.
*BaseInstance behaves identically to its counterpart draw calls except that
<instanceCount> instances of the range of elements are executed and the
value of <instance> advances for each iteration. Those attributes that have
non-zero values for <divisor>, as specified by VertexAttribDivisor, advance
once per <divisor> instances of the set(s) of vertices being rendered.
Additionally, <baseInstance> specifies the first element within the
instanced vertex attributes.
*BaseVertex* is equivalent to its counterpart draw calls except that
the value of the base vertex passed into the driver is <baseVertex> instead
of zero, and that <instances> of the set of elements are executed and the
value of <instance> advances between each set.
IP Status
No known IP claims.
New Procedures and Functions
void DrawArraysInstancedBaseInstanceANGLE(enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
void MultiDrawArraysInstancedBaseInstanceANGLE(enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
New Tokens
None.
Additions to Chapter 10 of the OpenGL ES 3.2 Specification
Section 10.5 Drawing Commands Using Vertex Arrays:
The command
void DrawArraysInstancedBaseInstanceANGLE(
enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
Behaves identically to DrawArraysInstanced except that <baseInstance> is
passed down to DrawArraysOneInstance instead of zero.
The command
void MultiDrawArraysInstancedBaseInstanceANGLE(
enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
Behaves identically to DrawArraysInstancedBaseInstanceANGLE except that a
list of arrays is specified instead. The number of lists is specified in
the <drawcount> parameter. It has the same effect as:
for(i=0; i<drawcount; i++) {
if (*(counts+i)>0) DrawArraysInstancedBaseInstance(
mode,
*(counts+i),
*(instanceCounts+i),
*(firsts+i),
*(baseInstance+i)
);
}
The index of the draw (<i> in the above pseudo-code) may be read by
a vertex shader as <gl_DrawID> which is defined in GL_ANGLE_multi_draw.
The command
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
Behaves identically to DrawElementsInstanced except that <baseVertex> and
<baseInstance> are passed down to DrawElementsOneInstance instead of zero.
The command
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
Behaves identically to DrawElementsInstancedBaseVertexBaseInstanceANGLE
except that a list of arrays is specified instead. The number of lists is
specified in the <drawcount> parameter. It has the same effect as:
for(i=0; i<drawcount; i++) {
if (*(counts+i)>0) DrawElementsInstancedBaseVertexBaseInstanceANGLE(
mode,
*(counts+i),
type,
*(instanceCounts+i),
*(indices+i),
*(baseVertices+i),
*(baseInstances+i)
);
}
The index of the draw (<i> in the above pseudo-code) may be read by
a vertex shader as <gl_DrawID> which is defined in GL_ANGLE_multi_draw.
Errors
DrawArraysInstancedBaseInstanceANGLE and
DrawElementsInstancedBaseVertexBaseInstanceANGLE
generate the same errors as DrawArraysInstanced and DrawElementsInstanced.
MultiDrawArraysInstancedBaseInstanceANGLE and
MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE
generate the same errors as DrawArraysInstanced and DrawElementsInstanced,
respectively, for any draw <i> where an error is generated. If any call
would produce an error, no drawing is performed.
The error INVALID_VALUE is generated by the MultiDraw* functions if
<drawcount> is less than zero.
Dependencies on GL_OES_draw_elements_base_vertex and
GL_EXT_draw_elements_base_vertex
If the OpenGL ES context version is less than 3.2, this extension is only
available when GL_OES_draw_elements_base_vertex or
GL_EXT_draw_elements_base_vertex are available.
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------------- --------------------------------------------
1 08/13/19 Shrek Shao First revision.
2 07/14/20 Shrek Shao Fix baseInstance type from GLint to GLuint.
3 11/19/21 Shrek Shao Decouple gl_BaseVertex/gl_BaseInstance.
4 06/21/22 Alexey Knyazev Fixed typos and type usage.

View File

@@ -0,0 +1,142 @@
Name
ANGLE_base_vertex_base_instance_shader_builtin
Name Strings
GL_ANGLE_base_vertex_base_instance_shader_builtin
Contributors
Shrek Shao, Google Inc.
Contributors to the ANGLE_base_vertex_base_instance specification
Contributors to the ARB_shader_draw_parameters specification
Contact
Shrek Shao (shrekshao 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Nov 19, 2021
Author Revision: 1
Number
OpenGL ES Extension XX
Dependencies
The extension is based on ANGLE_base_vertex_base_instance, all limitations of which
apply to this extension.
Overview
This extension is based on ANGLE_base_vertex_base_instance. It should be enabled
only if ANGLE_base_vertex_base_instance is enabled.
Additional to the functionality exposed by ANGLE_base_vertex_base_instance,
<gl_BaseVertex> and <gl_BaseInstance> builtins are added to the shading language.
For any *BaseVertex* draw call variant, the <baseVertex> of the draw may be
read by the vertex shader as <gl_BaseVertex>. For non *BaseVertex* calls,
the value of <gl_BaseVertex> is 0.
For any *BaseInstance draw call variant, the baseInstance of the draw may
be read by the vertex shader as <gl_BaseInstance>. For non *BaseInstance
calls, the value of <gl_BaseInstance> is 0.
IP Status
No known IP claims.
New Procedures and Functions
None.
New Tokens
None.
Additions to Chapter 10 of the OpenGL ES 3.2 Specification
Section 10.5 Drawing Commands Using Vertex Arrays:
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>, for the commands
void DrawArraysInstancedBaseInstanceANGLE(
enum mode,
int first,
sizei count,
sizei instanceCount,
uint baseInstance);
and
void MultiDrawArraysInstancedBaseInstanceANGLE(
enum mode,
const int *firsts,
const sizei *counts,
const sizei *instanceCounts,
const uint *baseInstances,
sizei drawcount);
The base index of the vertex may be read by a vertex shader as
<gl_BaseVertex>. This value is also added to the <gl_VertexID>.
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>. Note that this value is not added to the
<gl_InstanceID>, for the commands
void DrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
sizei count,
enum type,
const void *indices,
sizei instanceCount,
int baseVertex,
uint baseInstance);
and
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(
enum mode,
const sizei *counts,
enum type,
const void *const *indices,
const sizei *instanceCounts,
const int *baseVertices,
const uint *baseInstances,
sizei drawcount);
Errors
None.
Modifications to the OpenGL ES Shading Language Specification, Version 3.00
Including the following line in a shader controls the
language featured described in this extension:
#extension GL_ANGLE_base_vertex_base_instance_shader_builtin : <behavior>
where <behavior> is as specified in section 3.5.
A new preprocessor #define is added to the OpenGL ES Shading Language:
#define GL_ANGLE_base_vertex_base_instance_shader_builtin 1
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------------- --------------------------------------------
1 11/19/21 Shrek Shao First revision.
2 06/21/22 Alexey Knyazev Fixed typos and type usage.

View File

@@ -0,0 +1,103 @@
Name
ANGLE_client_arrays
Name Strings
GL_ANGLE_client_arrays
Contributors
Geoff Lang
Contact
Geoff Lang (geofflang 'at' google.com)
Notice
Copyright (c) 2016 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html
Status
Draft
Version
Version 1, February 13, 2016
Number
OpenGL ES Extension #??
Dependencies
Requires OpenGL ES 2.0
Written against the OpenGL ES 2.0 specification.
Overview
This extension allows the OpenGL context to indicate if it supports drawing
with client-side vertex or index data. Client-side can be very inefficient
and unsafe, it is convenient for some users to completely disable its usage.
New Procedures and Functions
None
New Tokens
Accepted by the <cap> parameter to IsEnabled and the <pname> parameter to
GetBooleanv, GetIntegerv, GetFloatv, and GetInteger64v:
CLIENT_ARRAYS_ANGLE 0x93AA
Additions to the OpenGL ES Specification
Add after paragraph 3 of section 2.8 "Vertex Arrays":
If VertexAttribPointer is called while zero is bound to the ARRAY_BUFFER
buffer object binding point, the pointer argument is not NULL, and
CLIENT_ARRAYS_ANGLE is TRUE, an INVALID_OPERATION error is generated.
Add to the end of section 2.9.1 "Vertex Arrays in Buffer Objects":
Rendering commands that draw more than 0 primitives using enabled vertex
attributes with no buffer bound when CLIENT_ARRAYS_ANGLE is TRUE generate
an INVALID_OPERATION error.
Add to the end of section 2.9.2 "Array Indices in Buffer Objects":
Rendering commands that draw using index data when no buffer is bound to
the ELEMENT_ARRAY_BUFFER binding point when CLIENT_ARRAYS_ANGLE is TRUE
generate an INVALID_OPERATION error.
New State
Modify Table 6.22, Miscellaneous
Add:
Initial
Get Value Type Get Command Value Description
-------------------- ---- ----------- ------- ---------------------
CLIENT_ARRAYS_ANGLE B IsEnabled TRUE Client arrays enabled
Conformance Tests
TBD
Issues
None
Revision History
Rev. Date Author Changes
---- ------------- --------- ----------------------------------------
2 Jun 12, 2018 Brandon Jones (Intel) Remove primitives > 0 requirement to error
when doing an indexed draw with no bound
ELEMENT_ARRAY_BUFFER
1 Feb 13, 2016 geofflang Initial version

View File

@@ -0,0 +1,114 @@
Name
ANGLE_clip_cull_distance
Name Strings
GL_ANGLE_clip_cull_distance
Contributors
Contributors to EXT_clip_cull_distance
Members of the WebGL working group
Status
Draft
Version
Last Modified Date: December 1, 2022
Revision: 1
Number
OpenGL ES Extension XX
Dependencies
This specification is written against the OpenGL ES 3.2 Specification
(May 5, 2022), and the OpenGL ES 3.20 Shading Language Specification
(July 10, 2019) but can apply to prior specifications.
OpenGL ES 3.0 and OpenGL ES Shading Language 3.00 are required.
Overview
This extension has the same semantics as EXT_clip_cull_distance but
the number of supported cull distances may be zero.
New Procedures and Functions
None
New Tokens
Accepted by the <pname> parameters of GetBooleanv, GetIntegerv,
GetInteger64v, and GetFloatv:
MAX_CLIP_DISTANCES_ANGLE 0x0D32
MAX_CULL_DISTANCES_ANGLE 0x82F9
MAX_COMBINED_CLIP_AND_CULL_DISTANCES_ANGLE 0x82FA
Accepted by the <pname> parameters of Enable, Disable and IsEnabled:
CLIP_DISTANCE0_ANGLE 0x3000
CLIP_DISTANCE1_ANGLE 0x3001
CLIP_DISTANCE2_ANGLE 0x3002
CLIP_DISTANCE3_ANGLE 0x3003
CLIP_DISTANCE4_ANGLE 0x3004
CLIP_DISTANCE5_ANGLE 0x3005
CLIP_DISTANCE6_ANGLE 0x3006
CLIP_DISTANCE7_ANGLE 0x3007
Additions to OpenGL ES Shading Language 3.20 Specification
Including the following line in a shader can be used to control
the language features described in this extension:
#extension GL_ANGLE_clip_cull_distance : <behavior>
where <behavior> is as described in section 3.4.
A new preprocessor #define is added to the OpenGL ES Shading Language:
#define GL_ANGLE_clip_cull_distance 1
Other additions follow the EXT_clip_cull_distance specification.
Dependencies on cull distance support
If cull distances are not supported, querying MAX_CULL_DISTANCES_ANGLE
and MAX_COMBINED_CLIP_AND_CULL_DISTANCES_ANGLE must return zero, the
built-in constants gl_MaxCullDistances and gl_MaxCombinedClipAndCullDistances
are defined as zero, and gl_CullDistance must not be used in shaders.
New State
Add the following to Table 21.6 (Transformation State):
Initial
Get Value Type Get Command Value Description Sec.
-------------------- ------ ----------- -------- ----------------- ----
CLIP_DISTANCEi_ANGLE 8* x B IsEnabled FALSE ith user clip 12.5
distance enabled
New Implementation Dependent State
Add the following to Table 21.40 (Implementation Dependent Values):
Minimum
Get Value Type Get Command Value Description Sec.
------------------------ ---- ----------- -------- ----------------- ----
MAX_CLIP_DISTANCES_ANGLE Z+ GetIntegerv 8 Max. no. of user 12.5
clip distances
MAX_CULL_DISTANCES_ANGLE Z+ GetIntegerv 0 Max. no. of user 12.5
cull distances
MAX_COMBINED_CLIP_AND- Z+ GetIntegerv 0 Max. combined no. 12.5
_CULL_DISTANCES_ANGLE of user clip and
cull distances
Revision History
12/1/2022 First revision

View File

@@ -0,0 +1,73 @@
Name
ANGLE_compressed_texture_etc
Name Strings
GL_ANGLE_compressed_texture_etc
Version
Last Modifed Date: October 5, 2019
Dependencies
OpenGL ES 2.0 is required.
Overview
This extension exposes the OpenGL ES 3.0 core compressed texture
formats in OpenGL ES 2.0.
New Procedures and Functions
None
New Tokens
Accepted by the <internalformat> parameter of CompressedTexImage2D and the
<format> parameter of CompressedTexSubImage2D:
COMPRESSED_R11_EAC 0x9270
COMPRESSED_SIGNED_R11_EAC 0x9271
COMPRESSED_RG11_EAC 0x9272
COMPRESSED_SIGNED_RG11_EAC 0x9273
COMPRESSED_RGB8_ETC2 0x9274
COMPRESSED_SRGB8_ETC2 0x9275
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
COMPRESSED_RGBA8_ETC2_EAC 0x9278
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
Querying COMPRESSED_TEXTURE_FORMATS will include these new formats.
New Procedures and Functions
None.
Errors
The error INVALID_VALUE is generated if the <internalformat> parameter of
CompressedTexImage2D or the <format> parameter of CompressedTexSubImage2D is
COMPRESSED_R11_EAC, COMPRESSED_SIGNED_R11_EAC, COMPRESSED_RGB8_ETC2,
COMPRESSED_SRGB8_ETC2, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 or
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, and imageSize is not
floor((width + 3) / 4) * floor((height + 3) / 4) * 8
The error INVALID_VALUE is generated if the <internalformat> parameter of
CompressedTexImage2D or the <format> paremeter of CompressedTexSubImage2D is
COMPRESSED_RG11_EAC, COMPRESSED_SIGNED_RG11_EAC, COMPRESSED_RGBA8_ETC2_EAC,
or COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, and imageSize is not
floor((width + 3) / 4) * floor((height + 3) / 4) * 16
New State
None.
Revision History
9/19/2016 First revision
10/5/2019 Rename to ANGLE_compressed_texture_etc

View File

@@ -0,0 +1,225 @@
Name
ANGLE_copy_texture_3d
Name Strings
GL_ANGLE_copy_texture_3d
Contributors
Brandon Jones, Intel
Contacts
Brandon Jones, Intel (brandon1.jones 'at' intel 'dot' com)
Status
Implemented.
Version
Version 1, 2018-8-8
Dependencies
OpenGL ES 3.0 required.
Overview
This extension adds 3D texture support to the functionality
provided by the CHROMIUM_copy_texture extension. Two new
functions are exported, glCopyTexture3DANGLE and
glCopySubTexture3DANGLE that perform the same copy operations as
glCopyTextureCHROMIUM and glCopySubTextureCHROMIUM, respectively,
on GL_TEXTURE_3D and GL_TEXTURE_2D_ARRAY bound textures.
New Procedures and Functions
void CopyTexture3DANGLE(uint sourceId,
int sourceLevel,
enum destTarget,
uint destId,
int destLevel,
int internalFormat,
enum destType,
boolean unpackFlipY,
boolean unpackPremultiplyAlpha,
boolean unpackUnmultiplyAlpha)
void CopySubTexture3DANGLE(uint sourceId,
int sourceLevel,
enum destTarget,
uint destId,
int destLevel,
int xoffset,
int yoffset,
int zoffset,
int x,
int y,
int z,
sizei width,
sizei height,
sizei depth,
boolean unpackFlipY,
boolean unpackPremultiplyAlpha,
boolean unpackUnmultiplyAlpha)
Additions to the OpenGL ES 3.0 Specification
The command
CopyTexture3DANGLE
All CopyTexture3DANGLE behavior is the same as
CopyTextureCHROMIUM unless otherwise defined below.
When source texture doesn't contain a superset of the component
required by <internalFormat>, fill the components by the
following rules.
source format color components
----------------------------------------
RED (R, 0, 0, 1)
RED_INTEGER (R, 0, 0, 1)
RG (R, G, 0, 1)
RG_INTEGER (R, G, 0, 1)
RGB (R, G, B, 1)
RGB_INTEGER (R, G, B, 1)
RGBA (R, G, B, A)
RGBA_INTEGER (R, G, B, A)
LUMINANCE_ALPHA (L, L, L, A)
LUMINANCE (L, L, L, 1)
ALPHA (0, 0, 0, A)
INVALID_OPERATION is generated if the format of <sourceId> is not
one of formats in Table 1.1.
INVALID_ENUM is generated if <destTarget> is not TEXTURE_3D or
TEXTURE_2D_ARRAY.
INVALID_VALUE is generated if the texture corresponding to
<sourceId> has not been bound as <destTarget>.
INVALID_OPERATION is generated if <internalFormat> is not one of
the sized internal formats in Table 1.0.
The command
CopySubTexture3DANGLE
All CopySubTexture3DANGLE behavior is the same as
CopySubTextureCHROMIUM unless otherwise defined below.
<zoffset> specifies a texel offset in the z direction
respectively within the destination texture.
<z> specifies a texel offset in the z direction respectively
within the source texture.
<depth> specifies the depth of the texture subimage.
INVALID_ENUM is generated if <destTarget> is not TEXTURE_3D or
TEXTURE_2D_ARRAY.
INVALID_VALUE is generated if the texture corresponding to
<sourceId> and <destId> have not been bound as <destTarget>.
INVALID_VALUE is generated if either <sourceId> texture or
<destId> texture is not defined.
INVALID_OPERATION is generated if the format of <sourceId> or
<destId> is not one of formats in Table 1.1.
INVALID_VALUE is generated if zoffset is less than 0.
INVALID_VALUE is generated if z is less than 0.
INVALID_VALUE is generated if depth is less than 0.
INVALID_VALUE is generated if (<z> + <depth>) > srcDepth.
INVALID_VALUE is generated if (<zoffset> + <depth>) > destDepth.
Table 1.0 internal formats for CopyTexture3DANGLE:
<internalFormat>
---------------
RGB
RGBA
LUMINANCE
LUMINANCE_ALPHA
ALPHA
R8
R8_SNORM
R16F
R32F
R8UI
R8I
R16UI
R16I
R32UI
R32I
RG8
RG8_SNORM
RG16F
RG32F
RG8UI
RG8I
RG16UI
RG16I
RG32UI
RG32I
RGB8
SRGB8
RGB565
RGB8_SNORM
R11F_G11F_B10F
RGB9_E5
RGB16F
RGB32F
RGB8UI
RGB8I
RGB16UI
RGB16I
RGB32UI
RGB32I
RGBA8
SRGB8_ALPHA8
RGBA8_SNORM
RGB5_A1
RGBA4
RGB10_A2
RGBA16F
RGBA32F
RGBA8UI
RGBA8I
RGB10_A2UI
RGBA16UI
RGBA16I
RGBA32I
RGBA32UI
Table 1.1 Valid source texture formats for
CopyTexture3DANGLE and source and destination formats for
CopySubTexture3DANGLE:
Format
---------------
RED
RED_INTEGER
RG
RG_INTEGER
RGB
RGB_INTEGER
RGBA
RGBA_INTEGER
LUMINANCE_ALPHA
LUMINANCE
ALPHA
Revision History
Version 1, 2018-8-8 (Brandon Jones)
- Initial implementation.

View File

@@ -0,0 +1,402 @@
Name
ANGLE_depth_texture
Name Strings
GL_ANGLE_depth_texture
Contributors
Nicolas Capens, TransGaming
Daniel Koch, TransGaming
Shannon Woods, TransGaming
Kenneth Russell, Google
Vangelis Kokkevis, Google
Gregg Tavares, Google
Contributors to OES_depth_texture
Contributors to OES_packed_depth_stencil
Contact
Shannon Woods, TransGaming (shannon 'dot' woods 'at' transgaming.com)
Status
Implemented in ANGLE.
Version
Last Modified Date: February 25, 2013
Revision: #4
Number
TBD
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the OpenGL ES 2.0.25 specification
OES_packed_depth_stencil affects the definition of this extension.
EXT_texture_storage affects the definition of this extension.
Overview
This extension defines support for 2D depth and depth-stencil
textures in an OpenGL ES implementation.
This extension incorporates the depth texturing functionality of
OES_depth_texture and OES_packed_depth_stencil, but does not
provide the ability to load existing data via TexImage2D or
TexSubImage2D. This extension also allows implementation
variability in which components from a sampled depth texture
contain the depth data. Depth textures created with this
extension only support 1 level.
New Procedures and Functions
None
New Tokens
Accepted by the <format> parameter of TexImage2D and TexSubImage2D and
<internalformat> parameter of TexImage2D:
DEPTH_COMPONENT 0x1902
DEPTH_STENCIL_OES 0x84F9
Accepted by the <type> parameter of TexImage2D, TexSubImage2D:
UNSIGNED_SHORT 0x1403
UNSIGNED_INT 0x1405
UNSIGNED_INT_24_8_OES 0x84FA
Accepted by the <internalformat> parameter of TexStorage2DEXT:
DEPTH_COMPONENT16 0x81A5
DEPTH_COMPONENT32_OES 0x81A7
DEPTH24_STENCIL8_OES 0x88F0
Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
Update Section 2.10.5 "Shader Execution" in the subsection titled
"Texture Access" add a new paragraph before the last paragraph add
this line:
"The stencil index texture internal component is ignored if the base
internal format is DEPTH_STENCIL_OES.
If a vertex shader uses..."
Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterization)
Add the following rows to Table 3.2 (page 62):
type Parameter GL Data Type Special
------------------------------------------------
... ... ...
UNSIGNED_SHORT ushort No
UNSIGNED_INT uint No
UNSIGNED_INT_24_8_OES uint Yes
Add the following rows to Table 3.3 (page 62):
Format Name Element Meaning and Order Target Buffer
------------------------------------------------------------------
... ... ...
DEPTH_COMPONENT Depth Depth
DEPTH_STENCIL_OES Depth and Stencil Index Depth and Stencil
... ... ...
Add a row to Table 3.5 "Packed pixel formats" (page 64):
type Parameter GL Type Components Pixel Formats
------------------------------------------------------------------
... ... ... ...
UNSIGNED_INT_24_8_OES uint 2 DEPTH_STENCIL_OES
Add a new table after Table 3.6 (page 64):
UNSIGNED_INT_24_8_OES
31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0
+----------------------------------+---------------+
| 1st Component | 2nd Component |
+----------------------------------+---------------+
Table 3.6.B: UNSIGNED_INT formats
Add a row to Table 3.7 "Packed pixel field assignments" (page 65):
Format | 1st 2nd 3rd 4th
------------------+-------------------------------
... | ... ... ... ...
DEPTH_STENCIL_OES | depth stencil N/A N/A
Add the following paragraph to the end of the section "Conversion to
floating-point" (page 65):
"For groups of components that contain both standard components and index
elements, such as DEPTH_STENCIL_OES, the index elements are not converted."
In section 3.7.1 "Texture Image Specification", update page 67 to
say:
"The selected groups are processed as described in section 3.6.2, stopping
just before final conversion. Each R, G, B, A, or depth value so generated
is clamped to [0, 1], while the stencil index values are masked by 2^n-1,
where n is the number of stencil bits in the internal format resolution
(see below).
Components are then selected from the resulting R, G, B, A, depth, or
stencil index values to obtain a texture with the base internal format
specified by <internalformat>. Table 3.8 summarizes the mapping of R, G,
B, A, depth, or stencil values to texture components, as a function of the
base internal format of the texture image. <internalformat> may be
specified as one of the internal format symbolic constants listed in
table 3.8. Specifying a value for <internalformat> that is not one of the
above values generates the error INVALID_VALUE. If <internalformat> does
not match <format>, the error INVALID_OPERATION is generated.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES are supported by texture image specification commands
only if <target> is TEXTURE_2D. Using these formats in conjunction with
any other <target> will result in an INVALID_OPERATION error.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES only support one level of image data. Specifying a
non-zero value for <level> will result in an INVALID_OPERATION error.
Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES
require either depth component data or depth/stencil component data.
Textures with other base internal formats require RGBA component data. The
error INVALID_OPERATION is generated if the base internal format is
DEPTH_COMPONENT or DEPTH_STENCIL_OES and <format> is not DEPTH_COMPONENT or
DEPTH_STENCIL_OES, or if the base internal format is not DEPTH_COMPONENT or
DEPTH_STENCIL_OES and <format> is DEPTH_COMPONENT or DEPTH_STENCIL_OES.
Textures with a base internal format of DEPTH_COMPONENT or
DEPTH_STENCIL_OES do not support loading image data via the TexImage
commands. They can only have their contents specified by rendering
to them. The INVALID_OPERATION error is generated by the TexImage2D
command if <data> is not NULL for such textures."
Add a row to table 3.8 (page 68), and update the title of the
second column:
Base Internal Format RGBA, Depth and Stencil Values Internal Components
-------------------------------------------------------------------------
... ... ...
DEPTH_COMPONENT Depth D
DEPTH_STENCIL_OES Depth,Stencil D,S
... ... ...
Update the caption for table 3.8 (page 68)
"Table 3.8: Conversion from RGBA, depth, and stencil pixel components to
internal texture components. Texture components R, G, B, A, and L are
converted back to RGBA colors during filtering as shown in table 3.12.
Texture components D are converted to RGBA colors as described in
section 3.7.8-1/2."
Add the following to section 3.7.2 "Alternate Texture Image Specification
Commands":
"CopyTexImage2D and CopyTexSubImage2D generate the INVALID_OPERATION
error if the base internal format of the destination texture is
DEPTH_COMPONENT or DEPTH_STENCIL_OES.
TexSubImage2D generates the INVALID_OPERATION error if the base internal
format of the texture is DEPTH_COMPONENT or DEPTH_STENCIL_OES."
Add a new section between sections 3.7.8 and 3.7.9:
"3.7.8-1/2 Depth/Stencil Textures
If the currently bound texture's base internal format is DEPTH_COMPONENT or
DEPTH_STENCIL_OES, then the output of the texture unit is as described
below. Otherwise, the texture unit operates in the normal manner.
Let <D_t> be the depth texture value, provided by the shader's texture lookup
function. Then the effective texture value is computed as follows:
<Tau> = <D_t>
If the texture image has a base internal format of DEPTH_STENCIL_OES, then
the stencil index texture component is ignored. The texture value <Tau> does
not include a stencil index component, but includes only the depth
component.
The resulting <Tau> is assigned to <R_t>. In some implementations, <Tau> is
also assigned to <G_t>, <B_t>, or <A_t>. Thus in table 3.12, textures with
depth component data behave as if their base internal format is RGBA, with
values in <G_t>, <B_t>, and <A_t> being implementation dependent."
Add the following to section 3.7.11 "Mipmap Generation":
"If the level zero array contains depth or depth-stencil data, the
error INVALID_OPERATION is generated."
Insert a new paragraph after the first paragraph of the "Texture Access"
subsection of section 3.8.2 on page 87, which says:
"Texture lookups involving textures with depth component data generate
a texture source color by using depth data directly, as described in
section 3.7.8-1/2. The stencil texture internal component is ignored
if the base internal format is DEPTH_STENCIL_OES."
Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment
Operations and the Framebuffer)
In section 4.4.5 "Framebuffer Completeness", replace the the 3rd
paragraph with the following text:
"* An internal format is color-renderable if it is one of the formats
from table 4.5 noted as color-renderable or if it is unsized format
RGBA or RGB. No other formats, including compressed internal formats,
are color-renderable.
* An internal format is depth-renderable if it is one of the sized
internal formats from table 4.5 noted as depth-renderable, if it
is the unsized format DEPTH_COMPONENT or if it is the internal
format value of DEPTH24_STENCIL8_OES. No other formats are
depth-renderable.
* An internal format is stencil-renderable if it is one of the sized
internal formats from table 4.5 noted as stencil-renderable or if it
is DEPTH24_STENCIL8_OES. No other formats are stencil-renderable."
Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
Functions)
None.
Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
Requests)
None.
Interactions with OES_packed_depth_stencil
If OES_packed_depth_stencil is not supported, mentions of
DEPTH_STENCIL_OES and UNSIGNED_INT_24_8_OES as a format/type combinations
for TexImage2D and TexSubImage2D are omitted. Mentions of
the internal format DEPTH24_STENCIL8_OES are also omitted.
Interactions with EXT_texture_storage
If EXT_texture_storage is supported the following internalformat
to format/type mappings are used:
<internalformat> <format> <type>
---------------- -------- ------
DEPTH_COMPONENT16 DEPTH_COMPONENT UNSIGNED_SHORT
DEPTH_COMPONENT32_OES DEPTH_COMPONENT UNSIGNED_INT
DEPTH24_STENCIL8_OES DEPTH_STENCIL_OES UNSIGNED_INT
Textures with the above <internalformats> only support one level of
image data. Specifying a value other than one for the <levels> parameter
to TexStorage2DEXT will result in an INVALID_OPERATION error.
If EXT_texture_storage is not supported, ignore any references
to TexStorage2DEXT.
Errors
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT,
or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT, or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT,
or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexSubImage2D if <format> is
not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT, or UNSIGNED_INT.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> are DEPTH_STENCIL_OES and <type> is not
UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
is DEPTH_STENCIL_OES and <type> is not UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexImage2D if <format> and
<internalformat> is not DEPTH_STENCIL_OES and <type> is
UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated by TexSubImage2D if <format>
is not DEPTH_STENCIL_OES and <type> is UNSIGNED_INT_24_8_OES.
The error INVALID_OPERATION is generated in the following situations:
- TexImage2D is called with <format> and <internalformat> of
DEPTH_COMPONENT or DEPTH_STENCIL_OES and
- <target> is not TEXTURE_2D,
- <data> is not NULL, or
- <level> is not zero.
- TexSubImage2D is called with <format> of DEPTH_COMPONENT or
DEPTH_STENCIL_OES.
- TexStorage2DEXT is called with <internalformat> of DEPTH_COMPONENT16,
DEPTH_COMPONENT32_OES, or DEPTH24_STENCIL8_OES, and
- <target> is not TEXTURE_2D, or
- <levels> is not one.
- CopyTexImage2D is called with an <internalformat> that has a base
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
- CopyTexSubImage2D is called with a target texture that has a base
internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
- GenerateMipmap is called on a texture that has a base internal format
of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
New State
None.
Issues
1) What are the differences between this extension and OES_depth_texture
and OES_packed_depth_stencil?
RESOLVED: This extension:
- does not support loading pre-baked depth stencil data via
TexImage2D or TexSubImage2D.
- allows variability in the y-, z-, and w-components of the sample
results from depth textures.
- only supports one level textures.
- explicitly lists the errors for unsupported functionality.
Since these were not clearly specified in the OES_depth_texture
extension there may be differences in error values between
implementations of OES_depth_texture and ANGLE_depth_texture.
This specification was also rebased to apply against the OpenGL ES 2.0
specification instead of the OpenGL specification, making it more
obvious what all the functionality changes are.
2) Why does TexSubImage2D accept the new format/type combinations even
though it does not actually support loading data?
RESOLVED: This was done to be more consistent with the OES_depth_texture
extension and to make it easier to add support for loading texture
data if it is possible to support in the future.
3) Why are only 1-level depth textures supported?
RESOLVED: The only use for multiple levels of depth textures would
be for fitlered texturing. However since it is not possible to
render to non-zero-level texture levels in OpenGL ES 2.0, and since
this extension forbids loading existing data and GenerateMipmap on
depth textures, it is impossible to initialize or specify contents
for non-zero levels of depth textures.
Revision History
02/25/2013 swoods revise to allow texture lookup to guarantee depth values
only in red channel of sample result.
06/04/2012 dgkoch fix errors, disallow multi-level depth textures.
05/30/2012 dgkoch minor updates and add issues.
05/23/2012 dgkoch intial revision based on OES_depth_texture and
OES_packed_depth_stencil and rebased against the ES 2.0 spec

View File

@@ -0,0 +1,81 @@
Name
ANGLE_explicit_context_gles1
Name Strings
GL_ANGLE_explicit_context_gles1
Contributors
Brandon Jones, Intel
Contacts
Brandon Jones, Intel (brandon1.jones 'at' intel 'dot' com)
Status
Complete.
Version
Version 1, 2018-5-22
Number
GL Extension XXX
Dependencies
OpenGL ES 1.0 is required.
EGL_ANGLE_explicit_context is required.
Overview
This extension adds new OpenGL ES entry points that allow the user to pass the current EGL
context as a function parameter. This allows users to skip lookup of the thread's current
context upon entry.
New Types
typedef void* GLeglContextANGLE
New Procedures and Functions
For every OpenGL ES entry point available in OpenGL ES 1.0, an additional entry point is made
available. The entry points have the form of:
<return value> gl<entry point name>ContextANGLE(GLeglContextANGLE context, <entry point parameters>)
If a function already has an extension suffix, this form still applies.
New Tokens
None.
Additions to Chapter 2 of the OpenGL ES 1.0 Specification (OpenGL ES Operation)
The ContextANGLE entry points allow the user to pass the current EGL context as a function
parameter to provide better performance than looking up the current EGL context at every GL
entry point.
Calls made with an explicit context provide no additional validation for the passed context
parameter.
Calls made with an explicit context will generate errors under the same conditions as they
would without an explicit context. Any instances of undefined behaviour without specifying
an explicit context are still undefined when specifying an explicit context.
When an EGL context that is not current is explicitly passed, the resulting behavior is
undefined.
Issues
None.
Revision History
Version 1, 2018-5-22 (Brandon Jones)
- Initial draft

Some files were not shown because too many files have changed in this diff Show More