21572 Commits

Author SHA1 Message Date
Yuly Novikov
e8e17211e2 Retry angle_deqp_gles2_metal_tests
Flaky crashes in OSXWindow::messageLoop(), like the other GTest based
tests on Mac, which already have retries enabled.

Bug: angleproject:6570
Change-Id: I65ffc4b09a6ece68dcfe404055fcfe50d013c000
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685573
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-07-17 16:14:42 +00:00
Cody Northrop
a04d544301 Docs: Add a couple of Android pointers
Hit some rough edges while setting up a clean install.

Bug: angleproject:4347
Change-Id: I241cddac0c86d0eb00195e42304f50e2c7bba5e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4688533
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-17 16:07:05 +00:00
Roman Lavrov
c0f2f71eba Use VK_EXT_legacy_dithering when available instead of emulation
Yields improvement in gpu power: http://b/284462263#comment45

Bug: b/284462263
Change-Id: I5bfd115557b6baac17c05639118feaebf19c5cd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4652590
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-17 15:24:21 +00:00
Yuly Novikov
d04dda1505 Skip WebGL2CompatibilityTest.DrawWithZeroSizedBuffer on iOS GL
Bug: angleproject:8264
Change-Id: Icac83200b8e9aa35ba3e85be8b34bd45e616a8bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685572
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-07-17 15:16:11 +00:00
angle-autoroll
a18246ac1a Roll Chromium from 68d783529187 to 48a8f73f303f (690 revisions)
68d7835291..48a8f73f30

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: 7565823755..a158d61f27
* testing: 2bac855313..b98bc2989c
* third_party/android_deps: 6514de5457..9ce3e620bd
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..394c179782
* third_party/depot_tools: abbd5858fa..b389d031a2
* third_party/fuchsia-sdk/sdk: version:13.20230711.2.1..version:13.20230714.0.1
* tools/clang: 4786f206b4..c05e52187e
* tools/mb: f8f7cb6141..5ce938841d
* tools/perf: 86375f9e21..a2303f1c72
* tools/valgrind: 27e9a92f3b..e10259da24
No update to Clang.

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I3f305f69842c73569aad368fb3fb7d222c91d231
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4688527
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-17 08:13:47 +00:00
Dave Tapuska
507f67ccff Fix cfi issue with Angle invoking worker pool
Mark the function as ignoring cfi-icall because
of broken upstream builds.

https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20CFI/25615/overview

Bug: angleproject:8256
Change-Id: I63b5fee27bc0565dc6881bd83fd284abc7a9f1f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685324
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
2023-07-14 21:39:58 +00:00
Roman Lavrov
c5b7fc3655 Ensure settings get cleaned up on exceptions
Before this change, Ctrl-C or another exception leaves settings behind

Bug: b/284462263
Change-Id: I5694cbb2ca7d43a4173099d126e6695e07ec9d2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685238
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-07-14 20:11:16 +00:00
Roman Lavrov
d6dc46dbd9 Revert "Add minimal setup for Go codegen in Android.bp."
This reverts commit 9f7b6babe1.

Reason for revert: No longer appears needed as 1) number of diffs was greatly reduced via cc_default 2) build configs got simpler with switching to platform zlib. No recent conflicts introduced by build scripts

Original change's description:
> Add minimal setup for Go codegen in Android.bp.
>
> Based on Cody's http://ag/19603310.
>
> Only adds libEGL_angle_codegen to libEGL_angle and is a no-op.
>
> Tested in an aosp checkout. Hopefully this doesn't cause merge conflicts
> with internal master as all diffs are close to the top of the file.
>
> Android.bp diff: https://paste.googleplex.com/6626641357832192
>
> Bug: b/242929755
> Change-Id: I6d7ac9f3dd502074c41838bd1aa10075a8c99145
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3876890
> Commit-Queue: Roman Lavrov <romanl@google.com>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

Bug: b/242929755
Change-Id: Id4cbdf68e9704138396ee1bef7a4f1edef3f50cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685320
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-14 19:16:03 +00:00
Yuly Novikov
9736822967 Skip dEQP-EGL.functional.native_[color|coord]_mapping.native_window.*
Skip on all platforms instead of the individual suppressions,
that let test failures to slip into build failures.

