Issue 8297 in angleproject: Vulkan: Perform shader compile and program link without holding the share group lock

7 views
Skip to first unread message

syous… via monorail

unread,
Aug 8, 2023, 3:24:19 PM8/8/23
to angleproj...@googlegroups.com
Status: Available
Owner: syou...@chromium.org
OS: All
Priority: Medium
Renderer: Vulkan
Type: Enhancement

New issue 8297 by syou...@chromium.org: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297

The mechanism for parallel compile/link can be leveraged to put these tasks in an UnlockedTailCall. This would allow GL threads whose sole purpose is to compile shaders and link programs to be run in parallel with the main thread.

There are a couple of subtasks:

- Parallel link should be supported (even if disabled) in the Vulkan backend
- The job management should be hoisted to the front-end such that it can decide to post a job, or schedule it as an UnlockedTailCall
* Most of the front-end link can also then be placed in the same task and parallelized
- The tail of the call (Context::onProgramLink) should be managed such that it's no longer the tail! Given that it stops parallel link in some cases, the front-end can just decided not to make the link parallel in the first place in that case, and only do parallel/UnlockedTailCall in the other case (which is the common one)
- UnlockedTailCall for shader compilation is separate task.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Git Watcher via monorail

unread,
Aug 9, 2023, 12:14:11 PM8/9/23
to angleproj...@googlegroups.com

Comment #1 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c1

The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/df76f5b1674739ceeba7fe433f4aaec098d396a2

commit df76f5b1674739ceeba7fe433f4aaec098d396a2
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Aug 08 19:13:54 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/df76f5b1674739ceeba7fe433f4aaec098d396a2/src/libANGLE/renderer/metal/ShaderMtl.mm
[modify] https://crrev.com/df76f5b1674739ceeba7fe433f4aaec098d396a2/src/libANGLE/renderer/d3d/ShaderD3D.cpp
[modify] https://crrev.com/df76f5b1674739ceeba7fe433f4aaec098d396a2/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/df76f5b1674739ceeba7fe433f4aaec098d396a2/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Aug 11, 2023, 10:05:13 PM8/11/23
to angleproj...@googlegroups.com

Comment #2 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c2


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/16cfa28e11aac93363f8ec35e7de6a7a06f92b24

commit 16cfa28e11aac93363f8ec35e7de6a7a06f92b24
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 09 02:08:24 2023

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 <cc...@google.com>

Reviewed-by: Geoff Lang <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/tests/test_utils/angle_test_instantiate.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ContextVk.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/include/platform/vk_features.json
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/vk_cache_utils.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/include/platform/autogen/FeaturesVk_autogen.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/vk_helpers.h
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/UtilsVk.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/vk_helpers.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ContextVk.cpp
[modify] https://crrev.com/16cfa28e11aac93363f8ec35e7de6a7a06f92b24/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h

Git Watcher via monorail

unread,
Aug 15, 2023, 11:05:14 AM8/15/23
to angleproj...@googlegroups.com

Comment #3 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c3


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/424f43e40e14f7f7362ef06948b0bb0cc2917c74

commit 424f43e40e14f7f7362ef06948b0bb0cc2917c74
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Aug 11 21:07:16 2023

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 <cc...@google.com>
Reviewed-by: Geoff Lang <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/Program.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/Shader.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/gl/RendererGL.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/Program.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/Shader.cpp
[modify] https://crrev.com/424f43e40e14f7f7362ef06948b0bb0cc2917c74/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Aug 15, 2023, 11:17:16 AM8/15/23
to angleproj...@googlegroups.com

Comment #4 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c4


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d7d78adb2adb256c15cb6542ba382675cb1272ae

commit d7d78adb2adb256c15cb6542ba382675cb1272ae
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Aug 15 14:07:39 2023

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 <ynov...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/d7d78adb2adb256c15cb6542ba382675cb1272ae/infra/specs/angle.json
[modify] https://crrev.com/d7d78adb2adb256c15cb6542ba382675cb1272ae/infra/specs/test_suites.pyl

Git Watcher via monorail

unread,
Aug 15, 2023, 12:34:18 PM8/15/23
to angleproj...@googlegroups.com

Comment #5 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c5


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2

commit d8cd4dcdc9c55c88f030f7fca41357e99e600ed2
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 09 20:51:13 2023

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 <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Yuxin Hu <yux...@google.com>

