|
c292f292
|
2025-09-10T14:34:14
|
|
Vulkan: Remove compressVertexData feature
This feature was added for performance reason. It was used years ago to
improve performance of lego legacy. That entire game dashboard feature
was disabled a few years ago. So this code path is no longer been used
now, and not been tested on bots as well. This CL deletes this feature
and related code path so that we don't just leave it bit rotten.
Bug: b/167404532
Bug: b/439073246
Change-Id: I384fc97021592da57d38e8c1771892071ae68a89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6935271
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
428afbc2
|
2025-09-09T12:38:30
|
|
Vulkan: Remove hardcoded image layouts
In some places, ANGLE assumed and hardcoded the image layout. This was
often unnecessary, as the layout (or ImageAccess) was readily available
already.
In preparation for setting the image layout to GENERAL due to
VK_KHR_unified_image_layouts, this change makes sure the image layout is
not assumed to be anything specifically not GENERAL.
Bug: angleproject:422982681
Change-Id: I831bed0ca20197bd7424295ab0858d6bce83fe81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6932268
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e77725a4
|
2025-09-02T12:14:55
|
|
Add VkFormat id to descriptor cache key's imageSubresourceRange
This is to fix the bug when two shaders are modifying the same
texture buffer but with different formats, the old buffer view
with "incompatible" format can be reused.
Bug: b/443105853
Change-Id: Ic3b2202a7d1d408fbbf826414bfcf2b1df4c3a15
Test: GLSLTest.TextureBufferWritesUsingDifferentFormats
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6916350
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
166c9e23
|
2025-09-05T12:52:38
|
|
Vulkan: Separate barrier data into its file
vk::Renderer includes a modified copy of kImageMemoryBarrierData. When
using VK_KHR_unified_image_layouts, even more of this data is modified
based on device features. Leaving kImageMemoryBarrierData in
vk_helpers.cpp runs the risk that it's accessed directly instead of
using the copy in vk::Renderer.
Bug: angleproject:422982681
Change-Id: I7e288ef0ac519c53842214fe934ba7b2474e1f9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6927350
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ebf29178
|
2025-09-05T12:15:23
|
|
Vulkan: Rename ImageLayout to ImageAccess
This enum really describes how the image is accessed, including what
VkImageLayout it should be in for that access.
With VK_KHR_unified_image_layouts, it makes little sense to call this
enum ImageLayout anymore, given how almost all of them will have
VK_IMAGE_LAYOUT_GENERAL.
Bug: angleproject:422982681
Change-Id: Id0ea107d339457e90b7a167292b75211eb42f803
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6918518
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
0042de5f
|
2025-09-08T12:04:33
|
|
Vulkan: Rename ImageAccess to ImageFormatSupport
`ImageAccess` to be used for other purposes. Variable name `access` was
also identical to variables of `CommandBufferAccess`.
Bug: angleproject:422982681
Change-Id: I69b4d2bd773f1c5ff0fb15c7b611efd1f736061d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923330
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
25390156
|
2025-08-21T00:13:19
|
|
Suppress unsafe buffers on a file-by-file basis in src/ [1 of N]
In this CL, we suppress many files but stop short of actually
enabling the warning by not removing the line from the
unsafe_buffers_paths.txt file. That will happen in a follow-on
CL, along with resolving any stragglers missed here.
This is mostly a manual change so as to familiarize myself with
the kinds of issues faced by the Angle codebase when applying buffer
safety warnings.
-- Re-generate affected hashes.
-- Clang-format applied to all changed files.
-- Add a few missing .reserve() calls to vectors as noticed.
-- Fix some mismatches between file names and header comments.
-- Be more consistent with header comment format (blank lines and
trailing //-only lines when a filename comment adjoins license
boilerplate).
Bug: b/436880895
Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
677d8281
|
2025-08-25T15:59:46
|
|
Vulkan: Pass ContextVk to view-creation functions
In preparation for moving the ycbcr conversion cache to the share group.
This change is a no-op.
Bug: angleproject:440364873
Change-Id: I0c18062259b07813dd04ec02650bb6fab48947ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6879204
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
890b5d8f
|
2025-07-07T13:06:54
|
|
Vulkan: Encapsulate more descriptor set logic in ProgramExecutableVk
- ProgramExecutableVk handles SharedDescriptorSetCacheKey updates
- Inline most update*DescInfo methods
- Add dedicated methods to handle uniform and storage buffers to remove
some branches from frequently used code paths
Bug: angleproject:426412564
Tests: UniformBufferTest31.UniformBufferBindingRangeChangeWith*FBF
Change-Id: I54b8ae2bd8778231e4d187b2cfd30f4d71de7f3b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6733546
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
30a1cbc9
|
2025-07-03T13:00:05
|
|
Vulkan: Separate out descriptor set for uniform buffers
Bug: angleproject:426412564
Change-Id: Icdbb1e634fc543714d1e3b9cdba0530d400cb153
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6705153
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ce289330
|
2025-07-01T19:41:46
|
|
Vulkan: Simplify descriptor set management
- Descriptor logic is contained in ProgramExecutableVk and
doesn't leak into ContextVk
- Reduces CPU overhead by not having to constantly copy and
resize the DescriptorSetDescBuilder
- Simplifies decoupling of descriptor set of uniform buffers
from that of other shader resources
Bug: angleproject:426412564
Change-Id: Ic0926d0d466ea21f611c2b2c7b844e0bb9027c1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6702410
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b3ec3a5f
|
2025-06-23T14:51:13
|
|
Track active uniform and storage buffer blocks
Track active uniform and storage buffer block indices
so we can process updates to only active buffer blocks
Bug: angleproject:426412564
Change-Id: I54fa6fbe795073887646d672303d231ed4317b65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663825
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
2fd033d0
|
2025-05-22T04:21:11
|
|
Vulkan: Optimize updates to uniform buffers
... when only the offset is modified. Most of the work done when
handling dirty uniforms can be skipped since the buffer bindings
haven't changed
Bug: angleproject:386749841
Tests: UniformBufferTest31.UniformBufferBindingRangeChange*Vulkan
Change-Id: Ic811bd71f0f2993f88ce9bcf93f9e8e46dfc6d99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6581359
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
59281334
|
2025-05-22T17:13:22
|
|
Vulkan: Reduce kMaxEmptySlots for SharedDescriptorSetCacheKey
There is report that addKey is still showing up in simpleperf. This CL
breaks addKeyImpl into three functions so that SharedFramebufferCacheKey
will still have the same behavior. SharedDescriptorSetCacheKey is
changed to track 64 cache key at maximum, and updateEmptySlotBits() is
never called in SharedDescriptorSetCacheKey. This means the shared cache
key tracking is further limited to usage case where a buffer/texture is
only involved in less than 64 descriptorSets. Otherwise we will not
track the remaining DescriptorSets, which means if this buffer is
released, the corresponding descriptorSet will not immediately
destroyed, and we will rely on cache eviction code to take care of DS
growing problem.
Bug: b/384839847
Change-Id: I99abd17966446377babace6d06cc8f380a71c084
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6581492
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
d8c15499
|
2025-05-27T03:46:24
|
|
Vulkan: Clear depth and stencil unresolve separately
To take into account two situations.
1. LoadOp for depth and stencil attachments are set differently.
2. depth and stencil unresolves could be different between the
previous render pass and the current render pass.
Bug: angleproject:42266019
Change-Id: I9e069b3972f86abb84eee6280919e6bba2901225
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6590197
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c39f4a5c
|
2025-06-05T15:35:06
|
|
Vulkan: Update border color assignment for stencil
In texture border clamp, if the border color is assigned together
stencil mode (both using glTexParameter()), its red component is used
to set up a border color to be used in each backend:
* (Set up in AdjustBorderColor())
In the Vulkan backend, this is used when updating SamplerDesc, which
is then used later to set up the custom border color:
* (VkSamplerCustomBorderColorCreateInfoEXT)
According to the spec, in case of undefined format, integer border
color, and stencil image, the implementation is required to use either
the first or the second component of the custom color, although it is
recommended to use the first. However, at the moment, only the first
component is being populated, while using the second component is also
valid.
* Added feature: usesSecondComponentForStencilBorderColor
* Added bit to SamplerDesc: mUsesSecondComponentForStencil
* It is set based on the feature flag above and the texture format.
* When setting the custom border color info, the second component will
be used based on the above flag.
* Added test suites to test this on ES31 and ES32:
TextureBorderClampTestES3*.CustomBorderColorWithStencil*
* Updated capture params for glTexParameterIuivEXT().
* Suppressed the ES32 version for the following:
* P4
* Linux/NVIDIA (due to out-of-date driver)
Bug: b/390710636
Change-Id: Ie50c19e8ea66da40dc8b8db49d7e622a582637a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6626416
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
c45e7c83
|
2025-05-22T04:14:52
|
|
Vulkan: Optimize uniform and storage buffer updates
Maintain a map between buffer block index and its DescriptorDesc index
in WriteDescriptorDescs and look up the map instead of repeatedly
calculating it when updating DescriptorDesc
Bug: angleproject:386749841
Change-Id: I74d14f6205f07992fae1e338697998d04de1c563
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6603986
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
506f8a95
|
2025-05-08T17:03:30
|
|
Vulkan: Fix incorrect shaderWrite to shaderWrite detection
There is an optimization we added in
https://chromium-review.googlesource.com/c/angle/angle/+/5719258 that
avoids inserting WAW barrier in between two back to back shaderWrite to
the buffer, unless it is app introduced barrier via glMemoryBarrier call
(i.e, it is app's responsibility to issue such WAW barrier instead of
ANGLE). There is a bug in that logic that if there is a vertex read in
between two shaderWrite, we will incorrectly treat it like two
shaderWrites. That caused we skipped WAR before the second shaderWrite.
This CL fix the logic by also looking at read access on the buffer.
Bug: angleproject:350994515
Bug: angleproject:416573908
Change-Id: I5bbbeff4d7222a644d1c994bffda7fd9ea292c17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6526949
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
2ca90dab
|
2025-05-02T22:38:38
|
|
Vulkan: Don't calculate vertex input state when dynamic
When vertex input state is dynamic,
VkGraphicsPipelineCreateInfo::pVertexInputeState can be nullptr. This
change makes sure time is not wasted calculating this state at pipeline
creation time.
The change also ensures drivers don't rely on info provided at compile
time by mistake.
Bug: angleproject:42265637
Change-Id: I54da8be7769f0dd0767df6d7774baa956475bf8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6510082
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
f355e2b3
|
2025-04-15T18:58:25
|
|
Vulkan: Remove preferDriverUniformOverSpecConst
This was practically true for every vendor on Android (where rotation
matters). For Qualcomm, it was also true due to a bug in version
checking and didn't seem to be causing any concerns. Where pre-rotation
is supported, it is better to enable this feature to avoid excessive
pipeline creation.
This change removes the feature and makes sure ANGLE always uses
uniforms for rotation instead of spec consts. While technically this
may have an adverse effect on platforms that never need pre-rotation,
the ability is retained for all vendors since pre-rotation is finding
its way into more platforms and would likely eventually be needed
everywhere anyway.
Bug: angleproject:42265878
Bug: angleproject:42262166
Change-Id: I4b64c04da46db08cfdd44b60789b66d93d8e8b17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6459025
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Cody Northrop <cnorthrop@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>
|
|
0331847e
|
2025-03-07T16:32:41
|
|
Vulkan: Update VkGraphicsPipelineCreateInfo::flags
... with protected access bits if VK_EXT_pipeline_protected_access
is supported
Bug: angleproject:42265839
Bug: angleproject:391002353
Change-Id: Ibb00a4a0dcb1084046403bf4bfaeeb8d125b9aea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6336515
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ad6c3d74
|
2025-02-19T22:45:29
|
|
Vulkan: Fix RP resolve layouts w.r.t shared present mode
This is partially a regression after the previous change:
Vulkan: Fix present optimization w.r.t shared present mode
Before the above change, swapchain image was still optimized for present
even when using shared present mode. However, because
SetBitField(mAttachmentOps[packedAttachmentIndex].finalResolveLayout
line was using `getCurrentImageLayout()` (lucky coincidence) it was
setting correct SharedPresent layout into `finalResolveLayout`.
The `initialLayout` and reference `layout` was still
`VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL`, but for some reason VVL was
not producing any errors.
This change adds setting `finalResolveLayout` for the resolve
attachment, which in turn propagates
`VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR` to all renderpass layouts as well
as to the dynamic rendering info.
Test: angle_end2end_tests --gtest_filter=EGLSingleBufferTest.SharedPresentLayoutWithMSAA/*
Bug: angleproject:42262606
Change-Id: I49a121f1d43a078890b0dc32e0574a79e3565270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6281569
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
9df57ec5
|
2025-02-28T14:35:01
|
|
Vulkan: Limit max vector size of mEmptySlotBits to 4
Add another safety guard: in case of some uncommon usage case that we
end up with one buffer/texture is part of many descriptorSets, skip the
tracking logic in SharedCacheKeyManager to avoid the excessive overhead
associated with it. The only downside is that when BufferBlock gets
destroyed, we will not able to immediately destroy all cached
descriptorSets that it is part of. They will still gets evicted later on
if needed (see evictStaleDescriptorSets for detail). Based on 300+ app
traces we have, this appears very rare situation.
Also made this behavior limited to DescriptorSetCacheManager, so that
FramebufferCacheManager will not get affected. FramebufferCacheManager
does not have any cache eviction, so it is important that we always
destroy cache when texture is destroyed.
Bug: b/293297177
Bug: b/384839847
Change-Id: I0f1eb21b014f83675b14fb59ab59b5c694a421e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6314161
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
65343c4c
|
2025-02-27T11:23:04
|
|
Vulkan: Improve ConvertImageLayoutToVkImageLayout()
This CL removes supportsMixedReadWriteDepthStencilLayouts feature flag.
This feature flag was introduced when ANGLE only requires vulkan 1.0.
But now we require vulkan 1.1 and this is part of vulkan 1.1 core spec.
So it is no longer needed and wasting CPU cycles to check this every
time ConvertImageLayoutToVkImageLayout() is called.
With supportsMixedReadWriteDepthStencilLayouts removed, convert from
ImageLayout to VkImageLayout no longer needs renderer parameter. The
layout information in kImageMemoryBarrierData is never modified by
renderer at run time. So the renerer arguments has been removed in a lot
of places, avoids another pointer de-reference.
Bug: b/384839847
Change-Id: I5a89a890c0c0a1f99d2fdc1b2a85baf7de5c28bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310839
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e6d28755
|
2025-02-27T11:09:10
|
|
Vulkan: Use VkImageLayout in DescriptorInfoDesc
DescriptorInfoDesc is part of the cache key for descriptorSet cache.
Right now it uses ImageLayout for
DescriptorInfoDesc::imageLayoutOrRange. There are cases where two
ImageLayout have the exact same VkImageLayout, which end up with cache
miss. Switch to use VkImageLayout will make it cache hit. Given that
this field is uint32_t, we are not really getting any benefit by using
ImageLayout.
Bug: b/384839847
Change-Id: I14060c3faab701b76a554a1e3a07aff44e25d7cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310838
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
00f5944d
|
2025-02-26T15:42:14
|
|
Vulkan: Avoid duplicate sharedCacheKey in mDescriptorSetCacheManager
There are usage cases that same buffer/texture bound to multiple binding
points. When we have a cache miss, we end up walking through all binding
points and record the sharedCacheKey there (so that when the
buffer/texture is destroyed, the cache will be destroyed). This causes
same cacheKey added to the same buffer/texture multiple times. This CL
keeps track of last added sharedCacheKey and do a quick check against it
and it matches, we just early return. With this CL,
SharedCacheKeyManager::mEmptySlotBits max vector size reduced from ~200
to ~70 for batman_telltale.
Bug: b/384839847
Change-Id: I0d405c18b3f1c807da4c7a402392667630bd7f1f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6306687
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
9202e05a
|
2025-02-21T18:42:42
|
|
Vulkan: Invalidate the SharedCacheKey when cache gets evicted
When descriptorSet cache gets evicted, right now we have a bug that the
sharedCacheKey does not gets invalidated. This caused
SharedCacheKeyManager always think the sharedCacheKey is valid and the
mEmptySlotBits never gets cleared, which leads to mEmptySlotBits growth
over time, and increases CPU overhead when walking mEmptySlotBits
vector. This CL adds an assertion to ensure that all valid
sharedCacheKeys has a corresponding entry in the cache, which means
without this CL, some traces and dEQP tests are hitting the assertion.
This CL also fixes the bug.
Bug: b/384839847
Change-Id: If013443144aceb5d62f67f619074ef831e73653b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6292988
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ba174a76
|
2025-02-19T16:35:15
|
|
Vulkan: Bugfix for nullColorAttachmentWithExternalFormatResolve
When nullColorAttachmentWithExternalFormatResolve is VK_TRUE,
* The imageView in VkRenderingAttachmentInfo for dynamic rendering
should be VK_NULL_HANDLE.
* Push YUV resolveImageView as if it is the color attachment to ensure
the coherency between ops, clearValues and attachmentViews for both
dynamic rendering and render pass objects. Then pack the YUV resolve
information first as well.
* Add end2end tests that render and clear YUV with a depth attachment.
Bug: angleproject:395212980
Change-Id: I8b6173b41723ed7dc12359e181791fb1ac22fc41
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6262510
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
c96844d9
|
2025-02-14T10:26:25
|
|
Vulkan: More vector storage fix
BufferPool::mBufferBlocks reserves 32 entry storage based on data
gathered from trace.
BufferPool::mEmptyBufferBlocks switched to queue since we almost never
walk the entire list unless it gets destroyed.
Renderer::CollectGarbage is changed to take only one object. The only
time it get called with more than one object is from
ImageHelper::releaseImage(), which in this CL we now creates and pass
GarbageObjects to Renderer::collectGarbage directly. This also allows me
to delete recursive CollectGarbage() and DestroyGarbage() functions
(which is doing emplace_back quite often, even though only two entries).
PipelineHelper::mTransitions is updated to reserve storage for 8 entries
based on trace data.
Bug: b/293297177
Change-Id: I3e4552939a780dd26f9b7b8a67deee0d52d4f9bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6270518
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
2ba1f129
|
2025-02-11T15:27:16
|
|
Vulkan: Avoid storage reallocation in UpdateDescriptorSetsBuilder
UpdateDescriptorSetsBuilder::mDescriptorBufferInfos and
mDescriptorImageInfos will keep grow to a few hundreds of entries and
that grow will end up with data copy and patching mWriteDescriptorSets.
There is no requirement that entire vector of mDescriptorBufferInfos
andmDescriptorImageInfos must be continuous. The only requirement is
that when allocDescriptorBufferInfos(count) is called, the count of
entries must be continuous. This CL uses a queue of vectors so that when
we need to allocate new storage we just add another vector and allocate
out of the new vector. This avoids all related data copy.
Similar thing applies to mWriteDescriptorSets. The only thing I added
for mWriteDescriptorSets is that I try to grow the first vector big
enough to hold all of the entries for next submission to minimize the
vkUpdateDescriptorSets call.
Bug: b/293297177
Change-Id: Ief417ace8c8f7b477a1962505e9487bf31bae2ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6253675
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
b4cac1ad
|
2025-01-29T10:59:22
|
|
CL/VK: Hotfix: Implementation of Compute Pipeline Cache
Unnecessary "new" that was leaking when moving raw ptr
to cache map. Easy fix is to stack allocate and std::move
the object to container when finished initializing.
Bug: angleproject:391672281
Change-Id: I7b0f922de2a1332e8e452e87bc498d3c9907d7d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6214690
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
95635ef0
|
2025-01-23T16:30:41
|
|
CL/VK: Implementation of Compute Pipeline Cache.
Implemented ComputePipelineCache, hash map from OpenCL and
OpenGL compute state vectors to compiled pipelines. Implemented
ComputePipelineDesc, a tightly packed description of the current
compute state.
Compute Pipeline State includes the specialization constants,
Pipeline Options (Protected, Robust).
Updated-by: Austin Annestrand <a.annestrand@samsung.com>
Bug: angleproject:391672281
Change-Id: I88944dc169d194d1b2c75747769d7346b041fa75
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6191437
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
|
|
fbd230f5
|
2025-01-23T12:59:06
|
|
Vulkan: Split ErrorContext into ErrorContext and Context
ErrorContext continue to be context for error handling. vk::Context is
added to serve as common base class for ContextVk and CLContextVk.
Bug: angleproject:390443243
Change-Id: Ifac0b1d2d714ce610693ce60a35459c6c9cddf1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6191438
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c1214ec2
|
2025-01-22T14:22:56
|
|
Vulkan: Rename Context to ErrorContext
In preparation for adding another Context (derived by GL and CL
contexts), which includes logic that pertains to command recording (such
as barrier tracking).
Bug: angleproject:390443243
Change-Id: Idf495b62e63fb9aa901a2f16447fdaf3c2acd90b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6191248
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
40267ddc
|
2025-01-14T12:51:00
|
|
Vulkan: Add bufferWrite for multiple shader stages
This is mostly a clean up CL. When a buffer is used in multiple shader
stages, it was inserting barrier multiple times by calling bufferWrite
in a loop. This creates unnecessary barrier against one shader stage to
another shader stage. This CL adds a multiple shader stages version of
bufferWrite that takes "const gl::ShaderBitSet &writeShaderStages" as an
argument, in consistency to bufferRead. Otherwise this creates a problem
in future CLs where we use VkEvent to track the write and you end up
with WAW of the VkEvent that has not submitted.
Bug: angleproject:360274928
Bug: angleproject:42262235
Change-Id: I923dc9df39318d337f67f4fa0f6a68f336df24f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6180948
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1d25be59
|
2025-01-09T11:09:22
|
|
Vulkan: Pass Context instead of Renderer to BufferHelper APIs
This is preparation CL for later CL. In later CL we need to access
context argument in BufferHelper's barrier related functions. release()
also preferred to have context argument so that the events can be
recycled within share group. Because of this, a lot of functions has to
propagate back to pass context as argument instead of renderer.
Bug: angleproject:360274928
Change-Id: I13e930666eeeefbcff7b542d0e3126f3b07ce286
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6164686
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
711b2c32
|
2024-12-23T10:23:13
|
|
Vulkan: Let XFB's BufferHelper keep SharedDescriptorSetCacheKey
instead of BufferBlock. Unlike uniform buffers which uses
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the descriptorSet for
transform feedback buffers also have the buffer offset baked in, so it
is not helpful to use BufferBlock's serial in the cache key. This CL
changes to use BufferHelper's serial for cache key. With this we can
also let BufferHelper keep the SharedDescriptorSetCacheKey instead of
store it in the BufferBlock. In the case that BufferHelper gets
destroyed and recreated, the SharedDescriptorSetCacheKey will also get
destroyed. Right now because we cache BufferBlock serial, the
SharedDescriptorSetCacheKey will not be destroyed even though
BufferHelper is destroyed and there is very rare case that it can be
reused, thus causing BufferBlock's SharedDescriptorSetCacheKey queue
keep increasing, which causes perf issue.
Bug: b/384839847
Change-Id: I76b8f0d56486079740cca302e8b14a04a6e24074
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6115111
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
87d891dc
|
2024-12-13T19:51:42
|
|
Inline more tiny functions on hot path
Similar to https://crrev.com/c/6094283, not as hot but broader.
Highlighted by PGO profile of driver_overhead_2 trace combined with size
and offset of the corresponding .so sections to maximize reduction in
TLB misses.
Improves driver_overhead_2 performance by 1~2% on Pixel 8. Almost no
change in .so size as functions are tiny.
Bug: b/383305597
Change-Id: Ib1c021d4635141b879667b59305e4d45de7b8aef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6088958
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
fc4fc174
|
2024-12-10T22:01:28
|
|
Vulkan: Prevent crash with D/S FF without D/S attachment
The spec says that the values for gl_LastFragDepth/StencilARM are
undefined if there is no depth/stencil attachment. This "just" works on
tiling GPUs, because reading input attachments simply translates to
reading _something_ from the tile memory.
For ANGLE, the situation is a little more complicated. ANGLE has to
bind descriptors for input attachments (because non-tilers read from the
input attachment descriptor instead of using the knowledge that input
and color/depth/stencil attachments are one and the same thing in tile
memory). When a depth/stencil attachment is missing, there is no image
to bind to the descriptor set.
ANGLE cannot skip binding an image to the descriptor set, because
OpImageRead (translated from subpassLoad()) attempts to access the
input descriptor; skipping this causes an internal crash in SwiftShader
for example.
ANGLE cannot bind a bogus image as input attachment, as Vulkan requires
that input attachments are also color/depth/stencil attachments.
ANGLE _could_ bind a bogus image as input attachment and also as
depth/stencil attachment. This is rather risky, as it then also has to
be careful to make sure that depth/stencil attachment is never actually
used (i.e. it affects the depth/stencil state, load/store ops etc).
In this change, the shader itself is modified to remove references to
the depth/stencil input attachments if the attachment is missing. This
is rather inefficient, as it means the pipeline warmup will not produce
a usable pipeline, but it's accepted as a workaround for something apps
shouldn't really be doing.
Bug: angleproject:376572258
Change-Id: I0de68252b61615cb82cba7d1730699aadf41e92f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6085368
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7adbb3e8
|
2024-11-26T17:06:07
|
|
Vulkan: Remove explicit destroy calls
Since now SharedPtr will automatically call destroy(device) when last
reference goes away, there is no need for explicitly calling
destroy(device) any more.
Bug: angleproject:372268711
Change-Id: I208b17cf7e090babd51d6f337c20fdfd74c75b6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6052886
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
d81834b6
|
2024-11-26T15:25:35
|
|
Vulkan: Store VkDevice in vk::SharedPtr
So that we don't need to have two versions of destroy() APIs. In
previous CLs I had to add another version of destroy() that does not
take device argument due to SharedPtr may calls destroy when last
reference count goes away. Because we do not have device information at
that time, destroy() API was added but mostly just doing assertion that
Vulkan object has been explicitly destroyed. With this CL, we now stores
device in the SharedPtr so that we no longer need two destroy() APIs.
The explicit destroy(device) call will be removed in the next CL.
Bug: angleproject:372268711
Change-Id: Idcacbc3a922e17ac3d0f6056466b8f3aa084b02e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6052096
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f51170b3
|
2024-11-21T16:30:40
|
|
Enable GL_KHR_texture_compression_astc_hdr
Vulkan supports GL_KHR_texture_compression_astc_hdr,
so this extension can be enabled in Angle.
Bug: angleproject:379186304
Change-Id: I438a120c3f884a7eefcd883ad71abf68f81cb473
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038457
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6c1021ec
|
2024-11-22T16:48:45
|
|
Vulkan: Switch DescriptorSetLayout to use AtomicSharedPtr
SharedPtr has better semantics and safer to use. This CL removes direct
exposure of RefCounted object and also allows me to delete
BindingPointer class in later CL.
Bug: angleproject:372268711
Change-Id: I08a0dff3efcf794be843a4a548b9f2609bb9a5e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6044328
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2dc072ec
|
2024-11-22T16:14:52
|
|
Vulkan: Switch PipelineLayout from AtomicBind* to AtomicSharedPtr
AtomicSharedPtr/SharedPtr has better semantics and safer to use. This
will allow deleting BindingPointer in later CL.
Bug: angleproject:372268711
Change-Id: Ife20f68b2277a1913b06be0de153770214ac964a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6044326
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
87d61997
|
2024-11-21T14:20:55
|
|
Vulkan: Switch ShaderModule to use SharedPtr
This CL gets rid of many vk::RefCounted<vk::ShaderModule> usage which is
risky due to it allows you to direct manipulate reference count. Switch
to vk::SharedPtr manages the reference counting automatically.
Bug: angleproject:372268711
Change-Id: I14f5c509bcbd9ea7d17101637e033652a68710a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6039117
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
21d747de
|
2024-11-20T11:54:15
|
|
Vulkan: Use vk::SharedPtr for SharedDescriptorSetCacheKey
This CL switches SharedDescriptorSetCacheKey from using c++
std::shared_ptr to our internal version of vk::SharedPtr. Also get rid
of an extra pointer indirection that SharedDescriptorSetCacheKey is a
reference counted of actual cache key instead of std::unique_ptr of
cache key.
Bug: angleproject:372268711
Change-Id: Id9af5070d24f67711d6decc3a30a260b8d4062d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6036302
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
8e0178fb
|
2024-11-19T13:31:45
|
|
Vulkan: Switch SamplerBinding to Use SharedPtr
Another step to remove vk::BindingPointer. SharedPtr is used and
SamplerBinding is renamed to SharedSamplerPtr. This also removed
RefCountedSampler to avoid direct expose of RefCounted<SamplerHelper>
which is risky due to ability of change reference count directly.
Bug: angleproject:372268711
Change-Id: Ia6f352186a4f75ab9ce3396f298e33f70cd61a1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6036294
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2b8d6bbe
|
2024-11-01T11:23:35
|
|
Vulkan: Use UpdateFullTexturesDescriptorSet when cache missed
DescriptorSetDescBuilder::updateDescriptorSet() relies on the cache key
to build descriptorSet. UpdateFullTexturesDescriptorSet() builds
descriptorSet directly from state, it does not use cache key. Test shows
UpdateFullTexturesDescriptorSet is much faster than
updateActiveTexturesForCacheMiss and updateDescriptorSet pair. This CL
removes updateActiveTexturesForCacheMiss() function and uses
UpdateFullTexturesDescriptorSet for cache miss case.
The timing code is added around the cache miss functions to measure the
time.
Old:
asphalt_9 average 7,554 nanosec
gl_driver2_off: 20,354 nanosec
batman_telltale: 12,992 nanosec
New:
asphalt_9 average 916 nanosec
gl_driver2_off: 1,839 nanosec
batman_telltale: 3,437 nanosec
Bug: angleproject:372268711
Change-Id: I176d67ed732c3fe3a18a079df7c4973aa926087a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5984893
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fbe34df7
|
2024-10-29T16:19:29
|
|
Vulkan: More texture descriptorSet code cleanup
Removed unused argument `pipelineType` from
updateActiveTexturesForCacheMiss().
Removed unused argument `context` from getReadImageView()
Rename getBufferViewAndRecordUse() to getBufferView() since there is no
"record use" happening.
Moved UpdateFullActiveTexturesDescriptorSet() function from
vk_cache_utils.cpp to ProgramExecutableVk.cpp anonymous name space,
since it is only used in this file.
Bug: angleproject:372268711
Change-Id: Ib7240c1063f727fb52588234e79fba349f9aff9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5977481
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
a21b7ad0
|
2024-04-24T02:11:42
|
|
CL/Vulkan: Add skeleton for CLSamplerVk
* It is setup to be a wrapper for the SamplerHelper interface
Bug: angleproject:42266936
Change-Id: Iac7e80c4d5262687d98a8188a60a24a9be190dc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5801184
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5c26ffea
|
2024-10-29T11:11:38
|
|
Vulkan: Optmize descriptorSet cache disable code path
Right now the way it works is that it first computes the cache key and
then use the cache key to look in the cache. If cache misses, then it
builds descriptorSet out of the cache Key. This might make sense if
cache is enabled. If cache is disabled then no need to go through the
middle man. This CL skip all the cache key build up entirely and
directly build descriptorSet out of context state. In this CL,
updateFullActiveTextures() and updateDescriptorSet() are merged into one
function UpdateFullActiveTexturesDescriptorSet() which updates
VkWriteDescriptorSet directly.
Bug: angleproject:372268711
Change-Id: I7ba0c60a23b967d1ac903020d04022405c29e354
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972508
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
08c1724f
|
2024-10-11T14:29:00
|
|
Vulkan: Support GL_ARM_shader_framebuffer_fetch_depth_stencil
Bug: angleproject:352364582
Change-Id: I63fd78314fa7ebccbf366c252e309a9c0f09c8c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938150
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
65fcf9c4
|
2024-10-26T10:53:18
|
|
Vulkan: Remove redundant dependent feature checks
Since [1], when a feature is overriden, the dependent features
automatically take the override into account. Tests no longer need to
account for dependent features, neither does the logic in the code.
[1]:https://chromium-review.googlesource.com/c/angle/angle/+/4749524
Bug: angleproject:42266725
Change-Id: I5440aba4a89cffbe710e26ad7de4cfee783e9bdf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5967414
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9a4c7495
|
2024-10-15T13:05:28
|
|
Vulkan: Add feature flag to enable descriptorSet cache
So that we can disable it to compare the performance difference.
Bug: angleproject:372268711
Change-Id: I02da254e5d58815741080634a2dd005617aa7432
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5936135
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
31c80bbf
|
2024-10-17T10:56:16
|
|
Vulkan: Avoid redundant work in updateFullActiveTextures
ContextVk keeps mActiveTexturesDesc, which gets updated by
UpdatePreCacheActiveTextures(). This is only used for cache lookup. When
there is a cache miss, we end up call updateFullActiveTextures() which
recomputes DescriptorSetDesc again, which is redundant work.
This CL removes mActiveTexturesDesc from ContextVk.
UpdatePreCacheActiveTextures has been changed to be a
DescriptorSetDescBuilder method so that it can directly update the
mDesc. updateFullActiveTextures has been renamed to
updateActiveTexturesForCacheMiss which avoid mDesc calculation.
updateFullActiveTextures is still kept for now which will be used in
next CL when cache is disabled.
Bug: b/372268711
Change-Id: Ic9a0cdaa7cefca5f72b599d26d079cef14888f07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905766
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
a1584f49
|
2024-10-11T21:17:32
|
|
Vulkan: Qualify framebuffer fetch with "Color"
In preparation for depth/stencil framebuffer fetch, many framebuffer
fetch symbols are affixed with Color to indicate that they pertain to
color framebuffer fetch logic.
Bug: angleproject:352364582
Change-Id: I86000ada5e6ef47387dec0b6a3fca589d816cdc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5926593
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
1608d0be
|
2024-10-10T16:53:15
|
|
Vulkan: Isolate framebuffer fetch no-RP-break optim from DR
Prior to [1], changes to framebuffer fetch usage by shaders caused a
render pass break. This was due to a limitation of render pass
compatibility rules. It also caused other headache, such as needing to
clear the render pass cache, recreating pipelines etc.
[1]:https://chromium-review.googlesource.com/c/angle/angle/+/3697308
In [1] an important optimization was implemented for tiling GPUs where
ANGLE permanently switched to framebuffer fetch mode on first
encountering framebuffer fetch use. From that point on, ANGLE would
always make every render pass framebuffer fetch compatible.
In reality, the render pass break was unnecessary, which became apparent
with dynamic rendering (for example that whether the render pass
includes input attachments has no bearing on a pipeline that doesn't use
input attachments at all). In [2], dynamic rendering kept the render
pass break + permanent switch behavior for simplicity.
[2]:https://chromium-review.googlesource.com/c/angle/angle/+/5637155
This change untangles the optimization done for legacy render passes
from dynamic rendering, allowing dynamic rendering to start every render
pass without framebuffer fetch and enable it later if a framebuffer
fetch program is used.
This is in preparation for supporting depth/stencil framebuffer fetch,
where a perma-switch is troublesome (for example in combination with
read-only depth/stencil feedback loops).
Bug: angleproject:352364582
Change-Id: I31221cf22a28d58b9b2bf188e9c0b786cd0fe3d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5923120
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
78a694a1
|
2024-10-10T14:08:31
|
|
Bugfix for ms_to_ss in dynamic rendering
VkMultisampledRenderToSingleSampledInfoEXT should be added into
VkRenderingInfo.pNext when using dynamic rendering pass.
Bug: angleproject:370153437
Change-Id: If9377362d95c60e610ec978eb684918de9807342
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5922915
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b3d85cce
|
2024-09-30T14:28:35
|
|
Vulkan: Consolidate write colorspace override states
ColorspaceState struct is now used to cache write colorspace related
states to determine the colorspace of Vulkan draw image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final write colorspace.
We can now fully support rendering to EGLImages, with colorspace
overrides, via texture or renderbuffer EGLImage targets
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
ReadPixelsPBOTest.SrgbUnorm*Vulkan
Change-Id: I2be2cd3b5b2b4ac8ecb803c34cde2b846cbd1cbe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5901256
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
b38cc7fa
|
2024-09-30T12:43:09
|
|
Vulkan: Consolidate read colorspace override states
ColorspaceState struct is now used to cache read colorspace related
states to determine the colorspace of Vulkan read image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final read colorspace.
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
SRGBTextureTest.SRGB*TextureParameter*Vulkan
SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
Change-Id: I16b3666cd80865936b826dc0738fc9210dabeda9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5901255
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
b61f9f9e
|
2024-10-04T11:07:23
|
|
Vulkan: Add operator<< for descriptorSet for debugging
Right now it is using streamOut() function which is hard to use with
WARN(). This replaces the streamOut function with standard c++
operator<< so that we can use in WARN()/INFO() along with other logs for
debugging.
Bug: b/368566032
Change-Id: Iec98b4c59f360cbbfb8fbdd85d5d1150fcca8f4a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5908773
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eb4eaea9
|
2024-10-03T17:15:21
|
|
Vulkan: Improve SharedCacheKeyManager::addKey performance
This function walks a vector of keys. When there are many keys this
could be slow. Also when we have to grow the vector size, it involves
memory reallocation which means copy the data from old storage to new
storage. This CL changes mSharedCacheKeys to use std::deque instead of
vector which solves storage reallocation problem. It also adds
angle::BitSet64<64> to track all available (i.e., empty) slots in
mSharedCacheKeys so that we don't have to loop most of time. You only
loop all keys once to find all empty slots and then subsequent addKey()
call will be O(1) until all empty slots are used.
Bug: b/368566032
Change-Id: I4d32b461761f1cd64380f5527883b84357bb44c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5908690
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eaffa034
|
2024-09-24T20:56:04
|
|
Revert "Vulkan: Consolidate colorspace override states"
This reverts commit bffcd235ba6c031603d798daaa98f1cf9a3f3e46.
Reason for revert: Breaks Android test `org.skia.skqp.SkQPRunner#UnitTest_DMSAA_dst_read`. Details:
https://b.corp.google.com/issues/369388539.
Original change's description:
> Vulkan: Consolidate colorspace override states
>
> ColorspaceState struct is now used to cache colorspace related states
> and used to determine the colorspace of Vulkan image views.
> ImageViewHelper methods are called during initialization and when
> colorspace related states are toggled dynamically which in turn process
> these states and determine the final read and write colorspaces.
>
> We can now fully support rendering to EGLImages, with colorspace
> overrides, via texture or renderbuffer EGLImage targets
>
> Bug: angleproject:40644776
> Tests: ImageTest*Colorspace*Vulkan
> MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
> SRGBTextureTest.SRGB*TextureParameter*Vulkan
> SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
> ReadPixelsPBOTest.SrgbUnorm*Vulkan
> Change-Id: I1cc2b5bd834b519b83deab4d80a2fcaabeb271d6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5841290
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Bug: angleproject:40644776
Change-Id: I5bf6cf2ed0c8ec22fc02d8c3da92673ee85fe002
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5888506
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
bffcd235
|
2024-09-13T14:58:00
|
|
Vulkan: Consolidate colorspace override states
ColorspaceState struct is now used to cache colorspace related states
and used to determine the colorspace of Vulkan image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final read and write colorspaces.
We can now fully support rendering to EGLImages, with colorspace
overrides, via texture or renderbuffer EGLImage targets
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
SRGBTextureTest.SRGB*TextureParameter*Vulkan
SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
ReadPixelsPBOTest.SrgbUnorm*Vulkan
Change-Id: I1cc2b5bd834b519b83deab4d80a2fcaabeb271d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5841290
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
167b9e8d
|
2024-09-18T21:51:38
|
|
Vulkan: Fix pipeline cache store vs monolithic pipeline race
The thread that creates monolithic pipelines needs to hold the pipeline
cache lock, as well as the thread that stores the pipeline cache
contents to the blob cache.
Bug: angleproject:42265839
Change-Id: I17cf9d2bb3f27d531f368003cb4ee00007a464fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5872715
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f8fc8ac3
|
2024-08-05T11:50:11
|
|
Vulkan: Remove dependency on ContextVk for CommandBufferHelper
Following on the changes in [1], this makes the
`CommandBufferHelperCommon` and `OutsideRenderPassCommandBufferHelper`
interfaces independent of `ContextVk` state. Any dependency is made
explicit.
In addition, interfaces that are not specific to GLES context are also
updated.
[1]: Commit (bcf814fda5 Vulkan: Constrain the dependency on ContextVk in
BufferHelper)
Bug: angleproject:8544
Change-Id: I7d90ad915e8c14187ab5584453b9e8802bd91e2b
Signed-off-by: Gowtham Tammana <g.tammana@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5319147
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
26cdf621
|
2024-07-31T14:43:12
|
|
Vulkan: Bugfix in dynamic rendering support
Fix 2 bugs -
1. Set VkGraphicsPipelineCreateInfo::flags when linking GPLs
2. Chain VkRenderingFragmentShadingRateAttachmentInfoKHR struct in
VkRenderingInfo::pNext
Bug: angleproject:42267038
Change-Id: I456c75d57ec64926a21dffe93b05e1bbab2cb262
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5754635
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c77bb75
|
2024-07-24T12:05:29
|
|
Vulkan: Remove implicit buffer barrier for shader write
When app uses shaders to write to SSBO, right now we are inserting an
implicit barrier to ensure WAW are in order. But Spec says that
"Explicit synchronization is required to ensure that the effects of
buffer and texture data stores performed by shaders will be visible to
subsequent operations using the same objects". This CL removes the
implicit barrier for buffer write if the current write comes from
shaders and relies on explicit glMemoryBarrier to insert a global
barrier.
Bug: angleproject:350994515
Change-Id: I8ab039610be9be2ded27ea60dab54bdad08502f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5719258
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
7691cea7
|
2024-07-22T13:46:14
|
|
Vulkan: Remove seamful cubemap emulation
Practically, the Vulkan backend is never expected to run on ES2
hardware. It _may_ for WebGL, but seamful cubemap emulation was
disabled for webgl anyway.
Bug: angleproject:354729454
Change-Id: Iafa20fbdbe232c4df4c777b12e7698ef7a87cf24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5730143
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
1db80b88
|
2024-07-10T12:47:42
|
|
Reland "Vulkan: Use VK_KHR_dynamic_rendering[_local_read]"
This is a reland of commit c379ff48043a47e444c388c45270db40d3172d50
Original change's description:
> Vulkan: Use VK_KHR_dynamic_rendering[_local_read]
>
> Bug: angleproject:42267038
> Change-Id: I1f4eb0f309992a9c1c287a69520dadf5eff23b26
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637155
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:42267038
Change-Id: I083e6963b5421386695e49a9872edbb2016c9763
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691342
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
1f87cbc9
|
2024-07-15T13:07:35
|
|
Vulkan: Fix late-added resolve attachment tracking
Resolve attachments may be added after the fact to a render pass due to
glBlitFramebuffer or eglSwapBuffer. Previously, only the resolve image
views were tracked by the render pass, and otherwise the state tracking
(layout, content defined, etc) treated the resolve images as generically
written-to by the render pass.
As a result, the render pass was unable to finalize the layout of the
resolve images early. Optimizing the layout of the swapchain image when
the surface is multisampled for example was not done due to this issue.
In this change, when resolve attachments are added late, they are
tracked identically to when they are added at the beginning of the
render pass, fixing the issues described above.
Bug: angleproject:42265625
Bug: angleproject:42266019
Change-Id: I765560762bb8caf39ba1096fb028177201c082d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5707470
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7d461b21
|
2024-07-10T14:11:53
|
|
Revert "Vulkan: Use VK_KHR_dynamic_rendering[_local_read]"
This reverts commit c379ff48043a47e444c388c45270db40d3172d50.
Reason for revert: Regresses CPU perf and memory when _not_ using DR
Original change's description:
> Vulkan: Use VK_KHR_dynamic_rendering[_local_read]
>
> Bug: angleproject:42267038
> Change-Id: I1f4eb0f309992a9c1c287a69520dadf5eff23b26
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637155
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:42267038
Change-Id: I3865f0d86813f0eeb9085a92875a33bd449b907f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691337
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c379ff48
|
2024-06-10T22:01:57
|
|
Vulkan: Use VK_KHR_dynamic_rendering[_local_read]
Bug: angleproject:42267038
Change-Id: I1f4eb0f309992a9c1c287a69520dadf5eff23b26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637155
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
7d61980e
|
2024-06-26T18:39:53
|
|
Vulkan: Rename DescriptorSetLayoutDesc update() to addBinding()
The `update()` method is never actually used to update the exiting
bindings (but rather to add new ones), this change renames the method
to `addBinding()` and adds few ASSERTs for clarity.
Also, after recent changes in `DescriptorSetLayoutDesc` class, some
changes made by `update()` method are irreversible. It is possible
to have different descriptions that will produce same layout if use
`update()` to rewrite the existing structure.
Bug: angleproject:8677
Change-Id: If85eb2b271bc06843ee9326c024d73801d3da091
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5676345
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a1dea207
|
2024-06-13T11:40:39
|
|
Implement KHR_blend_equation_advanced_coherent
* Updated the validation for glBlendBarrier() and ~KHR().
* GL state now includes mBlendAdvancedCoherent.
* Updated glEnable() to accept GL_BLEND_ADVANCED_COHERENT_KHR.
* It can be queried via glGetIntegerv(), etc.
* EXTENDED_DIRTY_BIT_BLEND_ADVANCED_COHERENT added.
* Added a corresponding bit to ExternalContextState.
* If coherence is supported, there should be no need to use blend
barriers, as, based on the spec, the advanced blend ops should
then follow order like the basic blend ops.
* Relevant tests: *GLES31.functional.blend_equation_advanced.coherent*
* On Linux/NVIDIA: From "Not supported" to "Passed"
Bug: angleproject:42262258
Change-Id: I7e0e43bdc71524eec111c2d3b024fe73c9795e55
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634381
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d0744916
|
2024-05-07T12:52:53
|
|
Vulkan: Smaller PackedDescriptorSetBinding
Bug: angleproject:8677
Change-Id: Id7bcef8de129514446384a019b6cce95da13b028
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5522755
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
65f8dc8e
|
2024-06-12T17:01:54
|
|
Vulkan: Remove traces of VK_MSRTSS_GOOGLEX
Devices that shipped this unreleased extension should have long been
updated to VK_MSRTSS_EXT
Bug: angleproject:4836
Change-Id: I23736ebf28afd4a6f3b5b0d5a6417b3e7564c293
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5627575
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
295ff607
|
2024-06-05T14:49:33
|
|
Vulkan: Precompute stageMask of kImageMemoryBarrierData
Right now every time we need a pipelineStage in kImageMemoryBarrierData,
we are doing a bitwise AND with
mSupportedVulkanPipelineStageMask. This get called multiple
times from barrier call. This CL adds
mImageLayoutAndMemoryBarrierDataMap that has already precomputed all
stageMask, thus avoid run time bitwise OR.
This CL also precomputes the bufferWritePipelineStageMask so that
flushImpl can be use it without construct every time.
Bug: b/345279810
Change-Id: I878bd31c967cd217477061976f07df13b043fa7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601073
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
6aad8a89
|
2024-05-31T14:46:28
|
|
Vulkan: Remove combineAllShadersInPipelineLibrary
If we have VK_NULL_HANDLE as the descriptor set layout handle for both
pre-rasterization and fragment shader subset pipelines
we run into VVL - VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681
Need to work around this by having the renderer store a placeholder
descriptor set layout handle for an empty DescriptorSetLayoutDesc
that can be reused across all contexts
Bug: angleproject:8677
Tests: EGLMultiContextTest.NonSharedContextsReuseDescritorSetLayoutHandle*
Change-Id: I22e7f39c497d7f668afe7cb26690f6a9de49831b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5587990
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c3a1cae4
|
2024-04-15T14:58:55
|
|
Use angle::SimpleMutex everywhere in libGLESv2
Only cases left that use std::mutex are:
- Share group and the context ErrorSet mutexes as they need try_lock()
- Anywhere mutexes are used in conjunction with std::condition_variables
(as they explicitly require std::mutex)
Bug: angleproject:8667
Change-Id: Ib6d68938b0886f9e7c43e023162557990ecfb300
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5453294
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
97aaad3a
|
2024-04-20T19:27:13
|
|
Vulkan: Pack DescriptorSetLayoutDesc layout
Use angle::FastVector instead of arrays to further compact
DescriptorSetLayoutDesc layout
Bug: angleproject:8677
Tests: VulkanDescriptorSetLayoutDescTest*
Change-Id: I5bb7b2ebf0aa5aba3d7c47c45384788245dce3dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5470362
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
a0b721bc
|
2024-04-23T17:08:58
|
|
Vulkan: Optimize DescriptorSetLayout with no bindings
There is no need to unpack bindings of DescriptorSetLayoutDesc and call
into vkCreateDescriptorSetLayout when there are no bindings. Insert a
placeholder vk::DescriptorSetLayout into DescriptorSetLayoutCache. This
reduces the number of Vulkan handles created and can be reused across
multiple pipelines that have DescriptorSetLayoutDesc with no bindings.
Bug: angleproject:8677
Change-Id: Ifc0d199697a95f3a5c037fd85520220a512d7949
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5483308
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
48132950
|
2024-04-17T17:05:07
|
|
Vulkan: Optimize DescriptorSetLayoutDesc layout
Separate out immutable samplers into its own array so we can remove
padding from PackedDescriptorSetBinding which reduces the size of that
struct from 16 bytes to 4 bytes.
Bug: angleproject:2462
Change-Id: I79d1ab584178202c9b7f34b0c7926edced4e21a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5464162
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
80c8b6f0
|
2024-04-17T10:06:45
|
|
Revert "Vulkan: Only enable DS dynamic state if there is DS attachment."
This reverts commit 471b50407d7d1c22491d066df77060cb8b9b2f89.
The reverted change does not correctly handle UtilsVk functions, leading
to validation failures. UtilsVk could be made to not set dynamic state
when the depth/stencil attachments are missing, but instead the change
is reverted because:
- The original issue that prompted this is easily fixable (and fixed in
this change)
- Disabling depth/stencil dynamic state is not necessarily a performance
improvement; every time a pipeline in such a render pass is bound, the
driver would have to make sure to no-op the relevant state change if
static, which is also costly. Instead, dynamic state may need to be
set only once in the entire render pass.
Bug: b/223456677
Bug: b/315353258
Bug: angleproject:8242
Change-Id: I8282b87857d6b9285dbcf307c3c6ecf69df5fadb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5462079
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
b2aad1bb
|
2024-04-17T06:12:14
|
|
Vulkan: Track valid descriptor set layouts
Instead of looping through kMaxDescriptorSetLayoutBindings in
`DescriptorSetLayoutDesc::unpackBindings` track valid descriptor set
layouts in `DescriptorSetLayoutDesc::update`
Bug: angleproject:2462
Change-Id: I1ca2ba72875d9306b6059b14cde39c5d16250be6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5464160
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
c1397510
|
2024-04-07T21:05:34
|
|
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 <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4af8dafb
|
2024-03-10T20:14:18
|
|
Vulkan: Enable MSRTT emulation tests on swiftshader
Bug: b/309355117
Change-Id: I2d842bc52f9b6af340025654111dfd3f8e9c58a3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5359654
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
ad13fec3
|
2024-03-30T15:31:49
|
|
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 <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
13829f20
|
2024-03-26T23:03:12
|
|
Vulkan: Optimize depth/stencil resolve with glBlitFramebuffer
Like color resolve, depth/stencil resolve is now also possibly done by
modifying the render pass and attaching a depth/stencil resolve
attachment.
Bug: angleproject:7551
Change-Id: I045e3875e24006d2473a55b6c3856dd768fe8b84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5398004
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b559efa8
|
2024-03-26T22:02:41
|
|
Vulkan: Allow depth and stencil resolve to be separately added
In preparation for optimizing resolve through glBlitFramebuffer for
depth/stencil attachments.
Bug: angleproject:7551
Change-Id: I57650d82c0cc6e56f44591eadfc42ac794cfef09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5399140
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
c71a67de
|
2024-03-27T15:50:00
|
|
Vulkan: Move pipeline cache graph dump to renderer
In preparation for moving some caches to the share group.
Bug: angleproject:6565
Bug: angleproject:8629
Change-Id: I1a06a18417502e499da0edb9abb0d510e3ad99ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5401513
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
|
|
9475ac40
|
2023-11-15T10:25:06
|
|
Vulkan: Make efficient MSAA resolve possible
Prior to this change, using a resolve attachment to implement resolve
through glBlitFramebuffer was done by temporarily modifying the source
FramebufferVk's framebuffer description. This caused a good deal of
complexity; enough to require the render pass to be immediately closed
after this optimization.
The downsides to this are:
- Only one attachment can be efficiently resolved
- There is no chance for the MSAA attachment to be invalidated
In this change, resolve attachments that are added because of
glBlitFramebuffer are stored in the command buffer, with the
FramebufferVk completely oblivious to them. When the render pass is
closed, either the FramebufferVk's original framebuffer object is used
(if no resolve attachments are added) or a temporary one is created to
include those resolve attachments.
With the above method, the render pass is able to accumulate many
resolve attachments as well as have its MSAA attachments be invalidated
before it is flushed.
For a FramebufferVk that is resolved in this way, there used to be two
framebuffers created each time and thrown away as the code alternated
between starting a render pass without a resolve attachment and then
closing with one. With this change, there is now one framebuffer
(without resolve attachments) that is cached in FramebufferVk (and is
not recreated every time), and only the framebuffer with resolve
attachments is recreated every time.
Ultimatley, when VK_KHR_dynamic_rendering is implemented in ANGLE, there
would be no framebuffers to create and destroy, and this change paves
the way for that support too.
WindowSurfaceVk framebuffers are still imagefull. Making them imageless
adds unnecessary complication with no benefit.
-----------------
To achieve efficient MSAA rendering on tiling hardware, applications
should do the following:
```
glBindFramebuffer(GL_FRAMEBUFFER, msaaFBO);
// Clear the framebuffer to avoid a load
// Or invalidate, if not needed to load:
// glInvalidateFramebuffer(GL_DRAW_FRAMEBUFFER, ...);
glClear(...);
// Draw calls
// Resolve into the single sampled framebuffer
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, resolveFBO);
glBlitFramebuffer(...);
// Immediately discard the contents of the MSAA buffer, to avoid store
glInvalidateFramebuffer(GL_READ_FRAMEBUFFER, ...);
```
The above would translate to the following Vulkan render pass:
- MSAA LOAD_OP_CLEAR/DONT_CARE
- MSAA STORE_OP_DONT_CARE
- Resolve LOAD_OP_DONT_CARE
- Resolve STORE_OP_STORE
This makes sure the MSAA data doesn't leave the tile memory and greatly
reduces bandwidth usage.
Once anglebug.com/4892 is fixed, this would also allow the MSAA image
to never be allocated either.
Bug: angleproject:7551
Bug: angleproject:8625
Change-Id: Ia9f4d20863d76a013d8495033f95c7b39f77e062
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5388492
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
914fe61b
|
2024-03-15T13:20:49
|
|
Vulkan: Rename RendererVk.* to vk_renderer.*
Done in a separate CL from the move to namespace vk to avoid possible
rebase-time confusion with the file name change.
Bug: angleproject:8564
Change-Id: Ibab79029834b88514d4466a7a4c076b1352bc450
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370107
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
21d124c4
|
2024-03-16T10:06:02
|
|
Vulkan: Remove support for pipeline cache control
For current and upcoming uses for pipeline caches the benefits of having
an externally synchronized pipeline cache is minimal at best. Remove
support for that and have all caches be internally synchronized by the
Vulkan driver.
Bug: angleproject:8601
Change-Id: Ic5d9740934641f61b527094aa301e27302b02a57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5375102
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: 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>
|
|
91ddf851
|
2024-03-03T10:57:22
|
|
Vulkan: support QCOM foveated rendering extensions
Add support for foveated rendering in the vulkan backend.
This is done by leveraging the VK_KHR_fragment_shading_rate extension.
Bug: angleproject:8484
Change-Id: I0d01d07583f710b2302ea07b19c9d113c73bfe41
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5269907
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: 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>
|
|
6607a2b9
|
2024-01-17T15:58:20
|
|
Vulkan: Add support for VK_EXT_vertex_input_dynamic_state
Hook into VK_EXT_vertex_input_dynamic_state so pipeline states
that differ only in vertex input state can reuse existing
pipelines.
Bug: angleproject:7162
Tests: StateChangeTestES3.Vertex*
Change-Id: Icd3134dee93fc5fc2e9d284fcfa8c674b62faec8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5207462
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|