src/libANGLE/renderer/vulkan/ShareGroupVk.cpp


Log

Author Commit Date CI Message
Amirali Abdolrashidi 84c30b76 2022-07-12T20:42:00 Vulkan: Add single-level mutable texture flushing So far, the feature to flush mutable textures after switching to a new texture only applied to textures with at least two mip levels. In that case, the whole mip chain would be allocated for those textures. This change will add single-level texture flushing as well. However, the it should be optimized to prevent allocating the whole mip chain for only one defined level, and reduce memory usage. * Updated the code for previous texture flushing to include one-mip textures as well. * Added the condition that the mutable texture not be bound as an attachment for flushing. * Changed ImageMipLevels::FullMipChain to ::EnabledLevels in order to limit the number of allocated mips. * Removed ::FullMipChain from ImageMipLevels. Bug: b/285613719 Change-Id: Ibc76917345820c5a0991f700e9fb93e4cda6efae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3763841 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao be8739f2 2023-09-22T14:36:45 Vulkan: Fix StatInfo in vk_mem_alloc_wrapper.h to match VMA Right now we are defining our own StatInfo structure in vk_mem_alloc_wrapper.h to avoid inclusion of VMA header directly in other ANGLE code. This caused this struct no longer matches VMA's structure since VMA 3.0 switch. For quick fix, this CL just update StatInfo to match VMA 3.0 define. Bug: b/301653706 Change-Id: Ic510c362f30d9296a13964e6ba9c617e80e49ceb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4888625 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 26148a02 2023-09-21T11:25:16 Vulkan: Minor cleanup of mPrevUploadedMutableTexture When texture is transit from mutable to immutable, we need to remove it from SharedGroupVk::mPrevUploadedMutableTexture if it is pointing to. Right now we did not clear the pointer, but rely on next texImage call to detect that mPrevUploadedMutableTexture is pointing to a immutable texture and then set it to new tetxure. This is a bit confusing since we only add a mutable texture to this mPrevUploadedMutableTexture pointer but at some point it becomes immutable. This CL changes to immediately reset the pointer when texture is respecified from mutable to immutable, and added assertion that mPrevUploadedMutableTexture is mutable. Bug: b/301289624 Change-Id: I97a11616887367cd4c2069419fe17d3dea052b50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879087 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi 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>
Shahbaz Youssefi 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>
Charlie Lao 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>