[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/tests/gl_tests/LinkAndRelinkTest.cpp
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/Program.h
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/Shader.h
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/Program.cpp
[modify] https://crrev.com/d8cd4dcdc9c55c88f030f7fca41357e99e600ed2/src/libANGLE/Context.cpp

Git Watcher via monorail

unread,
Aug 15, 2023, 2:01:13 PM8/15/23
to angleproj...@googlegroups.com

Comment #6 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c6


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/10f54902e816fa7e4cf314384e00590e2b9bfa1d

commit 10f54902e816fa7e4cf314384e00590e2b9bfa1d
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 09 21:21:20 2023

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 <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>

[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/spv_utils.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/Shader.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/vulkan/spv_utils.h
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/Program.cpp
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/10f54902e816fa7e4cf314384e00590e2b9bfa1d/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Aug 15, 2023, 2:37:15 PM8/15/23
to angleproj...@googlegroups.com

Comment #7 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c7


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/29aae8ac961145db0b1808ab8b2cbedc6aa426c3

commit 29aae8ac961145db0b1808ab8b2cbedc6aa426c3
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Aug 14 19:33:16 2023

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 <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>

Git Watcher via monorail

unread,
Aug 16, 2023, 3:58:12 PM8/16/23
to angleproj...@googlegroups.com

Comment #8 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c8


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/78de02ab5230127135b1504b5432784c57620488

commit 78de02ab5230127135b1504b5432784c57620488
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 16 19:23:23 2023

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 <syou...@chromium.org>
Reviewed-by: Yuly Novikov <ynov...@chromium.org>

[modify] https://crrev.com/78de02ab5230127135b1504b5432784c57620488/src/libANGLE/Shader.cpp

Git Watcher via monorail

unread,
Aug 17, 2023, 1:49:08 PM8/17/23
to angleproj...@googlegroups.com

Comment #9 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c9


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/4ba4af616068e6e33b2810a92aa104320d90013c

commit 4ba4af616068e6e33b2810a92aa104320d90013c
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 17 15:28:18 2023

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
10f54902e816fa7e4cf314384e00590e2b9bfa1d.


Vulkan: Move default uniform init to link job
d8cd4dcdc9c55c88f030f7fca41357e99e600ed2.

Bug: angleproject:8297
Change-Id: I9a258460e7bcaeac214be5e63c16c20681e0bcde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789843

Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Yuly Novikov <ynov...@chromium.org>

[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/tests/gl_tests/LinkAndRelinkTest.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/Shader.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/gl/RendererGL.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/Context.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/spv_utils.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/Shader.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/spv_utils.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/Program.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/Program.cpp
[modify] https://crrev.com/4ba4af616068e6e33b2810a92aa104320d90013c/src/libANGLE/renderer/metal/ProgramMtl.mm

Git Watcher via monorail

unread,
Aug 22, 2023, 2:18:16 PM8/22/23
to angleproj...@googlegroups.com

Comment #10 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c10


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/f3c1de3636f36229f49b4779d75f3d1d176b8b55

commit f3c1de3636f36229f49b4779d75f3d1d176b8b55
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 17 19:29:24 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/tests/gl_tests/LinkAndRelinkTest.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/vulkan/ShaderVk.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/mtl_msl_utils.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/mtl_msl_utils.mm
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Shader.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/ProgramLinkedResources.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/ShaderMtl.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Context.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/common/CompiledShaderState.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/validationESEXT.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/DynamicImage2DHLSL.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/common/CompiledShaderState.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/validationES.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/capture/serialize.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/vulkan/spv_utils.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Context.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Shader.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/vulkan/spv_utils.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/ProgramLinkedResources.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/ShaderD3D.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Program.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/validationES2.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/capture/FrameCapture.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/ShaderMtl.mm
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/ShaderD3D.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/DynamicHLSL.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/d3d/DynamicImage2DHLSL.h
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/Program.cpp
[modify] https://crrev.com/f3c1de3636f36229f49b4779d75f3d1d176b8b55/src/libANGLE/renderer/metal/ProgramMtl.mm

Git Watcher via monorail

unread,
Aug 23, 2023, 12:01:16 PM8/23/23
to angleproj...@googlegroups.com

Comment #11 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c11


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/8f64b51d22628cec2c0c7f071c2df9a367a2a42e

commit 8f64b51d22628cec2c0c7f071c2df9a367a2a42e
Author: Shahbaz Youssefi <syou...@chromium.org>

Date: Wed Aug 09 20:51:13 2023

Reland: Vulkan: Move default uniform init to link job

This is a reland of d8cd4dcdc9c55c88f030f7fca41357e99e600ed2

Bug: angleproject:8297
Change-Id: Ib4f8e9dd258da71d44983bbb619b6b4abda0b109
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793218

Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/Program.h
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/Program.cpp
[modify] https://crrev.com/8f64b51d22628cec2c0c7f071c2df9a367a2a42e/src/libANGLE/Context.cpp

Git Watcher via monorail

unread,
Aug 23, 2023, 1:47:08 PM8/23/23
to angleproj...@googlegroups.com

Comment #12 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c12


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11

commit cfd9ccd0089bc7b6119ce708d4d17576dd80fd11
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 09 21:21:20 2023

Reland: Vulkan: Move SPIR-V set up to link job

This is a reland of 10f54902e816fa7e4cf314384e00590e2b9bfa1d

Bug: angleproject:8297
Change-Id: I701b750a13ac5b17df67dee5b6c37c13c60f5b10
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793219
Reviewed-by: Yuxin Hu <yux...@google.com>
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/spv_utils.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/spv_utils.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/Program.cpp
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/cfd9ccd0089bc7b6119ce708d4d17576dd80fd11/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Aug 23, 2023, 3:08:20 PM8/23/23
to angleproj...@googlegroups.com

Comment #13 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c13


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/68f2c10cdf51396aa7fa1c331bed3b17f50a3c26

commit 68f2c10cdf51396aa7fa1c331bed3b17f50a3c26
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 16 02:47:32 2023

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 <yux...@google.com>
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>

Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>

Git Watcher via monorail

unread,
Aug 24, 2023, 3:37:13 PM8/24/23
to angleproj...@googlegroups.com

Comment #14 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c14


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/571b4cdb112779da54bf16faa2853271d256b7f3

commit 571b4cdb112779da54bf16faa2853271d256b7f3
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Aug 14 20:55:28 2023

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 <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/ProgramLinkedResources.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/tests/test_utils/angle_test_instantiate.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ShareGroupVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/UtilsVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/RendererVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/RendererVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ContextVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/vk_utils.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/ProgramLinkedResources.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/CommandProcessor.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/vk_cache_utils.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/CommandProcessor.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/UtilsVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/vk_helpers.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/renderer/vulkan/ContextVk.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/Program.cpp
[modify] https://crrev.com/571b4cdb112779da54bf16faa2853271d256b7f3/src/libANGLE/ProgramPipeline.cpp

Git Watcher via monorail

unread,
Aug 24, 2023, 5:32:08 PM8/24/23
to angleproj...@googlegroups.com

Comment #15 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c15


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/44b5715c4049ebabc8a7124f531eea5910efbec2

commit 44b5715c4049ebabc8a7124f531eea5910efbec2
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Aug 15 19:06:25 2023

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 <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/DynamicHLSL.h
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/Context.cpp
[modify] https://crrev.com/44b5715c4049ebabc8a7124f531eea5910efbec2/src/libANGLE/Context.h

Git Watcher via monorail

unread,
Aug 24, 2023, 9:53:17 PM8/24/23
to angleproj...@googlegroups.com

Comment #16 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c16


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/4376a8c879a15ec67e3630f559529a6a7a62ed45

commit 4376a8c879a15ec67e3630f559529a6a7a62ed45
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 16 16:02:57 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/4376a8c879a15ec67e3630f559529a6a7a62ed45/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/4376a8c879a15ec67e3630f559529a6a7a62ed45/src/libANGLE/renderer/metal/mtl_msl_utils.h
[modify] https://crrev.com/4376a8c879a15ec67e3630f559529a6a7a62ed45/src/libANGLE/renderer/metal/mtl_msl_utils.mm
[modify] https://crrev.com/4376a8c879a15ec67e3630f559529a6a7a62ed45/src/libANGLE/renderer/metal/ProgramMtl.mm

Git Watcher via monorail

unread,
Aug 24, 2023, 10:12:17 PM8/24/23
to angleproj...@googlegroups.com

Comment #17 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c17


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/c8ec8739ec4db7641400d735417afad1881c83ab

commit c8ec8739ec4db7641400d735417afad1881c83ab
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Aug 22 15:30:08 2023

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 <yux...@google.com>
Reviewed-by: Charlie Lao <cc...@google.com>

Git Watcher via monorail

unread,
Aug 25, 2023, 2:12:13 PM8/25/23
to angleproj...@googlegroups.com

Comment #18 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c18


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/57388ab2e24d28c19c552574bf3f5806ef997dc6

commit 57388ab2e24d28c19c552574bf3f5806ef997dc6
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 24 18:44:48 2023

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 <yux...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/spv_utils.cpp
[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/spv_utils.h
[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/57388ab2e24d28c19c552574bf3f5806ef997dc6/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp

Git Watcher via monorail

unread,
Aug 29, 2023, 4:46:23 PM8/29/23
to angleproj...@googlegroups.com

Comment #19 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c19


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/bb135f0ebe130731eaff8eb5ae372fd397ff4e64

commit bb135f0ebe130731eaff8eb5ae372fd397ff4e64
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 24 19:29:11 2023

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 <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/vk_utils.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/d3d9/Context9.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/GLImplFactory.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/metal/metal_backend.gni
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/tests/angle_unittests_utils.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/metal/ContextMtl.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/null/null_backend.gni
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libGLESv2.gni
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/Program.h
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/ProgramExecutableImpl.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ContextVk.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/ProgramPipeline.h
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/gl/ProgramExecutableGL.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/d3d11/Context11.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/metal/ContextMtl.mm
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/gl/ContextGL.cpp
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/null/ProgramExecutableNULL.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/null/ContextNULL.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/d3d_backend.gni
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/null/ContextNULL.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/gl/ContextGL.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ContextVk.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/vulkan/ProgramPipelineVk.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/d3d/d3d9/Context9.h
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/Program.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/ProgramPipeline.cpp
[modify] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/gl/gl_backend.gni
[add] https://crrev.com/bb135f0ebe130731eaff8eb5ae372fd397ff4e64/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm

Git Watcher via monorail

unread,
Aug 29, 2023, 5:59:10 PM8/29/23
to angleproj...@googlegroups.com

Comment #20 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c20


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/3822ea3a409d33cd642bd561110931336b5fb39c

commit 3822ea3a409d33cd642bd561110931336b5fb39c
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Aug 25 02:42:43 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/StateManager11.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/DynamicImage2DHLSL.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/RendererD3D.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/RendererD3D.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/Program.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/ProgramExecutableImpl.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/DynamicHLSL.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/DynamicImage2DHLSL.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/Program.cpp
[modify] https://crrev.com/3822ea3a409d33cd642bd561110931336b5fb39c/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp

Git Watcher via monorail

unread,
Aug 29, 2023, 10:39:08 PM8/29/23
to angleproj...@googlegroups.com

Comment #21 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c21


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d9672adae7e00ca09d1c7b5f9174ac086d53275f

commit d9672adae7e00ca09d1c7b5f9174ac086d53275f
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Aug 25 15:37:09 2023

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 <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Yuxin Hu <yux...@google.com>

[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/Program.h
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/ProgramPipeline.h
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/capture/serialize.cpp
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/Program.cpp
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/d9672adae7e00ca09d1c7b5f9174ac086d53275f/src/libANGLE/ProgramPipeline.cpp

Git Watcher via monorail

unread,
Aug 29, 2023, 10:48:18 PM8/29/23
to angleproj...@googlegroups.com

Comment #22 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c22


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/4c0c837e6ad4883fda2ed11be9dfa58778b4632b

commit 4c0c837e6ad4883fda2ed11be9dfa58778b4632b
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Aug 25 17:46:36 2023

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 <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/4c0c837e6ad4883fda2ed11be9dfa58778b4632b/src/libANGLE/renderer/gl/ProgramExecutableGL.h
[modify] https://crrev.com/4c0c837e6ad4883fda2ed11be9dfa58778b4632b/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/4c0c837e6ad4883fda2ed11be9dfa58778b4632b/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/4c0c837e6ad4883fda2ed11be9dfa58778b4632b/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp

Git Watcher via monorail

unread,
Aug 29, 2023, 11:11:22 PM8/29/23
to angleproj...@googlegroups.com

Comment #23 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c23


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ae67a24b4ea4b75cadda510f1e6c6d989af36e73

commit ae67a24b4ea4b75cadda510f1e6c6d989af36e73
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Aug 25 18:51:50 2023

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 <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/mtl_common.h
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ContextMtl.h
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/VertexArrayMtl.mm
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ContextMtl.mm
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/ae67a24b4ea4b75cadda510f1e6c6d989af36e73/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm

Git Watcher via monorail

unread,
Aug 29, 2023, 11:14:17 PM8/29/23
to angleproj...@googlegroups.com

Comment #24 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c24


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/6698fb69b0733a29bd55bbafc37e6c66a90084dd

commit 6698fb69b0733a29bd55bbafc37e6c66a90084dd
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Sat Aug 26 02:21:32 2023

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 <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Yuxin Hu <yux...@google.com>

[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/vk_cache_utils.h
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ContextVk.h
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ContextVk.cpp
[modify] https://crrev.com/6698fb69b0733a29bd55bbafc37e6c66a90084dd/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp

Git Watcher via monorail

unread,
Aug 30, 2023, 12:20:16 AM8/30/23
to angleproj...@googlegroups.com

Comment #25 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c25


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/b9e9c58bbd779cfeb98b16c57fb76001379b4975

commit b9e9c58bbd779cfeb98b16c57fb76001379b4975
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Aug 28 19:25:59 2023

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 <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Aug 31, 2023, 12:39:41 PM8/31/23
to angleproj...@googlegroups.com

Comment #26 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c26


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/0df4adbd246e57e2e5ded8f9ab6cf696c8f6ff81

commit 0df4adbd246e57e2e5ded8f9ab6cf696c8f6ff81
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Aug 28 19:27:11 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/0df4adbd246e57e2e5ded8f9ab6cf696c8f6ff81/src/libANGLE/MemoryProgramCache.cpp

Git Watcher via monorail

unread,
Aug 31, 2023, 2:04:13 PM8/31/23
to angleproj...@googlegroups.com

Comment #27 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c27


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/6ff209bc9d9b1cb39c8214403fff21b64d630419

commit 6ff209bc9d9b1cb39c8214403fff21b64d630419
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 30 04:02:30 2023

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 <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>

[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/queryutils.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/Context.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/capture/capture_gles_2_0_params.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/validationES.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/Program.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/ProgramPipeline.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/tests/gl_tests/GLSLTest.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/Program.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/ProgramPipeline.cpp
[modify] https://crrev.com/6ff209bc9d9b1cb39c8214403fff21b64d630419/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm

Git Watcher via monorail

unread,
Aug 31, 2023, 2:33:09 PM8/31/23
to angleproj...@googlegroups.com

Comment #28 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c28


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/33be2590820eaef5662385276dcb6873d038ffe9

commit 33be2590820eaef5662385276dcb6873d038ffe9
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 31 01:58:54 2023

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 <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>

Git Watcher via monorail

unread,
Sep 1, 2023, 10:41:35 PM9/1/23
to angleproj...@googlegroups.com

Comment #29 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c29


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ebf1e7163216932b0eeb6653da5dac13c3b8ba6a

commit ebf1e7163216932b0eeb6653da5dac13c3b8ba6a
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Aug 31 21:19:44 2023

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 <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Sep 5, 2023, 2:52:15 PM9/5/23
to angleproj...@googlegroups.com

Comment #30 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c30


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/93402d6f9a040db32593d3673c43ac04f3158b55

commit 93402d6f9a040db32593d3673c43ac04f3158b55
Author: Geoff Lang <geof...@chromium.org>
Date: Tue Sep 05 16:57:16 2023

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 <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/93402d6f9a040db32593d3673c43ac04f3158b55/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/93402d6f9a040db32593d3673c43ac04f3158b55/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/93402d6f9a040db32593d3673c43ac04f3158b55/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
[modify] https://crrev.com/93402d6f9a040db32593d3673c43ac04f3158b55/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/93402d6f9a040db32593d3673c43ac04f3158b55/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp

Git Watcher via monorail

unread,
Sep 5, 2023, 2:53:17 PM9/5/23
to angleproj...@googlegroups.com

Comment #31 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c31


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/0ff71d5ecd25d96f357b6ec153074d93438c8d1d

commit 0ff71d5ecd25d96f357b6ec153074d93438c8d1d
Author: Geoff Lang <geof...@chromium.org>
Date: Tue Sep 05 16:55:50 2023

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

Git Watcher via monorail

unread,
Sep 5, 2023, 10:14:17 PM9/5/23
to angleproj...@googlegroups.com

Comment #32 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c32


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d664543f3e6d683bfdc3e31d2db99403ca8b1c40

commit d664543f3e6d683bfdc3e31d2db99403ca8b1c40
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Sat Sep 02 03:11:59 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/mtl_msl_utils.h
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/mtl_msl_utils.mm
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ContextMtl.h
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ContextMtl.mm
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/d664543f3e6d683bfdc3e31d2db99403ca8b1c40/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm

Git Watcher via monorail

unread,
Sep 6, 2023, 1:41:16 PM9/6/23
to angleproj...@googlegroups.com

Comment #33 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c33


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/7b0bb0f6e785ec810761984c0fc09f603a1c4bde

commit 7b0bb0f6e785ec810761984c0fc09f603a1c4bde
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Sep 01 17:52:28 2023

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 <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/tests/gl_tests/LinkAndRelinkTest.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Observer.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/MemoryProgramCache.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Context.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/State.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/validationES.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/State.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Context.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/ProgramLinkedResources.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Program.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/validationES31.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/ProgramPipeline.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Context.inl.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/renderer/metal/ContextMtl.mm
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/tests/gl_tests/ContextNoErrorTest.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/capture/FrameCapture.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/MemoryProgramCache.h
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/Program.cpp
[modify] https://crrev.com/7b0bb0f6e785ec810761984c0fc09f603a1c4bde/src/libANGLE/ProgramPipeline.cpp

Git Watcher via monorail

unread,
Sep 6, 2023, 5:01:14 PM9/6/23
to angleproj...@googlegroups.com

Comment #34 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c34


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/60b56591dee59bc0bc770577f43d90be4b18863c

commit 60b56591dee59bc0bc770577f43d90be4b18863c
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Aug 28 19:40:26 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Sep 7, 2023, 12:51:13 PM9/7/23
to angleproj...@googlegroups.com

Comment #35 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c35


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/06411d1623fc555e48011a7a152225ba2f1bf881

commit 06411d1623fc555e48011a7a152225ba2f1bf881
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Sep 06 17:23:34 2023

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 <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/FramebufferGL.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/StateManagerGL.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/tests/gl_tests/MultiviewDrawTest.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/StateManagerGL.h
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ProgramExecutableGL.h
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/validationES.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ContextGL.h
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ContextGL.cpp
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/06411d1623fc555e48011a7a152225ba2f1bf881/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp

Git Watcher via monorail

unread,
Sep 7, 2023, 1:14:33 PM9/7/23
to angleproj...@googlegroups.com

Comment #36 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c36


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/fc7a28530e112ac8355f266e820bfb71580df66f

commit fc7a28530e112ac8355f266e820bfb71580df66f
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Sep 07 17:10:56 2023

Revert "Verify shader link correctness after looking up in program cache"

This reverts commit 60b56591dee59bc0bc770577f43d90be4b18863c.

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 <geof...@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syou...@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-...@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/fc7a28530e112ac8355f266e820bfb71580df66f/src/libANGLE/Program.cpp

Git Watcher via monorail

unread,
Sep 8, 2023, 8:17:11 PM9/8/23
to angleproj...@googlegroups.com

Comment #37 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c37


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5

commit 1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Sep 07 04:21:13 2023

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 <syou...@google.com>

Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/1bd9fc2429dfa9ff200a5ddbf8f27ec0d5351ce5/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp

Git Watcher via monorail

unread,
Sep 8, 2023, 9:07:18 PM9/8/23
to angleproj...@googlegroups.com

Comment #38 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c38


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/48e2c605adcd5bcc1622b18f357c7a73ebfb3543

commit 48e2c605adcd5bcc1622b18f357c7a73ebfb3543
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Sep 07 18:30:46 2023

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 <syou...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

Git Watcher via monorail

unread,
Sep 14, 2023, 11:48:08 AM9/14/23
to angleproj...@googlegroups.com

Comment #39 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c39


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/68bfa1edf513656e4a640771301b932fdffdac0c

commit 68bfa1edf513656e4a640771301b932fdffdac0c
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Aug 23 02:02:15 2023

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 <cc...@google.com>
Reviewed-by: Geoff Lang <geof...@chromium.org>

Reviewed-by: Shahbaz Youssefi <syou...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/ProgramImpl.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/include/platform/frontend_features.json
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/Context.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/metal/DisplayMtl.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/common/CompiledShaderState.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/common/CompiledShaderState.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/Shader.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/Context.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/Program.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/metal/DisplayMtl.mm
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/include/platform/autogen/FrontendFeatures_autogen.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/Program.cpp
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/68bfa1edf513656e4a640771301b932fdffdac0c/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm

Git Watcher via monorail

unread,
Sep 18, 2023, 2:35:11 PM9/18/23
to angleproj...@googlegroups.com

Comment #40 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c40


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/29561184ae5d589914d32052bde1050902cff599

commit 29561184ae5d589914d32052bde1050902cff599
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Sep 07 02:08:33 2023

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 <yux...@google.com>
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/ProgramLinkedResources.h
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/queryutils.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/Context.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/gl/StateManagerGL.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/validationES.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/capture/serialize.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/ProgramLinkedResources.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/Program.h
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/validationES31.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/validationES2.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/capture/FrameCapture.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/renderer_utils.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/validationES3.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/d3d/DynamicHLSL.h
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/Program.cpp
[modify] https://crrev.com/29561184ae5d589914d32052bde1050902cff599/src/libANGLE/renderer/metal/ProgramMtl.mm

Git Watcher via monorail

unread,
Sep 19, 2023, 6:14:21 AM9/19/23
to angleproj...@googlegroups.com

Comment #41 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c41


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/936694e3e890fd619486902ff379f7bd82502c21

commit 936694e3e890fd619486902ff379f7bd82502c21
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Sep 15 20:03:25 2023

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 <syou...@chromium.org>
Reviewed-by: Yuxin Hu <yux...@google.com>
Reviewed-by: Charlie Lao <cc...@google.com>
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/936694e3e890fd619486902ff379f7bd82502c21/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/936694e3e890fd619486902ff379f7bd82502c21/src/libANGLE/Program.cpp
[modify] https://crrev.com/936694e3e890fd619486902ff379f7bd82502c21/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/936694e3e890fd619486902ff379f7bd82502c21/src/libANGLE/ProgramPipeline.cpp

Git Watcher via monorail

unread,
Sep 19, 2023, 10:56:12 AM9/19/23
to angleproj...@googlegroups.com

Comment #42 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c42


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/eb0d59973d21f845b5785563f5d56b8ebb617478

commit eb0d59973d21f845b5785563f5d56b8ebb617478
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Sep 15 20:41:13 2023

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 <cc...@google.com>
Reviewed-by: Yuxin Hu <yux...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/null/ProgramNULL.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/Context.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/capture/serialize.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/Program.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/ProgramExecutableImpl.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/ProgramPipeline.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/gl/ProgramExecutableGL.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/renderer_utils.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/d3d/d3d11/Context11.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/tests/gl_tests/MultiDrawTest.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/GLES1Renderer.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/gl/ProgramGL.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/capture/FrameCapture.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/d3d/ProgramD3D.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/renderer_utils.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/null/ProgramExecutableNULL.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/vulkan/ProgramVk.h
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/Program.cpp
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm
[modify] https://crrev.com/eb0d59973d21f845b5785563f5d56b8ebb617478/src/libANGLE/ProgramPipeline.cpp

Git Watcher via monorail

unread,
Sep 26, 2023, 11:48:10 AM9/26/23
to angleproj...@googlegroups.com

Comment #43 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c43


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/97a4891213554c6ae278ee621a75736df4939529

commit 97a4891213554c6ae278ee621a75736df4939529
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Sep 26 14:31:58 2023

Turn is-link-thread-safe feature into a positive condition

Chrome's --disable-gpu-driver-bug-workarounds currently sets every
feature to false, which breaks the GL backend.

Bug: angleproject:8297
Change-Id: I284d0699e356d7c1a362eb992cdc0d052f9ea7c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887598
Reviewed-by: Geoff Lang <geof...@chromium.org>
Reviewed-by: Roman Lavrov <rom...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.h
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/vulkan/RendererVk.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/metal/DisplayMtl.mm
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/include/platform/autogen/FrontendFeatures_autogen.h
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/include/platform/frontend_features.json
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/Program.cpp
[modify] https://crrev.com/97a4891213554c6ae278ee621a75736df4939529/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp

Git Watcher via monorail

unread,
Nov 6, 2023, 3:28:13 PM11/6/23
to angleproj...@googlegroups.com

Comment #44 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c44


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/e7ce481fe52e62992fa3a205468eb2029c8e9545

commit e7ce481fe52e62992fa3a205468eb2029c8e9545
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Nov 02 02:44:22 2023

Consolidate parallel compilation in front-end

This cleans up the multiple compilation task implementations in the
backends and consolidates them in the front-end. The front-end is then
able to do the compilation in an unlocked tail call instead if
desired (in a future change).

This change is in preparation for having the program link tasks directly
wait on the shader compilation tasks. As a result, the "shader resolve"
should not be needed to access the shader compilation results; it should
be enough to wait for the compilation job. This change therefore moves
post-processing of results to the compilation job itself as they did not
need to actually be done after compilation is done (merely after
translation is done). As a side effect, shader substition and other
debug features should now work for the GL backend as they are now done
before back-end compilation.

Bug: angleproject:8297
Change-Id: Ib9274b1149fadca7545956a864d6635b6cba5c3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4994655
Reviewed-by: Geoff Lang <geof...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/vulkan/ShaderVk.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/null/ShaderNULL.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/Shader.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/vulkan/ShaderVk.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/metal/ShaderMtl.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/include/platform/frontend_features.json
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/null/ShaderNULL.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/capture/serialize.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/Shader.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/d3d/ShaderD3D.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/vulkan/RendererVk.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/metal/DisplayMtl.mm
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/include/platform/autogen/FrontendFeatures_autogen.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/metal/ShaderMtl.mm
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/ShaderImpl.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/d3d/ShaderD3D.cpp
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/gl/ShaderGL.h
[modify] https://crrev.com/e7ce481fe52e62992fa3a205468eb2029c8e9545/src/libANGLE/renderer/ShaderImpl.h

Git Watcher via monorail

unread,
Nov 6, 2023, 4:44:27 PM11/6/23
to angleproj...@googlegroups.com

Comment #45 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c45


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/c114fc265b807156db959411a2c61b1e2cb56a26

commit c114fc265b807156db959411a2c61b1e2cb56a26
Author: Shahbaz Youssefi <syou...@chromium.org>

Date: Mon Aug 28 19:40:26 2023

Reland: 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: Iccadc63a976689d7fa06d0a5ccfe81a594c424e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5003236

Reviewed-by: Geoff Lang <geof...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

ynovi… via monorail

unread,
Nov 7, 2023, 1:58:30 PM11/7/23
to angleproj...@googlegroups.com

Comment #46 on issue 8297 by ynovi...@chromium.org: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c46

The CL in comment #44 seems to be causing shader compilation problems on Android x86 and x64 emulators.
First seen in this roll: https://chromium-review.googlesource.com/c/chromium/src/+/5008801
https://ci.chromium.org/ui/p/chromium/builders/try/android-12-x64-rel/585363/overview
https://ci.chromium.org/ui/p/chromium/builders/try/android-x86-rel/39709/overview
But similar error show on the manual roll of the single CL: https://chromium-review.googlesource.com/c/chromium/src/+/5009463

Example logcat:
https://luci-logdog.appspot.com/logs/chromium/android/swarming/logcats/65c0e3dce216b011/+/logcat_logcat_android.assist.cts.WebViewTest.testWebView_shard0_20231107T045636-UTC_emulator-5554
11-06 20:56:41.941 12116 12238 E chromium: [ERROR:shared_context_state.cc(101)] Skia shader compilation error
11-06 20:56:41.941 12116 12238 E chromium: ------------------------
11-06 20:56:41.941 12116 12238 E chromium: #version 300 es
11-06 20:56:41.941 12116 12238 E chromium:
11-06 20:56:41.941 12116 12238 E chromium: precision mediump float;
11-06 20:56:41.942 12116 12238 E chromium: precision mediump sampler2D;
11-06 20:56:41.942 12116 12238 E chromium: out mediump vec4 sk_FragColor;
11-06 20:56:41.942 12116 12238 E chromium: uniform sampler2D uTextureSampler_0_S0;
11-06 20:56:41.942 12116 12238 E chromium: in highp vec2 vlocalCoord_S0;
11-06 20:56:41.942 12116 12238 E chromium: void main() {
11-06 20:56:41.942 12116 12238 E chromium: mediump vec4 outputColor_S0 = vec4(1.0);
11-06 20:56:41.942 12116 12238 E chromium: highp vec2 texCoord = vlocalCoord_S0;
11-06 20:56:41.942 12116 12238 E chromium: outputColor_S0 = texture(uTextureSampler_0_S0, texCoord, -0.5);
11-06 20:56:41.942 12116 12238 E chromium: {
11-06 20:56:41.942 12116 12238 E chromium: sk_FragColor = outputColor_S0;
11-06 20:56:41.942 12116 12238 E chromium: }
11-06 20:56:41.942 12116 12238 E chromium: }
11-06 20:56:41.943 12116 12238 E chromium:
11-06 20:56:41.943 12116 12238 E chromium: Errors:
11-06 20:56:41.943 12116 12238 E chromium: ERROR: 0:20: '
11-06 20:56:41.943 12116 12238 E chromium: ' : #version directive must occur on the first line of the shader
11-06 20:56:41.943 12116 12238 E chromium: ERROR: 0:21: 'out' : storage qualifier supported in GLSL ES 3.00 only
11-06 20:56:41.943 12116 12238 E chromium: ERROR: 0:23: 'in' : storage qualifier supported in GLSL ES 3.00 only
11-06 20:56:41.943 12116 12238 E chromium: ERROR: 0:27: 'texture' : no matching overloaded function found
11-06 20:56:41.943 12116 12238 E chromium: ERROR: 0:27: 'assign' : cannot convert from 'const mediump float' to '4-component vector of float'

Git Watcher via monorail

unread,
Nov 7, 2023, 5:46:11 PM11/7/23
to angleproj...@googlegroups.com

Comment #47 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c47


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/a494c1d6c8131a5316923bcc573f0908b1db4ef8

commit a494c1d6c8131a5316923bcc573f0908b1db4ef8
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Nov 07 21:29:07 2023

GL: Fix compilation on drivers sensitive to initial comment

Prior to
https://chromium-review.googlesource.com/c/angle/angle/+/4994655, debug
info was **prepended** to the translated source in the form of a comment
after the compilation was done. In that change, this was done after
translation and before the translated source was handed to the backend
compiler.

Some GL drivers however failed to compile the shader after this change
because the #version line was no longer the first one in the shader.

This is fixed by **appending** the debug info instead.

Bug: angleproject:8297
Change-Id: I88b31fa128de304dc8bf32289bf20a29169883a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5007223
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/a494c1d6c8131a5316923bcc573f0908b1db4ef8/src/libANGLE/Shader.cpp

Git Watcher via monorail

unread,
Nov 10, 2023, 2:18:13 PM11/10/23
to angleproj...@googlegroups.com

Comment #48 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c48


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/aec4ffac02c0a093c7ff03d2069c4660ce552599

commit aec4ffac02c0a093c7ff03d2069c4660ce552599
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Mon Nov 06 19:13:06 2023

Add a perf test for parallel compile and link

Bug: angleproject:8297
Change-Id: I40ec3af49bd0f5effbafc82b557840c615fd4c64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5008040
Reviewed-by: Charlie Lao <cc...@google.com>

Reviewed-by: Geoff Lang <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Nov 10, 2023, 3:16:36 PM11/10/23
to angleproj...@googlegroups.com

Comment #49 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c49


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/93b97a59aa8f7c193cdb78363ccc6e64a96b82df

commit 93b97a59aa8f7c193cdb78363ccc6e64a96b82df
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Sat Nov 04 02:07:23 2023

Make link job directly wait on compile job

Previously, program link waited on the compile job on the calling thread
before launching the link job. As a result, sequences of intermixed
compile and link would get largely serialized as such:

Main Thread Thread 1 Thread 2 Thread 3 Thread 4
Compile -------> Compile
Compile -----------|----------> Compile
Link | |
Wait | |
| | |
|<--------------/--------------/
\------------------------------------------> Link
Compile -------> Compile |
Compile -----------|----------> Compile |
Link | | |
Wait | | |
| | | |
|<--------------/--------------/ |
\---------------------------------------------|-----------> Link
Compile -------> Compile | |
Compile -----------|----------> Compile | |
Link | | | |
Wait | | | |
| | | | |
...

With this change, the main thread no longer waits for compilation to
finish. It's the link job itself that does the waiting. This allows
the main thread to go through Compile and Link commands without
blocking, generating as many jobs as needed. The above scenario
therefore becomes:

Main T1 T2 T3 T4 T5 T6 T7 T8 T9
C ----> C
C ------|----> C
L ------|------|----> L
C ------|------|-------W---> C
C ------|------|-------|-----|----> C
L ------|------|-------|-----|------|----> L
C ------|------|-------|-----|------|-------W---> C
C ------|------|-------|-----|------|-------|-----|----> C
L ------|------|-------|-----|------|-------|-----|------|----> L
. \-----\------>/ | | | | | W
. | \-----\------>/ | | |
. | | \-----\------>/
. | | |
. | | |

This greatly improves the amount of parallelism compile and link jobs
get.

The careful observer may note that the link job being blocked on the
compile job is now wasting a thread from the thread pool. While this
change is strictly an improvement, parallelism can be further improved
if the link job is just not assigned to a thread until the corresponding
compile jobs are finished. This is currently not possible, but may be
if:

- Instead of a thread pool, the operating system's FIFO scheduler is
used. Then the operating system would automatically put blocking
tasks to sleep and pick up another task. This has the downside of
requiring threads to be created for each task.
- The thread pool work scheduler is enhanced to be made aware of
relationship between tasks and avoid scheduling jobs whose
dependencies are not yet met.

Alternatively, the number of threads in the pool can be increased by 30%
and hope for the best.

Bug: angleproject:8297
Change-Id: If4e6540ade47558a10cfab55e2286f073b904928
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5006874
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>
Reviewed-by: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/common/CompiledShaderState.cpp
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/libANGLE/Program.h
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/libANGLE/Shader.h
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/common/CompiledShaderState.h
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/libANGLE/Program.cpp
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/93b97a59aa8f7c193cdb78363ccc6e64a96b82df/src/libANGLE/Shader.cpp

Git Watcher via monorail

unread,
Nov 10, 2023, 8:14:10 PM11/10/23
to angleproj...@googlegroups.com

Comment #50 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c50


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3

commit ade3dacd7168ffa4ad695f6ce94eb4aa904305f3
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Tue Nov 07 02:56:41 2023

Do compile/link unlocked if not threaded (but thread-safe)

If GL_KHR_parallel_shader_compile is not supported, or it is not used to
do threaded compilation and link, this change lets the compile and link
jobs be done after releasing the share group lock. With
multithreaded/multi-context applications, this allows the other context
(typically the main context) to make progress in the meantime.

A typical scenario where this optimization matters is games seamlessly
loading a new area of the game and performing compilation and link in a
separate context. Before this change, the game would stutter as the
compile/link jobs prevent the main thread from drawing anything. With
this change, the hitching is removed.

Bug: angleproject:8297
Change-Id: I702d84324a7442561b49677bf42c16d650304313
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5006640

Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Geoff Lang <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Program.h
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/common/WorkerThread.h
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Shader.h
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/scripts/code_generation_hashes/GL_EGL_entry_points.json
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/scripts/generate_entry_points.py
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/angletypes.h
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Context.cpp
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/common/WorkerThread.cpp
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Program.cpp
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Context.h
[modify] https://crrev.com/ade3dacd7168ffa4ad695f6ce94eb4aa904305f3/src/libANGLE/Shader.cpp

syous… via monorail

unread,
Nov 13, 2023, 11:01:17 AM11/13/23
to angleproj...@googlegroups.com
Updates:
Status: Fixed

Comment #51 on issue 8297 by syou...@chromium.org: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c51

Calling this done. See potential follow ups mentioned in Comment #49, which _may_ be helpful for the other backends if the apps did links without immediately resolving them (another idea is to prepend compile jobs while appending link jobs as a poor man's priority system). For Vulkan, the change in Comment #50 is all I really wanted to do all along.

syous… via monorail

unread,
Nov 15, 2023, 10:22:28 AM11/15/23
to angleproj...@googlegroups.com
Issue 8297: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297

This issue is now blocking issue 8417.
See https://bugs.chromium.org/p/angleproject/issues/detail?id=8417

Git Watcher via monorail

unread,
Nov 23, 2023, 8:31:26 PM11/23/23
to angleproj...@googlegroups.com

Comment #53 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c53


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/aa3bebf94d2fa2554f1f2bd32b4d9784142354d1

commit aa3bebf94d2fa2554f1f2bd32b4d9784142354d1
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Sun Nov 19 03:15:11 2023

GL: Fix parallel link query of in-progress link

Bug: angleproject:8297
Change-Id: Iab2f12467a2c567c945742435939057a40642951
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5042345
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Geoff Lang <geof...@chromium.org>

[modify] https://crrev.com/aa3bebf94d2fa2554f1f2bd32b4d9784142354d1/src/libANGLE/Program.cpp

Git Watcher via monorail

unread,
Nov 29, 2023, 9:55:28 PM11/29/23
to angleproj...@googlegroups.com

Comment #54 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c54


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/6f4f5e3992cb928860fb5906f17e1d695285eefa

commit 6f4f5e3992cb928860fb5906f17e1d695285eefa
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Sun Nov 19 03:15:49 2023

Fix checking result of link sub tasks

Bug: angleproject:8297
Change-Id: I143a26be6e7340a4a2d2b917bbe4dd9dd474f7af
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5042346

Reviewed-by: Geoff Lang <geof...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Mar 20, 2024, 2:17:32 PM3/20/24
to angleproj...@googlegroups.com

Comment #56 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c56


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/00eb6edba074a22389b09990ab856adfd417dd64

commit 00eb6edba074a22389b09990ab856adfd417dd64
Author: Mohan Maiya <m.m...@samsung.com>
Date: Wed Mar 20 13:49:38 2024

Rename LinkSubTask -> PostLinkTask

This is a renaming change, no behavior changes are expected.

Bug: angleproject:8297
Change-Id: I734c7959f5ed6db2447853cc6f6256e3c8e86213
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5382224
Commit-Queue: mohan maiya <m.m...@samsung.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/vulkan/vk_renderer.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/Program.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/ProgramImpl.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/metal/DisplayMtl.mm
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/include/platform/autogen/FrontendFeatures_autogen.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/include/platform/frontend_features.json
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/Context.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/tests/perf_tests/ParallelLinkProgramPerfTest.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/wgpu/ProgramWgpu.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/Program.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/ShaderImpl.h
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/tests/egl_tests/EGLBlobCacheTest.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/00eb6edba074a22389b09990ab856adfd417dd64/src/libANGLE/Context.h

Git Watcher via monorail

unread,
Mar 22, 2024, 1:30:28 AM3/22/24
to angleproj...@googlegroups.com

Comment #57 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c57


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ad013650bbf34e59d72452b7a4075352ac55d870

commit ad013650bbf34e59d72452b7a4075352ac55d870
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Fri Mar 22 03:42:44 2024

Revert "Rename LinkSubTask -> PostLinkTask"

This reverts commit 00eb6edba074a22389b09990ab856adfd417dd64.

Reason for revert: Sub tasks are not actually post-link tasks for all
the other backends (other than Vulkan), but they are a real part of
the link job.

Original change's description:

> Rename LinkSubTask -> PostLinkTask
>
> This is a renaming change, no behavior changes are expected.
>
> Bug: angleproject:8297
> Change-Id: I734c7959f5ed6db2447853cc6f6256e3c8e86213
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5382224
> Commit-Queue: mohan maiya <m.m...@samsung.com>
> Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

Bug: angleproject:8297
Change-Id: Iaebf9d165d810344bfc524042206ca427d270034
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5386432

Reviewed-by: Shahbaz Youssefi <syou...@google.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/vulkan/vk_renderer.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/util/autogen/angle_features_autogen.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/Program.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/ProgramImpl.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/metal/DisplayMtl.mm
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/include/platform/autogen/FrontendFeatures_autogen.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/util/autogen/angle_features_autogen.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/include/platform/frontend_features.json
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/Context.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/tests/perf_tests/ParallelLinkProgramPerfTest.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/metal/ProgramMtl.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/wgpu/ProgramWgpu.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/Program.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/ShaderImpl.h
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/tests/egl_tests/EGLBlobCacheTest.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/renderer/d3d/ProgramD3D.cpp
[modify] https://crrev.com/ad013650bbf34e59d72452b7a4075352ac55d870/src/libANGLE/Context.h

Git Watcher via monorail

unread,
Mar 24, 2024, 12:56:25 AM3/24/24
to angleproj...@googlegroups.com

Comment #58 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c58


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ee02014d875f45635779762a8ffd0aee1ec29990

commit ee02014d875f45635779762a8ffd0aee1ec29990
Author: Mohan Maiya <m.m...@samsung.com>
Date: Fri Mar 22 18:52:35 2024

Selectively wait for LinkSubTasks

Backends have the option to request frontend to run their LinkSubTask
post-link. Do not wait for such sub tasks during most glProgram APIs.
Note that we do wait for these "post-link sub tasks" incase of a program
relink or first use by a draw call.

Bug: angleproject:8297
Change-Id: I936fb5a127570f9dfa567ee8cbc02e25c4b70a6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5387064
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/wgpu/ProgramWgpu.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/Program.h
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/ProgramImpl.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/Program.cpp
[modify] https://crrev.com/ee02014d875f45635779762a8ffd0aee1ec29990/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Mar 29, 2024, 10:09:26 PM3/29/24
to angleproj...@googlegroups.com

Comment #59 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c59


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/e85bc34531a843851e04319150eb1e5f64046b3e

commit e85bc34531a843851e04319150eb1e5f64046b3e
Author: Mohan Maiya <m.m...@samsung.com>
Date: Fri Mar 29 20:43:46 2024

Account for disableProgramCaching

Blob cache tests rely on implicit caching of programs. Account for
disableProgramCaching frontend feature when saving and retrieving
from cache. Also skip EGLBlobCache tests if the feature is enabled.

Bug: angleproject:8297
Change-Id: Ib101eb5712deb7c04dd19c7092f93a6c6b42cd40
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5408103
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/e85bc34531a843851e04319150eb1e5f64046b3e/src/libANGLE/Program.cpp
[modify] https://crrev.com/e85bc34531a843851e04319150eb1e5f64046b3e/src/tests/egl_tests/EGLBlobCacheTest.cpp

Git Watcher via monorail

unread,
Apr 5, 2024, 1:17:26 PM4/5/24
to angleproj...@googlegroups.com

Comment #60 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c60


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/4a5d47df7876aedd8c16bc73afcbb8a3119a3f20

commit 4a5d47df7876aedd8c16bc73afcbb8a3119a3f20
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Thu Apr 04 20:41:46 2024

Test that binary is not saved after being loaded

Bug: angleproject:8297
Change-Id: I2e7e2ffb8fff37aba828d25825fe7ab3262406ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5426396

Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Charlie Lao <cc...@google.com>

Git Watcher via monorail

unread,
Apr 5, 2024, 3:41:28 PM4/5/24
to angleproj...@googlegroups.com

Comment #61 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c61


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ac654931c2899a10e088f543fca5ffda8724b289

commit ac654931c2899a10e088f543fca5ffda8724b289
Author: Mohan Maiya <m.m...@samsung.com>
Date: Thu Apr 04 22:42:47 2024

ProgramExecutable manages post-link tasks

Post-link tasks are now owned and managed by ProgramExecutable.

Also, update `LinkTask::link` API so backends have a choice to populate
either the linkSubTask or postLinkSubTask containers (but not both).

Bug: angleproject:8297
Change-Id: I5dbed6a070efe851fc1376699e9eccd3a21bd03f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5406487
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: mohan maiya <m.m...@samsung.com>
Reviewed-by: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/null/ProgramNULL.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/Program.h
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/ProgramImpl.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/ProgramImpl.h
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/wgpu/ProgramWgpu.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/gl/ProgramGL.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/Program.cpp
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/metal/ProgramMtl.mm
[modify] https://crrev.com/ac654931c2899a10e088f543fca5ffda8724b289/src/libANGLE/renderer/d3d/ProgramD3D.cpp

Git Watcher via monorail

unread,
Apr 5, 2024, 10:06:24 PM4/5/24
to angleproj...@googlegroups.com

Comment #62 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c62


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/06472a7e41b86265082b7ac4d05c49574a41e609

commit 06472a7e41b86265082b7ac4d05c49574a41e609
Author: Mohan Maiya <m.m...@samsung.com>
Date: Fri Apr 05 02:07:02 2024

Extend ProgramExecutableImpl API

waitForPostLinkTasks(...) will be called into by the frontend.
Backends can now choose to defer or avoid waiting for post-link tasks.

Also, move warmUp task code to ProgramExecutableVk in the Vulkan backend

Bug: angleproject:8297
Change-Id: Ia8a0682923e2f8c6287d62a606eed7f481cda08f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5427000
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/renderer/ProgramExecutableImpl.h
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/ProgramExecutable.cpp
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/ProgramExecutable.h
[modify] https://crrev.com/06472a7e41b86265082b7ac4d05c49574a41e609/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp

Git Watcher via monorail

unread,
Apr 5, 2024, 10:44:24 PM4/5/24
to angleproj...@googlegroups.com

Comment #63 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c63


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/924b40dc2d542961a25717617e85be39f989e0b1

commit 924b40dc2d542961a25717617e85be39f989e0b1
Author: Mohan Maiya <m.m...@samsung.com>
Date: Fri Apr 05 01:44:21 2024

Selectively wait for post-link tasks in the frontend

The frontend waits for post-link tasks only for a relink or in
syncState when `disableProgramCaching` feature is not enabled.

Bug: angleproject:8297
Change-Id: If7a3b8a10a2d01f82fd2bebac5c8f378be56e19e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5427001
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: mohan maiya <m.m...@samsung.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/924b40dc2d542961a25717617e85be39f989e0b1/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/924b40dc2d542961a25717617e85be39f989e0b1/src/libANGLE/renderer/vulkan/ContextVk.cpp
[modify] https://crrev.com/924b40dc2d542961a25717617e85be39f989e0b1/src/libANGLE/Program.cpp

Git Watcher via monorail

unread,
Apr 5, 2024, 11:17:25 PM4/5/24
to angleproj...@googlegroups.com

Comment #64 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c64


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/49e63e0751263a23b3c79f99c49175ac800ddda2

commit 49e63e0751263a23b3c79f99c49175ac800ddda2
Author: Mohan Maiya <m.m...@samsung.com>
Date: Wed Apr 03 20:22:30 2024

Vulkan: Selectively wait for WarmUp tasks

If the GraphicsPipelineDesc used by a draw call differs from the
one being used by the WarmUp tasks there is no need to wait for
their completion.

Bug: angleproject:8297
Change-Id: Ibbf3ee710036936060990455bb8657d83c7b6faf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5421594
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: mohan maiya <m.m...@samsung.com>

[modify] https://crrev.com/49e63e0751263a23b3c79f99c49175ac800ddda2/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp

Git Watcher via monorail

unread,
Apr 5, 2024, 11:17:40 PM4/5/24
to angleproj...@googlegroups.com

Comment #65 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c65


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ad13fec33da34c4bac8ef99441924e9386dd47c8

commit ad13fec33da34c4bac8ef99441924e9386dd47c8
Author: Mohan Maiya <m.m...@samsung.com>
Date: Sat Mar 30 22:31:49 2024

Vulkan: warmUpGraphicsPipelineCache(...) shouldn't set state

The prepareForWarmUpPipelineCache(...) method would have already setup
all necessary state for the warm up task. Make that intent explicit by
calling into a method that sets no state.

Bug: angleproject:8297
Change-Id: I959d8591045ff05ddb2a410fd0e0eda8dd692d37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5408796

Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: mohan maiya <m.m...@samsung.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Apr 8, 2024, 12:31:26 PM4/8/24
to angleproj...@googlegroups.com

Comment #66 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c66


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/ba208b45ad1c534fd8e16592ece34b5ea7b6592f

commit ba208b45ad1c534fd8e16592ece34b5ea7b6592f
Author: Mohan Maiya <m.m...@samsung.com>
Date: Sun Apr 07 04:08:15 2024

Vulkan: wait for post-link tasks in resetLayout

Wait for post-link tasks before resetting ProgramExecutableVk. Otherwise
mGraphicsProgramInfos, which post-link tasks use to create pipeline, can
be prematurely invalidated.

Bug: angleproject:8297
Tests: Texture2DTestES3YUV*DisableProgramCaching
Change-Id: Ib84cebad252777ae4c37cb32c455c326911416a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5430927

Commit-Queue: mohan maiya <m.m...@samsung.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

Git Watcher via monorail

unread,
Apr 9, 2024, 6:44:24 PM4/9/24
to angleproj...@googlegroups.com

Comment #67 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c67


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d1bffdb657d948a86e55784e1facffd0afe7cfb4

commit d1bffdb657d948a86e55784e1facffd0afe7cfb4
Author: Mohan Maiya <m.m...@samsung.com>
Date: Tue Apr 09 13:22:18 2024

Vulkan: Bugfix in WarmUpComputeTask

1. An early return caused compute warm up tasks to not be scheduled
2. There are usecases where a program is marked separable post-link.
Perform waitForPostLinkTasksImpl unconditionally during save(...)

Bug: angleproject:8297
Tests: ProgramBinaryES31Test.SeparableProgramLinkedUniforms*
Change-Id: I499f397b938677b4fcdb486001e0a75e202aaf5d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5439732
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/d1bffdb657d948a86e55784e1facffd0afe7cfb4/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp

Git Watcher via monorail

unread,
Apr 10, 2024, 2:35:39 PM4/10/24
to angleproj...@googlegroups.com

Comment #68 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c68


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/c139751042c5efbf63ae95c5fe7bb59378efadb3

commit c139751042c5efbf63ae95c5fe7bb59378efadb3
Author: Mohan Maiya <m.m...@samsung.com>
Date: Mon Apr 08 04:05:34 2024

Vulkan: Fix data race in WarmUpGraphicsTask

std::unordered_map doesn't support simultaneous read and write. Cache
placeholder PipelineHelper in WarmUpGraphicsTask and std::move the
newly created PipelineHelper when warm up is complete.

Bug: angleproject:8297
Change-Id: I1cc4b3cd48147d0080666d5669d61de006c2252d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5431830
Reviewed-by: Charlie Lao <cc...@google.com>

Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/ProgramVk.cpp
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/vk_cache_utils.h
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/tests/perf_tests/VulkanPipelineCachePerf.cpp
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
[modify] https://crrev.com/c139751042c5efbf63ae95c5fe7bb59378efadb3/src/libANGLE/renderer/vulkan/ProgramPipelineVk.cpp

Git Watcher via monorail

unread,
Apr 10, 2024, 6:19:33 PM4/10/24
to angleproj...@googlegroups.com

Comment #69 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c69


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/d9943e447f723429e24f6c708bf07658714ef10e

commit d9943e447f723429e24f6c708bf07658714ef10e
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Apr 10 03:53:48 2024

Remove Program::syncState

The last bit of responsibility still left in Program::syncState was to
wait for post-link tasks for the sake of EGLBlobCacheTest tests. A new
extension, GL_ANGLE_program_binary_readiness_query is created so that
the wait can be done in the test itself.

This extension is ultimately useful for applications as well, so they
can avoid blocking the CPU by calling glGetProgramBinary prematurely.

Bug: angleproject:8297
Change-Id: Ied6b755cb9b060198f82c7948bfd03441435a578
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5440302
Auto-Submit: Shahbaz Youssefi <syou...@chromium.org>
Reviewed-by: mohan maiya <m.m...@samsung.com>
Reviewed-by: Charlie Lao <cc...@google.com>
Commit-Queue: Charlie Lao <cc...@google.com>

[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/libGLESv2_no_capture_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/capture/capture_gles_ext_autogen.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/Context_gles_ext_autogen.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/interpreter_utils.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/doc/ExtensionSupport.md
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/queryutils.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/Context.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/entry_points_gles_ext_autogen.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/GL_EGL_WGL_loader.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/gles_extensions_autogen.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/common/gl_enum_utils_autogen.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/State.cpp
[add] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/extensions/ANGLE_program_binary_readiness_query.txt
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/validationESEXT_autogen.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/validationES.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/renderer/vulkan/vk_helpers.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/libGLESv2_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/State.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/GLES1Renderer.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/entry_points_gles_ext_autogen.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/Program.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/opengl32_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/opengl32_with_wgl_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/GL_EGL_entry_points.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/registry_xml.py
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/libGLESv2_with_capture_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/include/GLES2/gl2ext_angle.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/proc_table.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/gl_angle_ext.xml
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/Extension_files.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/gles_extensions_autogen.h
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libANGLE/Program.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/tests/egl_tests/EGLBlobCacheTest.cpp
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/scripts/code_generation_hashes/GLenum_value_to_string_map.json
[modify] https://crrev.com/d9943e447f723429e24f6c708bf07658714ef10e/src/libGLESv2/libGLESv2_autogen.cpp

Git Watcher via monorail

unread,
Apr 10, 2024, 8:42:25 PM4/10/24
to angleproj...@googlegroups.com

Comment #70 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c70


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/bc53f36023e0de23a3cd5d76961f0a2c3efdfd84

commit bc53f36023e0de23a3cd5d76961f0a2c3efdfd84
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Apr 10 20:08:23 2024

Vulkan: Improve pipeline warmup hit rate without GPL

When VK_EXT_graphics_pipeline_library is not in use, warmup would
practically always hit a perf warning about it mismatching the graphics
desc of the current draw call. This is because the color mask is not
set appropriately, which is what this change does.

Bug: angleproject:8297
Change-Id: Ie84660e493baf4370c09f43d50d57fc911bd1390
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5445483

Reviewed-by: mohan maiya <m.m...@samsung.com>
Reviewed-by: Charlie Lao <cc...@google.com>

Git Watcher via monorail

unread,
Apr 10, 2024, 9:22:24 PM4/10/24
to angleproj...@googlegroups.com

Comment #71 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c71


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/e41286e1092c950b64a6e6c6a46eb7c716d8a3a9

commit e41286e1092c950b64a6e6c6a46eb7c716d8a3a9
Author: Shahbaz Youssefi <syou...@chromium.org>
Date: Wed Apr 10 15:05:09 2024

Vulkan: Fix internal caching missing

Since the backend wait for post-link tasks was made possible [1], the
front-end may never get a chance to internally cache its binary. This
is because the decision to cache the binary was based on the existence
of post-link tasks, and the backend clearing that list made the
front-end confused.

In this change, a specific bool tracks whether binary is cached, and
that is checked at various times to make sure the binary cache is
eventually done.

[1]:https://chromium-review.googlesource.com/c/angle/angle/+/5427001

Bug: angleproject:8297
Change-Id: Iceefd0bca79d570d4910983be3660d6e725684a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5445484
Reviewed-by: Charlie Lao <cc...@google.com>
Reviewed-by: mohan maiya <m.m...@samsung.com>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/e41286e1092c950b64a6e6c6a46eb7c716d8a3a9/src/libANGLE/Program.h
[modify] https://crrev.com/e41286e1092c950b64a6e6c6a46eb7c716d8a3a9/src/libANGLE/State.cpp
[modify] https://crrev.com/e41286e1092c950b64a6e6c6a46eb7c716d8a3a9/src/libANGLE/Program.cpp
[modify] https://crrev.com/e41286e1092c950b64a6e6c6a46eb7c716d8a3a9/src/tests/egl_tests/EGLBlobCacheTest.cpp

Git Watcher via monorail

unread,
May 9, 2024, 3:55:27 PM5/9/24
to angleproj...@googlegroups.com

Comment #72 on issue 8297 by Git Watcher: Vulkan: Perform shader compile and program link without holding the share group lock
https://bugs.chromium.org/p/angleproject/issues/detail?id=8297#c72


The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/1202055c973b20e5367ab9fc27898d7d5a1a79d5

commit 1202055c973b20e5367ab9fc27898d7d5a1a79d5
Author: Mohan Maiya <m.m...@samsung.com>
Date: Thu May 09 16:25:38 2024

Vulkan: Updates to perf counters

1. don't reset pipeline cache hit / miss counters after every frame
2. bugfix in LinkTaskVk::getResult(...)
3. accumulate counters in WarmUpTaskCommon::getResultImpl(...)

Bug: angleproject:8297
Change-Id: I39d7e1a438d78e2e353c5cf8246fb24fb3cfefea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5529942

Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: mohan maiya <m.m...@samsung.com>

Reply all
Reply to author
Forward
0 new messages