Bug: angleproject:8261
Change-Id: I16a5eaceb5fe49dc4e23233bfe4fe146b77a95f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685567
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-07-14 17:55:33 +00:00
Geoff Lang
972f810767 Reject program binaries when the renderer string changes
If the underlying driver changes, reject program binaries from the old
versions. The driver is supposed to do this for us (on OpenGL, at
least) but this adds some extra protection.

Bug: angleproject:4981
Change-Id: Id9486d8e6f9136970c0d7c37d59dea5d43b0a50e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685317
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-14 17:04:35 +00:00
Geoff Lang
c0cd00e835 Sync all framebuffer attachments when checking completeness.
If the backend requires that a framebuffer is synchronized before
checking backend completeness, make sure all attachments are
synchronized too.

GL has completeness rules based on GL_BASE_LEVEL and
GL_MAX_LEVEL of texture attachments which are not syncrhonized until
the textures are. If they are left un-sychronized during completeness
checks, the driver will tell us that the framebuffer isn't complete.

Bug: chromium:1455725
Change-Id: I7c3bf6a38f63feaa863f4d8914c3655e286dd768
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678286
Reviewed-by: Brian Ho <hob@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-07-14 16:31:48 +00:00
Shahbaz Youssefi
5032f08b35 Translator: Unconditionally limit variable sizes
... instead of just for WebGL.  This is to avoid hitting driver bugs
that were prevented with this check for WebGL on a compromised renderer
that can create non-WebGL contexts.

Bug: chromium:1464682
Change-Id: I47a9d9690bd1ca9d701391fb7d70932f2dbe7334
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685307
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-14 16:15:55 +00:00
Yuly Novikov
35c077b110 Remove obsolete VUID suppressions
02859 was renamed to 08608 and
06538 was renamed to 08753 in
0cc78b9c28

Bug: angleproject:8242, angleproject:8119, angleproject:7105
Change-Id: Icde11d7c5b598bfb617d899daa795d3e19c8a178
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4687419
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-14 15:33:22 +00:00
Geoff Lang
cc8ea4c29a Metal: Call terminate if display initialization fails.
This ensures that any resources that were partially initialized are
cleaned up.

This is a speculative fix for dual GPU macs not falling back to the
low power GPU. DisplayMtl leaks the metal device if it fails to
initialize due to unsupported GPU families or vendors.

Bug: chromium:1322521
Change-Id: I93930de8c07bb94318ac41c67513a3b1c8bd3bf0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681842
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2023-07-14 15:28:02 +00:00
Geoff Lang
8f76a7ebf6 Metal: Use the pipeline cache for RenderUtils compute shaders
This ensures that all pipelines created in the Metal backend are stored
in the single pipeline cache.

