src/libANGLE/renderer/vulkan/vk_renderer.cpp


Log

Author Commit Date CI Message
Hao Li 2af09236 2024-09-24T13:55:04 Vulkan: Enable monolithic pipelines on Intel Windows The hang issue is fixed and not reproduced on Intel Windows drivers 101.5379 and later. Bug: angleproject:369043994 Change-Id: Ic395ca47e65fa6467baf09e54b7e24c0d7d71ad3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5885989 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Igor Nazarov f5f419ec 2024-09-04T20:22:20 Vulkan: Add verify-restore in CompressAndStorePipelineCacheVk() Change fixes following problem: When blob cache is full, but still allows to store the current pipeline cache data, storing next chunk may trigger eviction of already stored items. Depending on the blob cache implementation, eviction process may choose to evict chunks from the current pipeline cache data. As the result: blob cache will not contain all chunks. Solution: The `StorePipelineCacheVkChunks()` function now check what chunks exist in the blob cache (if `lastNumStoredChunks` parameter is positive) and restores any missing chunks if their number is less than `lastNumStoredChunks`. First call to `StorePipelineCacheVkChunks()` passes zero (0) to the `lastNumStoredChunks`, which will skip the check and store all chunks unconditionally. If "verifyPipelineCacheInBlobCache" feature is enabled, the `StorePipelineCacheVkChunks()` will be called again to restore possibly missing chunks. If "hasBlobCacheThatEvictsOldItemsFirst" feature is disabled, the function will be called repeatedly in a loop (opposed to only once), until all chunks are present or until number of missing chunk stops decreasing. Bug: angleproject:4722 Change-Id: Ibbbdb2f878d6aafd7ab5586fc654e2b9be900a9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5837042 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Shahbaz Youssefi a6ec0bb9 2024-09-23T10:50:28 Vulkan: Fix recursion in ensurePipelineCacheInitialized() If the initial data was loaded from the blob cache, this function called getPipelineCacheSize() to initialize mPipelineCacheSizeAtLastSync. However, that function itself lead back to ensurePipelineCacheInitialized(), causing a recursion. This was previously undiscovered as the conditions that would lead to the global pipeline cache needing a lock were yet to materialize in the wild. Since the preferMonolithicPipelinesOverLibraries feature was made more widely enabled in [1] and consequently a race condition was fixed in [2], this recursion was discovered as a deadlock due to the mutex use. While this change avoids the recursion, it simultaneously optimizes the syncPipelineCacheVk() function by making sure the lock is taken once intstead of twice when retrieving the pipeline cache size and subsequently data. This also avoids a previously encountered race condition where the pipeline cache was modified in between the two queries and VK_INCOMPLETE was returned from the second call. [1]: https://chromium-review.googlesource.com/c/angle/angle/+/5870466 [2]: https://chromium-review.googlesource.com/c/angle/angle/+/5872715 Bug: angleproject:42265839 Change-Id: Ic682b3d20ec4411ba180b3bafb807fdde8166d5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5883153 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Steven Noonan <steven@uplinklabs.net> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi 1e74ce33 2024-09-17T14:44:36 Reland "Vulkan: Prefer monolithic pipelines everywhere" This reverts commit 1503a10737e28ac9d1bb98c2f3e369880c63ca43. Reason for revert: Fixed threading + undo for buggy drivers Original change's description: > Revert "Vulkan: Prefer monolithic pipelines everywhere" > > This reverts commit e9ab557c744c29088174b6c7bc93692fe7f32dbd. > > Reason for revert: kills Windows Intel UHD 770 machines > http://anglebug.com/42265839#comment34 > > Original change's description: > > Vulkan: Prefer monolithic pipelines everywhere > > > > Apparently, every vendor prefers this, and > > graphicsPipelineLibraryFastLinking has no bearing on the driver's > > preference. > > > > Bug: angleproject:42265839 > > Change-Id: Ied8d82e0a9e08fe5efe3f625e2612764f67f9768 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5861024 > > Commit-Queue: Yuxin Hu <yuxinhu@google.com> > > Reviewed-by: Yuxin Hu <yuxinhu@google.com> > > Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: angleproject:42265839 > Change-Id: I95fa61b2242684b63adc2841b777bde923e34d41 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5868055 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bug: angleproject:42265839 Change-Id: I007a3efc69e0edc040b0feddcd84e191f68ded9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5870466 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 167b9e8d 2024-09-18T21:51:38 Vulkan: Fix pipeline cache store vs monolithic pipeline race The thread that creates monolithic pipelines needs to hold the pipeline cache lock, as well as the thread that stores the pipeline cache contents to the blob cache. Bug: angleproject:42265839 Change-Id: I17cf9d2bb3f27d531f368003cb4ee00007a464fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5872715 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov cb9d52f8 2024-09-11T15:26:49 Vulkan: Add Pipeline blob cache per chunk CRC check Each chunk now have it's own CRC value, that is calculated starting from beginning of the data up to the end of the chunk. This way last chunk will have CRC of the entire data, avoiding calculating it separately. The `GenerateCRC32()` was splint into `InitCRC32()` and `UpdateCRC32()` function, which supports calculating running CRC32. Calculating CRC this way has some performance hit, when using many small chunks. Increasing chunk size to at least 1 MB almost negates any overhead from running `UpdateCRC32()` multiple times. On S921B with locked frequencies, calculating CRC for 89 MB of data using single call took 7.13 ms and 13.34 ms, when using multiple calls. However even this difference is negligible, because compressing 291 MB of data to 89 MB took 9.22 seconds. Bug: angleproject:4722 Change-Id: Ic6f3245b3aa7319ac13502d2c43e1a084a9bc8b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5854709 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Igor Nazarov 8469debb 2024-09-04T20:04:10 Vulkan: Add dual slots in CompressAndStorePipelineCacheVk() Change fixes following problem: Currently, each call to `CompressAndStorePipelineCacheVk()` stores chunks in order, starting from 0. This overrides previously stored chunks. In case of app termination (kill) in the middle of this process, the entire cache data will be corrupted, since it will partially contain chunks from the new and old caches. Solution: In order to fix this problem, this change introduces `slotIndex` into the `chunkCacheHash` calculation. Slot index is managed by `vk::Renderer::getNextPipelineCacheBlobCacheSlotIndex()` method, which will alternate between 0 and 1 when "useDualPipelineBlobCacheSlots" feature is enabled, and always 0 otherwise. Additionally, chunk storing order is reversed: last chunk is stored first and the first (0 chunk) - last. This is done because 0 chunk is the first that is loaded in `GetAndDecompressPipelineCacheVk()` and used as indication that there is data in the cache. Writing it last, ensures that other chunks will be also available. When "useDualPipelineBlobCacheSlots" is enabled, each call to `CompressAndStorePipelineCacheVk()` will use slot index opposed to the slot that is stored in the cache, avoiding damaging existing data. After writing all chunks for a brief moment there may be 2 instances of the data. However, data for the previous slot will be immediately erased (by writing 1/0-sized blobs) starting from the 0 chunk. To control if erasing of old pipeline cache data will be erased by using 0-sized or 1-sized blobs blobs, added `useEmptyBlobsToEraseOldPipelineCacheFromBlobCache` feature. The `GetAndDecompressPipelineCacheVk()` function will iterate over each available slot index checking only 0 chunk until data is found. In case of the OpenCL API, features will always have following values: - "useDualPipelineBlobCacheSlots" -> false - "useEmptyBlobsToEraseOldPipelineCacheFromBlobCache" -> true Note: this solution requires 2X pipeline cache size space in the blob cache to work as expected, otherwise it will exacerbate other problem: When blob cache is full, but still allows to store the current pipeline cache data, storing next chunk may trigger eviction of already stored items. Depending on the blob cache implementation, eviction process may choose to evict chunks from the current pipeline cache data. As the result: blob cache will not contain all chunks. The above problem will be addressed in the follow up CL. Bug: angleproject:4722 Change-Id: I2920bc3d89263280cdfe0466446fca26415e2b25 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5756576 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Yuxin Hu 44b6203c 2024-09-02T16:23:44 Add new functions defined in VK_KHR_Synchronization2 extension Add vkCmdPipelineBarrier2 and vkCmdWriteTimeStamp2. The other functions introduced in VK_KHR_Synchronization2 are not being used at the moment. Bug: b/356985874 Change-Id: I4f8b432aee9b11debcb8abe8b3089f88ad7a069b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5832709 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 7bdd5f77 2024-09-18T12:51:25 Vulkan: Remove syncval suppressions for fixed bugs Bug: angleproject:42265220 Change-Id: I282f77330867682eee121f67d5357658bf375844 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5873529 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Igor Nazarov dfa516ce 2024-09-12T15:25:08 Vulkan: Fix chunkIndex is not 16 bits when computing key Replace `uint8_t` with `size_t` in `ComputePipelineCacheVkChunkKey()`. This fixes the bug and also makes type consistent with the rest of the code. Also `CacheDataHeader::setData()` made consistent with `getData()`. Bug: b/246683126 Change-Id: Ib1f8b680622c3d4f912d8a21ed8b740c3d17483e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5854707 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6e0ae899 2024-09-17T12:12:03 Vulkan: Suppress more rasterizer-discard VUs due to VVL bugs Bug: angleproject:42266678 Change-Id: I7321c28362d1a2be529b9d173c8429c757c26fd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5869444 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao dbdc9551 2024-09-16T10:19:47 Vulkan: Let asyncCommandBufferReset control garbage cleanup So that people can toggle the flag to compare perf/power difference with async thread doing garbage clean up AND command buffer reset. This also renames feature flag asyncCommandBufferReset to asyncCommandBufferResetAndGarbageCleanup to reflect the implementation. Bug: b/255411748 Change-Id: Id459e6f4dc81ec76b6c0c2dba0db46041ea6ae8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5867389 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi f8031fbe 2024-09-17T11:35:58 Vulkan: Unsuppress fixed VU errors Bug: chromium:359904720 Bug: angleproject:362545033 Change-Id: I2721344843ffbddd6c56261359360473ad896a39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5870469 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Mohan Maiya f2eb8781 2024-09-14T16:16:53 Vulkan: Selectively enable emulateR32fImageAtomicExchange Only emulate R32F imageAtomicExchange if shaderImageFloat32Atomics feature is not supported Bug: angleproject:42264071 Change-Id: I305ab88bf3ac918eff5d8c399f0ed02ec8c60c2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860814 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 1503a107 2024-09-17T10:46:29 Revert "Vulkan: Prefer monolithic pipelines everywhere" This reverts commit e9ab557c744c29088174b6c7bc93692fe7f32dbd. Reason for revert: kills Windows Intel UHD 770 machines http://anglebug.com/42265839#comment34 Original change's description: > Vulkan: Prefer monolithic pipelines everywhere > > Apparently, every vendor prefers this, and > graphicsPipelineLibraryFastLinking has no bearing on the driver's > preference. > > Bug: angleproject:42265839 > Change-Id: Ied8d82e0a9e08fe5efe3f625e2612764f67f9768 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5861024 > Commit-Queue: Yuxin Hu <yuxinhu@google.com> > Reviewed-by: Yuxin Hu <yuxinhu@google.com> > Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:42265839 Change-Id: I95fa61b2242684b63adc2841b777bde923e34d41 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5868055 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi e9ab557c 2024-09-14T22:11:18 Vulkan: Prefer monolithic pipelines everywhere Apparently, every vendor prefers this, and graphicsPipelineLibraryFastLinking has no bearing on the driver's preference. Bug: angleproject:42265839 Change-Id: Ied8d82e0a9e08fe5efe3f625e2612764f67f9768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5861024 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 6ee07959 2024-09-13T17:12:26 Remove the suppressed VVL error https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/8523 is fixed. Remove the VVL error from the suppressed list. Bug: b/365580001 Change-Id: Ib7a3819e740393306995df1eabec14e1b9878d7a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860811 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Yuly Novikov 7dcfc32b 2024-09-12T16:25:28 Remove renamed VUID VUID-VkVertexInputBindingDivisorDescriptionEXT-divisor-01870 was renamed to VUID-VkVertexInputBindingDivisorDescriptionKHR-divisor-01870 in https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/6adb436617e6c66fbc8b2a24996659f5c5bbb63f Bug: angleproject:42266877, angleproject:42266639 Change-Id: I382625d33ef6728835d8e9db307d32b7910ac9b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5855187 Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
angle-autoroll 958b657f 2024-09-10T20:34:57 Manual roll vulkan-deps from 725499142cb6 to 3b92cef97feb (32 revisions) Manual roll requested by yuxinhu@google.com Manual roll changes: suppress VUID-vkCmdDrawIndexed-Input-08734 until VVL issue angleproject:365580001 is addressed. https://chromium.googlesource.com/vulkan-deps.git/+log/725499142cb6..3b92cef97feb Also rolling transitive DEPS: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang/+log/a496a34b439022750d41d2ba04fbbe416ef81c9a..12a17b7ce41436427e358608183100b1103274da https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers/+log/efb6b4099ddb8fa60f62956dee592c4b94ec6a49..2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801 https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools/+log/e1782d6675b88225225e331a6318554d473c54db..d160e170d74ff45cb2a88dfb365bdfd896016f7c https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader/+log/c758bac8bf1580b5018adafd3a2ec709237b0134..1108bba6c97174d172d45470a7470a3d6a564647 https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries/+log/fbb4db92c6b2ac09003b2b8e5ceb978f4f2dda71..ea5774a13e3017b6d5d79af6fba9f0d72ca5c61a https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers/+log/af7b0a35d009b5ad6e0b280a5b81388608ebfe39..99de3c17fbc2db6b6da0347916c9e01a383c2758 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC angle-team@google.com,yuxinhu@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: angleproject:365580001 Tbr: yuxinhu@google.com Change-Id: Iac9c8b6310d3ebb955dd09fd26b71d373e13b479 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5849280 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 6afcbd3e 2024-09-10T10:31:42 Vulkan: Disable dynamic rendering on ARM Due to driver bugs. Bug: b/356051947 Change-Id: Ic345496010b051ad054811a8c34bb3f816bbf258 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5851632 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 941b3df3 2024-08-21T17:23:16 Vulkan: Add new threshold for CPU buffer subdata Currently, with preferCPUForBufferSubData enabled, when the GPU is busy, we use the CPU to copy subdata, which includes duplicating the buffer. If the buffer is large, this can cause performance regression. To avoid this, we should avoid using the CPU in cases that can lead to such regressions. * Enabled preferCPUForBufferSubData for all ARM devices. * This feature is only used in the following cases: * If the buffer is smaller than than 32K; or * If the copy size is greater than 1/8 of the total buffer size. * Significant performance improvement observed in several traces. Bug: b/360118138 Change-Id: Ibc8e3de9b4e081c69457c85facba893283c8fb38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5824347 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 621bba6c 2024-09-04T09:58:09 Vulkan: Fix device entry points loaded as instance Bug: angleproject:359420106 Change-Id: I970ac7b924013a3c8ea5dd73f90bbe1649969753 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5836783 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 8b6b1113 2024-08-30T16:06:17 Vulkan: Fallback to host unCached if no cached memory available Android studio may not have any host cached memory. This CL will make it use unCached memory in this case. User of this memory will still treat it like cached and try to flush/invalidate cache, but these flush/invalidate call will early out, so they should still work. Performance wont be good, but that is the best we can do to make it work instead of crash. Bug: b/363347052 Change-Id: I68ac917585f6f5672a75085c397858bdc28687e9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5828132 Reviewed-by: Lars Harrison <slumpwuffle@google.com> Auto-Submit: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 20e0b83a 2024-08-30T11:05:09 Vulkan: Expand preferSubmitAtFBOBoundary from ARM to all tiler GPUs On S24, enable preferSubmitAtFBOBoundary flag boost black_clover_m frame time significantly. The app uses occlusion query which was blocking the CPU to encode next frame until one of the previous frame's render pass is completed. Enable preferSubmitAtFBOBoundary makes the render pass being submitted early which reduces the query wait time, which in turn boost GPU utilization and bumps GPU clock. This reduces frame time of black_clover_m from 23.8ms to 6.4ms, even much better than native's 16ms. It could impact power usage as well, a little bit harder to tell without data that it will be better or worse. For now, I am enabling this for all tiler based GPUs and we can re-evaluate if any problems comes up. This would potentially also benefit other desktop GPU as well, but I am not touching these until we have data showing the benefit before enabling it. Bug: b/362555815 Change-Id: Ie7a5231350389c49091bb2771c542b4439c9c227 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5829781 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8d6f6c23 2024-08-29T14:56:31 Vulkan: Unsuppress fixed VVL errors Bug: angleproject:361600662 Change-Id: Ic4585f4b38261f69700a9703bdb10b60e18f638a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5826762 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b43f8889 2024-08-29T12:34:46 Vulkan: Fix varyings reserved for xfb At some point in the past, the ANGLEXfbPosition varying was generated unconditionally when the xfb extension is available. The logic that reserved one varying for this was not updated and fails to account for it in recent drivers. Bug: angleproject:362545033 Change-Id: I65fb58cd912b96b2774a7dfbffa4aa656f694e81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5826761 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 79729f7c 2024-08-27T17:13:57 Reapply "Vulkan: Expose float control properties as angle features" This reverts commit 5a8eab96c6b7b99b8568feb902b8b85e2df7e19a. This relands the commit 027cbe1a071f41a09d596c4baa243a0abc3d1a86 with the below changes - add back needed suppressions that were removed erroneously ``` // https://anglebug.com/361600662 "VUID-RuntimeSpirv-OpEntryPoint-08743", "VUID-RuntimeSpirv-OpEntryPoint-07754", "VUID-RuntimeSpirv-maintenance4-06817", ``` Bug: angleproject:360031000 Change-Id: I74ed80b459466bdd8ae638ff875677b089aaa360 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5818733 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Sheedy c094d4bc 2024-08-26T18:00:50 Enable tests on linux-exp-nvidia Enables tests on the new linux-exp-nvidia builder. Bug: chromium:357573052, chromium:362545033, chromium:362486580 Bug: chromium:362728695 Change-Id: Ib2f1c2edb139be1b3b2225dd9a9ec88df2bf1a84 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5814931 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Yuly Novikov 5a8eab96 2024-08-27T10:07:26 Revert "Vulkan: Expose float control properties as angle features" This reverts commit 027cbe1a071f41a09d596c4baa243a0abc3d1a86. Reason for revert: removes needed suppressions, breaking bots: https://ci.chromium.org/ui/p/angle/builders/ci/win-exp-test/569/overview https://ci.chromium.org/ui/p/angle/builders/ci/linux-exp-test/810/overview https://ci.chromium.org/ui/p/angle/builders/ci/android-arm64-exp-s22-test/1060/overview Original change's description: > Vulkan: Expose float control properties as angle features > > The different fp configuration that a vulkan backend supports are > exposed through `VkPhysicalDeviceFloatControlsProperties`. Expose these > as angle features that api's implementations can query. > > The autogen files are changes as reported by running `python3 > scripts/run_code_generation.py` script. > > Bug: angleproject:360031000 > Change-Id: I038cbf2c9e2b10916697994782ef73b35a1caf12 > Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5798053 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:360031000 Change-Id: I88c0a083725320b5e1a8302a50f67d41cbf5c089 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5816829 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Gowtham Tammana 027cbe1a 2024-08-13T17:27:27 Vulkan: Expose float control properties as angle features The different fp configuration that a vulkan backend supports are exposed through `VkPhysicalDeviceFloatControlsProperties`. Expose these as angle features that api's implementations can query. The autogen files are changes as reported by running `python3 scripts/run_code_generation.py` script. Bug: angleproject:360031000 Change-Id: I038cbf2c9e2b10916697994782ef73b35a1caf12 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5798053 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Yuly Novikov 95c30276 2024-08-26T18:14:30 Don't use VK_GOOGLE_surfaceless_query on Samsung S24 Xclipse Apply S22 workaround on S24 as well, tentative fix for bad traces. Bug: b/362253922 Change-Id: I5a04741d7465139f86de5baadbf774eed172b4e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5812323 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Gowtham Tammana 3f1c47bf 2024-08-13T15:06:40 Vulkan: Add VK_KHR_variable_pointers ext if available Add VK_KHR_variable_pointers exetensions to enabled extension if it is supported. This is needed when SPIR-V 1.4 is supported. Bug: angleproject:360031000 Change-Id: Ia93604ae308c9f304acb3bc39457811401a0ca7b Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5789897 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 2e35835b 2024-08-23T11:28:54 Suppress new VUIDs VUID-RuntimeSpirv-OpEntryPoint-08743 VUID-RuntimeSpirv-OpEntryPoint-07754 VUID-RuntimeSpirv-maintenance4-06817 Started reporting after VVL roll https://chromium-review.googlesource.com/c/angle/angle/+/5807076 Bug: angleproject:361600662 Change-Id: Ibdf30bd2506366460009f18a4e1f63559d23eb97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5803266 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Gowtham Tammana 579a5855 2024-08-13T11:39:54 Vulkan: Add query for 64bit fp support feature check Add a feature check for shaderFloat64 support. If present expose the corresponding feature check. The following files are updated by running the autogen script - `run_auto_code_generation.py` - include/platform/autogen/FeaturesVk_autogen.h - util/autogen/angle_features_autogen.cpp - util/autogen/angle_features_autogen.h Bug: angleproject:360031000 Change-Id: If2a11190729550ad5b84714e0a3aa3b81956c66a signed-off-by: gowtham tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5789896 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana e90cd0c4 2024-08-12T17:07:47 Vulkan: Add check for int8 extension support Vulkan backend currently has a check for float16 part in VK_KHR_shader_float16_int8 extension. Add the int8 support as well. The changes in below files are generated through `scripts/run_code_generation.py` script - include/platform/autogen/FeaturesVk_autogen.h - util/autogen/angle_features_autogen.cpp - util/autogen/angle_features_autogen.h Bug: angleproject:360031000 Change-Id: I8811779299e3d24b4536d1871e1eadcbb87432c2 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5792021 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 319907d2 2024-04-05T16:05:33 Vulkan: Propagate the support of shaderInt16/64 feature Progate the support of shaderInt16/64 features in to enabled feature list. Bug: angleproject:360031000 Change-Id: I38915a764fb2f1dd31348c01bc2fcfa4913ebdec Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5792019 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
angle-autoroll e6b46eae 2024-08-15T10:01:05 Roll vulkan-deps from f084a55f96da to 91058f2297c9 (4 revisions) Suppress new VUIDs: VUID-vkCmdDraw-Input-07939 VUID-vkCmdDrawIndexed-Input-07939 VUID-vkCmdDrawIndexedIndirect-Input-07939 VUID-vkCmdDrawIndirect-Input-07939 https://chromium.googlesource.com/vulkan-deps.git/+log/f084a55f96da..91058f2297c9 Also rolling transitive DEPS: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang/+log/3a08cd8de1f88d114c18670366f29226db453a9e..0dc6711e5a178e4d5643437af688c6b48f829f5c https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers/+log/f013f08e4455bcc1f0eed8e3dd5e2009682656d9..1b75a4ae0b4289014b4c369301dc925c366f78a6 https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers/+log/8d902c7f67edd9e54b0fa5f7d2c34f9abfeacba8..4eb3585f32ec194efe2d9cd88a2b2943ff41f922 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC angle-team@google.com,ynovikov@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: chromium:359904720 Change-Id: Idf82bf9a210b953785fc2387e5c64ef157ec36e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5791052 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Gowtham Tammana 2003e062 2024-08-09T17:52:38 Vulkan: Set queue family index for oneoff command buffer Use the queue family index that the Renderer has chosen for creation of oneoff command buffers. Bug: angleproject:359623670 Change-Id: I0a36edf79a751133d477d433c9cfd8dbddaad221 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5785864 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 2b15c795 2024-08-09T17:13:17 Make explicit that GenerateCrc() return correct CRC32 hash According to the documentation of `crc32_z()`, to get required initial value need to call `crc32_z()` with nullptr "buf" parameter. Using this initial value will produce correct CRC32 hash. On practice, `crc32_z()` with nullptr "buf" produces "0", so the current code actually calculates correct CRC32 hash. However, this is still against the documentation, and in different versions of zlib or architectures may produce incorrect results. Technically, `GenerateCrc()` does not require to produce correct CRC32 hash - the main purpose is to calculate some hash value. But because updating this function to produce correct CRC32 hash is very easy, this change updates the implementation and renames it to `GenerateCRC32()` to explicitly state that it generates correct CRC32 hash. After this, function may be used in scenarios where CRC32 hash is really required. Bug: angleproject:4722 Change-Id: Ib159f2d3ad1a8388f505abb09a6d0b19a51b7eec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5777145 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov bacd3a7d 2024-08-07T19:01:18 Vulkan: Fix CompressAndStorePipelineCacheVk() crashing `ContextVk` may be destroyed while `CompressAndStorePipelineCacheTask()` is still running. Context is only used to output a performance warning. So in case of such performance warning, `gl::State::mDebug` object may be already destroyed, causing undefined behavior. Change removes `ContextVk` from the function and uses `WARN()` instead. The `CompressAndStorePipelineCacheTask` stores pointer to the `vk::Renderer` instead of `ContextVk`. Bug: angleproject:4722 Change-Id: Iba9cad78ce5c6ea29cc2143f7bd2340cf0484855 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5768881 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov bc0c6c5b 2024-08-07T09:48:25 VVL: sync_queue_submit -> syncval_submit_time_validation Avoids this warning printed to stdout: Validation Setting Warning - sync_queue_submit was set, this is deprecated, please use syncval_submit_time_validation Bug: b/316013423 Change-Id: I9a8be1a49be72e8ec2fed74ace36989d8e37163a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5769522 Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 7a81e79d 2024-08-02T19:39:57 Vulkan: Fix mPipelineCache not populated from blob cache Fixes regression introduced in change: Vulkan: Remove support for pipeline cache control https://chromium-review.googlesource.com/c/angle/angle/+/5375102 Returns logic implemented in: Vulkan: pipeline cache not populated as blob cache is not set https://chromium-review.googlesource.com/c/angle/angle/+/1683807 In the current state, call to `ensurePipelineCacheInitialized()` from `getPipelineCache()` is essentially a dead code, since `mPipelineCacheInitialized` will always be `true` after call from `createDeviceAndQueue()`. So if blob functions are not set before `createDeviceAndQueue()` then blob cache data will never be loaded. This change simply removes `ensurePipelineCacheInitialized()` from the `createDeviceAndQueue()`, since cache can only be accessed after the initialization (`mPipelineCacheInitialized` is true). Bug: angleproject:8601 Change-Id: I3db1cd69346ec1aa2c36e4134c77680526b22cc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5756574 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 721becf2 2024-08-06T17:49:56 Vulkan: Update Renderer::syncPipelineCacheVk() method Add check for `mPipelineCacheInitialized` to avoid overwriting existing pipeline cache data in the blob cache by empty cache data if sync is called before pipeline cache is loaded from the blob cache. Move checking of `mCompressEvent` before getting pipeline size and updating `mPipelineCacheSizeAtLastSync`. This will avoid unnecessary (potentially heavy) vulkan call and fix bug when next sync is skipped, because `mPipelineCacheSizeAtLastSync` is already updated. Bug: angleproject:4722 Change-Id: I7390c4bc53ba57732b659d79c65ed4da8d7a6ba6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5756575 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 22ed9877 2024-03-07T15:52:13 Vulkan: Generate fragment shading rates with compute Generating fragment shading rates on the CPU could cause avoidable stalls or increased latencies due to host<->device synchronization. Instead generate the rates using a compute shader. Optimize foveated rendering by treating a foveated draw with focal points whose gainX or gainY is 0 as if it were an un-foveated draw Bug: angleproject:42266906 Change-Id: If8c5504087997666c7d0c1cae8dcc5fab847187e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5754322 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Yuxin Hu ea63e372 2024-08-01T21:10:02 Enable VK_KHR_synchronization2 if it is available If the device supports VK_KHR_synchronization2 and VkPhysicalDeviceSynchronization2Features.synchronization2 queried from the device is VK_TRUE, Enabled the extension VK_KHR_synchronization2 and feature VkPhysicalDeviceSynchronization2Features when calling vkCreateDevice. Bug: b/356985874 Bug: b/336844257 Change-Id: Iac95f373a283f5a97e126770321769e0f760e5f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5759319 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 65f08d08 2024-07-26T22:14:49 Vulkan: Work around driver bug with nested switch Bug: chromium:350528343 Change-Id: Ie7bd58934ccb2b8f06f6ad6a8c3bf38e81b84969 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5744620 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 7b0dc666 2024-07-19T15:39:42 Vulkan: Enable explicitlyEnablePerSampleShading for most vendors Bug: b/267953710 Bug: angleproject:40096890 Tests: SampleMultisampleInterpolationTest.SampleMaskInPerSample* Change-Id: I51cc393934e7fd24146ab5c94893bb3014c5c044 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5726628 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 85edb907 2024-07-17T19:09:09 Vulkan: Remove the adjustClearColorPrecision feature for new driver The vulkan driver issue that this feature tries to workaround is resolved in the new driver. Remove the feature workaround. Bug: b/292282210 Change-Id: I541526e71d5312f1a23b5a415e96d5b966e77f2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5719652 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Igor Nazarov 86b22745 2024-07-17T19:05:51 Vulkan: Fix mPipelineCache is not initialized after terminate Very old regression: https://chromium-review.googlesource.com/c/angle/angle/+/1683807 Problem happens only if call `eglInitialize()` again on terminated display without also calling `eglGetDisplay()`. Note: calling `eglGetDisplay()` on terminated display will call `setupDisplayPlatform()`, which will destroy old `mImplementation`. Test: angle_end2end_tests --gtest_filter=EGLDisplayTest.InitializeDrawSwapTerminateLoop* Bug: angleproject:3318 Change-Id: I94bc7eba97be2d9b194c1a22a37662a2836f60b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5717753 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 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>
Charlie Lao 58a56ca4 2024-07-16T11:26:44 Vulkan: Restrict VkEvent to TBRs VkEvent has much bigger overhead. Until we know that it helps desktop GPUs, we restrict it to TBRs. Also enabled for SwiftShader so that we get more test coverage in bots. Bug: b/336844257 Change-Id: Ie1859a515c9969ca37f07eae0ff729dd934eb26e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5714391 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 06921c61 2024-07-08T12:13:40 vulkan: filter out devices with insufficient API version We weren't taking the version into consideration inside ChoosePhysicalDevice, but RendererVk really cares about that and will error out if the selected device doesn't meet the minimum API version requirements. Frontload some of that API version check work in ChoosePhysicalDevice, giving it the opportunity to find a device that matches the requirements. Bug: angleproject:351866412 Change-Id: I471e93b03eca5e18e98202f9848ba0fd1b55d5a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5686556 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao a5161f01 2024-06-04T15:46:04 Vulkan: Enable event based image barrier This CL enables VkEvent based image barrier for all GPUs. The testing result on HK3 shows manhattan31_off score impoves ~5%. We can exclude certain barrier insensitive GPUs if needed. Bug: b/336844257 Change-Id: Iebc4957dbb683637c9314e706be31d3376ee15aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634089 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Imran Ziad 24322b7d 2024-06-28T20:10:34 Vulkan: feature for cached non-coherent for dyn/stream buffers On platforms lacking cached coherent memory, ANGLE falls back to non-cached coherent memory for dynamic/stream buffers. This impacts CPU readback performance. Add VK feature preferCachedNoncoherentForDynamicStreamBufferUsage. When enabled, ANGLE prioritizes cached non-coherent memory for these buffers. Enable this feature for Intel Meteorlake SOCs. Bug: b/347601787 Change-Id: If62af9f3df57c0bcebf18af747cac56e45f93ea7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5667457 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov eda67d7e 2024-07-11T11:16:08 Avoid including fstream from angleutils.h SaveFileHelper is mostly useful for / specific to FrameCapture, so move it there. The other couple of uses just write a string. Bug: angleproject:42266508 Change-Id: Ia1dcd4531f9d5671f40611a1887dcfe7c5dbc1ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5696025 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi f7620039 2024-07-10T10:21:11 Vulkan: Prepare syncval suppressions for dynamic rendering Removing mentions of vkCmdBeginRenderPass and such. Bug: angleproject:42267038 Change-Id: Ibba2c15249b154fb11b116ef75ee6f20e08e4d00 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691343 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 7d461b21 2024-07-10T14:11:53 Revert "Vulkan: Use VK_KHR_dynamic_rendering[_local_read]" This reverts commit c379ff48043a47e444c388c45270db40d3172d50. Reason for revert: Regresses CPU perf and memory when _not_ using DR Original change's description: > Vulkan: Use VK_KHR_dynamic_rendering[_local_read] > > Bug: angleproject:42267038 > Change-Id: I1f4eb0f309992a9c1c287a69520dadf5eff23b26 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637155 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:42267038 Change-Id: I3865f0d86813f0eeb9085a92875a33bd449b907f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691337 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
angle-autoroll 0679b3eb 2024-07-09T18:55:35 Manual roll vulkan-deps from 17d345a0f23d to 1d4b1061b004 (24 revisions) Suppressing a new sync hazard warning Manual roll requested by romanl@google.com https://chromium.googlesource.com/vulkan-deps.git/+log/17d345a0f23d..1d4b1061b004 Also rolling transitive DEPS: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang/+log/5939e32b87487fa9c72ab336ebfcc5ae26d9ab6d..42d9adf50b4ad7db2a7212318068ec614b36414f https://chromium.googlesource.com/external/github.com/LunarG/VulkanTools/+log/00c49e3b56cc9748228d2e5b0d1e8e9c4409a02f..88194ef2d87683f963e735793f20ad1ebce70bc5 https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools/+log/216574bedb80d439c2533d161e7ea7897504bbb6..9f2ccaef5f70c32bcd6c911a2b09dbb26106b437 https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers/+log/190d2cb24e90e5bf2bec0a75604a9b3586485b6d..6c539b2ed2dba2997cdedeac0b376ff2fe382595 https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries/+log/df78ee39d2ff6c10b4f7f2ae06c7ca64524f9e25..d13c1ee715c4674237aca1c775479e1edde87d3c https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers/+log/96fb5396040477fbbffdc1b4439dea9447f59d80..d03e2bca31b298fc911f7c89cfaf24d28904492d If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC angle-team@google.com,romanl@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: angleproject:352094384 Tbr: romanl@google.com Change-Id: If9da3b32eb405aba8472a020be0c3fd732656f27 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5689521 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi c379ff48 2024-06-10T22:01:57 Vulkan: Use VK_KHR_dynamic_rendering[_local_read] Bug: angleproject:42267038 Change-Id: I1f4eb0f309992a9c1c287a69520dadf5eff23b26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637155 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Mark Lobodzinski 3813e805 2024-06-21T14:29:55 Add env var/property control of API dump layer Layer is now included with all debug/assert builds or when specified through GN arg. VK_VULKAN_API_DUMP_LAYER on desktop, or for android set debug.angle.enable_vulkan_api_dump_layer to 1. Also included some renaming since layers other than validation are supported. Bug: angleproject:8623 Change-Id: I2bb976dede53712f781a531d0c4f3ce4d33f052c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5649937 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi df7bda5c 2024-06-21T13:27:08 Disable MSRTSS if not supported for RGBA * Support for MSRTSS is checked for RGBA8 and RGBA8_SRGB during renderer initialization. * In the case of lack of support, this feature is disabled. * preferMSRTSSFlagByDefault is disabled if MSRTSS is not supported at all. Bug: angleproject:348181798 Change-Id: If1bf27f53a61f4fd67576c426ab07f4e2304fbe9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5647495 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi a1dea207 2024-06-13T11:40:39 Implement KHR_blend_equation_advanced_coherent * Updated the validation for glBlendBarrier() and ~KHR(). * GL state now includes mBlendAdvancedCoherent. * Updated glEnable() to accept GL_BLEND_ADVANCED_COHERENT_KHR. * It can be queried via glGetIntegerv(), etc. * EXTENDED_DIRTY_BIT_BLEND_ADVANCED_COHERENT added. * Added a corresponding bit to ExternalContextState. * If coherence is supported, there should be no need to use blend barriers, as, based on the spec, the advanced blend ops should then follow order like the basic blend ops. * Relevant tests: *GLES31.functional.blend_equation_advanced.coherent* * On Linux/NVIDIA: From "Not supported" to "Passed" Bug: angleproject:42262258 Change-Id: I7e0e43bdc71524eec111c2d3b024fe73c9795e55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634381 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 05801537 2024-06-13T13:35:05 Vulkan: Add feature for coherent blend advanced op This change will add features that will be used in the follow-up CL. * Added the following feature to the Vulkan backend: * supports_blend_operation_advanced_coherent * Added the following feature to the renderer: * mBlendOperationAdvancedFeatures * It will be used to query advancedBlendCoherentOperations from the physical device. Bug: angleproject:42262258 Change-Id: I2949002d053700e89d92358d6e7c80c714ea36ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634380 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Mark Lobodzinski 37b2487b 2024-05-03T09:55:04 Add LunarG api dump layer to ANGLE vulkan back-end Bug: angleproject:8623 Change-Id: Ia4dbd5915c5fe918cd65e09b468e0b8d094522f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601070 Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6ac37446 2024-06-17T15:38:09 Vulkan: Add feature for VK_KHR_maintenance5 This extension expands the pipeline flag bits, one of which is needed for VK_EXT_legacy_dithering v2 for dynamic rendering. Bug: angleproject:42267038 Change-Id: I45f2c47fbd016f60c3e52fda80d148d9f147bd71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637154 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 165b85b6 2024-06-13T16:54:03 Vulkan: Disable VK_EXT_shader_stencil_export on SwiftShader Bug: chromium:40942995 Change-Id: I4c469108c420d3e68008a30f627989655a64c27c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5630161 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 53fdd3b1 2024-06-11T08:53:55 Vulkan: Remove suppression for fixed syncval error VVL bug fixed upstream. Bug: angleproject:344031874 Change-Id: I2521744439b93531ef9bab66a37cd71884a74cf1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5621970 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 65f8dc8e 2024-06-12T17:01:54 Vulkan: Remove traces of VK_MSRTSS_GOOGLEX Devices that shipped this unreleased extension should have long been updated to VK_MSRTSS_EXT Bug: angleproject:4836 Change-Id: I23736ebf28afd4a6f3b5b0d5a6417b3e7564c293 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5627575 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov 15c182f9 2024-06-11T09:47:07 Vulkan: remove deferFlushUntilEndRenderPass feature, always on This only applies to Qualcomm chipsets, the feature was already enabled for all other devices. It was previously causing a manhattan 3.0 perf regression on some Qualcomm devices, but my tests on S24 both with ANGLE trace manhattan_31 and running gfxbench manually do not show any obvious regression. It was also not expected that this would result in a regression. As we do not aim to improve perf on older devices, removing the feature altogether so that defers are always enabled. This change resulted in a change in gold images on these traces on pixel 4 bots: pokemon_masters_ex - text was missing and now is rendered street_fighter_iv_ce_frame86 - shadow was missing and now is rendered So it looks like the feature may have been working incorrectly. Bug: b/346378481 Change-Id: I2b0d15b89e11c67dea7c316a42bc807441c43b0a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5622115 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi ebb56cee 2024-05-31T15:10:37 Implement OES_tessellation_shader Based on the specs, there are no functional differences between OES and EXT. * Added validation for glPatchParameteriOES() and the core glPatchParameteri(). * Added the extension support for GLSL. * EXT_shader_io_blocks is implicitly enabled for the EXT geometry and tessellation shader extensions. * OES_shader_io_blocks is implicitly enabled for the OES versions of said extensions. * Added a test to make sure using this extension works instead of EXT. * Turned the repeated test code into a function: * testTessellationTextureBufferAccess * Skipped the tests that fail on various platforms. * It seems that these tests were being skipped before enabling this extension ("Not supported"). Bug: b/344030760 Bug: angleproject:345306326 Bug: angleproject:345304850 Bug: angleproject:345312771 Change-Id: I905da0132bf6525cb453dcaa613e4deb3155c4dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595611 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi c519a4a6 2024-06-10T15:56:36 Vulkan: Add dynamic rendering features Bug: angleproject:42267038 Change-Id: Ic2cdc277f6bb1bb3ce273a866bdb2ce6f5930355 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5617653 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 295ff607 2024-06-05T14:49:33 Vulkan: Precompute stageMask of kImageMemoryBarrierData Right now every time we need a pipelineStage in kImageMemoryBarrierData, we are doing a bitwise AND with mSupportedVulkanPipelineStageMask. This get called multiple times from barrier call. This CL adds mImageLayoutAndMemoryBarrierDataMap that has already precomputed all stageMask, thus avoid run time bitwise OR. This CL also precomputes the bufferWritePipelineStageMask so that flushImpl can be use it without construct every time. Bug: b/345279810 Change-Id: I878bd31c967cd217477061976f07df13b043fa7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601073 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 4d47c73a 2024-06-04T15:43:36 Vulkan: Enable SyncVal for VkEvent based barriers Previously SyncVal is disabled due to some tests time out when VkEvent is enabled. Now with earlier CLs that reduces number of VkEvents being used, we are able to enable SyncVal again when event based barriers are enabled. Bug: b/336844257 Change-Id: Idb4f8646495cd087d79f2d09cd12fccfa9062792 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5597733 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 87bbeaee 2024-06-03T15:04:25 Vulkan: Reduce VkEvent counts by using EventStage enums Right now we are using too many VkCmdSetEvents and causes some of the deqp tests timeout on CI bots (because of VVL is very slow along with the number of events being used). RefCountedEvents are per ImageLayout. But some of ImageLayous have the same VkPipelineStageFlags, for example TransferSrc and TransferDst. This CL changes RefCountedEvent to per unique VkPipelineStageFlags instead of per ImageLayout, thus allows TransferSrc and TransferDst to share one VkEvent. To do that, EventStage enum and kEventStageAndPipelineStageFlagsMap table are added to define the predefined VkPielineStageFlags that ANGLE uses. RefCountedEvent now keeps EventStage instead of ImageLayout. To further reduce the CPU overhead, a customized mPipelineStageMaskAndEventMap table is precomputed in renderer with supported vulkan pipeline stages. With this CL, previously timed out tests such as KHR-GLES3.copy_tex_image_conversions.forbidden.renderbuffer_cubemap* now passing. Bug: b/336844257 Change-Id: I021a8f1d6112d5cf96c61652c9af5f679b1172eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5597732 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi 25374c90 2024-05-31T16:08:58 Implement OES_gpu_shader5 Based on the specs, there is no difference between the OES version and the EXT version. * Added support for use in shaders * Added test to make sure the OES extension works. * Turned the repeated test code into a function: * testArrayOfArrayOfSamplerDynamicIndex() Bug: b/344031022 Change-Id: Ifda4fa5495983d254f598940a95d0797e8a9ce67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595609 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 7d65c945 2024-06-06T09:01:40 Vulkan: Limit SSBO max size to 256MB on older Mali GPUs Bug: angleproject:345244067 Change-Id: I18ff10198fc3db3a82a0897319fba5fb200a2a05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5603109 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 6aad8a89 2024-05-31T14:46:28 Vulkan: Remove combineAllShadersInPipelineLibrary If we have VK_NULL_HANDLE as the descriptor set layout handle for both pre-rasterization and fragment shader subset pipelines we run into VVL - VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681 Need to work around this by having the renderer store a placeholder descriptor set layout handle for an empty DescriptorSetLayoutDesc that can be reused across all contexts Bug: angleproject:8677 Tests: EGLMultiContextTest.NonSharedContextsReuseDescritorSetLayoutHandle* Change-Id: I22e7f39c497d7f668afe7cb26690f6a9de49831b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5587990 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Solti 9ca4c0df 2024-05-31T23:08:26 Manual roll vulkan-deps from f7e762742da9 to d4f7e6e954db (1 revision) Manual roll requested by solti@google.com https://chromium.googlesource.com/vulkan-deps.git/+log/f7e762742da9..d4f7e6e954db Also rolling transitive DEPS: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers/+log/ff56cf67d3494eec1243cc4225d1667e9b3f90cd..e15fdd01eff029f2bf15e63970f2a7cebf2999b0 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC angle-team@google.com,solti@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Note: - in addition to the DEPS, this CL suppresses the VVL error. Bug: angleproject:344031874 Bug: b/343202259 Change-Id: I145d09821ba1ae4adbefcf151d3a852f00c3f950 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5587991 Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Yiwei Zhang 42a61f6e 2024-06-01T23:25:39 Vulkan: no longer need isVenus condition All things needed by Venus have been upstreamed or gated behind the actual hw driver backend. Bug: None Test: build Change-Id: I5cec111aaeac5cc5cef05e199653489ee6dffc2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5591469 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi ddd93740 2024-05-16T15:49:47 Vulkan: Extend GLES 3.2 extension requirements * Added CanSupportGLES32() to extend the extension requirements for GLES 3.2. * The following function returns the extension list: * GetRequiredGLES32ExtensionList() * If any required feature is not supported, we must fall back to GLES 3.1 (unless exposeNonConformantExtensionsAndVersions is enabled). * Added LogMissingExtensionsForGLES32() to log any missing extension that is required for GLES 3.2. * (Currently, if xfb extension is not supported and cannot be emulated, we fall back to GLES 2.0.) * (KHR_debug by default is marked as a supported extension in the frontend. Therefore it is not added to the check.) * In generateSupportedExtensions() * CanSupportGPUShader5EXT() is now private to vk_cap_utils.cpp. * Before checking if the max GLES version should be capped, we make sure that the caps are initialized. Bug: angleproject:42263905 Bug: b/336860504 Change-Id: Ib5d85df310c6ec7df6258d3ea430f9c365153fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5544455 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c33c6cd3 2024-05-27T00:06:18 Vulkan: Use OpSelect with all types with SPIR-V 1.4 SPIR-V 1.4 relaxes the types that can be used as arguments of OpSelect. Previously, the types were limited to scalars and vectors, but since SPIR-V 1.4, it's unrestricted. Writing tests for this change, another bug was discovered where support for structs and arrays with the ternary operator was disabled due to ESSL 1.0, even though that support is mandatory in ESSL 3.2. Bug: angleproject:342316794 Bug: angleproject:343218491 Bug: angleproject:3830 Change-Id: I6cff2f8178634369f773c4fb16a1ddde96928c8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5570154 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 34b832a3 2024-05-24T13:38:58 Vulkan: Add RefCountedEvent recycler Previously the recycler was disabled due to race between resetEvent and setEvent. This CL splits mFreeStack into two list: mEventsToReset and mEventsToReuse. Events are first added to mEventsToReset list. Then at OutsideRenderPassCommandBufferHelper::flushToPrimary time, VkCmdResetEvents are added to reset all events in mEventsToReset list, and that reset operation is tracked by mResettingQueue. When reset command is completed, events moved into mEventsToReuse list. Since access to renderer's RefCountedEventRecycler requires lock, RefCountedEventCollector (a queue of events) is passed between ShareGroupVk and renderer's recycler to minimize the locked access. Bug: b/336844257 Change-Id: Iffac095729a81ba65a43df68cc9255d76e4be7c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5576757 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi c53b3405 2024-05-25T02:50:27 Vulkan: Use OpCopyLogical with SPIR-V 1.4 When shaders copy structs and arrays, this instruction saves a lot of churn in the SPIR-V. Bug: angleproject:342316794 Bug: angleproject:343218484 Change-Id: I698a8d8ee8c15113e40602a0f4953726bc9a84f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5570152 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 018188c7 2024-05-28T14:44:14 Vulkan: Fix CachedPreferCoherent to actually require cached VK_MEMORY_PROPERTY_HOST_CACHED_BIT should be in requiredBits instead of preferredBits for CachedPreferCoherent buffer. This again caused pixel6 test failures. flush() call is added right after buffer allocation to fix the test failure. This likely is due to the spec says " If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.". Bug: b/339562049 Change-Id: Ie8529722bd03534598b03983ba447131573b1879 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5578276 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 9620d4d3 2024-05-23T16:12:52 Vulkan: Emit SPIR-V 1.4 where available In preparation for optimizations possible for SPIR-V 1.4. This change makes ANGLE output SPIR-V 1.4 if supported, and SPIR-V 1.3 otherwise. It handles the following differences between the two versions: - OpEntryPoint in SPIR-V 1.4 includes all global variables, as opposed to SPIR-V 1.3 where only the Input and Output variables are listed - Storage buffers use a dedicated storage class in SPIR-V 1.4 Bug: angleproject:342316794 Change-Id: I157ed46449ff2d0f14d284b883b4ddc1b4b46fd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5565224 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 55c8c714 2024-05-23T17:26:24 Vulkan: Enable ABE emulation for Android * Enabled emulating advanced blend equations for all Android devices without VK_EXT_blend_operation_advanced. Bug: b/336860504 Change-Id: I97bf654dc4058b5a92d7de32b1000fb7aff86828 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5567092 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7b0d26bb 2024-05-23T15:46:34 Vulkan: Disable VkEvent for images due to perf regressions Bug: angleproject:336844257 Change-Id: I5732455a48f449f402dc114e019d1dc91142b59e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5565223 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 602c0edf 2024-04-25T15:08:32 Vulkan: Enable VkEvent for Image barriers This CL actually enables using VkEvent for image barriers. One problem with event is that syncVal is super slow when event is used (it actually slow with VkCmdSetEvent call). which causes a few tests (KHR-GLES3.copy_tex_image_conversions.forbidden.renderbuffer_cubemap_* and asphalt_9) to timeout. These tests did not show signicant overhead with event with VVL disabled, which means the timeout is due to VVL overhead. For now I am disabling syncVal when event is used for image barrier. Since layers are configured before feature bits, a helper function ShouldUseEventForImageBarrier() is introduced to have a central logic enable/disable event. Right ow it just returns true. If we need to disable for a given GPU, we need to pass in proper arguments here while setting up the layers (not sure what exactly will be but will decide when situation comes up). Bug: b/336844257 Change-Id: Iffff8a895e7c767660d327ce9b9e90e6ae0652df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5492739 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 9d124c35 2024-05-21T10:36:27 Vulkan: Store QueueIndex in DeviceQueueMap VkGetDeviceQueue call takes two indices: queueFamilyIndex and queueIndex. Right now DeviceQueueMap only stores queueFamilyIndex. This CL also stores queueIndex in the DeviceQueueMap. In later CL, we are going to expose this queueIndex to vk::Context and vk::ImageHelper along with queueFamilyIndex. In order to do it in a cleaner way, this CL mostly involves cleanup. Previously DeviceQueueMap is a subclass of angle::PackedEnumMap. In this CL, DeviceQueueMap has mQueueAndIndices data member that maps priority to devicePriority/queueIndex/VkQueue. Previously DeviceQueueMap was created in Renderer::createDeviceAndQueue() and then passed to CommandQueue::init(), which copies to mQueueMap. This CL removes the copy. It now calls mQueueMap.initialize() directly from CommandQueue::init(). This CL also cleans up relationship between QueueFamily and DeviceQueueMap. Before this CL, QueueFamily::initializeQueueMap() initialiazes DeviceQueueMap object. After this CL, that logic now moves to DeviceQueueMap::initialize(). QueueFamily no longer modifies DeviceQueueMap class. No functional change is expected. Bug: b/337135577 Change-Id: I3f96fb78aedc89d96d6235b060c88b769bdd1e24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5553066 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yiwei Zhang a00babd8 2024-05-17T20:38:56 Vulkan: disable supportsShaderFramebufferFetchNonCoherent on Android Not just ARM or QC, but also Intel and AMD are impacted. So just disable this for Android as a whole since it's for app compat but not specific to a particular impl. Bug: b/340665604 Test: LIMBO, Diablo Immortal, Real Racing 3, etc are running properly Change-Id: Id11ad4cd541166c9e6c6d84bb09d9c06a175d5a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5547687 Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Lepton Wu <lepton@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 7ac85733 2024-05-15T15:06:31 Vulkan: Enable advanced blend emulation on Intel/Linux Only Intel/windows drivers miss the required functionality. Bug: angleproject:3586 Change-Id: I53eeb100c7ac7ee469e0bb35c19ae42d21f79ed2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5539019 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 44db69ab 2024-05-06T17:12:17 Add Qualcomm version with fixed CmdClearAttachment * Added QualcommDriverVersion (angle::VersionTriple) to make comparing versions more clear. * Added ParseGenericVulkanDriverVersion() to parse the version of drivers using the generic Vulkan format. * Updated the condition for the following feature to no longer apply to more recent drivers. * preferDrawClearOverVkCmdClearAttachments Bug: b/339054824 Change-Id: I0016c6c19ef1606b7c9475d684d98134494d8524 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5514933 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Charlie Lao 0636b509 2024-05-06T12:36:20 Vulkan: Move RefCountedEvent GC and recycler to ShareGroupVk (2/3) One of the problem we had with RefCountedEvents is CPU overhead comes with it, and some part of the CPU overhead is due to atomic reference counting. The RefCountedEvents are only used by ImageHelper and ImageHelpers are per share group, so they are already protected by front end context share lock. The only reason we needs atomic here is due to garbage cleanup, which runs in separate thread and will decrement the refCount. The idea is to move that garbage list from RendererVk to ShareGroupVk so that access of RefCountedEvents are all protected already, thus we can remove the use of atomic. The down side with this approach is that a share group will hold onto its event garbage and not available for other context to reuse. But VkEvents are expected to be very light weighted objects, so that should be acceptable. This is the second CL in the series. In this CL, we added RefCountedEventsGarbageRecycler to the ShareGroupVk which is responsible to garbage collect and recycle RefCountedEvent. Since most of ImageHelper code have only access to Context argument, for convenience we also stored the RefCountedEventsGarbageRecycler pointer in the vk::Context for easy access. vk::Context argument is also passed to RefCounteEvent::init and release function so that it has access to the recycler. The garbage collection happens when RefCountedEvent is needed. The per renderer recycler is still kept to hold the RefCounteEvents that gets released from ShareGroupVk or when it is released without access to context information. Bug: b/336844257 Change-Id: I36fe5d1c8dacdbe35bb2d380f94a32b9b72bbaa5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5529951 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 5332ab8c 2024-05-10T19:48:34 Vulkan: Add RefCountedEventRecycler to vk::Renderer This CL adds event recycler in vk::Renderer to avoid the constant create and destroy of VkEvents. When RefCountedEvent is destroyed previously, it now goes into per renderer recycler. When RefCountedEvent is created previously, it now dips into this recycler and fetch it. Before we issue VkCmdSetEvent, if this event was from recycler, we also issue VkCmdResetEvent before VkCmdSetEvebt. When glFinish/EGLSwapBuffer is called or context gets destroyed, this recycler is purged to keep the free count under limit. Bug: b/336844257 Change-Id: I92ec1b183f708112a96c3d06fcfa265024f5aa04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5519174 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi e29d643e 2024-05-07T13:40:18 Vulkan: Fix missing per-present-mode query ... if VK_EXT_surface_maintenance1 is supported but VK_EXT_swapchain_maintenance1 isn't. The code mistakenly made the appropriate query conditional to the presence of swapchain_maint1 instead of surface_maint1. On devices where surface_maint1 was available but swapchain_maint1 wasn't, this caused a VVL error that is now fixed. Bug: angleproject:8680 Change-Id: Ide9a87f0e50887572f693d741d5476361320ea19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5522756 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 3d04180c 2024-05-02T17:30:02 Vulkan: Add a dedicated garbage list for RefCountedEvents Previously each individual RefCountedEvent is wrapped into a GarbageObject. That is the reason behind RefCountedEvent being a subclass from WrappedObject, since vk::GetGarbage call requires garbage object is a subclass of WrappedObject. This CL adds a new garbage list dedicated for RefCountedEvents, named mRefCountedEventGarbageList. With this new change, we no longer limited by the vk::GetGarbage requirements since it no longer called for RefCountedEvents. RefCountedEventCollector is a vector of RefCountedEvents and every time a RefCountedEvent needs to be released, it adds into the collector. Then the event collector entire thing is treated like a garbage object and gets ResourceUse tracked and added into mRefCountedEventGarbageList. This list gets walked and cleaned when GPU is completed. This CL is also a preparation for later CLs that adds event recycle support. Bug: b/336844257 Change-Id: I4eff69b66922dfe5521b6994f240e967ff3726bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5516458 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Mohan Maiya 62eb8fbe 2024-05-06T07:22:15 Vulkan: Switch to using zlib::crc32_z for CRC generation A CRC is generated to validate blobs that are compressed / decompressed. There was a custom CRC generator being used, switch over to using zlib's crc32_z(...) Also increment kPipelineCacheVersion's version since both the header and structure have been updated. Data collected with dEQP test suite - 1. egl size of blob - 74022 bytes ComputeCRC16 - 0.001683 sec zlib::crc32_z - 0.000008 sec 2. gles2 size of blob - 8709119 bytes ComputeCRC16 - 0.130268 sec zlib::crc32_z - 0.000625 sec 3. gles3 size of blob - 20308078 bytes ComputeCRC16 - 0.433155 sec zlib::crc32_z - 0.002547 sec 4. gles31 size of blob - 11041841 bytes ComputeCRC16 - 0.192512 sec zlib::crc32_z - 0.000452 sec Bug: angleproject:4722 Change-Id: Iaa7026c9c8a748b446ef2320e584a2937336c7b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5518595 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi c3a1cae4 2024-04-15T14:58:55 Use angle::SimpleMutex everywhere in libGLESv2 Only cases left that use std::mutex are: - Share group and the context ErrorSet mutexes as they need try_lock() - Anywhere mutexes are used in conjunction with std::condition_variables (as they explicitly require std::mutex) Bug: angleproject:8667 Change-Id: Ib6d68938b0886f9e7c43e023162557990ecfb300 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5453294 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Sheedy e5606471 2024-04-25T14:48:53 Start Linux/Intel experiment Bug: chromium:41496254, angleproject:8680, angleproject:8682 Bug: angleproject:8683 Change-Id: I1956ac642969cae0c17fff87388e899237b9df2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5491789 Auto-Submit: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Brian Sheedy <bsheedy@chromium.org>