|
ce53aff0
|
2024-11-05T16:57:57
|
|
Vulkan: Add per descriptorSet LRU cache eviction
Before this CL, the descriptor set cache eviction is at the pool level.
Either the entire pool is deleted or not. It is also not LRU based.
This CL adds a per descriptor set cache eviction and reuse evicted
descriptorSet before allocating a new pool. This eviction is LRU based
so that it is more precise. The mCurrentFrameCount is passed into
various API so that it can make eviction decision based on the frame
number. In this CL, anything not been used in last 10 frames will be
evicted and recycled before allocate a new pool.
Since eviction is based on individual descriptor set, not by pool,
ProgramExecutableVk no longer needs to track the DescriptorSetPool
object. mDescriptorPools has been removed from ProgramExecutableVk
class.
As measured by crrev.com/c/5425496/133 This LRU linked list maintenance
does not add any measurable time difference, but reduces total
descriptorSet pool count by one third (from 75 down to 48).
running test name: "TracePerf", backend: "_vulkan", story:
"batman_telltale"
Before this CL:
cacheMissCount: 200, averageTime:23998 ns
cacheHitCount: 1075445, averageTime:626 ns
descriptorSetEvicted: 0, descriptorSetPoolCount:75
Average frame time 3.9262 ms
After this CL:
cacheMissCount: 200, averageTime:23207 ns
cacheHitCount: 1025415, averageTime:602 ns
descriptorSetEvicted: 102708, descriptorSetPoolCount:48
Average frame time 3.9074 ms
BYPASS_LARGE_CHANGE_WARNING
Bug: angleproject:372268711
Change-Id: I84daaf46f4557cbbfdb94c10c5386001105f5046
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5985112
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
17a01469
|
2024-10-26T06:07:31
|
|
Vulkan: Bugfix TextureVk::generateMipmap
Add support for generating mipmaps of textures that are EGLImage
texture targets with colorspace overrides
Bug: angleproject:40644776
Tests: ImageTestES3.SourceAHBTarget2DGenerateMipmap*
Change-Id: I9b4ff802f4118a42d54dc8d80ab30e2f9958bfee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5966623
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
af73a7eb
|
2024-10-18T17:19:29
|
|
Vulkan: Add WeakPtr to mirror std::weak_ptr
This is a follow up from previous CL crrev.com/c/5938947. Because of
pool eviction is based on reference count, there is need to have a weak
pointer to the reference counted pool that does not add an extra
reference count. This CL adds WeakPtr that works similarly to
std::weak_ptr, and replaced direct RefCountedDescriptorPool pointer with
WeakPtr wrapper. This is safer than RefCountedDescriptorPool in a way
that it does not allow modification of underline reference count. Also
the use of WeakPtr has been reduced to minimum in this CL.
Bug: angleproject:372268711
Change-Id: Idd6fa77432a9351269c968c961785a7cf5fab50c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5944061
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
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>
|
|
dd54eeec
|
2024-10-11T13:26:46
|
|
Reland "Vulkan: Track GPU progress for individual DescriptorSet"
This is a reland of commit 292102944add2ab30f4aa12a971cac456cc7726b
with the fix of garbage being added back to garbage list.
Original change's description:
> Vulkan: Track GPU progress for individual DescriptorSet
>
> Right now ProgramExecutableVk keeps VkDescriptorSet object, and
> DescriptorSetHelper is created when a cache entry becomes invalid.
> Further, DescriptorSetCache keeps the cache of {VkDescriptorSet,
> RefCountedDescriptorPoolHelper} pair. So we are having three different
> type of objects at different stages of life: VkDescriptorSet,
> DescriptorSetHelper, and {VkDescriptorSet,
> RefCountedDescriptorPoolHelper. This CL makes DescriptorSetHelper at
> creation and at cache and at garbage. With this change, you have a
> reference counted DescriptorSetHelper object (i.e, DescriptorSetPointer)
> during entire life cycle and is passed around between cache and program
> as is. This CL is preparation for the future CL where we may disable
> cache for descriptorSet. The descriptorSet will be added to garbage list
> and reused constantly without go through the cache code. We need to
> track the individual descriptorSet with ResourceUse so that it won't
> reuse until GPU is finished. This CL is making DescriptorSetHelper a GPU
> tracking object so that it will still just work when cache is disabled.
>
> Bug: angleproject:372268711
> Change-Id: I1cfb77cc5069b202d870388fd8809e265cdca90b
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5918586
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Bug: angleproject:372268711
Change-Id: Ic920f99cc78cde1e94690bdbee3b885844fa155b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5954701
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
45cc47af
|
2024-10-22T21:41:22
|
|
Revert "Vulkan: Track GPU progress for individual DescriptorSet"
This reverts commit 292102944add2ab30f4aa12a971cac456cc7726b.
Reason for revert: Causing bot failure in later CLs
Original change's description:
> Vulkan: Track GPU progress for individual DescriptorSet
>
> Right now ProgramExecutableVk keeps VkDescriptorSet object, and
> DescriptorSetHelper is created when a cache entry becomes invalid.
> Further, DescriptorSetCache keeps the cache of {VkDescriptorSet,
> RefCountedDescriptorPoolHelper} pair. So we are having three different
> type of objects at different stages of life: VkDescriptorSet,
> DescriptorSetHelper, and {VkDescriptorSet,
> RefCountedDescriptorPoolHelper. This CL makes DescriptorSetHelper at
> creation and at cache and at garbage. With this change, you have a
> reference counted DescriptorSetHelper object (i.e, DescriptorSetPointer)
> during entire life cycle and is passed around between cache and program
> as is. This CL is preparation for the future CL where we may disable
> cache for descriptorSet. The descriptorSet will be added to garbage list
> and reused constantly without go through the cache code. We need to
> track the individual descriptorSet with ResourceUse so that it won't
> reuse until GPU is finished. This CL is making DescriptorSetHelper a GPU
> tracking object so that it will still just work when cache is disabled.
>
> Bug: angleproject:372268711
> Change-Id: I1cfb77cc5069b202d870388fd8809e265cdca90b
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5918586
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Bug: angleproject:372268711
Change-Id: I4d3c34058d100112a098144276b52c0faf8d593a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5955529
Auto-Submit: Charlie Lao <cclao@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
29210294
|
2024-10-11T13:26:46
|
|
Vulkan: Track GPU progress for individual DescriptorSet
Right now ProgramExecutableVk keeps VkDescriptorSet object, and
DescriptorSetHelper is created when a cache entry becomes invalid.
Further, DescriptorSetCache keeps the cache of {VkDescriptorSet,
RefCountedDescriptorPoolHelper} pair. So we are having three different
type of objects at different stages of life: VkDescriptorSet,
DescriptorSetHelper, and {VkDescriptorSet,
RefCountedDescriptorPoolHelper. This CL makes DescriptorSetHelper at
creation and at cache and at garbage. With this change, you have a
reference counted DescriptorSetHelper object (i.e, DescriptorSetPointer)
during entire life cycle and is passed around between cache and program
as is. This CL is preparation for the future CL where we may disable
cache for descriptorSet. The descriptorSet will be added to garbage list
and reused constantly without go through the cache code. We need to
track the individual descriptorSet with ResourceUse so that it won't
reuse until GPU is finished. This CL is making DescriptorSetHelper a GPU
tracking object so that it will still just work when cache is disabled.
Bug: angleproject:372268711
Change-Id: I1cfb77cc5069b202d870388fd8809e265cdca90b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5918586
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
4bdcdf0d
|
2024-10-16T11:44:49
|
|
Vulkan: Switch RefCountedDescriptorPoolBinding to use SharedPtr
This mostly a clean up. RefCountedDescriptorPoolBinding is replaced with
DescriptorPoolPointer, which is defined as
SharedPtr<DescriptorPoolHelper>. It has more intuitive semantics to use.
Bug: angleproject:372268711
Change-Id: I0397111b5228e896c1d226e00930851319d955a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938947
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
a19f0947
|
2024-10-17T22:42:30
|
|
Vulkan: Cache depth- and stencil-only views
Existing depth/stencil blit and resolve paths created temporary depth-
and stencil-only views. For
GL_ARM_shader_framebuffer_fetch_depth_stencil, such views are needed as
well.
In preparation for that extension, this change adds depth- and
stencil-only views to ImageViewHelper and allows them to be retrieved
through RenderTargetVk. The blit and resolve paths are consequently
simplfied as a side-effect.
Bug: angleproject:352364582
Change-Id: Ia822efb44ca7c82f63afce904eb19dd1bed02ff5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938149
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
8f367854
|
2024-10-13T13:45:17
|
|
Vulkan: Refactor ImageCopy shader
- Refactor common shader code into "ImageCopy.inc"
- Add ImageCopyFloat shader that supports only float src and dst formats
- Perform YUV and multisampled image copies with ImageCopyFloat
Bug: angleproject:372059358
Change-Id: I34bbaf49f98920494d9ed9e1fd290b413a89ea13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5927276
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
68de0042
|
2024-10-08T05:41:37
|
|
Vulkan: Support glCopyTexImage2D from MSAA default framebuffer
Add support for glCopyTexImage2D when the source is an MSAA
default framebuffer by enhancing UtilsVk::copyImage(...) to
support multisampled source images.
Bug: angleproject:372059358
Tests: MultisampleTestES3.CopyTexImage2DFromMsaaDefaultFbo*
Change-Id: I9b5d39f6f75ca8056f8be18b1e68eb0161c99903
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5914629
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
b724eb0e
|
2024-10-10T16:51:11
|
|
Vulkan: Fix assert with overlay and not dynamic rendering
The render pass started by UtilsVk for the overlay was not marked as
belonging to the default framebuffer, causing an incorrect assertion
failure where the final image layout was to be set to PRESENT_SRC.
Bug: angleproject:42267038
Change-Id: I6e7a9357378d6f9a6e907e0ba25fb64dc8f7540e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5923119
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
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>
|
|
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>
|
|
e38d25b1
|
2024-06-21T18:22:32
|
|
Vulkan: Implement EXT_clear_texture
* Added new functions to TextureVk to clear the image.
* clearImage()
* clearSubImage()
* Both implemented via clearSubImageImpl(), with the former a
special case of the latter.
* For multisample or renderable images, stagePartialClear() from
ImageHelper is called to add the update.
* For single-sampled non-renderable images, a buffer is filled with
the pixel data and applied to the image as a buffer update.
* Added new update type: ClearPartial
* Used for renderable textures. This includes multisample textures.
* LOAD_OP_CLEAR is used in a render pass to perform the clear.
* UtilsVk::clearTexture()
* (Uses ClearTextureParameters)
* Uses the following functions to get the VkClearValue from the
input data and format:
* GetVkClearColorValueFromBytes()
* GetVkClearDepthStencilValueFromBytes()
* ClearPartial updates can also be superseded and removed similar to
Buffer updates.
* Updated UtilsVk::startRenderPass() to accept a VkClearValue* as an
input arg. If used, the render pass will use LOAD_OP_CLEAR.
* Enabled the feature "clearTextureEXT" on Vulkan.
* Added new unit tests in ClearTextureEXTTest for various formats and
pixel sizes.
* Added related multisample tests in FramebufferTest.cpp.
* FramebufferTest_ES31.ClearTextureEXT*
* Disabled some of the new tests failing using OpenGL.
* Disabled stencil-only-related tests on Pineapple.
Bug: angleproject:42266869
Change-Id: I89c631d68a4ed63d9991abe1783333255ade20dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5778348
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
7c6f1c05
|
2024-08-20T17:50:00
|
|
Vulkan: Enable UtilsVk::startRenderPass() for DS
Currently, UtilsVk::startRenderPass() assumes usage for color ops
and only uses color aspect flags and layouts. This CL will add the
option to use it for depth/stencil as well.
* Added the aspect flags to the args of startRenderPass()
* For the existing usage of this function, which use the color bit,
the image layout "ColorWrite" is used as before.
* For depth/stencil usage, the layout to be used therein will be
DepthWriteStencilWrite.
* The follow-up CL will use this.
Bug: angleproject:42266869
Change-Id: I135df3b91064b6e711e6109e9e7b734bc6361396
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5801657
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
9685cb96
|
2024-09-17T11:41:28
|
|
Vulkan: Clean up PackedClearValuesArray::store
The code was a bit confusing, raising question why there is check of
aspectFlags != VK_IMAGE_ASPECT_STENCIL_BIT. I believe this was
originally from
https://chromium-review.googlesource.com/c/angle/angle/+/2142711, and
then followed by
https://chromium-review.googlesource.com/c/angle/angle/+/2410366. The
code seems to having some special logic to handle packed depth stencil
clear value. This code may have been changed a bit. When I am looking at
current code base, I am not seeing good reason doing it this way. Caller
is handling the packed format by reading out depth value and pack them
together and then store. This CL replaces store/storeNoDepthStencil
pair to storeColor/storeDepthStencil.
Bug: b/167301719
Change-Id: I40cfca1e51654f5ddaf4b2e8460ae5a26c656f2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5870921
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
1b4d6185
|
2024-09-12T09:18:46
|
|
Vulkan: Cleanup sRGB related code
Image and image view code is littered with sRGB related enums, even
in places that don't deal with sRGB. Remove sRGB related parameters
from initLayerImageView and getLevelLayerDrawImageView methods, which
now assume default values. Add dedicated methods that allow overriding
sRGB state values.
Also introduce ColorspaceState struct that consolidates all sRGB
related states, this will be used in follow up changes to track
and infer colorspace of image views
Bug: angleproject:40644776
Change-Id: Ifb366db48043e376f9ff6c30c852c44dd96562a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860808
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
53476d6f
|
2024-09-04T14:34:11
|
|
Vulkan: Do vertex conversion with fine grain dirtyRange
Right now when we do vertex conversion with multiple dirty ranges, we
are merging dirty ranges into single range and then
UtilsVk::convertVertexBuffer() is called for the merged dirty range. If
there is big gap between two ranges, the merged range could be very big.
This means we end up doing many unnecessary conversion. This CL tracks
individual dirty ranges and issues dispatchCompute for each dirty range,
thus minimize the unnecessary conversions.
On S24, this change further reduces TraceTest.gangstar_vegas frame time
from ~6.0ms to ~3.8ms, almost parity to native GLES's ~3.6ms.
Bug: b/357622380
Change-Id: Ia103f3963bdb5996ff3f95164c955a3e4f33f311
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5787633
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
86508e20
|
2024-08-16T14:56:37
|
|
Vulkan: Make VertexConversionBuffer a class
And wrap the cache key (i.e, formatID/stride/offset) into a CacheKey
struct so that we can easily add more data members. This CL also changes
ConversionBuffer from struct to class to have better encapsulation. No
functional changes is expected here.
Bug: b/357622380
Change-Id: Ieecf5c922b95a940137c8e54657ef3f458c55fc9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5793921
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
7080b766
|
2024-08-16T11:31:39
|
|
Vulkan: Move LineLoopHelper from vk to rx namespace
There is no line loop support in vulkan. LineLoopHelper is a utility
function for backend, not a helper function for vulkan object. So it is
better fit in rx namespace instead of vk namespace.
This also helps my next CL where I am going to change
initBufferForVertexConversion to take a ConversionBuffer instead of
BufferHelper. LineLoopHelper uses initBufferForVertexConversion, which
means I have to change LineLoopHelper to uses ConversionBuffer. This
causes header inclusion problem that now vk namespace object end up have
to include rx namespace header. This CL fixes this inclusion problem by
moving it to the proper namespace.
Bug: b/357622380
Change-Id: I6d6cf1aa926f726bb1b1ab1017bcab092eaf5d37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5787502
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
22ed9877
|
2024-03-07T15:52:13
|
|
Vulkan: Generate fragment shading rates with compute
Generating fragment shading rates on the CPU could cause avoidable
stalls or increased latencies due to host<->device synchronization.
Instead generate the rates using a compute shader.
Optimize foveated rendering by treating a foveated draw with focal
points whose gainX or gainY is 0 as if it were an un-foveated draw
Bug: angleproject:42266906
Change-Id: If8c5504087997666c7d0c1cae8dcc5fab847187e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5754322
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.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>
|
|
584fbcee
|
2024-07-10T12:43:34
|
|
Vulkan: Rework swap-time barrier logic
Avoids unnecessary transitions when overlay is enabled
Bug: angleproject:42267038
Change-Id: I0534911c0142c5e94cf3be112283fb98fcde0f6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691346
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
373ac541
|
2024-07-10T11:14:47
|
|
Vulkan: Make surface RP check independent from framebuffer object
With dynamic rendering, there is no framebuffer object, so checking
whether the currently open render pass belongs to the window surface (at
swap time) is made independent from these objects.
Bug: angleproject:42267038
Change-Id: I408e2376ba865b64fa1e8890316e8f57c08c695f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691345
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: 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>
|
|
6c6975af
|
2024-07-05T12:28:54
|
|
Manual roll vulkan-deps from 5fdd3da87369 to 17d345a0f23d (10 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/5fdd3da87369..17d345a0f23d
Also rolling transitive DEPS:
https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang/+log/704107fda3827377f00e57dff0c21da019bff4ae..5939e32b87487fa9c72ab336ebfcc5ae26d9ab6d
https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers/+log/2acb319af38d43be3ea76bfabf3998e5281d8d12..41a8eb27f1a7554dadfcdd45819954eaa94935e6
https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools/+log/973e791a9ac122f903c2796349a538b278cbe29b..216574bedb80d439c2533d161e7ea7897504bbb6
https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers/+log/afeb91d6d2110717b8c842081eff410617aed1ef..96fb5396040477fbbffdc1b4439dea9447f59d80
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC abdolrashidi@google.com,angle-team@google.com on the revert to
ensure that a human
is aware of the problem.
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Bug: None
Tbr: abdolrashidi@google.com
Change-Id: I2e1c6204e675eb8e70ed68dbe13b912bd6ffce6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5678939
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@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>
|
|
d193d51b
|
2024-06-17T22:46:08
|
|
Replace issue ids post migration to new issue tracker
This change replaces anglebug.com/NNNN links.
Bug: None
Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5703bd61
|
2024-06-14T14:12:41
|
|
Vulkan: Further optimize ProgramExecutableVk::resetLayout
1. Handle compute pipelines similar to how we handle graphics pipelines
2. Track valid compute pipeline permutations
Bug: angleproject:8297
Change-Id: I58200517e5a44a2b3092777ea24d1529ceee00f5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634574
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
98402f33
|
2024-05-23T10:23:29
|
|
Vulkan: Explicitly set SPIR-V version
Bug: angleproject:342316794
Change-Id: Ide73e3d8b167a932338419cb9da3ea358058ebeb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5564203
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d4abe622
|
2024-04-03T17:46:38
|
|
CL/VK: Implement enqueue NDRangeKernel & Task
Adding support for:
clEnqueueNDRangeKernel
clEnqueueTask
Bug: angleproject:8631
Change-Id: If57002be3ea00a55215e89ca47ab8fe9a422c6e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5406614
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
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>
|
|
d71b8ee0
|
2024-04-17T10:00:27
|
|
Vulkan: Fix dynamic depth/stencil in UtilsVk when unused
Dynamic state still needs to be set even if depth/stencil test is
disabled.
Bug: angleproject:8151
Bug: b/323708819
Change-Id: Ic470fabd84c71b026152b6bee2e6a2c803514106
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5462059
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
545e3f6e
|
2024-03-01T23:27:03
|
|
Vulkan: Decouple RendererVk from egl::BlobCache
The new vk::GlobalOps class abstracts access to egl::BlobCache. This is
a step towards decoupling RendererVk from egl::Display for direct use
with OpenCL.
Bug: angleproject:8564
Change-Id: I7b3910254430df74b889759639da1749735584a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5332082
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: 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>
|
|
dbc6bd9d
|
2024-02-12T14:07:49
|
|
Reland "Vulkan: Fix alignment issues with SecondaryCommandBuffer"
This is a reland of commit e53270c9ca1afe393d6d7d0359e81cf6755b6ca5
Original change's description:
> Vulkan: Fix alignment issues with SecondaryCommandBuffer
>
> This solves undefined behaviour on 64-bit systems. This inflates the
> size of a few commands, but most commands either already did align to 8
> bytes or could be aligned to 8 bytes with a few tweaks.
>
> Bug: angleproject:7852
> Change-Id: Ie61976d5bf8df7790acd95c0e15d4c79402622a1
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5288636
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:7852
Change-Id: Ie206e66fc21c5db7c9e67eb478d9cddada5db8e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5296376
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
c70c329e
|
2024-01-31T15:59:19
|
|
Vulkan: Fix texture copy vs pre-rotation
A minor error where the destination offsets were swapped based on source
rotation.
Bug: b/319336510
Change-Id: I5541f8d0bf0b7306b951d2601c8c27ffedb8470e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5254238
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
464dbb61
|
2023-10-18T17:49:14
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 4
VUID-VkWriteDescriptorSet-descriptorType-01946: The Vulkan spec states:
If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, then the
imageView member of each pImageInfo element must have been created
without a VkSamplerYcbcrConversionInfo structure in its pNext chain. The
bug here is that right now these angle::Format::External{n} returns
isYUV false. This CL changes the check of isYUV to
getYcbcrConversionDesc().valid().
Bug: b/223456677
Change-Id: Ifc97f738972a24c4e5dec3e37d8d5896efa9fe80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953917
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8c341cfd
|
2023-10-04T12:49:59
|
|
Vulkan: Fix blits involving 3D images
The layer vs depth value involved with 3D images when calling
vkCmdBlitImage is fixed in this change.
However, that brought to light that the combination of
VUID-vkCmdBlitImage-srcImage-00240 and
VUID-vkCmdBlitImage-dstImage-00252 make it impossible to blit between 3D
and 2D array images, which is likely a spec oversight.
This change makes 3D<->2DArray blits fall back to draw-based blit. This
in turn exposed the fact that 3D images as src were not handled in
BlitResolve.frag. A new Blit3DSrc.frag shader is added which shares
code with BlitResolve.frag to implement this. This is a separate shader
to avoid creating unnecessary and invalid combinations of shaders.
VK_EXT_image_2d_view_of_3d could have been used to avoid this new
shader, but that is not ubiquitous.
Bug: angleproject:7291
Bug: dawn:1962
Change-Id: I6a96162f95829304b4731d43208d9d054f538105
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911800
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
e7418836
|
2023-08-16T14:25:52
|
|
Vulkan: Add context flushing as OOM fallback
* As a new fallback for out-of-memory errors, if an allocation results
in device OOM, the context is flushed and the allocation is retried.
* Functions related to buffer/image allocations now return a VkResult
value instead of angle::Result, which will be bubbled up to a higher
level for safer handling.
* The OOM is no longer handled at the level where the allocation
happens, but is moved up to the context.
* Added two functions to ContextVk for allocating memory for images and
buffer suballocations, which also include the fallback options.
* initBufferAllocation(): Uses BufferHelper::initSuballocation()
* initImageAllocation(): Uses ImageHelper::initMemory()
* Moved initNonZeroMemory() out of the following functions:
* BufferHelper::initSuballocation()
* Moved to ContextVk::initBufferAllocation().
* ImageHelper::initMemory()
* Moved to ContextVk::initImageAllocation().
* Also moved to new function:
ImageHelper::initMemoryAndNonZeroFillIfNeeded().
This function replaced the rest of initMemory() usages outside
initImageAllocation().
* New macros for memory allocation
* VK_RESULT_TRY()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the error result from the command.
* VK_RESULT_CHECK()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the input error.
* Added a test in which allocation would fail due to too much pending
garbage without the fix on some platforms. The test ends once there
has been a submission.
* New suite: UniformBufferMemoryTest
* Added a similar test for flushing texture-related pending garbage.
* New suite: Texture2DMemoryTestES3
Bug: b/280304441
Change-Id: I60248ce39eae80b5a8ffe4723d8a1c5641087f23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787949
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>
|
|
16cfa28e
|
2023-08-08T22:08:24
|
|
Vulkan: Basic infra for parallel link
This change moves pipeline warm up to a parallelizable task, mostly as
an exercise to put in the infrastructure for parallel link in the Vulkan
backend. Follow up changes will move more of the link step to this
task.
The end goal is to be able to make the link task independent of
ContextVk, which would allow it to be run as an UnlockedTailCall, even
if not using a worker thread.
Bug: angleproject:8297
Change-Id: I17047162b2a41f0d681d9e3ee33f2e0239b4280d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764231
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ef4327f6
|
2023-07-12T09:12:03
|
|
Vulkan: Make UtilsVk::copyImage copy YCbCr images properly
This changes the descriptor binding for the image from
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE to
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER for YCbCr source textures and
ensures that the copy pipelines and descriptor sets for YCbCr source
textures are created with the appropriate YCbCr samplers, and use the
`texture()` function instead of `texelFetch()` for YCbCr images.
Bug: angleproject:8252
Change-Id: Ife3e230d3669b275f4e0fab1922d75b6b6c4f8bd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4675806
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
6ffd0d20
|
2023-07-12T12:09:45
|
|
Vulkan: Clean up depth stencil feedback mode part 2
Right now the tracking of depth stencil buffer readOnly or feedback loop
is in FramebufferVk class. This really belongs to ContextVk, since it is
not a permanent state of framebuffer, but current state of context. This
CL moves it to ContextVk and changes to use BitSet instead of four
boolean.
Bug: b/289436017
Change-Id: I955c439259935f82eff30ddfff776a69723e5d0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679886
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
a33ec5dd
|
2023-07-11T18:01:12
|
|
Vulkan: Clean up depthStencil feedback loop implementation Part1
This is first clean up effort for depth stencil feedback loop
implementation. This CL moves updateRenderPassStencilReadOnlyMode and
updateRenderPassDepthReadOnlyMode methods from FramebufferVk to
RenderPassCommandBufferHelper class. The method is actually updating
renderPass's state, not FramebufferVk's state. In the next CL,
FramebufferVk will be removed from the argument as well. With this
change, I also removes updateStartedRenderPassWithDepthMode() and
updateStartedRenderPassWithStencilMode() to use
updateStartedRenderPassWithDepthStencilMode() directly.
This CL is mechanical changes only, no behavior chnage is expected.
Bug: b/289436017
Change-Id: Id3960f973a7115c05ebea199cb8ef802e995941a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679365
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
0892420b
|
2023-06-28T23:03:51
|
|
Vulkan: Optimize PBO download between RGBA and BGRA
Google Meet hits this path in Chrome when blurring the background. The
CPU readback was particularly slow on Intel/Mesa where readback from the
temp buffer took hundreds of milliseconds.
This change adds a compute shader that directly copies from the image to
the pack buffer in simple but common cases.
Bug: b/286882707
Change-Id: I9877ea01e3d8377db96f2539362aca67cf832b4a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4657058
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
b0e9bbd7
|
2023-05-31T14:23:40
|
|
Vulkan: Split features for dynamic state
When a driver bug with dynamic state is encountered, it is hard to debug
which dynamic state exactly is causing an issue, due to the current
granularity of disabling all entire state from an extension. With this
change, every dynamic state gets its own ANGLE feature, and can be
toggled as necessary.
Disabling the supportsExtendedDynamicState* features implicitly
disables all dependent features.
Bug: b/285124778
Bug: b/275210062
Bug: fuchsia:107106
Bug: angleproject:5906
Change-Id: Ic291279872df2d0eb58618ff364ab118bdcc4a9f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4577553
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
ec7e0778
|
2023-05-26T22:11:49
|
|
Vulkan: Track the emulated texture buffer in command buffer
... instead of the original texture buffer, because the emulated one is
the one that is actually being used. This removes the necessity to
issue a hacky barrier after the emulation is done.
Bug: angleproject:8128
Change-Id: Ibc812894204cc1b2c6147817674de44e9c7ba2f4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4571701
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ff110417
|
2023-04-21T15:16:03
|
|
Vulkan: Emulate RGB32 uniform texel buffers when unsupported
Applies to: GL_RGB32F, GL_RGB32I, GL_RGB32UI
When VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT is specified for these
formats by the Vulkan driver, behavior is the same as before.
When it is not speficied: previously ANGLE wouldn't enable
GL_EXT_texture_buffer unless exposeNonConformantExtensionsAndVersions
was enabled; now ANGLE always enables it and does the RGB->RGBA
conversion (GPU) under the hood and tracks buffer content updates using
the paths added for tracking this for Vertex Arrays.
Bug: b/278585075
Bug: angleproject:8128
Change-Id: I4605719bf3f51c5a10c1a35ecae767833dcd45d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4456498
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2fec8ae8
|
2023-05-02T15:53:29
|
|
Vulkan: Handle inactive render pass in draw-based clear
For simplicity, if a render pass is open for the current framebuffer but
is not active, a new one is started in UtilsVk::clearFramebuffer. A
future optimization could decide to reactive the render pass instead,
but needs to check for whether that's possible (with a condition similar
to what's found in ContextVk::handleDirtyGraphicsRenderPass)
Bug: chromium:1440764
Change-Id: I727d4ecefc2bc0a1a9e399b8851c4cc830d20879
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4499765
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fa9172a3
|
2023-03-27T09:49:33
|
|
Reland "Vulkan: Use midRenderPass clear if RP has started but inactive"
This is a reland of commit 98151770adfd990c533991da27615b4879494307
Original change's description:
> Vulkan: Use midRenderPass clear if RP has started but inactive
>
> This CL extends prior CL's optimization so that if clear is issued right
> after blitFramebuffer call (this could make sense if blit and clear are
> on different buffer), we can keep the started render pass and do the
> midRenderPass clear instead of endRenderPass and start another
> renderPass.
>
> Bug: b/273808966
> Change-Id: Ia2504e8e260867a6f797d42cd4c8a72f187280ef
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374145
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: b/273808966
Change-Id: I5c8c85c173f021a7753ef579f83d9ceb24147a7c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4442911
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9188aa0e
|
2023-04-18T10:05:29
|
|
Vulkan: Disallow reactivate of UtilsVk::blitResolve renderPass
We are still seeing
ClearTestES3.RepeatedStencilClearWithBlitInBetween/ES3_Vulkan flakiness
on win-test bot with intel GPU. The exact root cause is still unknown.
For now this CL will disallow reactivate of UtilsVk::blitResolve
renderPass by the subsequent user's draw calls.
Bug: b/273808966
Change-Id: Iebf37da3642d1fc3ee724b0743bfc0767ac48354
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4442446
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2f19bb74
|
2023-03-16T16:03:29
|
|
Reland "Vulkan: Reactivate already started render pass when possible"
This is a reland of commit ad9537af7f2bb5e22bc73f4e833fd3789adaa217
Original change's description:
> Vulkan: Reactivate already started render pass when possible
>
> In some usage case (such as lineage_mobile), we are seeing in the middle
> of render pass, app switch to another fbo just to issue a glClear()
> call, which the clear call itself gets deferred. Application then switch
> back to the original frame buffer. Before this CL, the render pass gets
> recreated due to frame buffer binding change, even though the clear gets
> deferred and new render pass and the previous render pass are
> essentially the same. This CL detects this situation and reactivate the
> current render pass instead of creating a new one. With this CL,
> lineage_m app trace reduces frame time from 3.86ms to 3.7ms, and only
> one render pass is used instead of two.
>
> This CL also allows the render pass started by BlitFramebuffer reused by
> subsequent draw calls. Asphalt_9 is hitting this use pattern and this CL
> reduces frame time by 0.1245 ms (from 5.6203 ms to 5.4958 on pixel 7
> pro)
>
> Bug: b/273808966
> Change-Id: I48c2671cbef3ff9d6cf59caae88c37c77828ee07
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348713
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/273808966
Change-Id: Ice9062122ae320b1a0108ff981bc65bd13b2ada0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4406888
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
41f0a321
|
2023-04-03T21:58:43
|
|
Revert "Vulkan: Reactivate already started render pass when possible"
This reverts commit ad9537af7f2bb5e22bc73f4e833fd3789adaa217.
Reason for revert: Suspected cause for flakiness. anglebug.com/8118
Original change's description:
> Vulkan: Reactivate already started render pass when possible
>
> In some usage case (such as lineage_mobile), we are seeing in the middle
> of render pass, app switch to another fbo just to issue a glClear()
> call, which the clear call itself gets deferred. Application then switch
> back to the original frame buffer. Before this CL, the render pass gets
> recreated due to frame buffer binding change, even though the clear gets
> deferred and new render pass and the previous render pass are
> essentially the same. This CL detects this situation and reactivate the
> current render pass instead of creating a new one. With this CL,
> lineage_m app trace reduces frame time from 3.86ms to 3.7ms, and only
> one render pass is used instead of two.
>
> This CL also allows the render pass started by BlitFramebuffer reused by
> subsequent draw calls. Asphalt_9 is hitting this use pattern and this CL
> reduces frame time by 0.1245 ms (from 5.6203 ms to 5.4958 on pixel 7
> pro)
>
> Bug: b/273808966
> Change-Id: I48c2671cbef3ff9d6cf59caae88c37c77828ee07
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348713
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/273808966
Change-Id: I81cc2dcacb52466808b2ccf5819feda466c39fc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4396502
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c5e9de23
|
2023-04-03T15:14:03
|
|
Revert "Vulkan: Use midRenderPass clear if RP has started but inactive"
This reverts commit 98151770adfd990c533991da27615b4879494307.
Reason for revert: Suspected cause for flakiness. anglebug.com/8118
Original change's description:
> Vulkan: Use midRenderPass clear if RP has started but inactive
>
> This CL extends prior CL's optimization so that if clear is issued right
> after blitFramebuffer call (this could make sense if blit and clear are
> on different buffer), we can keep the started render pass and do the
> midRenderPass clear instead of endRenderPass and start another
> renderPass.
>
> Bug: b/273808966
> Change-Id: Ia2504e8e260867a6f797d42cd4c8a72f187280ef
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374145
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: b/273808966
Change-Id: I7a11635a6eceafb6f4fb3a0d95f6627ee98321c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4393497
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
98151770
|
2023-03-27T09:49:33
|
|
Vulkan: Use midRenderPass clear if RP has started but inactive
This CL extends prior CL's optimization so that if clear is issued right
after blitFramebuffer call (this could make sense if blit and clear are
on different buffer), we can keep the started render pass and do the
midRenderPass clear instead of endRenderPass and start another
renderPass.
Bug: b/273808966
Change-Id: Ia2504e8e260867a6f797d42cd4c8a72f187280ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374145
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ad9537af
|
2023-03-16T16:03:29
|
|
Vulkan: Reactivate already started render pass when possible
In some usage case (such as lineage_mobile), we are seeing in the middle
of render pass, app switch to another fbo just to issue a glClear()
call, which the clear call itself gets deferred. Application then switch
back to the original frame buffer. Before this CL, the render pass gets
recreated due to frame buffer binding change, even though the clear gets
deferred and new render pass and the previous render pass are
essentially the same. This CL detects this situation and reactivate the
current render pass instead of creating a new one. With this CL,
lineage_m app trace reduces frame time from 3.86ms to 3.7ms, and only
one render pass is used instead of two.
This CL also allows the render pass started by BlitFramebuffer reused by
subsequent draw calls. Asphalt_9 is hitting this use pattern and this CL
reduces frame time by 0.1245 ms (from 5.6203 ms to 5.4958 on pixel 7
pro)
Bug: b/273808966
Change-Id: I48c2671cbef3ff9d6cf59caae88c37c77828ee07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4348713
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
97897d92
|
2023-03-27T16:02:57
|
|
Vulkan: Work around driver bug with dynamic primitive restart
This CL forces the state to be static on buggy drivers.
Bug: b/275210062
Change-Id: Ia3391ecb19c3c9d19c05a83e11da8c718513a4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374104
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
|
|
67ad3ddc
|
2023-03-06T16:44:36
|
|
Vulkan: Relax size limit for dynamicBuffer to pick buddy algorithm
If glBufferData's usage is one of the dynamic usage, app may keep
calling glBufferData frequently, which means get into suballocation code
frequently. There are two suballocation algorithms today: buddy
algorithm (faster) and generic (slower). Right now the decision of which
algorithm (i.e, which pool) to use is purely based on size or memory
type. This CL also utilize usage information so that dynamic usage will
pick buddy algorithm with bigger size threshold. mSmallBufferPool is
removed and replaced with the BufferPoolPointerArray that gets picked
based on allocation algorithm.
This CL reduces average frame time of efootball_pes_2021 from 7.518 ms
to 4.670 ms on pixel 7 Pro.
Bug: b/271915956
Change-Id: I1c2f270ac49f56e6f405501d20691cfbab49e7eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4313685
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
233c128b
|
2023-01-17T19:21:58
|
|
Vulkan: Fix UBs when deleted attachment is used in a RenderPass.
Problem:
- "RenderbufferVk"/"TextureVk" with "mOwnsImage == false" used as
RenderPass attachment.
- "RenderbufferVk"/"TextureVk" deleted.
- Owning resource is destroyed ("EGLImage" and all siblings /
"EGLSurface").
- Crash (UB) may happen when ending RenderPass, flushing or executing
commands.
Fix adds tracking of "vk::ImageSourceID" value in
"vk::RenderPassAttachment" - IDs of objects, that originally provide
"vk::ImageHelper" images. This is necessary, because when using
EGLImage, there may be multiple "TextureVk" objects with same
"vk::ImageHelper", and need to call "finalizeImageLayout()" for the
correct attachment.
Bug: angleproject:8032
Test: angle_end2end_tests --gtest_filter=ImageTest*DeletedWhileInUse*
Test: angle_end2end_tests --gtest_filter=PbufferTest.UseAsFramebufferColorThenDestroy*
Change-Id: I50fdd9d6b6a9677adad2262373303b46de1dee4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4296014
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
1174582a
|
2023-03-06T00:00:00
|
|
GL: Implement EXT_clip_control
The extension is trivially exposed
if the current context supports it.
* Added packed clip control enums
* Removed unused state query code
* Aligned symbol names with the specs
Bug: angleproject:8066
Change-Id: I9d106f39800658ecc75f4525ee93cb534dc49f9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306770
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7eb6869a
|
2022-08-30T16:28:08
|
|
Vulkan: Change ResourceAccess::Write to ResourceAccess::ReadWrite
AS a preparation for the next CL which will optimize for WriteOnly
access, this CL changes Write to ReadWrite and adds WriteOnly access
(but not used yet). Mechanical changes only and no function difference
is expected.
Bug: b/243711628
Change-Id: I509d6045ae87635e24076b646af42f35d88d52cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3866672
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
410d8ba5
|
2022-12-21T13:27:00
|
|
Vulkan: Cleanup ContextVk::hasStartedRenderPass APIs
ContextVk has a few hasStartedRenderPass APIs which interpret "start"
inconsistently. A RenderPassCommands' life should be notStarted,
started, requestEnd, and end (which is equivalent to notStarted). When
someone calls onRenderPassFinished on a started renderpass, it does not
immediate endRenderPass, but it will set DIRTY_BIT_RENDER_PASS dirty bit
so that next draw call will trigger endRenderPass and start a new
renderPass. We do not have a name for this state, which adds some
confusion. This CL renames the stage between start and
onRenderPassFinished to be "active" renderpass, when you have
mRenderPassCommandBuffer pointer being valid and you can actively adding
draw commands into the renderPass. For this purpose, I haves renamed
hasStartedRenderPass to hasActiveRenderPass. This CL also simplifies
hasStartedRenderPass implementation to only check
mRenderPassCommandBuffer and turned mRenderPassCommands.started as
assertion. This CL also changes hasStartedRenderPassWithQueueSerial to
actually check mRenderPassCommands.started instead of being "active", so
that name reflects what it is actually checking. This CL also changed
hasStartedRenderPassWithCommands to hasActiveRenderPassWithCommands to
make name and implementation consistent. One added benefit of this is
that after this CL we now allow load/store optimization on a started but
inactive renderPass as well (for example glInvalidateFramebuffer call
after glFenceSync call, or invalidate after FBO blit as demonstrated by
MultisampleResolveTest.ResolveD32FSamples tests).
Bug: angleproject:7903
Bug: angleproject:7551
Change-Id: I8c8ec4c0d54b9ad0a9e373108dfce6b151c8fe0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4119693
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6c41793f
|
2022-12-20T15:20:50
|
|
Vulkan: Use read/write depth/stencil layouts
This allows an application to have depth in read-only feedback loop
while stencil is being written to for example.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: Ic2e11d32da7c7e3a7f3cd86dbafc5c56a0dbbfd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116730
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
626b10c1
|
2022-12-20T20:22:19
|
|
Vulkan: Add read/write depth/stencil layouts
This CL only adds the layouts in the list, but does not use them. The
layouts are renamed for consistency in this change.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I47986c7252d32626e9f26c6670c0a4e3496fe0c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116736
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
301ed545
|
2022-12-20T20:16:22
|
|
Vulkan: Pass context to layout getters
In preparation for a change that optionally uses read/write
depth/stencil layouts. Context is used to test for the
supportsMixedReadWriteDepthStencilLayouts feature to know whether those
layouts are supported or that a fallback must be chosen.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
5c8c0347
|
2022-12-15T15:46:38
|
|
Vulkan: Remove ContextVk::retainResource and retainImage()
Clean up some retain* APIs. retainImge and retainReadOnlyResource and
retainResource are doing exact same thing, they are consolidated into
just retainResource. ContextVk::retainResource is removed since mUse
can now safely copied from DescriptorSetHelperPool object which tracks
mUse.
Bug: b/262047600
Change-Id: I56ea08696e870826bd94ccb79dd621f35923bc6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114500
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
412dd368
|
2022-10-05T23:51:52
|
|
Vulkan: Use vkCmdClearAttachments for unmasked scissored clears
Building on work by Tim Van Patten <timvp@google.com>
In https://chromium-review.googlesource.com/c/angle/angle/+/3388635, not
only were unmasked scissored clears made to use vkCmdClearAttachments,
but also scissored clears could use loadOp=Clear. While this is
potentially faster, it comes with a number of complications.
This change only does the former. Unfortunately, due to a Qualcomm
driver bug that forces ANGLE to avoid vkCmdClearAttachments, code
simplification in the draw path cannot be made.
Bug: angleproject:5194
Change-Id: Iec4184a09ca7fd09e3e8148c53db503512e6b8f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935893
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
40c17b58
|
2022-12-13T15:35:23
|
|
Vulkan: Move SPIR-V transform to vulkan/
No longer used by metal/.
Bug: angleproject:7220
Change-Id: Idb3a6369fefbcf87e7993daa652c8702ec53c20f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4104002
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
8181c056
|
2022-11-22T15:34:48
|
|
Vulkan: Remove RenderPassSerial
RenderPassSerial was introduced to uniquely identify a
RenderPassCommands. With the work of per current context queue serial,
now every started RenderPassCommands already have a unique QueueSerial.
This CL removes RenderPassSerial and use renderPass's queueSerial
instead.
Bug: b/255414841
Change-Id: Id0a87319a9132cdb74aba195f1f05aa31454592b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4049966
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
b00fa5e5
|
2022-11-23T12:10:47
|
|
Vulkan: Pipeline graph dump vs pipeline libraries
The pipeline graph dump code is now made aware of partial pipelines.
Vertex input and fragment output pipelines are also output. As a
collateral, UtilsVk pipelines are also included.
Bug: angleproject:7369
Change-Id: I327fbd07b83ae42d27766847d70637ada04d86cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4051623
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6384f76b
|
2022-11-16T21:47:04
|
|
Vulkan: Move PipelineCacheAccess to namespace vk
In preparation for a change that uses it in that namespace.
Bug: angleproject:7369
Change-Id: Icc75b8839d702fd3e6d3d00c1d8f81619cdd89cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031150
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2dde7357
|
2022-11-16T10:39:32
|
|
Vulkan: `const` render passes
Bug: angleproject:7369
Change-Id: I1ee1449bd8ea8c6a3e26e50a7f3734fad91dc911
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031488
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
71d28a9b
|
2022-11-02T13:19:20
|
|
Vulkan: Remove unused ShaderAndSerial
The serial in the ShaderAndSerial is unused. This CL removed
ShaderAndSerial and replaced with ShaderModule directly.
Bug: b/257116399
Change-Id: I50d42af7818a12888309a80423531d75135e0bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3998747
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
adde4265
|
2022-10-19T23:33:48
|
|
Vulkan: Separate pipeline cache query and insertion
In preparation for VK_EXT_graphics_pipeline_library usage, the query and
insertion functions of the graphics pipeline cache are separated. This
will allow the implementation using VK_EXT_graphics_pipeline_library to
query the monolithic pipeline cache, and if a pipeline is not found,
create it through the pipeline library caches.
Bug: angleproject:7369
Change-Id: Iebf7669ae3ea95e180646198c4861cc59d67e580
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963854
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
c6390143
|
2022-10-12T09:57:55
|
|
Vulkan: Make compatible with GCC
Resolves below warnings occurred with GCC build.
1) deperecated-copy
Overriding an assignment operator without a copy constructor
caused the deprecated-copy warnings.
2) unused-function
3) parenthesis
Warnings occurred due to missing parenthesis around
some logical expressions, add them to quiet the warnings.
4) unused variable
5) 'maybe-unused' attribute ignored
Introduces 'ANGLE_MAYBE_UNUSED_PRIVATE_FIELD' macro to avoid
'attribute ignored' warning which is only occurred
with GCC because GCC doesn't warn about 'unused non
static data member' whereas Clang has Wno-unused-private-field.
Signed-off-by: Sungyong Choi <sywow.choi@samsung.com>
Bug: angleproject:7764
Change-Id: I8e7410a5ed8cb9b8f8b3202073d779fea63d6b75
Reviewed-by: Jeff Vigil <j.vigil@samsung.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963830
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7b4b56f0
|
2022-10-19T00:05:22
|
|
Vulkan: Missing output mask in GraphicsPipelineDesc
Currently, there's some program state used in creating pipelines
alongside what's in GraphicsPipelineDesc. This works because the
pipeline cache lives in the program executable.
With VK_EXT_graphics_pipeline_library however, we could create vertex
input and fragment output partial pipelines that are independent from
and are shared between multiple programs. To support this, any program
state that's necessary for pipeline creation should be part of the
GraphicsPipelineDesc structure.
This change places the state affecting fragment output in
GraphicsPipelineDesc.
Bug: angleproject:7369
Change-Id: I2e48fc9da220475e1b2ed376fc947ce13489610e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963652
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
f0e3d8f9
|
2022-10-18T13:51:31
|
|
Vulkan: Shader component type in GraphicsPipelineDesc
Currently, there's some program state used in creating pipelines
alongside what's in GraphicsPipelineDesc. This works because the
pipeline cache lives in the program executable.
With VK_EXT_graphics_pipeline_library however, we could create vertex
input and fragment output partial pipelines that are independent from
and are shared between multiple programs. To support this, any program
state that's necessary for pipeline creation should be part of the
GraphicsPipelineDesc structure.
This change places the state affecting vertex input in
GraphicsPipelineDesc. A follow up change will do the same for state
affecting fragment output.
Bug: angleproject:7369
Change-Id: Iccf691a1597d786efa1625f7b1c22f906201f2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3964751
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
b521be4c
|
2022-10-14T23:09:26
|
|
Vulkan: Decouple shader-set from pipeline caches
In preparation for VK_EXT_graphics_pipeline_library, where different
pipeline caches (for the complete pipelines and the shaders subset
partial pipelines) may create pipelines from the same shader set, the
pipeline caches are pulled out of ShaderProgramHelper. In an upcoming
change, ProgramExecutableVk will have more than one
GraphicsPipelineCache instance, both creating pipelines through the same
ShaderProgramHelper.
The pipeline creation methods in ShaderProgramHelper are now const.
This means a thread would be able to create pipelines using an object of
this class while the main thread creates other pipelines using the same
object, but in a different pipeline cache.
Bug: angleproject:7369
Change-Id: Ib8a76dedf1105ba9dfcad9e972157c92ba18e349
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956944
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8e644365
|
2022-10-11T11:47:55
|
|
Vulkan: Rearrange state specification for pipeline libraries
This change splits pipeline state setup based on whether the complete
pipeline is being created or only a subset of it. However, no partial
pipelines are yet created, that will be done in a following CL.
Bug: angleproject:7369
Change-Id: Ife34c4bc39641ab8f06e7c78502f95a6bc16d15d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949917
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
135022e4
|
2022-10-11T00:03:11
|
|
Vulkan: Create robust pipelines based on context state
Previously, pipelines were made robust based on whether any context in
the share group has so far been made robust. This means that pipelines
created on non-robust contexts would still be compiled as robust.
Inefficiency aside, this was buggy because robustness was not part of
the pipeline cache key, so if a pipeline was created as non-robust
first, then recreated in a robust context, it would reuse the non-robust
variant.
With VK_EXT_pipeline_protected_access, a similar situation arises for
context protected-ness. However, it is incorrect in that case to create
pipelines as protected unnecessarily.
This change makes pipeline robustness a part of the pipeline cache key,
in preparation for protectedness to be added similarly. Compute
programs may now generate multiple pipelines as a result too.
Bug: angleproject:7629
Change-Id: Ie95f10eff878f8c8b221c1018da44385c7aad15e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3943534
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9b5fff82
|
2022-10-05T21:56:00
|
|
Vulkan: Emulate shader stencil export for MSRTT
The MSRTT emulation code had one corner case issue that could lead to
performance and memory inefficiencies. That is when stencil needs to be
unresolved and VK_EXT_shader_stencil_export is not supported.
This change adds a path to emulate VK_EXT_shader_stencil_export and
removes this inefficiency.
This should help Chromium on older Android devices that lack both this
and the recent VK_EXT_multisampled_render_to_single_sampled extensions.
Chromium frequently breaks the render pass (crbug.com/1336981), which
easily leads to this situation.
Bug: angleproject:4836
Change-Id: Ifceec43f7f3807b7e32f4b379edcd4351ae76414
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935892
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
c19ec948
|
2022-08-23T10:43:59
|
|
Vulkan: Implement imageless framebuffers
* Added the attachment image and create info objects to be used
for imageless framebuffers created in getFramebuffer().
* New helper class for framebuffers in RenderPassCommandBufferHelper:
MaybeImagelessFramebuffer, which includes a framebuffer object, if
the framebuffer is imageless, and the image views. This is to make
sure that the args for render pass begin info will be correctly set
up according to the status of the used framebuffer.
* Refactored the collection of attachments in getFramebuffer() into
a new function, getAttachmentsAndImagesFromRenderTargets(). It also
returns their corresponding ImageHelper* objects used to create the
framebuffer (from their image properties).
* New struct: RenderTargetInfo; which keeps track of render targets
and whether resolve image should be used for the render pass in the
form of the enum class RenderTargetImage.
* Added a new arg to getFramebuffer(): resolveRenderTargetIn; to use
when there is a valid resolveImageViewIn.
* Without using the framebuffer cache, we would require to handle
the framebuffer destruction by adding it to the garbage instead
of releasing it. For example, FramebufferVk::destroy() now adds
mCurrentFramebuffer to the garbage.
* Added new framebuffer unit tests.
* Added tests where two textures with different attributes are bound
to the same framebuffer before drawing, one after another.
* Added test where a blit occurs from a multisample texture into a
non-zero level of a resolve texture, each bound to a separate FBO.
* Added a new perf test to compare performance for enabled imageless
framebuffers vs disabled. (Credit: cclao)
Bug: angleproject:7553
Change-Id: Iacdbd73aaa01cbb0e37abf01ae4892bdfdd4b12f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827644
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
836cc5e2
|
2022-09-09T22:06:22
|
|
Vulkan: add etc to bc compute transcoding.
use compute shader to transcode etc format to bc format.
Bug: b/243398683
Change-Id: Idbd0820a2df8d92fe690055dae2933bc559e9bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888501
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
|
|
b9cd542e
|
2022-09-15T17:31:35
|
|
Vulkan: Use serial to check which FBO has open RP
In preparation for the scenario where an imageless framebuffer is
shared, checking whether the started render pass belongs to a certain
framebuffer is tweaked to use a serial-based method instead of checking
the framebuffer handle.
* Added the last render pass serial to ContextVk, which increments
every time a render pass begins. The serial is also stored in the
FramebufferVk object invoking it.
* Added the type RenderPassSerial for this purpose.
* Serials are generated through a serial factory in ContextVk.
* Updated hasStartedRenderPassWithSerial() to match the serials
instead of the handles.
* Removed the getFramebuffer() calls from FramebufferVk and UtilsVk
that are now unused.
Bug: angleproject:7553
Change-Id: Id60dcbf7973558d35e55ff4af4c71e50c6853bba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3897970
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
2b4699ad
|
2022-09-21T12:19:20
|
|
Vulkan: Fix validation error with unset-logic-op in UtilsVk
Bug: angleproject:7654
Change-Id: Ie4da045a30fdd12eedd910ade3cb5ffe95e2c9a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909791
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ba3b4515
|
2022-09-15T01:06:51
|
|
Vulkan: Implement GL_ANGLE_logic_op
Enabled if the logicOp device feature is available. According to
gpuinfo, it's pretty much universal except for ARM.
Bug: angleproject:7654
Change-Id: I4808b519fdd6273b2f8c1bb17f59517eb65bfe8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898317
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0eff729
|
2022-07-26T13:14:36
|
|
Vulkan: Reduce descriptorSets usage from UtilsVk
Every time you get into UtilsVk to do conversion or emulation, it
allocates a new descriptorSet. Right now it relies on the pool eviction
to recycle the pool when no more free descriptorSet in the pool. This
end up with quickly pushing the pool's size to maximum, and more than
one pool been created. This CL intends to recycle individual
DescriptorSet for the UtilsVk instead of the entire pool. With asphalt_9
while sitting in the menu, after this CL UtilsVk only uses one pool of
size 16 (it really only uses 2 descriptorSets), versus before the CL you
see two pools of size of 512.
This CL also removes descriptorPoolBinding in UtilsVk since these are
not really used and we are updating mUse for every allocation, which
should prevent it from eviction when it should not be.
Bug: b/235523746
Change-Id: I1d49455ffeb4b2a9678402e16d5e694c530c9d7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3788566
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
5db09e9b
|
2022-07-21T10:45:12
|
|
Vulkan: Try allocate from existing DescriptorPool before create new
When we allocate a new descriptorSet, right now we only look at current
bound pool or the last pool, or allocate a new pool. We never look at
the other pools for the possibility of allocation. This is likely due to
we never free descriptorSet in the past. With the recent CLs, we now
release invalid descriptorSets when texture or buffer gets deleted or
re-specified. This opens up opportunity to allocate from other existing
pools before allocating a new pool. This CL changes the allocation logic
to add the pass to iterate over existing pools for allocation before
allocating a new pool, thus reducing the number of descriptorSetPools.
This CL also consolidates
DynamicDescriptorPool::getOrAllocateDescriptorSet()'s actual
descriptorSet allocation logic with
DynamicDescriptorPool::allocateDescriptorSet().
This CL also moves mEmptyDescriptorSets from ProgramExecutableVk to
DynamicDescriptorPool so that we will only have one empty descriporSet
per pool instead of per program.
Bug: b/235523746
Change-Id: I012346acce17f785ee6683ec55fdf21be00ea1a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780847
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
00e48c13
|
2022-07-20T17:35:01
|
|
Vulkan: Destroy DescriptorPoolHelper when its unused.
DynamicDescriptorPool keeps an array of DescriptorPoolHelpers. Right now
we only grow this array of pools, we never shrink the pool count. This
is partly due to we never release descriptorSet. But in the past few
CLs, we now release invalid descriptorSet when texture/buffer gets
deleted or re-specified. This means we could now have a pool with no
valid descriptorSets. This CL adds the ability to actually release the
pool when all of its descriptorSets has been released, thus reduce the
pool count when a lot of textures have been deleted.
Bug: b/235523746
Change-Id: I2d5047269154cc8ece8305408f08f2ad7c9dd8a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780845
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6c418f8c
|
2022-07-07T14:28:06
|
|
Vulkan: __samplerExternal2DY2YEXT-aware TextureVk
This CL adds the ability for TextureVk to return an ImageView that is
created with a VkSamplerYcbcrConversion object that uses an identity
conversion model.
This allows direct sampling of YUV values without RGB conversion, which
is needed for __samplerExternal2DY2YEXT.
Bug: b/223456677
Change-Id: Ie1d4e12375b7808a1f060747bc2d74baeda3fdea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3751889
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|