|
1f40285c
|
2025-09-24T11:54:44
|
|
Vulkan: Bypass buffer for VA if Bind*Buffers2
Due to added support for BindVertexBuffers2 and BindIndexBuffer2,
there would be no need to allocate a buffer for vertex arrays via
getBufferForVertexArray() if the related features are supported. It
should be possible to directly reference the original buffer and the
proper offset instead without errors.
* The buffer handles and offsets in VertexArrayVk now get the original
buffer handle and offset instead of using getBufferForVertexArray().
* getBufferForVertexArray() will now be used only when the following
feature is disabled:
* useVertexInputBindingStrideDynamicState
* (which is used as condition for vkCmdBindVertexBuffers2())
* Renamed the function for index buffer: getIndexBufferForVertexArray()
This will be used when the following feature is disabled:
* supportsMaintenance5
* (which is used as condition for vkCmdBindIndexBuffer2()))
* Moved the rest of the code in getBufferForVertexArray() to ~Impl(),
which is used by both the functions above.
* Removed redundant condition from the vertex input binding stride
dynamic state feature.
Bug: chromium:40059200
Bug: angleproject:394337110
Change-Id: I665611f92058048a9778aa4b823fabfad7c96c84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6980316
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e542cb6c
|
2025-09-15T16:35:34
|
|
Vulkan: Split handleDirtyGraphicsVertexBuffers into two funcs
ContextVk::handleDirtyGraphicsVertexBuffers() has two code paths that
are quite different, depends on if supportsVertexInputDynamicState is
enabled or not. This CL splits this function into two so that 1) code is
much easier to read that what is done in each case and 2) get rid of if
check at draw time.
Bug: b/439073246
Change-Id: Iaf9f84fb20d82e784f9dfe8ece321cff94b7b58d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6956208
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Charlie Lao <cclao@google.com>
|
|
98915e44
|
2025-09-12T14:15:05
|
|
Vulkan: Fix blit src missing mip
Bug: angleproject:433816259
Bug: angleproject:40644750
Change-Id: I50261279224dea8e37beff388207b927399d099a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6944327
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
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>
|
|
e9a30817
|
2024-10-28T14:54:38
|
|
Vulkan: Support vulkan physical addr in vk_helpers
- Add extraAllocationInfo for physical addressing
in AllocateBufferMemory/AllocateImageMemory
- Add getDeviceAddress which calls vkGetBufferDeviceAddressKHR
API to get device address
In CL, All the physical addressing supports are enabled when the
runtime flag "supportsPhysicalAddressing" is set.
Bug: angleproject:442950569
Change-Id: I1658062b3f031b3d55923937947cece0c1b67d67
Signed-off-by: hoonee.cho <hoonee.cho@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6916340
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
|
|
26926a8b
|
2025-09-08T13:07:49
|
|
Vulkan: Rename CommandBufferAccess to CommandResources
CommandBufferAccess was named as such to indicate "what the command
buffer is going to access". The new name indicates "what resources are
the following command going to use".
The rename is happening to reduce usages of "access", in preparation for
introducing another "access" which can be confused with this.
Bug: angleproject:422982681
Change-Id: Ib072cde8533515ba76734b6426b4d673cb07cc45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923331
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
dbbae298
|
2025-09-05T12:39:01
|
|
Vulkan: Remove debug name from ImageMemoryBarrierData
It was always there, but never became useful.
Bug: angleproject:422982681
Change-Id: I409c061b07840a1cc9b85220fcbe792944358dba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6919463
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
e842b5f8
|
2025-05-06T14:38:27
|
|
CL/Vulkan: Zero-copy support added for CL Buffers
- Used VK_EXT_external_memory_host and VK_KHR_external_memory extensions
- Added interfaces to CLBufferVk class for validating zero-copy ability
- Added logic in CLBufferVk::create to use zero-copy if eligible
- Added new HostExternalMemory class to provide utility functions
- Added VkPhysicalDeviceExternalMemoryHostPropertiesEXT for querying
Tests-Passing (having usage of CL_MEM_USE_HOST_PTR):
- ocl_cts.test_api
- ocl_cts.test_basic
- ocl_cts.test_buffers
- ocl_cts.test_mem_host_flags
Bug: angleproject:441471275
Change-Id: I296e709a4f67911dcd6d0ae89750e8e0262625f4
Signed-off-by: Shyam Manohar <s.manohar@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6892624
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
|
|
1ed999ea
|
2025-08-25T16:02:01
|
|
Vulkan: Move sampler cache to share group
The sampler cache (and the adjacent yuv-conversion-info cache) were in
vk::Renderer, but they were not thread safe.
Bug: angleproject:440364873
Change-Id: I2dc034f2db400f680ca91a9fde509d90f90c957e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6870736
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
a02670d6
|
2025-08-26T20:41:16
|
|
Move unsafe buffers inside header guard macros
While this is exactly opposite of what Chromium has chosen to do,
there is an issue with clang-format trying to indent preprocessor
directives four spaces relative to include guard. This is because
Angle's .clang-format file specifies IndentPPDirectives: AfterHash
but Chromium's does not. The current placement is sufficient to
throw off clang-format's guard detection since the guard macro no
longer covers the entire file.
Bug: b/436880895
Change-Id: Ic6b99c8cef6213939cdf9b42af8730e1eb423065
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6885892
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
8ef76b6a
|
2025-08-04T12:34:17
|
|
CL/Vulkan: cl_khr_external_memory extension (pt.2)
- Make this extension visible if Vulkan implementation support
features supportsExternalMemoryFd and/or
supportsExternalMemoryDmaBuf
- Implemented APIs clEnqueueAcquireExternalMemObjectsKHR and
clEnqueueReleaseExternalMemObjectsKHR
- Updated clCreateBufferWithProperties to handle external memory
file descriptor.
Bug: angleproject:378017028
Change-Id: I1751982c8e9b2cd07b7e251cc54db5dcd1bcda20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6843980
Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
130fb2a1
|
2025-07-29T08:16:57
|
|
Vulkan: Don't allocate ExternalFormatIDs for sampling usecases
Update the condition for allocating YUV ExternalFormatIDs to exclude
sampling-only usecases. Also, rename "isYuvResolve()" to
"isYuvExternalFormat()" to better reflect intent.
Bug: angleproject:386749841
Change-Id: I0e4f5b79937ea8ad98b5d00fdc7531b34ffa7e16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6797965
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
214a48c4
|
2025-07-16T12:42:18
|
|
Vulkan: add support for yuv resolve with transient image
Add support for the YUV_target extension in cases where the
implementation supports VK_ANDROID_external_format_resolve without
supporting nullColorAttachmentWithExternalFormatResolve.
Bug: angleproject:386749841
Tests: ImageTest*YUV*
Change-Id: Iebcb4f843b962f3d0d2f4e42db479902b6c1f849
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6761834
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ef29d42e
|
2025-05-22T15:52:49
|
|
Support ASTC decode mode extensions in ANGLE
Added support for GL_EXT_texture_compression_astc_decode_mode and
GL_EXT_texture_compression_astc_decode_mode_rgb9e5 in ANGLE. Also added
corresponding end-to-end tests for ASTC decode mode queries, including
ASTC decode mode queries and rendering with ASTC texture formats with
different decode modes on GL_TEXTURE_2D works.
Bug: angleproject:419403188
Change-Id: I0f2dced8468c4e25597740d1de346b2f699bb81e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575285
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.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>
|
|
16b2bf5e
|
2025-05-06T16:23:24
|
|
Vulkan: Only expose ASTC HDR if 3D textures supported
Not all hardware supports ASTC HDR for 3D textures.
This CL adds a check for each ASTC HDR format, querying the driver
for 3D support, and tracking it as a feature. We use that feature
when deciding to expose GL_KHR_texture_compression_astc_hdr.
Test: dEQP-GLES31.functional.copy_image.compressed.viewclass_astc_8x8_rgba
Bug: b/407634958, b/416095435
Change-Id: Iaa6f26e247c7e6c7451f3d4eb8dd7175509bf45f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6515816
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
6f9f343a
|
2025-04-16T14:45:33
|
|
Reland "Vulkan: Prune superseded updates during host-image-copy"
This is a reland of commit f8a8adf63c5834a725d1bd752acc6d63c3f45c05
Original change's description:
> Vulkan: Prune superseded updates during host-image-copy
>
> Bug: angleproject:42266771
> Change-Id: I7aa8e85720a54537389df615b575ddfa9951770d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6462475
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Bug: angleproject:42266771
Change-Id: I95e6f1d2421327a6394e627f03ef5b4cddf4a1e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6480011
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3f88a505
|
2025-04-03T17:29:20
|
|
GenerateMipmap encode and decode sRGB when GL_SKIP_DECODE_EXT is set
According to the spec, if TEXTURE_SRGB_DECODE_EXT is set before
GenerateMipmap for a texture with format sRGB, mipmap generation should
skips the encode and decode steps during mipmap generation, matching the
mipmap generation for a non-sRGB texture.
Bug: angleproject:406829410
Change-Id: Icea8c27a1ab2f20e9fd6c8d79187c0c5cfe8e789
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6428506
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Tingwei Guo <tingwei.guo@arm.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
|
|
50a4ad19
|
2025-04-22T09:29:17
|
|
Revert "Vulkan: Prune superseded updates during host-image-copy"
This reverts commit f8a8adf63c5834a725d1bd752acc6d63c3f45c05.
Reason for revert: Has a bug in the calculation of image layers whose
updates should be dropped.
Bug: angleproject:42266771
Original change's description:
> Vulkan: Prune superseded updates during host-image-copy
>
> Bug: angleproject:42266771
> Change-Id: I7aa8e85720a54537389df615b575ddfa9951770d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6462475
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Bug: angleproject:42266771
Change-Id: I2b992c8598f58c40386338ade3cf59ffdb03abd5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6480413
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
f8a8adf6
|
2025-04-16T14:45:33
|
|
Vulkan: Prune superseded updates during host-image-copy
Bug: angleproject:42266771
Change-Id: I7aa8e85720a54537389df615b575ddfa9951770d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6462475
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
49d0a332
|
2025-04-08T16:07:17
|
|
Vulkan: Remove ring buffer allocators
* Removed the ring buffer allocator functionality from ANGLE:
angle::RingBufferAllocator
* Also removed the related common files.
* (Pool allocators will be used at all times.)
* Removed the placeholder functions from the pool allocator.
* Removed the following BUILD flag:
angle_enable_vulkan_shared_ring_buffer_cmd_alloc
* Removed redundant line from ContextVk.
Bug: b/410036490
Change-Id: I368fb93a66ddfd192018b09f65004a32339abd5a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6442640
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0a5c565
|
2025-04-07T15:05:11
|
|
Vulkan: Add assert to check only clear is staged on swapchain image
The swap after clear optimizations on swapchain image multisampled
image
https://chromium-review.googlesource.com/c/angle/angle/+/6072416
works with the assumption that the only staged updates on swapchain
multisampled image is clear. This change adds an assert to validate
the assumption holds true before applying the optimization.
If the assert is ever triggered, we will know the assumption is
violated, and we need to look into how to tweak the optimization or
add other optimizations to solve the violated case.
Bug: angleproject:382006939
Change-Id: I7ce23dd7767b7730f1fa3ec89cb6616689339602
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6437217
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
dae3c851
|
2025-03-14T11:44:53
|
|
Vulkan: Bake non-shader state into linked pipeline
When using VK_EXT_graphics_pipeline_library, previously ANGLE would
create three pipelines libraries:
* The Shaders library was created based on the GL program's shaders + a
few static states. This typically hit the program's own pipeline's
cache that was warmed up during link.
* The VertexInput and FragmentOutput libraries were created at draw
time, which used the global pipeline cache
At draw time, immediately after creating the non-Shaders libraries, the
three libraries were linked into the final pipeline to be used by the
draw call.
This caused an inefficiency; because the non-Shaders libraries were
created independently from the Shaders library, they had to be compiled
pessimistically, for example because they could not be optimized to take
into account the precision of the fragment shader's outputs or whether
any value is const (typically alpha being set to one).
Given the creation of VertexInput and FragmentOutput libraries is
typically quite fast (the former being no-op and dynamic state anyway),
this change removes the need for creating those libraries, and directly
specifies the vertex input and fragment output state when creating the
final pipeline out of the Shaders library.
In this way, the same fragment output state can be tailored to the exact
shaders it is being used with and incur a smaller overhead. In this
change, the linked pipeline is cached in the GL program's pipeline
cache, which is never synced to the blob cache as producing it is
assumed to be fast already.
Bug: angleproject:42265839
Change-Id: I8496ea37771555522bdc9de94043a1b56fa5967e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6354205
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ac251fa8
|
2025-02-24T17:31:58
|
|
Vulkan: Remove doDeferredAcquireNextImage ContextVk dependency
This is the continuation of the previous CL. After this change
`lockSurface()` calls `doDeferredAcquireNextImage()` as the rest of the
code do.
The `ImageHelper::invalidateSubresourceContentImpl()` required
`ContextVk` pointer before this change.
The `ContextVk` is only used to print the performance warning when
`layerIndex` exceed the maximum count, which is not possible in case of
a `WindowSurfaceVk`. Added `layerLimitReachedOut` pointer instead of
writing the warning. It is processed in
`invalidateSubresource[Stencil]Content()`. Added
`invalidateEntireLevel[Stencil]Content()` which do not require
`ContextVk` to use in the `WindowSurfaceVk`.
Bug: angleproject:397848903
Bug: angleproject:42264593
Change-Id: I58451a4818ad56fa196c3c971df3a5f7793f2bfe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6298735
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
2f5a91ba
|
2025-02-24T17:25:10
|
|
Vulkan: Remove checkForOutOfDateSwapchain ContextVk dependency
This is the continuation of the previous CL. After this CL it is now
possible to call `prepareForAcquireNextSwapchainImage()` from
`lockSurface()` that will also do necessary swapchain recreation in
case of window resize.
These methods required `ContextVk` pointer before this change:
- RenderTargetVk::releaseImageAndViews()
- replaced with `releaseSwapchainImage()` that does not release
framebuffer because Window Surface framebuffers are not managed by
the cache.
- added `release()` method that does release the framebuffer.
- WindowSurfaceVk::releaseSwapchainImages()
- use `Renderer::collectGarbage()` instead of
`ContextVk::addGarbage()`.
- use `ImageHelper::releaseImage()` instead of
`ImageHelper::releaseImageFromShareContexts()`. The
`finalizeImageLayoutInShareContexts()` was not required since
renderpass must be already ended, because swapchain recreate is only
possible after present. Removal of `addToPendingImageGarbage()` is
not going to cause OOM problems, because repeated swapchain
recreate calls are not possible without swap (submissions).
Bug: angleproject:397848903
Bug: angleproject:42264593
Change-Id: Iacfa3a144aa980659569b7100be25a44ebb9f0a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6298734
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
318d4038
|
2025-02-18T13:19:28
|
|
Vulkan: Fix present optimization w.r.t shared present mode
Since the implementation of "EGL_KHR_mutable_render_buffer" mode
(angleproject:42262606), the renderpass optimization for present
(b/153885625) was not working correctly. It sill tries to transition
into `ImageLayout::Present`, but instead of entirely skipping the
transition, it inserts the barrier even when renderpass is still opened.
When both "supportsSharedPresentableImageExtension" and
"preferDynamicRendering" are enabled, code will hit ASSERT in
`flushToPrimary()` when attempting to record `ImageLayout::Present`
barrier into the primary command buffer.
Above issue is fixed by skipping the transitioning into
`ImageLayout::Present` when in shared present mode.
Other changes and fixes:
- removed renderpass flush when resolving with renderpass, since it is
not necessary (angleproject:42265256).
- above change reveled a bug in `finalizeImageLayout(&mColorImageMS)`
call. This call reverts the layout in the previous finalize call
from Present to ColorWrite. So it must have been inserted before
finalizing the swapchain image. Issue fixed by removing both finalize
calls.
- updated condition to skip invalidate w.r.t shared present mode
(b/229689340), that was missed during implementation of
"EGL_ANDROID_front_buffer_auto_refresh" (angleproject:42265697).
Test: angle_end2end_tests --gtest_filter=EGLSurfaceTest.PresentLayoutTransitionWithMSAA/*
Bug: b/153885625
Bug: angleproject:42262606
Bug: angleproject:42265256
Bug: b/229689340
Bug: angleproject:42265697
Change-Id: Ifad8aea8548fa7bfac27941812c435b2af655309
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6277445
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.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>
|
|
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>
|
|
5775a974
|
2025-02-21T11:00:05
|
|
Vulkan: Fix transition to FORIEGN and back in same submission
Image layout transitions are typically automatically handled. In some
cases however, the image layout is specifically "finalized". For
foreign images, the relevant cases are all about the point in time when
the image is being released.
When a foreign image's layout is finalized, a barrier is generated to
transition it to the FOREIGN queue on submission. Previously, an
incorrect assumption was made that after such a point, the VkImage will
no longer be used by any commands.
This was incorrect because of EGL Images, which let the same VkImage
(and ImageHelper) be shared between multiple textures. The following
scenario broke that assumption:
- Texture is bound to the (foreign) EGL image
- Texture is used and deleted
* VkImage's transition back to foreign is cached, but not executed
- Another texture is bound to the same EGL image
- Texture is used
* At this point, the texture is re-acquired from foreign, but it
wasn't released in the first place!
In this change, a vkQueueSubmit is issued after the foreign image's
layout is finalized to make sure the transition back to FOREIGN is
applied.
Bug: angleproject:42263241
Bug: angleproject:42262454
Bug: angleproject:390443243
Bug: chromium:382527242
Change-Id: Ibe3e6d60f282f9fb0eed1deba3325456017c3617
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6292804
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
03bdf1ca
|
2025-02-18T16:37:49
|
|
Vulkan: Use correct actual FormatID for MSAA swapchain image
Implementation of "overrideSurfaceFormatRGB8ToRGBA8" feature missed
updating actual FormatID for the MSAA swapchain image. This bug makes
possible to initialize RGBA8 swapchain image and RGB8 MSAA image.
However, on practice MSAA is still RGBA8 because RGB8 renderable is
generally emulated on Android.
VUID-vkCmdResolveImage-srcImage-01386: srcImage and dstImage must have
been created with the same image format.
This fix is cosmetic and is not expected to fix any real bugs
(because RGB8 is generally emulated with RGBA8).
Bug: angleproject:42265147
Change-Id: Ief4b74ac31e93a655f5088b7927e970585255f25
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6275968
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
8f8b41e3
|
2025-02-14T17:54:51
|
|
Vulkan: Optimize for multiple TexSubImage calls in the same level
Based on app traces, some apps make glTexSubImage call for the same
level multiple times in a row. One extreme example is lumino_city, which
it creates a 2D texture with nullptr data, and then calls
glTexSubImage2D many times back to back for each row of the texture to
update the data. Because we uses std::vector to store the per level
update struct (SubresourceUpdate), it means we copy these data
structures every time it grows 2x, until it hit the max size 1081. The
other common case we get into is app update some area of the texture
(like google map and gacha_life) which also end up with a few
texSubImage calls back to back. The other more common case is we staged
a clear first and then glTexSubImage which end up with vector size of 2.
This CL changes to use std::deque instead of std::vector to store the
staged update for a given level, which allows it to grow without extra
penalty.
Bug: b/293297177
Change-Id: Iabbc143074ad9d6fcf47abbddee09ecf7f78d1a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6271964
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: 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>
|
|
d252425d
|
2025-02-06T14:51:36
|
|
Vulkan: Check source image usage flags in copy paths
... instead of the format feature flags. If the source of the copy is
has external format (allowed with glCopy[Sub]TextureCHROMIUM), the
format feature checks are unable to query the format features. However,
the image usage flags already have the required information (whether the
image can be copied from, sampled from, etc).
Bug: chromium:383056998
Change-Id: I2ba8820751eb526ef497a8be724193276fd46160
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6238265
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
3dcd143c
|
2025-02-06T15:06:02
|
|
Vulkan: Reduce GL_EXT_texture_storage_compression related overhead
Most of apps not using fixed rate compression extension, but we are
getting into all these logic that checking for vulkan driver's support
of compression rate. This CL adds a check in TextureVk::initImage(), so
that it only goes down that logic if
mState.getSurfaceCompressionFixedRate() is not
GL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT. This means for all existing
app traces we have, we should not go down these logic any more.
This CL also made TextureVk::getFormatSupportedCompressionRatesImpl()
and ImageHelper::getCompressionFixedRate() out of TextureVk and
ImageHelper class given they are not accessing the data member at all.
Bug: b/293297177
Bug: angleproject:352364583
Change-Id: Ib5eebf54172f194d7c65c2d2d751326b7923403f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6239523
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9c82e55a
|
2025-01-16T17:47:41
|
|
Vulkan: Make VkEvent for Buffer work with more general usage
Before this CL, BufferHelper::mCurrentWriteAccess and
mCurrentReadAccess, mCurrentWriteStages, mCurrentReadStages still track
all accesses, regardless if it is tracked by RfCountedEvent or via
PipelineBarrier. This is okay for very limited usage case, but becomes
fragile when expand the event for general usage case. The problem is
that you can not correctly tell which bits in mCurrentReadAccess is for
pipelineBarrier and which is for Event, since event and pipeline barrier
could have the same VkAccessFlags. Similarly problem exist for
mCurrentWriteAccess. The reliable way is actually track pipeline barrier
access and VkEvent access completely separately. This CL changes
mCurrentWriteAccess, mCurrentWriteStages, mCurrentReadAccess and
mCurrentReadStage to only contain bits that not tracked by VkEvent. For
this reason, RefCountedEventWithAccessFlags wrapper class is added to
wrap mCurrentWriteEvent and its associated VkAccessFlags.
Bug: angleproject:360274928
Change-Id: I057484f0c3baa2739d56c3a75889eb88a647a65a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6210683
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1df10f8a
|
2025-01-29T14:50:21
|
|
Unsuppress VUID-VkImageViewCreateInfo-pNext-01585
* Updated ImageHelper::DeriveCreateInfoPNext() to check the usage flags
as well.
* If the image uses the storage bit, the format list should not be
added to it as pNext. Otherwise, if the count is not zero, it
expects the format used in its image view to be one of the stated
formats and will result in a VVL if this is not the case.
Bug: angleproject:42264452
Change-Id: I789ec5a9751366029929c4c25a942056df13b9ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6216381
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9d934912
|
2025-01-09T11:31:42
|
|
Vulkan: Use VkEvent to track transform feedback buffer write
This CL adds event tracking into BufferHelper class: mCurrentWriteEvent
is used to track the write event and mCurrentReadEvents is used to track
all different reads from the buffer. Since you can have multiple
different reads accumulate over time, read events are an array of
EventStage and the actual VkAccessFlags per event is tracked in
mCurrentReadEventsAccessFlags. Note that this is specifically designed
to allow pipelineBarrier and eventBarrier to co-exist. If
mCurrentReadStages contains more bits than mCurrentReadEvents, the
remaining bits will be using pipelineBarrier. Similarly if
mCurrentWriteStages contains more bits than mCurrentWriteEvent, the
remaining bits will be using pipelineBarrier. A heuristic tracking is
also added to track the buffer writes over a period of time. Right now
we will opt buffer into VkEvent if the buffer ever written by transform
feedback in the heuristic tracking window. This could be expanded in
future if we found more usage pattern that would be benefit from using
VkEvent.
Also note that DrawIndirect and VertexInput will be using the same
VkEvent to track. It still will be using different VkAccessFlags since
the access flags comes from buffer instead of event.
Bug: angleproject:360274928
Change-Id: I027ffed8a0fbff7f280f42cf70564b8a3f243d69
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6085490
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
f231d94b
|
2025-01-13T14:58:16
|
|
Vulkan: Add kBufferMemoryBarrierData to mirror image
Right now we only maintain a mapping from EventStage (which is a value
of VkPipelineStageFlags) to VkPipelineStageFlags for images. For next CL
we need to indicate if use VkEvent is preferred or not for a given
PipelineStage access. This CL expands kPipelineStageFlagBitMap (and
renamed to kBufferMemoryBarrierData) to contain both the
VkPipelineStages and EventStage to indicate if VkEvent should be used or
not, similar to kImageMemoryBarrierData but a lot simpler. Right now it
all set to EventStage::InvalidEnum which means will use pipelineBarrier.
This will change in next CL.
This CL also does some clean up:
A few BufferHelper related functions changed argument from ErrorContext*
to Context*, mainly because of BufferHelper::release() now takes
Context* as argument so that we can recycle events within context's
share group without lock.
ImageLayoutToMemoryBarrierDataMap is added to replace
angle::PackedEnumMap<ImageLayout, ImageMemoryBarrierData>
kEventStageAndPipelineStageFlagsMap is removed.
InitializeEventAndPipelineStagesMap is now using kImageMemoryBarrierData
directly to construct mEventStageToPipelineStageFlagsMap. As result of
this, EventAndPipelineBarrierHaveMatchingStageFlags is also removed
since InitializeEventStageToVkPipelineStageFlagsMap already ensures
this.
Bug: angleproject:360274928
Change-Id: Idb74f3e4120ca9a04b8eccb7ed034aa769024bf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6172763
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
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>
|
|
0f75fc3d
|
2025-01-20T14:10:41
|
|
Vulkan: Transition foreign images to the FOREIGN queue on submit
Vulkan's interaction with AHB and dmabuf images is through the FOREIGN
queue family. When ANGLE uses these images, it must take ownership of
the images by doing a queue family ownership transfer (QFOT) away from
the FOREIGN queue family and into the graphics queue family used by the
Vulkan backend.
Prior to this change, ANGLE would do the QFOT away from FOREIGN once
such a foreign image is imported into an EGL image. Afterwards, usage
in ANGLE works correctly. What ANGLE did not handle is when a foreign
entity wants to use these images _after_ ANGLE has used them.
For the above to work correctly, ANGLE must do a QFOT back into FOREIGN
before the image can be used by the foreign entity. Unfortunately,
EGL does not provide a clear point for this hand-off to happen. ANGLE
has no choice then to proactively transition the images back into
FOREIGN at some point "just in case".
For some native drivers, this hand-off to FOREIGN can be quite frequent.
For example, on Android for most vendors there is no actual layout
transition between graphics and FOREIGN queue families (the actual data
layout is the same), so a cache flush/invalidate at strategic points
(such as the end of the command buffer) is sufficient as equivalent to
transition to FOREIGN (and another at the beginning of the command
buffer as equivalent to transition from FOREIGN).
As a layer over Vulkan's formalism, ANGLE is less lucky; it has to
enumerate exactly which image is being transitioned to and away from
FOREIGN. Transitions away from FOREIGN are in principle easy. As long
as the image is marked as being in the FOREIGN queue family, it will
automatically transition to the graphics queue family on first use.
In this change, when a foreign image is transitioned out of the FOREIGN
queue, it's added to a list of images to be transitioned back to FOREIGN
at submit time. Once submission is done, the image may or may not
actually be used by a foreign entity, but ANGLE cannot know that. The
next time the image is used in ANGLE, it is transitioned out of FOREIGN.
Verifying correctness with multi-threading is tricky, and relies on GL's
requirement that access in one context is followed by a synchronization
and rebind in another context before it can be used there. This means
that the image's transition to FOREIGN (at the end of one submission)
naturally happens before the transition back from FOREIGN (at the
beginning of the next submission). Because the set of images to
transition is tracked in the context, submissions in other contexts
don't interfere with the above logic.
The situation can be more complicated with one-off submissions, but
fortunately, no such usage of foreign images is present.
Another wrinkle is simultaneous usage of the image as read-only in two
contexts. According to GL, this is not a hazard and requires no
synchronization. However this is broken in ANGLE even for non-foreign
images (see http://anglebug.com/42266349), because as what _seems_ like
read-only usage of the image from GL's point of view (like sampling from
the image), there are associated write operations from Vulkan's point of
view (image layout transitions and QFOT). This change does not attempt
to address this corner case.
Bug: angleproject:42263241
Bug: angleproject:42262454
Bug: angleproject:390443243
Bug: chromium:382527242
Change-Id: Idd4ef1fecfa3fccf1a4063f1bddb08d28b85386b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6184604
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c3f9109e
|
2025-01-09T17:22:41
|
|
Vulkan: Change EventMaps from struct to class
For better encapsulation, this CL turns struct EventMaps to class
RefCountedEventArray.
Bug: angleproject:360274928
Change-Id: Ie28996fdb95d5a830399e6fa6cd5602f403e8725
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6164698
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c7ad15e3
|
2025-01-23T13:37:28
|
|
Vulkan: de-duplicate ImageHelper::barrierImpl and barrierImplOneOff
barrierImpl is renamed to recordBarrierImpl barrierImplOneOff renamed to
recordBarrierOneOffImpl barrierImpl contains all the common logic
between recordBarrierImpl and recordBarrierOneOffImpl.
Bug: angleproject:390443243
Change-Id: I01ce9ea3f1f0acb30fe0efcdd20bd1caaa248a7c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6195570
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.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>
|
|
a5016e31
|
2025-01-17T17:50:27
|
|
Vulkan: Fix typos found by gerrit spellchecker
Bug: angleproject:360274928
Change-Id: Idbffd7a4609f28d161bd0a11ace817856dcd750c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6182930
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ac7a85f4
|
2025-01-10T17:24:48
|
|
Vulkan: Replace copy image view with same read view in setStorage
1.Introduce a share flag in ImageViewHelper.
2.Update the share flag when copy view is same as read image view.
3.Only return read view when copy view is same read one.
Bug: angleproject:387392704
Change-Id: I6a3a9ca043ba16cdeb430cce53d40197618a0d44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6147667
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f72428bb
|
2025-01-10T22:24:07
|
|
Vulkan: Fix MSAA swapchain resolve out of render pass
.. vs the optimization that transitions the swapchain image to
PRESENT_SRC as part of the render pass.
When the swapchain image is the resolve attachment, its layout is
decided when the render pass is closed (or through manual calls to
finalizeImageLayout()). If the render area forbids the swapchain image
from becoming the resolve attachment, it must be resolved after the
render pass.
Prior to this change, the swapchain image was still marked for
transition to PRESENT_SRC by the render pass. This is inefficient, as
the following out-of-render-pass resolve would have to transition the
image back out of PRESENT_SRC. Nevertheless, this also had a bug
exposed by an ASSERT in the dynamic rendering path:
* Before the out-of-render-pass resolve, the image layouts are
forcefully finalized.
* The code in finalizeImageLayout() checks which image is being
finalized; if the image is not any of the ones in the render pass, it
was silently ignored.
* The image marked for transition to PRESENT_SRC
(mImageOptimizeForPresent) is not separately checked, as it is
expected to be an attachment as well.
The code that optimized the final render pass always marked the
swapchain image for optimization, even if it was not going to become the
resolve attachment. This change makes sure this optimization is done
only if the image is definitely an attachment of the render pass.
Bug: angleproject:389048224
Change-Id: I9f451d2698944111ac96bd97fefd6efa23859b7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6168388
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
c75bd915
|
2024-12-10T23:01:44
|
|
Vulkan: Remove asyncCommandQueue
It's been years and it never showed an advantage. In the meantime,
performance without this feature seems close to native drivers (i.e. the
feature has lost its appeal) and it's frequently a source of
complication and bugs.
Bug: angleproject:42262955
Bug: angleproject:42265241
Bug: angleproject:42265934
Bug: angleproject:42265368
Bug: angleproject:42265738
Bug: angleproject:42266015
Bug: angleproject:377503738
Bug: angleproject:42265678
Bug: angleproject:173004081
Change-Id: Id8d7588fdbc397c28c1dd18aafa1f64cbe77806f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6084760
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d8f6df3e
|
2024-12-09T09:20:40
|
|
Vulkan: Fix assertion in RefCountedEvent::releaseImpl
RefCountedEvent uses non-atomic uint32_t for reference counting, so it
is not thread safe. To ensure we do not use it in a thread unsafe way,
there is an assertion I added in RefCountedEvent::releaseImpl that the
release call is not come from async command queue thread (all release
calls are expected come from context thread which should be protected by
context share group lock). A while ago dynamic rendering is implemented.
With dynamic rendering you can't do final layout change in render pass.
So the final layout change to Present is added to primary command buffer
at the end of RenderPassCommandBufferHelper::flushToPrimary(). And if
async command queue is enabled, that flushToPrimary is called from async
command queue thread, which triggers the assertion I added in
RefCountedEvent::releaseImpl(). This CL releases mCurrentRefCountedEvent
for this specific situation (present image + dynamic rendering +
asyncCommandQueue) so that we do not hit the assertion. The only
downside is that it will force to use pipelineBarrier for this specific
situation. But no one ships with asyncCommandQueue enabled, so there is
no real concern here as well.
Bug: angleproject:382580875
Change-Id: I042e3906db7f5bb7acb299997f8fc7e21b8350b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6072350
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
09578c42
|
2024-11-27T19:39:09
|
|
Vulkan: Cleanup CommandPoolAccess implementation
This is a follow up for:
Add a new mutex in CommandQueue to protect Vulkan Command Pool
crrev.com/c/angle/angle/+/6020895
Change simplifies `CommandPoolAccess` implementation as well as removes
source of bugs when need to know/remember what method from
`CommandPoolAccess` to use in order to collect/destroy the primary
command buffer.
Additionally, `CommandBatch` converted into a class to avoid invalid
use. The "retire" word replaced with "release" in methods such as
`releaseFinishedCommands()`.
Bug: b/362604439
Change-Id: Iaa72c55458604e5ea8ea5a402e437129a5c9180a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6056019
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
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>
|
|
01dee1cb
|
2024-10-14T15:04:28
|
|
Add implementation for GL_EXT_texture_storage_compression
Bug: angleproject:352364583
Change-Id: I3dab4c68d5d0206d681e165e991217bd3de8eeb6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011055
Auto-Submit: Neil Zhang <Neil.Zhang@arm.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
987cc0de
|
2024-08-06T12:16:37
|
|
Vulkan: Add release utility for BufferViewHelper
Add a release helper that doesn't require ContextVk for
BufferViewHelper.
Bug: angleproject:378103913
Change-Id: Ib468d152501ecaec1dd71c9c6ed5527b73a1afa5
Signed-off-by: Gowtham Tammana <g.tammana@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6004686
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
adb80cbb
|
2024-11-12T22:38:38
|
|
Vulkan: Optimize read-only depth/stencil switch after clear
Prior to this change, if color is cleared then read-only depth/stencil
mode is enabled, ContextVk::switchToReadOnlyDepthStencilMode eagerly
flushed the deferred clears (starting a render pass).
However, if the render pass is marked dirty for any reason afterwards,
for example because we want to flush the render pass after a query
ends, the render pass that is just started above is unnecessarily
closed.
In this change, `switchToReadOnlyDepthStencilMode` only detects if a new
render pass is needed and marks the appropriate dirt bits. This way,
the render pass can only be restarted once.
Bug: angleproject:378058737
Change-Id: I83a5ebae6c223882eafea338eeec19895d87e5c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6023414
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f44427b5
|
2024-11-05T15:18:59
|
|
Vulkan: Fix MSAA glReadPixels into PBOs
The temporary image used to resolve the MSAA framebuffer during
glReadPixels did not have the SAMPLED usage bit. Additionally, the
image was supposed to be garbage collected afterwards but ImageHelper's
release() function was accidentally immediately destroy()ing it.
This was not an issue with blocking glReadPixels paths, because the
command buffer was immediately flushed and the GPU work was waited on
before the image was destroyed in RendererScoped's destructor.
Bug: b/377437834
Change-Id: I1dca47172d6f363277059a848fe9446ac2a872d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5995530
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: 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>
|
|
e2cd9082
|
2024-11-05T04:07:17
|
|
Vulkan: Bugfix in setCurrentImageLayout
Make sure to update mLastNonShaderReadOnlyLayout and
mCurrentShaderReadStageMask when updating the current layout.
Bug: angleproject:40644776
Change-Id: Ie8652099a0d4caca9f9aea5bac38256a513b08e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5992020
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
79b6c7ab
|
2023-10-09T13:29:07
|
|
CL/Vulkan: Add fillWithPattern interface
In CL, the buffer can be requested to filled with a pattern. Adding a
pattern fill helper routine that fills up the buffer from CPU side.
Bug: angleproject:42267074
Change-Id: I144e9b7c6f4d1263f21cabc2491c46e8951e604f
Signed-off-by: Gowtham Tammana <g.tammana@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916157
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
6b9d3762
|
2024-08-22T15:29:00
|
|
Vulkan: Optimize full texture clears
Currently, a full texture clear (glClearTexImageEXT()) is treated as
a special case of a partial clear (glClearTexSubImageEXT() with image
dims as the input). However, it can be further optimized by treating
it as a clear update.
* For full clears from EXT_clear_texture, the clear update path is
taken.
* It leads to a more optimized path, including the usage of the
following APIs:
* vkCmdClearColorImage()
* vkCmdClearDepthStencilImage()
* It uses the following enum: ClearTextureMode
* If a partial clear uses the extents for the entire image, it is
treated as a full clear.
* Updated the method to determine if a texture is renderable in
clearSubImageImpl().
* Added perf counter: fullImageClears
* Added new unit tests
* Single 3D texture full clear (Clear3DSingleFull)
* 2D RGB SNORM clear (Clear2DRGB8Snorm)
* Added Vulkan perf counter test for 2D and 3D color image clear.
* Updated the related skipped tests on Pineapple.
Bug: angleproject:42266869
Bug: angleproject:375425839
Change-Id: I12ef3002dee190d7f8f43204f7d3f76e05d0b54f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5806207
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
99ba07d3
|
2024-03-26T00:58:57
|
|
CL/Vulkan: Implement createImage
Enabling functionality of:
- clCreateImage
Tests-Passing: OCLCTS.test_api get_image<1d|2d|3d>_info
Bug: angleproject:42266936
Signed-off-by: Rafay Khurram <r.khurram@samsung.com>
Change-Id: I0281f092bff13cdd81b87d596fdd15b33dda7e46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5796527
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
c52e8493
|
2024-10-11T14:21:19
|
|
Vulkan: Switch DescriptorPoolPointer to use SharedPtr
To make the reference counting easier to maintain, SharedPtr class is
added to automatically tracking the reference counting and object
creation/destruction. Right now we have BindingPointer class doing
similar things except it does not automatically manage the object
create/destroy, which makes it less robust as well as redundant code to
manage object life cycle. The other problem with BindingPointer is that
it does not work with normal assign/copy operator which made it hard to
read and use. SharedPtr uses exact same API semantics as
std::shared_ptr, which makes the reference counting very easy to use.
The main difference of SharedPtr and std::shared_ptr is that it does not
use any atomic or lock since it assumes user only uses it under thread
safe environment, which ANGLE's backend is.
This CL also changes mDescriptorPools to mDynamicDescriptorPools to make
it clear that it is dynamic descriptor pool not the descriptor pool.
This is also preparation CL for the next CL where we will use SharedPtr
to manage DescriptorSetHelper life cycle, which otherwise a bit
complicated to manually manage.
Bug: angleproject:372268711
Change-Id: I1033d9bf259bbc075a9b374d8a28e1f67d889873
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5926183
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
0dbe85f3
|
2024-10-15T13:54:36
|
|
Increase the size of vector WriteImages to max
ANGLE limits the size of vector which represents the write images when
resolving images. So when blit a multisample buffer to mrt, the sum of
write images is more than 1 and app will abort while checking the size
of the vector.
This patch increases the size of vector WriteImages to max.
Add end2end test to test blit multisampled framebuffer to MRT
framebuffer.
Bug: angleproject:361369302
Change-Id: I2d892bcd3411f2bca2ff514f6f0b6055d872668a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5872512
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
62f33a5c
|
2024-10-09T16:06:54
|
|
Vulkan: Make retainResource for descriptorSetPool consistent
Right now the cache hit and cache miss case are handled differently.
This CL makes it consistent. Now Caller of
DynamicDescriptorPool::getOrAllocateDescriptorSet will handle this
retainResource call regardless of cache hit or miss.
Bug: b/372268711
Change-Id: I11e47ab9e56a24eb68a0231c5e553ab6b8833c82
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5921640
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
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>
|
|
7c811715
|
2024-09-25T11:09:44
|
|
Vulkan: fix crash when clearing stencil with ClearBuffer
Follow up to [1] which fixed a crash with glClear, but the bug remained
with glClearBufferiv. This change refactors the "is stencil write
masked out" query to always take the framebuffer's stencil bit count
into account (practically always 8), which also happens to make the rest
of the code checking this query more accurate in the presence of
nonsense masks where the bottom 8 bits are 0.
[1]: https://chromium-review.googlesource.com/c/angle/angle/+/3315158
Bug: chromium:40207259
Bug: angleproject:42266334
Change-Id: I68a6b0b75c67ed2cdc8c4d03b243efe5495efce1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5889788
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@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>
|
|
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>
|
|
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>
|
|
937c5dc8
|
2024-09-09T12:18:55
|
|
Vulkan: Make image{Read,Write} helper interface api agnostic
Removing ContextVk dependency on the imageRead/imageWrite helper utility
functions.
Bug: angleproject:42266971
Change-Id: I493e1fb11e8ae192f766c822cbee278c49c23bfe
Signed-off-by: Gowtham Tammana <g.tammana@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5845197
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
bd3a3308
|
2024-07-22T14:03:20
|
|
Vulkan: Remove implicit image barrier for shader write
When app uses compute or fragment shader to write to an image and makes
multiple dispatchCompute or draw calls, right now we are inserting an
implicit barrier to ensure WAW is hazard free. 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 records the bits
from the last glMemoryBarrier call and will skip the barrier calls in
ContextVk::updateActiveImages if there is no layout change, unless there
is requirement from prior glMemoryBarrier.
Bug: angleproject:350994515
Change-Id: I8bdeeb658993824369824aaa0f25cb4b6e3785f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5719024
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
0d458614
|
2024-07-18T00:00:00
|
|
Vulkan: Fix PBO readbacks with small row length
Use CPU path when the row length is
smaller than the source area width.
Fixed: angleproject:354005999
Change-Id: I5c4686ca5387a98c6137868afb19c333aed8ac21
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5724591
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|