Bug: chromium:1329376
Change-Id: I99db93426acb3467be41d1fca5238b34553f6684
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4628680
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-14 14:16:20 +00:00
angle-autoroll
75dd634d04 Roll vulkan-deps from ad8a66bf7d69 to aa35b58fce7d (7 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/ad8a66bf7d69..aa35b58fce7d

Changed dependencies:
* glslang: 44779f508a..f47028995c
* spirv-tools: 9ab811a125..29431859f5
* vulkan-loader: 8b94e87bff..6837a92c34
* vulkan-validation-layers: c3065a7aed..80679543ad

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: I5edc436c35669da2ddddd038c9895216781c211c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684021
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-14 10:34:13 +00:00
angle-autoroll
da9ccc0155 Roll Chromium from de1153f640b8 to 68d783529187 (590 revisions)
de1153f640..68d7835291

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: 4c5f2bf0f3..7565823755
* buildtools/third_party/libc++abi/trunk: 8d21803b90..d6ce172e32
* testing: a59ee3caa2..2bac855313
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..afb1d77b69
* third_party/depot_tools: 7265d88a45..abbd5858fa
* third_party/fuchsia-sdk/sdk: version:13.20230629.2.1..version:13.20230711.2.1
* tools/android: ffa8abcd30..80da587681
* tools/luci-go: git_revision:1b0aa1222dd6e11673230e5b093d0a8ed6244e95..git_revision:f02582af78f530a7bbfe2f059fa5d211c9517756
* tools/luci-go: git_revision:1b0aa1222dd6e11673230e5b093d0a8ed6244e95..git_revision:f02582af78f530a7bbfe2f059fa5d211c9517756
* tools/mb: f7c0d5e54a..f8f7cb6141
* tools/skia_goldctl/linux: rm5mLaL8XD6eQvwq5a1oqtyfUbbjnUo1uQlcF6zoxLAC..Q5cqdj5BQE3eWNCe2CqhLT13X-o0w1ta7V2XnmXIrnEC
* tools/skia_goldctl/mac_amd64: D2Xn7R8I-IEY0P-2JklhAHVSbuuUizevvyMlfXENjKkC..YieDEr0s0SH8j_1Os9w89pblPmGHE2vvLJtvdTYamfAC
* tools/skia_goldctl/mac_arm64: xKGurBAqifTBoPNsTYQDrb9o_k5Twba5Dh1qwgE3iR8C..isJD0ZhCCqmn1h8q6_12lvDCcKt_M-8v548oOoQwpN4C
* tools/skia_goldctl/win: rpb78oS4WtlmYjaFPtWhEWaEIOXmzXAoSTnFu9WwSmsC..OzmCj3mfsBuDD-gOktZNf1BcL8eg8Ewi8ekcYDI4tsAC
No update to Clang.

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I96f28cdabed15d6d46736d0dfc49a7eba527f655
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684436
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-14 07:59:50 +00:00
Mohan Maiya
19c4e88503 Update input color in YUVSampleLinearFiltering test
This test uses narrow range encoding (as can be seen from the
color value for black) but the Cr component for red is greater
than 240. On some platforms with different clamping logic the
output color after conversion ends up not being red. Update the
input colors to account for different implementations.

Bug: b/210526871
Test: ImageTestES3.SourceYUVAHBTargetExternalYUVSampleLinearFiltering*
Change-Id: Ib9b76c9433b07f5ce8a129779e77bc682bb341ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684018
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-14 05:17:06 +00:00
Alexey Knyazev
817f4b8166 Restrict color writemasks for RGB9_E5 color buffers
Per-channel write operations to shared exponent
color buffers are loosely defined and may cause
driver validation errors.

Restricted the set of allowed color writemasks
for RGB9_E5 color buffers so that RGB channels
must be either all enabled or all disabled.

Added a Metal-specific adjustment to ignore
alpha writemask for RGB9_E5 color buffers.

Removed an unused function from
RenderPipelineColorAttachmentDesc.

Bug: angleproject:8043
Change-Id: I902c3b70ddc6d8e65069d98a4a02a82122f413a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685566
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-14 05:13:22 +00:00
Charlie Lao
6ffd0d2068 Vulkan: Clean up depth stencil feedback mode part 2
Right now the tracking of depth stencil buffer readOnly or feedback loop
is in FramebufferVk class. This really belongs to ContextVk, since it is
not a permanent state of framebuffer, but current state of context. This
CL moves it to ContextVk and changes to use BitSet instead of four
boolean.

Bug: b/289436017
Change-Id: I955c439259935f82eff30ddfff776a69723e5d0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679886
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-07-14 03:27:29 +00:00
Charlie Lao
a33ec5ddb6 Vulkan: Clean up depthStencil feedback loop implementation Part1
This is first clean up effort for depth stencil feedback loop
implementation. This CL moves updateRenderPassStencilReadOnlyMode and
updateRenderPassDepthReadOnlyMode methods from FramebufferVk to
RenderPassCommandBufferHelper class. The method is actually updating
renderPass's state, not FramebufferVk's state. In the next CL,
FramebufferVk will be removed from the argument as well. With this
change, I also removes updateStartedRenderPassWithDepthMode() and
updateStartedRenderPassWithStencilMode() to use
updateStartedRenderPassWithDepthStencilMode() directly.

This CL is mechanical changes only, no behavior chnage is expected.

Bug: b/289436017
Change-Id: Id3960f973a7115c05ebea199cb8ef802e995941a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679365
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2023-07-14 03:22:25 +00:00
Yiwei Zhang
79ebd10a9a Vulkan: disable explicitlyCastMediumpFloatTo16Bit for Venus
Workaround for platforms shipping Venus until vk-gl-cts issue 4554 gets
resolved.

Bug: b/290425152
Test: CtsSkQPTestCases org.skia.skqp.SkQPRunner#gles_gradient_many_stops
Change-Id: Ia05d905a9b56264164ed3325e4966dd2976b1fe9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684548
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-14 00:22:18 +00:00
Shahbaz Youssefi
74cf6a3a60 Ensure lockless entry point validations only access private data
Bug: angleproject:8224
Change-Id: I19e867923b088879f9f37d0a3b4ff8b681470be0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678352
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 23:38:48 +00:00
Geoff Lang
3a0da09d8b Metal: Cache compute pipelines for provoking vertex emulation
Remove ProvokingVertexComputePipelineCache and update
ProvokingVertexHelper to use the PipelineCache.

Bug: chromium:1329376
Change-Id: Ifca89fbb572d850c806b24f124fb86c65eec4f11
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4637204
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-13 21:05:56 +00:00
Shahbaz Youssefi
927410a8c1 Prevent accidental misuse of ANGLE_ENABLED
... by removing it altogether.  This macro was only available when
features.h was included.  If that header was not included, the
preprocessor would automatically consider it 0, which has the opposite
effect from what was desired.

Bug: angleproject:8256
Change-Id: Ia141573c0c8b44eef1388f4c3ec73ef770cd2854
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685226
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-13 20:28:44 +00:00
Geoff Lang
75254b989a Metal: Cache compute pipelines with render pipelines.
Support caching of compute pipelines in the same LRU cache as render
pipelines in mtl::PipelineCache.

Bug: chromium:1329376
Change-Id: I93bbfadb8f5c1461144f1c222362c174402cced1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4628673
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
2023-07-13 19:39:28 +00:00
Dave Tapuska
fe08eee884 Fix Angle creating its own worker pool.
The WorkerPool was created on the first postTask and could create
a number of threads. We were seeing this on blink for iOS where
we would have expected using the delegate's worker pool. However
ANGLE_ENABLED was undefined because it wasn't included. This
caused the comparison of ANGLE_DELEGATE_WORKERS to not work.

Instead of including the header for ANGLE_ENABLED since that would
cause a dependency on libAngle, just use #if X instead, while
this also isn't the best because X can be undefined its a solution
for now.

Bug: angleproject:8256
Change-Id: I5aeb686dcc117feaba884cdea5c89e4b146cb57f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679894
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 18:16:00 +00:00
Shahbaz Youssefi
2a52439028 Make insertion/retrieval of Debug messages thread-safe
Bug: angleproject:8135
Bug: angleproject:8224
Change-Id: I5ad53b6bb57fe3ee2a261d4e52b7027736fddfd1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681843
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-13 17:57:49 +00:00
Alexey Knyazev
435d575c7c Skip component type validation of non-existent draw buffers
The default framebuffer is initialized with just one
draw buffer slot so WebGL-specific validation causes
an assertion when clearing not present draw buffers.

Bug: angleproject:2831
Change-Id: I23ceb3f31dd8bae005fe8497cf20c49880f37938
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4683451
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-07-13 17:06:00 +00:00
Geoff Lang
fbf9e3c7fe Metal: Use the per-context pipeline cache for RenderUtils
The various RenderUtils classes created hundreds of RenderPipelineCache
objects which did not reliquish their pipelines for the life of the
Display. Hook them into the per-context PipelineCache so that they
share the total pipeline limit with programs.

Make RenderUtils fully RAII and store it in a unique_ptr in DisplayMtl.

Remove RenderPipelineCache.

Bug: chromium:1329376
Change-Id: I265e4e05fd3fd1da34932de36803cfe977f1f6a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4607153
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-13 16:57:11 +00:00
Cody Northrop
cdb822e7eb Revert "Android: Assert that CFI is disabled"
This reverts commit 43ef50f389

Reason for revert: LLVM bug is fixed upstream.

Fix:
https://reviews.llvm.org/rG92fbb602f3b635110417e40e2f774b31798b0b1d

LLVM Roll:
243d4473a3

CLs in the roll:
7586aeab..0c545a44

Original change's description:
> Android: Assert that CFI is disabled
>
> There appears to be a bug in the interaction of CFI and
> relative vtables. On armv9 it results in a crash with SIGILL
> when loading traces.
>
> Since we can't overwrite the flags used to control this
> just assert that it is correct in GN args.
>
> To avoid the assert, add the following to your GN args:
>
> arm_control_flow_integrity = "none"
>
> Test: Build and run traces on armv9 devices
> Bug: b/278955379
> Bug: chromium:1441148

Test: angle_trace_tests on ARM v9 device with flag removed from GN
Bug: b/278955379
Bug: chromium:1441148
Change-Id: Ib90405a143503896041c2522f484c234a943a6fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684008
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
2023-07-13 16:55:41 +00:00
Shahbaz Youssefi
c9a42949e3 Make validation make straight calls to ErrorSet
... and avoid going through the context (just to get a const cast).
This change is also in preparation for an follow up where some entry
points directly use ErrorSet and don't access context at all.

Bug: angleproject:8224
Change-Id: Idef0a88d9407870e7a84b4fe6967fbff175c269b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678350
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 16:51:50 +00:00
Shahbaz Youssefi
79f5b73a61 Make error handling and debug messages thread safe
Bug: angleproject:8135
Bug: angleproject:8224
Change-Id: I1527b6a02d917724034873b5206f2006ae0eaf05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678284
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 16:43:20 +00:00
Shahbaz Youssefi
84b5335918 [ssci] Roll VMA forward for README.chromium change
See the LSC doc at go/lsc-chrome-metadata.

Bug: b/285450740
Change-Id: Ia4430b6ecfeb85738dcc80c0fd65e256510261e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681127
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 15:53:37 +00:00
yanhongchen
b03a018c43 Android: Add privapp-permissions XML
Bug: angleproject:8210
Bug: b/242671681
Change-Id: I57d14eb026fab319e080cedcfefd5c160c1321d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4617552
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
2023-07-13 15:16:19 +00:00
Geoff Lang
1d496191ad Revert "Terminate the display if initialization fails."
This reverts commit ebaadc6c2c.

Reason for revert: Breaking some Chrome/Dawn tests that use the VK backend

Original change's description:
> Terminate the display if initialization fails.
>
> If DisplayImpl::initialize fails, call terminate to ensure no resources
> are leaked.
>
> This is a speculative fix for dual GPU macs not falling back to the
> low power GPU. DisplayMtl leaks the metal device if it fails to
> initialize due to unsupported GPU families or vendors.
>
> Bug: chromium:1322521
> Change-Id: Ie227216bc92ef2834ec50190fbb78bec45e9c053
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4641107
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>

Bug: chromium:1322521
Change-Id: I379521130071623a8d050d2cadf2059c0b696d32
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678359
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2023-07-13 15:10:13 +00:00
Shahbaz Youssefi
394c90ea70 Remove stale autogen files
The GL entry points were combined per major version in:

    https://chromium-review.googlesource.com/c/angle/angle/+/2566592

But the stale minor-version based autogenerated files were not removed.

Bug: angleproject:2621
Change-Id: I8c793a7d5e44e323dd4d702747ccb9bb58105e19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678351
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2023-07-13 14:22:23 +00:00
Shahbaz Youssefi
fd80ef867d Remove redundant mip-level-size validation
The ValidImageSizeParameters function already calls ValidMipLevel.  The
few places that called ValidMipLevels are fixed not to redundantly do
so.

Bug: angleproject:8224
Change-Id: I8e0745edb68be97a6903d7801560212cc53d0d6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678285
Reviewed-by: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-07-13 12:55:43 +00:00
angle-autoroll
27465cda5e Roll vulkan-deps from 4ba3255697ef to ad8a66bf7d69 (8 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4ba3255697ef..ad8a66bf7d69

Changed dependencies:
* spirv-headers: d0006a3938..f1ba373ef0
* spirv-tools: 7ff331af66..9ab811a125
* vulkan-validation-layers: 011b0090ed..c3065a7aed

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: Ibb6582a8c777d7aa38318c439fa0a98104634db7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681277
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-13 10:54:57 +00:00
angle-autoroll
a7e31a4e69 Roll SwiftShader from dda70a3ef9fe to 151fa797ee3e (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dda70a3ef9fe..151fa797ee3e

2023-07-12 aredulla@google.com [ssci] Added Shipped field to READMEs

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,cnorthrop@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: cnorthrop@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: I6e8b8e0d551766b260adc255f3ede6966719f4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4683185
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-13 10:48:31 +00:00
angle-autoroll
6946ca87ef Roll Chromium from 3d5d845687d5 to de1153f640b8 (604 revisions)
3d5d845687..de1153f640

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: e7cd327c47..4c5f2bf0f3
* testing: 0732a94e42..a59ee3caa2
* third_party/android_sdk: 14eb523de5..996d3d5271
* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..4ca1551fb4
* third_party/depot_tools: 43bf9b7258..7265d88a45
* third_party/r8: GB_DKiGwJt0TJAnCuEsWhGQdS_JTlr-KQRb0J6aO-r8C..Sz7S7AlqFPYB_t29P5b6i5K80Wq00mpvN2y8aNUAqo0C
* third_party/zlib: 1206f0dbef..61dc0bd13f
* tools/android: e5b5f210e7..ffa8abcd30
* tools/clang: c29b6b927f..4786f206b4
* tools/luci-go: git_revision:5d9f8239e3691bb585eeb88103ee6b4a8d212c0e..git_revision:1b0aa1222dd6e11673230e5b093d0a8ed6244e95
* tools/luci-go: git_revision:5d9f8239e3691bb585eeb88103ee6b4a8d212c0e..git_revision:1b0aa1222dd6e11673230e5b093d0a8ed6244e95
* tools/mb: 3fd043fc8b..f7c0d5e54a
* tools/skia_goldctl/linux: 6IuiEt6PqBPJ4kLiJ80ktH5SSuZwmG3r9o0xjRAYkNkC..rm5mLaL8XD6eQvwq5a1oqtyfUbbjnUo1uQlcF6zoxLAC
* tools/skia_goldctl/mac_amd64: Ts8bufL5zc4XHclA3vKuDS5FyicKlY7XQ_luGzlpdQ4C..D2Xn7R8I-IEY0P-2JklhAHVSbuuUizevvyMlfXENjKkC
* tools/skia_goldctl/mac_arm64: wk3OK108QbrE71cy85i0x-mRelw2_Hln3-7oAEyjA8cC..xKGurBAqifTBoPNsTYQDrb9o_k5Twba5Dh1qwgE3iR8C
* tools/skia_goldctl/win: ECZgbn-oQ7jsny_alVyAdR5ZDzOuPhKMX-YhZPdfnBIC..rpb78oS4WtlmYjaFPtWhEWaEIOXmzXAoSTnFu9WwSmsC
No update to Clang.

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I0f289bf738f9cd7cb1281d248e3669fc4956e2c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681416
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-13 07:58:29 +00:00
Shahbaz Youssefi
8ae9f28d7a Make context-loss state atomic
This state can be set by other threads, including those without a
context in the share group; context loss can originate from the Display
and is propagated to all contexts.

This change makes the relevant flags atomic which are read with relaxed
memory order to minimize their impact on performance.

Bug: angleproject:8224
Change-Id: I1f0a29210e07cd153db79fdc01d551cf96df4143
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678784
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-13 01:11:09 +00:00
Charlie Lao
f5986fbbee Vulkan: Dont break RP if there is actual render feedback loop
There is a bit terminology confusion here that will be fixed in next CL.
If a depth attachment is read only, then there is no feedback loop, we
should not call feedback loop for read only depth attachment. The real
depth render feedback loop mode is formed when we write to depth and
sample from depth at the same time. In this condition, the content is
undefined per OpenGLES spec section 9.3.1
(https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf). The
shouldSwitchToReadOnlyDepthStencilFeedbackLoopMode() implementation
handles the usage case that the same render pass has depth write and
then switch to read only. Under this usage there is no actual feedback
loop, and we should still work properly by end current render pass and
start a new render pass with read only depth attachment. This
implementation also treating the actual feedback loop case exactly the
same way by ending render pass first, even though this is undefined
behavior.  gangstar_vegas has the exact this undefined behavior usage
case, where it write and sample from depth buffer at the same draw call.
Native driver is not ending the render pass but ANGLE currently does.
This puts ANGLE into worse performance. Since this is undefined
behavior, either way is correct. This CL checks if there is an actual
feedback loop in the current render pass and if yes, we adopt the native
driver's behavior that keep the current render pass going. This improves
gangstar_vegas frame time from 4.365ms to 3.89ms, and interestingly,
yield the same golden image.

Bug: b/289436017
Change-Id: Ifc04ecd8ad6455a88e8615bd5452b9cce88c6687
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679361
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-07-12 22:47:03 +00:00
Charlie Lao
2a08c33b73 Vulkan: Avoid flushCommandsAndEndRenderPass for readonlyDS switch
When we switch to read only depth stencil mode, right now we always call
flushCommandsAndEndRenderPass, even though the started render pass is
empty and loadOp is load. This flush will cause render pass actually
submitted and color attachment being cleared and then color attachment
gets loaded in the subsequent render pass. In this CL, we only flush if
the depthStencil attachment has clear or written This CL save one
renderPass for the following app traces: antutu_refinery, aztec_ruins,
manhattan_10, manhattan_31.

Bug: b/290833623
Change-Id: I13b7a968d797b4c913f1cfbe9677d9b8abe791d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4674087
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
2023-07-12 20:33:31 +00:00
Shahbaz Youssefi
9962f078ae Pass only context-private state to private entry points
This change ensures that the implementation for these entry points
cannot access anything other than context-private state.

Bug: angleproject:8224
Change-Id: I988672b138d861db25e91d71ab8c34baa4e8ebee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678783
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-12 19:56:48 +00:00
Shahbaz Youssefi
491c2a5496 Split the context-private part of the state cache
In preparation for passing it directly to entry point implementations,
ensuring no access to the share-group-accessible part.

Bug: angleproject:8224
Change-Id: I705e6a8fb5204bab71caffff4dcb56d16c3d6e10
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678782
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-12 18:50:41 +00:00
Shahbaz Youssefi
40111c68dd Rename context-local to context-private state
Bug: angleproject:8224
Change-Id: I1bb39475043f8fb14d683d11a038b4850692a8c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678781
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-12 18:47:18 +00:00
Cody Northrop
c93682d3dc Revert "Stop rolling third_party/cpu_features"
This reverts commit da710ac3f7

Reason for revert: Causes Android roll to fail
http://anglebug.com/8255

Original change's description:
> Stop rolling third_party/cpu_features
>
> It was probably needed for zlib previously but now zlib already depends
> on the ndk's cpufeatures. There are no references to third_party
> cpu_features in the generated Android.bp.
>
> Bug: b/289259681
> Change-Id: Ib849b26391d0c23e533662094e74384c267c8620
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4656761
> Reviewed-by: Solti Ho <solti@google.com>
> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
> Auto-Submit: Roman Lavrov <romanl@google.com>
> Commit-Queue: Solti Ho <solti@google.com>

Test: scripts/roll_aosp.sh
Bug: angleproject:8255
Change-Id: I2a879a3675a1c041a0e6ffff2be886aa693e486d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4680107
Reviewed-by: Solti Ho <solti@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2023-07-12 17:46:11 +00:00
angle-autoroll
75e647193a Roll SwiftShader from 3e73cce1c470 to dda70a3ef9fe (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3e73cce1c470..dda70a3ef9fe

2023-07-11 jif@google.com [LLVM 16] Have Swiftshader built with
Android.bp use LLVM 16.

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,cnorthrop@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: cnorthrop@google.com
Use-Permissive-Angle-Pixel-Comparison: True
Change-Id: Ib06f37931e7291887caf54a19c4601d87e79066b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681283
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2023-07-12 12:15:21 +00:00
Phan Quang Minh
4cab5e94fc Vulkan: Enable timeline semaphores if supported by device
This is needed for a similar change in Chromium to function with
`--enable-features=VulkanFromANGLE`.

Bug: angleproject:8253
Change-Id: I422964ea010c650439dd4797ee8ba7b533f26a87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4675807
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-12 11:11:51 +00:00