|
7b4ff0b2
|
2025-10-01T16:30:47
|
|
Vulkan: Updates to onFramebufferBoundary
1. Rename to the more appropriate onFrameBoundary
2. Add method to renderer for better encapsulation
3. When being moved to the background some apps unMakeCurrent
the contexts and exit without calling other frame boundary
APIs. Handle such usecases by treating
ContextVk::onUnMakeCurrent(...) as a frame boundary
Bug: angleproject:386749841
Change-Id: Ic2a8ecb631d132d99f8508f45f3b454c49f6624e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/7004936
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
1ed999ea
|
2025-08-25T16:02:01
|
|
Vulkan: Move sampler cache to share group
The sampler cache (and the adjacent yuv-conversion-info cache) were in
vk::Renderer, but they were not thread safe.
Bug: angleproject:440364873
Change-Id: I2dc034f2db400f680ca91a9fde509d90f90c957e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6870736
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
dae3c851
|
2025-03-14T11:44:53
|
|
Vulkan: Bake non-shader state into linked pipeline
When using VK_EXT_graphics_pipeline_library, previously ANGLE would
create three pipelines libraries:
* The Shaders library was created based on the GL program's shaders + a
few static states. This typically hit the program's own pipeline's
cache that was warmed up during link.
* The VertexInput and FragmentOutput libraries were created at draw
time, which used the global pipeline cache
At draw time, immediately after creating the non-Shaders libraries, the
three libraries were linked into the final pipeline to be used by the
draw call.
This caused an inefficiency; because the non-Shaders libraries were
created independently from the Shaders library, they had to be compiled
pessimistically, for example because they could not be optimized to take
into account the precision of the fragment shader's outputs or whether
any value is const (typically alpha being set to one).
Given the creation of VertexInput and FragmentOutput libraries is
typically quite fast (the former being no-op and dynamic state anyway),
this change removes the need for creating those libraries, and directly
specifies the vertex input and fragment output state when creating the
final pipeline out of the Shaders library.
In this way, the same fragment output state can be tailored to the exact
shaders it is being used with and incur a smaller overhead. In this
change, the linked pipeline is cached in the GL program's pipeline
cache, which is never synced to the blob cache as producing it is
assumed to be fast already.
Bug: angleproject:42265839
Change-Id: I8496ea37771555522bdc9de94043a1b56fa5967e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6354205
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
cb31b886
|
2024-11-22T13:15:57
|
|
Vulkan: pruneDefaultBufferPools when there is excessive garbage
What commonly happens with game (and traces) is that we upload a lot of
textures before first frame is drawn. These texture uploads uses a lot
of buffer memory and creates peak memory usage moment if not clean up
quickly. This CL adds back the check if there is excessive suballocation
memory gets destroyed, don't wait until frame boundary to prune empty
buffer blocks. Do the prune immediately so that these memory could be
reused for other purpose for the first frame rendering.
Bug: angleproject:372268711
Change-Id: Ie548245b5ce108be0e2c19b296a28025bface395
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6043405
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
74f74b63
|
2024-11-14T10:07:34
|
|
Vulkan: Add ContextVk::onFramebufferBoundary() function
This makes a more formal API to track frame boundary. Also adds a
uint32_t mCurrentFrameCount to track the total number of frames rendered
so that we could use for heuristic purpose.
Bug: angleproject:372268711
Change-Id: I153497403ed0d8fde18f1786186ce600df60c514
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6022549
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
087cc411
|
2024-11-14T11:05:14
|
|
Vulkan: Add mRenderer to ShareGroupVk class
For convenience, instead of passing renderer to shareGroupVk's API, keep
mRenderer in SharGroupVk class at constructor call.
Bug: angleproject:372268711
Change-Id: I9534f7dbe24121856221b89ccf8fc6a353bbb0cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6022548
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
0636b509
|
2024-05-06T12:36:20
|
|
Vulkan: Move RefCountedEvent GC and recycler to ShareGroupVk (2/3)
One of the problem we had with RefCountedEvents is CPU overhead comes
with it, and some part of the CPU overhead is due to atomic reference
counting. The RefCountedEvents are only used by ImageHelper and
ImageHelpers are per share group, so they are already protected by front
end context share lock. The only reason we needs atomic here is due to
garbage cleanup, which runs in separate thread and will decrement the
refCount. The idea is to move that garbage list from RendererVk to
ShareGroupVk so that access of RefCountedEvents are all protected
already, thus we can remove the use of atomic. The down side with this
approach is that a share group will hold onto its event garbage and not
available for other context to reuse. But VkEvents are expected to be
very light weighted objects, so that should be acceptable.
This is the second CL in the series. In this CL, we added
RefCountedEventsGarbageRecycler to the ShareGroupVk which is responsible
to garbage collect and recycle RefCountedEvent. Since most of
ImageHelper code have only access to Context argument, for convenience
we also stored the RefCountedEventsGarbageRecycler pointer in the
vk::Context for easy access. vk::Context argument is also passed to
RefCounteEvent::init and release function so that it has access to the
recycler. The garbage collection happens when RefCountedEvent is needed.
The per renderer recycler is still kept to hold the RefCounteEvents that
gets released from ShareGroupVk or when it is released without access to
context information.
Bug: b/336844257
Change-Id: I36fe5d1c8dacdbe35bb2d380f94a32b9b72bbaa5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5529951
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
b4cf07c3
|
2024-03-27T15:58:04
|
|
Vulkan: Move the interface pipeline library caches to share group
When linking libraries into a pipeline, the linked pipeline lives in
ProgramExecutableVk and may be shared between contexts in a share group.
The caches for the vertex input and fragment output libraries thus
cannot live in the context, but should remain alive until all contexts
in the share group are destroyed.
This change moves these caches to the share group.
Bug: angleproject:8629
Change-Id: I2f7edf44d676505cf5e7e24640c6850c67f8b5e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5401514
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
efd41bd2
|
2024-03-15T13:25:03
|
|
Vulkan: Rename ResourceVk.* to vk_resource.*
This file adds helpers to namespace vk, so its name is changed for
consistency with other namespace vk files.
Bug: angleproject:8564
Change-Id: I6525e7609eb9385f2a3eecaa7c52b7417fda7f12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370108
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
60aaf4a0
|
2024-03-14T12:58:56
|
|
Vulkan: Move renderer to namespace vk
This class is agnostic of EGL. This change moves it to namespace vk for
use with the OpenCL implementation
Bug: angleproject:8564
Change-Id: I57f7807d6af8b3d5d7f8efbaf8b5d537a930f881
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5371324
Reviewed-by: Austin Annestrand <a.annestrand@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fc440afa
|
2024-02-16T13:57:32
|
|
Vulkan: Move DS builder class to Vk utils
Currently, UpdateDescriptorSetsBuilder lives in ShareGroupVk.cpp/h.
The UpdateDescriptorSetsBuilder isn't really GL-specific.
Thus it can be moved over to vk_cache_utils.h
(more of a Vk utility class).
Bug: angleproject:8546
Change-Id: I1ead04bab4c5840e6c471cdc7c5db4220e32bd50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5303540
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4b356c39
|
2023-08-17T10:49:19
|
|
Vulkan: Drop support for VMA 2.0
Since ANGLE and Chromium were last updated to use VMA 3.0, there have
been no breaking issues so far.
* ANGLE update: https://crrev.com/c/4777337
* Chromium update: https://crrev.com/c/4911597
Therefore, the support for the old VMA (2.3) can now be removed.
* Removed ANGLE_VMA_VERSION from the build files, since they are
no longer required.
* Removed the VMA-related guards in the code as well.
* Removed the flags and thresholds for the buddy algorithm, which were
used in VMA 2.3.
* Share group buffer pools is no longer a map.
Bug: b/303290680
Change-Id: Ic2b29e8f95ca5c941b297b20442c5bad4b8f52e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791667
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
571b4cdb
|
2023-08-14T16:55:28
|
|
Vulkan: Move pipeline/desc-set layout creation to link job
The pipeline and desc-set layout caches are consequently made
thread-safe. The reference counter on the layouts are also made atomic.
With this change, practically all of the link in the Vulkan backend is
moved to the link job.
Bug: angleproject:8297
Change-Id: Iba694ece5fc5510d34cce2c34441ae08ca5bb646
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774787
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cf2c9c56
|
2023-08-17T10:45:51
|
|
Vulkan: Add VMA 3.0 support in ANGLE
* Updated the VMA hash in the dependencies to the 3.0 version.
* Updated ANGLE_VMA_VERSION in the build_override GN file to 3.0.
* The ANGLE_VMA_VERSION in the root BUILD.gn is unchanged.
* The flags and thresholds for the buddy algorithm are only used when
the used VMA version is less than 3.0.
* The general algorithm is used for all cases for VMA 3.0.
Bug: b/295208838
Change-Id: I00a95a2c2513112f8888c40931da4e2e5db97e2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777337
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
52fe3116
|
2023-07-17T16:20:54
|
|
Vulkan: Deduplicate share group's context set tracking
Bug: angleproject:8224
Change-Id: I7a59a37229682fb91ff777f31e02e05d7ab2b80f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690345
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9f9284b7
|
2023-07-17T15:41:27
|
|
Move ShareGroup to its own files
Bug: angleproject:8224
Change-Id: Id6d272018bb5ee8c3e35488f641efa4d99fa836d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690003
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8049d082
|
2023-04-20T16:13:34
|
|
Vulkan: Split ShareGroupVk class from DisplayVK into its own files
When ShareGroupVk class was introduced, it is a bit of convenience to
put it in the DisplayVk.h and DisplayVk.cpp files. Now we have added
more and more code into ShareGroupVk class and it deserves to have its
own files. This CL added two files ShareGroupVk.h and ShareGroupVk.cpp
and moved the class into the new files. No functional change is
expected.
Bug: None
Change-Id: I8683a3dc4192612d6ec8abbc7f00424958f09598
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4454639
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|