src/libANGLE/renderer/vulkan/RendererVk.cpp


Log

Author Commit Date CI Message
angle-autoroll 2f3ce7b6 2023-02-01T10:01:30 Roll vulkan-deps from 30323acb3089 to c7184adab227 (11 revisions) Suppressed VUID-VkImageCreateInfo-pNext-00990 introduced in https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+/64da29612fe6f8f2922101a5ef64f807db860b6b https://chromium.googlesource.com/vulkan-deps.git/+log/30323acb3089..c7184adab227 Changed dependencies: * glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/4e9cde50bb..58d302cfa2 * spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/fcfc3c580c..8a0fe779e5 * vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/dda7872300..3bc9d7c0c5 * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/ea1305065a..99b147ad63 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: chromium:1412096 Change-Id: Ie6ef81d3ecb35670bcb9632096cc99f57012ef5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4211601 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 5a2d1ce9 2023-01-17T16:16:39 Vulkan: Disable Imageless Framebuffer in some conditions. Some Samsung Vulkan drivers crash in vkCmdClearAttachments() when imageless Framebuffer is used to begin Secondary Command Buffer before the corresponding vkCmdBeginRenderPass(). Bug: None Change-Id: I09833af6e529f64f534d9d33825a53eee5c49212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4194179 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 73cc578b 2023-01-30T12:22:20 Disable mutable texture upload due to render issue * In some applications, enabling this feature can lead to incorrect rendering of some textures. This CL will disable this feature for now. Bug: b/264143971 Change-Id: I69933bbc3caaf71d03645b4c0b0424b9173ee585 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4205049 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jose Dapena Paz 6fb2da90 2023-01-30T17:43:59 Do not use std::locale in Vulkan memory allocation tracker As Chromium is built without RTTI, but it may be running on top of system libstdc++ built with RTTI, std::locale should not be used with an inherited facet. This will crash trying to dynamic_cast the facet. This change also avoids having different formats depending on the locale. If, in the future, a format is wanted for improving log readability, then a custom helper should be added, instead of using std::locale. Bug: chromium:957519 Change-Id: Id836d6df63448c7d62845d3f47e2acb9b254ddf3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4202875 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 54f44639 2023-01-17T13:07:57 Vulkan: Make RendererVk only have one CommandQueue object Right now RendererVk have two CommandQueue objects: one owned by RendererVk (used for synchronous submission) and another owned by CommandProcessor (used for async submission). Since async submission is a feature flag that will never change once RendererVk initialized, we are only using one CommandQueue. This CL changes CommandProcessor's mCommandQueue to a pointer that points to RendererVk::mCommandQueue. The added benefit of this is that it allows me to remove bunch of CommandQueue property query APIs from CommandProcessor since these property has nothing to do with "command". CommandProcessor class is actually reduced to command processing. Bug: b/266605181 Change-Id: I1f33db14ee29e2c0aa7850de98b2d7c3823126b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4174874 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev ef0fe638 2023-01-16T00:00:00 Implement EXT_polygon_offset_clamp * Added polygonOffsetClamp to the RasterizerState * Adjusted State::setPolygonOffsetParams * Added PolygonOffsetClampTest end2end tests * Added StateChangeTestES3.PolygonOffsetClamp test * Suppressed the affected dEQP test as it has a bug Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Rely on the EXT extension defined both for desktop and ES contexts * On desktops, might as well use the ARB extension or GL 4.6 once ANGLE supports them D3D11 * Requires FL10_0 or higher * Maps to D3D11_RASTERIZER_DESC.DepthBiasClamp * Drive-by cleanup of extensions init code Vulkan * Requires depthBiasClamp physical device feature * Maps to the depthBiasClamp parameter of the vkCmdSetDepthBias command Metal * Maps to the clamp parameter of the setDepthBias command Bug: angleproject:7957 Change-Id: If6b28df4084f0a81db29f75fb434e75d394c8730 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4169945 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Charlie Lao 9a72a98e 2023-01-19T13:17:42 Vulkan: Fix the VVL error for shaderRead to shaderRead barrier When we use image from fragment shader read to vertex shader read, we detect the case (same layout with only shader stage change) and just merge the barrier into one. But that can only done if these two usages are for the same render pass. If it is different render pass, then you still have to issue a new barrier. Previously there is no way to detect that the barrier was issued for which render pass. With the fix in crrev.com/cl/4136948, we now know which render pass issued the last barrier. With that we are able to limit the shader stage consolidation only if they are for the same render pass, thus fixing the VVL errors. Bug: angleproject:6663 Change-Id: I3d884336e8cf1f3cf16fc3e5a3423357ae2ed3c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4182542 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 13aee254 2023-01-13T14:01:56 Move memory allocation info vars to separate class * Moved the RendererVk variables related to memory allocation to a new class, MemoryAllocationTracker. * Note: The existing variable "mMemoryAllocationTracker" has been renamed to "mMemoryAllocationRecord" to avoid confusion. * Added a custom locale using the class MemoryLogNumberFormat, since the original method did not include formatting on some Android devices. Bug: b/262029018 Change-Id: I23acf37119da02e6430de6b5d360307982ecf9bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4174738 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ivan Neulander <ineula@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao 77d19e39 2023-01-11T14:03:18 Vulkan: Add ThreadSafeCommandQueue class This is preparation CL for the next few CLs. Instead of having RendererVk owns mCommandQueueMutex and takes lock before calling CommandQueue APIs, this CL creates a ThreadSafeCommandQueue wrapper class that wraps CommandQueue class' public APIs with a mMutex. Right now this is purely a mechanical change, expecting no real functional or behavior differences. But in the future CLs, we are going to implement some APIs without holding lock while doing the wait. This also conceptually cleaner that a mutex lock should protect data not methods. Because of this, this CL also adds OneOffCommandPool class to wrap around all oneoff command buffers with its own lock. The same change also applied to CommandProcessor class by adding a ThreadSafeCommandProcessor class (this will be removed in later CLs). This CL also removes CommandQueueInterface base class and made all these virtual functions no longer virtual, thus reduces the overhead associate with calling virtual functions. Bug: b/261106868 Change-Id: Ifdc0085cef7f00d840b4ef3fa602172fed3c0fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4156637 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi ffbb65bc 2022-11-28T13:31:48 Vulkan: Use VK_EXT_swapchain_maintenance1 for present fences Bug: angleproject:7878 Change-Id: Ic3a43c663789a6489cff261848d9ad4a408ca53a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4088905 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Amirali Abdolrashidi 48e40ef6 2023-01-06T13:35:21 Add per-heap memory allocation trackers * For each member of MemoryAllocationType, we now have a per-heap counter to keep track of the allocation size in each available heap. * mActivePerHeapMemoryAllocationsSize * mActivePerHeapMemoryAllocationsCount (debug mode only) * Added the memory type index to onMemoryAlloc() and onMemoryDealloc() as an input. It can then be used to determine the used memory heap index for that allocation using the memory properties defined in the renderer. * checkForCurrentMemoryAllocations() will now log the heap index of the current memory allocations in debug mode and during an OOM crash. * logPendingMemoryAllocation() will now log the heap index of the pending allocation during an OOM crash. * Renamed constexpr values used for tracking for more consistency. * kTrackMemoryAllocation -> kTrackMemoryAllocationSizes * kDebugMemoryAllocationLogs -> kTrackMemoryAllocationDebug Bug: b/262029018 Change-Id: I178a3556b3107edc0c72c6b23ea2f2d6b12da947 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4149431 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Ivan Neulander <ineula@google.com>
Shahbaz Youssefi 2550fe9a 2023-01-14T21:21:24 Vulkan: Drop usage of VK_EXT_debug_report This extension has been deprecated for 6 years in favor of VK_EXT_debug_utils. Bug: angleproject:7959 Change-Id: I51923a6821a6a18854ef94e0ca85c328bc8c6da5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4167833 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 669e232a 2023-01-17T15:25:27 Revert "Suppress more VVL errors about vkCmdDraw*-None" This reverts commit 0d34d4f8810aeb2297bf2814f8b1ca7f749decd9. Reason for revert: Fixed upstream https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/4628 Original change's description: > Suppress more VVL errors about vkCmdDraw*-None > > * Suppressed the following VVLs: > * VUID-vkCmdDrawIndexed-None-02686 > * VUID-vkCmdDrawIndirect-None-02686 > * VUID-vkCmdDrawIndirectCount-None-02686 > * VUID-vkCmdDrawIndexedIndirect-None-02686 > * VUID-vkCmdDrawIndexedIndirectCount-None-02686 > > Bug: angleproject:7685 > Change-Id: I41390ee2a2a01509367a6e98697da3ad7e3cc2e5 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910174 > Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Bug: angleproject:7685 Change-Id: Ibc79b34758a18ea0070edff4f200b7f8462c8e9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4174173 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 598b4824 2023-01-13T11:12:07 Vulkan: Broaden more syncval suppressions The specificity of syncval error messages turned out to cause more churn than good, with development in syncval changing the messages. Recently, some messages with ..._STORAGE_READ were changed to correctly output ..._SAMPLED_READ, which caused a lot of the messages to no longer match. This change broadens the syncval suppressions to make it not sensitive to the above change, but also removes some other unnecessary details. Bug: angleproject:7949 Change-Id: Ie834205e24dcde36637300c281aa1a18330e9517 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4162737 Reviewed-by: Jamie Madill <jmadill@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3f5fcf15 2023-01-11T16:52:28 Vulkan: Make feedback loop syncval suppressions more general Bug: angleproject:7949 Change-Id: Ife0f7fb2692115874b32d4c1e7a8e505cdc614ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4158511 Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 3422358b 2023-01-11T00:17:04 Vulkan: Unsuppress fixed VUs Bug: angleproject:5331 Change-Id: I0e42c157a4b14ab1309716c9f5432c664785cf28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4153779 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi 3a152dc7 2023-01-06T10:47:37 Clean up the memory allocation info log output * For more readability, number formatting is added to memory size info using stringstream::imbue(std::locale()). * For more conciseness, removed the redundant heap budget info. (No longer VK_MAX_MEMORY_HEAPS) * Flags are updated to be logged in hex format. * Changed the order of heap stats, so heap budget and usage numbers are logged immediately after the available heaps. Bug: b/262029018 Change-Id: I309bd43e7a236629308ae23320606122f29584a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4143979 Reviewed-by: Kaiyi Li <kaiyili@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi ecda6664 2023-01-11T00:20:03 Vulkan: Unsuppress fixed VU Bug: angleproject:2796 Change-Id: I5e0975c7eef192a9d3a33490f777ea448dcb8884 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4153780 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Jamie Madill 173db16f 2023-01-11T13:52:17 Revert "Vulkan: Temporarily disable threaded monolithic pipelines." This reverts commit 69c68ea8d84b8cad4edd54fb81ba3f0d781a9aae. Reason for revert: Causes more crashes. Original change's description: > Vulkan: Temporarily disable threaded monolithic pipelines. > > These have a multithreading error. See issue for details. > > Bug: angleproject:7369 > Bug: angleproject:7944 > Change-Id: Icbb5e1eb7b026568fa3898d5a94bffd0186fa494 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4153011 > Reviewed-by: Roman Lavrov <romanl@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:7369 Bug: angleproject:7944 Change-Id: I76f35ee4c405dd634d3c0cbdc98b60e140dbaa55 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4155852 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Shahbaz Youssefi 146defd2 2023-01-11T05:08:30 Revert "Suppress VUID-VkGraphicsPipelineCreateInfo-pStages-06896." This reverts commit 992018c7bd18ed7fc4ab1220a511de7d36dbd764. Reason for revert: Fixed upstream Original change's description: > Suppress VUID-VkGraphicsPipelineCreateInfo-pStages-06896. > > Bug: angleproject:7513 > Change-Id: I2877c069e33d2ec5e92cf759dc3ab1d270e1a414 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3776759 > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Roman Lavrov <romanl@google.com> Bug: angleproject:7513 Change-Id: I562081b24b92e493649fa13ead4d56673ab46102 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4153137 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill 69c68ea8 2023-01-10T15:35:47 Vulkan: Temporarily disable threaded monolithic pipelines. These have a multithreading error. See issue for details. Bug: angleproject:7369 Bug: angleproject:7944 Change-Id: Icbb5e1eb7b026568fa3898d5a94bffd0186fa494 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4153011 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop a0939325 2023-01-01T17:41:33 Tests: Add Catalyst Black trace Test: angle_trace_tests --gtest_filter="*catalyst_black*" Bug: angleproject:7921 Bug: angleproject:7924 Change-Id: I626d6790ef602f3ca09c9c9a4e03c5df32a985ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4133886 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 6c41793f 2022-12-20T15:20:50 Vulkan: Use read/write depth/stencil layouts This allows an application to have depth in read-only feedback loop while stencil is being written to for example. Bug: angleproject:7899 Bug: b/192477489 Change-Id: Ic2e11d32da7c7e3a7f3cd86dbafc5c56a0dbbfd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116730 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 216cd10b 2022-12-22T11:29:35 Vulkan: Dsiable enableAsyncPipelineCacheCompression There was intermittent failure on bots due to this. Re-disable it for now. Bug: b/246683126 Change-Id: Iba5c0bcacb87336d187b952b47804885ce569f6d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4120245 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 301ed545 2022-12-20T20:16:22 Vulkan: Pass context to layout getters In preparation for a change that optionally uses read/write depth/stencil layouts. Context is used to test for the supportsMixedReadWriteDepthStencilLayouts feature to know whether those layouts are supported or that a fallback must be chosen. Bug: angleproject:7899 Bug: b/192477489 Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao d6dea33b 2022-12-19T13:39:34 Vulkan: Remove CommandQueue::mGarbageQueue With recent work of per active context queue serial, mGarbageQueue behaves almost identical to normal mSharedGarbage now. This CL removed mGarbageQueue and added garbage into Remove mSharedGarbage instead. Bug: b/263166501 Change-Id: I6bce47b4535283e7bd0f0c8823b9629cc25f9d94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4117712 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi cd540095 2022-12-12T13:13:14 Vulkan: Add memory log at allocation error * Added logging memory allocation information in handleError() in the event of an error from ANGLE_VK_TRY. * Used for the handleError() in ContextVk. * Updated the name and message of the function to log allocations. * checkForCurrentMemoryAllocations() * Added logging memory heap stats, including budget and usage. * logMemoryHeapStats() * In the renderer, added the feature flag indicating whether the platform supports the memory budget extension. * Uses VK_EXT_memory_budget. * Added the enum class MemoryLogSeverity, which is used to select the severity level of the memory log. * Added logging pending memory allocation information. * logPendingMemoryAllocation() * If the last unsuccessful memory allocation was unsuccessful, its information will be added to the log. Bug: b/262029018 Change-Id: I97343c1553936aed23d763f3e0c00d495f9ee810 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089531 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Kaiyi Li <kaiyili@google.com>
Shahbaz Youssefi ea36cf1c 2022-12-19T09:55:45 Vulkan: Feature for VK_EXT_rasterization_order_attachment_access This change just adds the feature. A follow up change will actually start using the extension. Bug: angleproject:7899 Bug: b/192477489 Change-Id: I19c078ebe57a7819b3aa3e95d4436cefa34ba85b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113912 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 1a8bcbda 2022-12-17T20:12:41 Vulkan: Re-enable async pipeline cache sync by default This is a reland of c7414946b84410bfcc8705759a902577c13d9fc4 The change here is that the program, shader and blob caches are now reset _after_ the backend is torn down. Otherwise the pipeline cache sync thread's use of the caches races with that. Bug: b/246683126 Change-Id: Ifc3d67279de50a2ee2866476aa5df85d4c10d30d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111972 Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 40c17b58 2022-12-13T15:35:23 Vulkan: Move SPIR-V transform to vulkan/ No longer used by metal/. Bug: angleproject:7220 Change-Id: Idb3a6369fefbcf87e7993daa652c8702ec53c20f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4104002 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 77c95de4 2022-11-16T21:12:28 Vulkan: Threaded monolithic pipeline creation With this change, once a pipeline is created out of libraries, a task is scheduled (if necessary) to asynchronously create a corresponding monolithic pipeline. Once the task is complete, the linked pipeline handle is replaced by the monolithic one, gaining back any performance that might have been lost due to the use of libraries. Bug: angleproject:7369 Change-Id: I525fb1e09f8bedc61b9dbef19f9cce7026ff9c53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031151 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Amirali Abdolrashidi 684ff60b 2022-06-21T10:52:31 Vulkan: Add shared ring buffer cmd alloc feature * Added RingBufferAllocator.cpp with implementation. * Main classes: * RingBufferAllocator (fast allocation with bulk deallocation) * SharedRingBufferAllocator (wrapper to help with shared use and multiple threads) * Implemented "angle_enable_vulkan_shared_ring_buffer_cmd_alloc" feature. (Disabled by default) * Details (from the original CL) * The angle::PoolAllocator replaced with angle::RingBufferAllocator. * Before, there was separate angle::PoolAllocator per each CommandBufferHelper. Now, a single angle::RingBufferAllocator is shared between multiple CommandBufferHelper objects. * Commands data from multiple CommandBufferHelpers is tightly packed without fragmentation. * Significantly less memory overhead, observed with enabled async queue. * Moved the parts of the code related to the allocators into the classes in the new AllocatorHelperPool and AllocatorHelperRing files for better management. The allocator can be switched by changing the following BUILD flag: `angle_enable_vulkan_shared_ring_buffer_cmd_alloc` * It is connected to the following macro: ANGLE_ENABLE_VULKAN_SHARED_RING_BUFFER_CMD_ALLOC * The two main allocator classes in each file are aliased as: * SecondaryCommandBlockAllocator (in CommandBufferHelper objects) * SecondaryCommandBlockPool (in SecondaryCommandBuffer) * Also added placeholder functions for VulkanSecondaryCommandBuffer. * Added descriptions regarding the two allocators. * renderer/vulkan/doc/Allocators.md Credit: Original CL authored by Igor Nazarov <i.nazarov@samsung.com> Bug: angleproject:6401 Bug: b/256666069 Change-Id: I0f24793eef6334bf4ff8e327b9665338807dad37 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3715968 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 6830b7d3 2022-11-23T11:51:28 Vulkan: Use finishQueueSerial for queueSubmitOneOff Right now for oneoff submission we are creating a fence and pass in the fence and then wait for fence outside the normal wait code path. This creates a problem that the command buffer and garbage clean up code does not gets run and may end up hitting assertion. This might be necessary before because complication with ResourceList. With recent work that removes ResourceList, this can be much simpler now. This CL removes the fence creation and wait in the oneoff submission code path (except the external fence) and switch to finishQueueSerial call. Bug: b/255414841 Change-Id: I2b16c187becbda9c2397685c7212abac994e8dc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4053261 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi db9ffea3 2022-12-08T22:08:51 Vulkan: Remove the unused shadowBuffer feature Bug: angleproject:4339 Change-Id: I4f4524ba597af25bd6da3792bd7a85ae1b52962e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089448 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1193b664 2022-10-11T01:00:40 Vulkan: Use VK_EXT_pipeline_protected_access This extension allows pipelines to be restricted to protected or unprotected command buffers only. Bug: angleproject:7714 Change-Id: Id07be4c2ffd7ca19b8b4a2a869828bc11e89e467 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3943535 Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 7e378da9 2022-12-01T16:36:08 Vulkan: Remove synchronous commands from CommandProcessor Some command tokens in CommandProcessor are doing synchronous calls. For example, finishResourceUse() and waitIdle(). They are inserting a token and then wait for CommandProcessor to drain. This CL removes these commands from CommandProcessor and it just ask CommandProcessor to drain and then call into mCommandQueue to finishResourceUse or waitIdle. This is a minor clean up for now, but in future CL we will also avoid waitForWorkComplete if the mUse has already been drained from CommandProcessor. Bug: b/261098465 Change-Id: I7672a9c0b1e477ea3537652cd83350aa97f7caa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072223 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Yuly Novikov 81a3c71e 2022-12-01T18:51:39 Enable tests on Win Intel Optiplex 7080 experimental bot Suppress failing end2end tests and run single process Suppress VUID-VkDescriptorImageInfo-imageView-06711 Bug: chromium:1349828, angleproject:7874 Bug: angleproject:7865, angleproject:7866, angleproject:7872 Change-Id: I18c9099af6635cf41f5368960dc1d35d9decc48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4071925 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Amirali Abdolrashidi 982755e0 2022-12-05T15:32:42 Suppress VUID-vkCmdDraw-None-06887 * Suppressed the following VVLs: * VUID-vkCmdDraw-None-06887 * VUID-vkCmdDrawIndexed-None-06887 Bug: angleproject:7861 Change-Id: I15cdf934bd87b5d5219e69eebc9d339d4c180660 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4082149 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 3b57c2a8 2022-12-05T15:33:43 Add cmnt for VUID-vkDestroySemaphore suppression Bug: angleproject:7729 Change-Id: I46d8afe9702b9263a776e9acfa9a3364b7184579 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4080592 Reviewed-by: Ian Elliott <ianelliott@google.com> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi 650f2274 2022-12-02T15:51:09 Vulkan: Remove fixed VVL errors Bug: angleproject:7338 Change-Id: I4d2b05c5fd5ad505fda2089dbfa2119e8db8ac16 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4076515 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi 58d7ace2 2022-11-22T16:08:07 Vulkan: Add memory allocation log support in debug * Added a memory tracker to the renderer object to keep track of the memory allocations and deallocations in more detail. * This feature is used for debugging only. * To enable it, set angle_enable_memory_alloc_logging=true in GN args (added in renderer/vulkan/BUILD). * It is related to ANGLE_ENABLE_MEMORY_ALLOC_LOGGING in the code. * The tracker are updated in the memory allocation tracking functions if the feature is enabled. (The counter is always updated, even if the feature is disabled.) * At the end of a RendererVk object, it checks for and logs any remaining allocated memory from MemoryAllocationType members. * The data is stored in the map object "mMemoryAllocationTracker". The key used for it is currently of type angle::BacktraceInfo. * If angle_enable_unwind_backtrace_support is disabled, or not on Android, the key is an empty object. * MemoryAllocInfoMapKey is used as a key to access the allocation information. Bug: b/242641395 Change-Id: If701a4bdea2f8738a830ee47e0c7c5cdacf95b87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4050103 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 2e5ca217 2022-11-18T10:44:49 Vulkan: Let each current context has its own QueueSerial. This CL makes every current context has its own queueSerial. At context creation time or when context becomes current, it allocates a QueueIndex from renderer. When it becomes non-current, it releases QueueIndex for others to reuse. This way we significantly reduces the max number of QueueIndexs for reasonable usage. Each CommandBuffer has its own unique QueueSerial and we use that to determine if a resource is being used by the given CommandBuffer. The QueueSerial for RenderPassCommands is deferred until renderPass starts, and when we generate queueSerial for renderPassCommands, we also reserve a range of serials for outsideRenderPassCommands so that we can do incremental submission of outsideRenderPassCommands without need to close renderPassCommands. In rare situation, if that reserved serials runs out, we also close renderPassCommands to ensure the ordering of serials matches ordering of command buffers. With per current context queue serial, this CL is able to set resource queue serial as it is being used. This CL completely removes usage of ResourceUseList class since it was introduced due to deferred setSerial. This CL also get rid of refCount from ResourceUse since there we no longer add it to a ResourceUseList. With that, we also able to remove SharedResourceUse class since access to ResourceUse itself is now thread safe since we are able to make a copy of it when we add it to GarbageList. Because RenderPassCommands now has its own unique QueueSerial as it encodes command, we can use it to detect if a resource is being used by it or not, thus this CL also removes usage of CommandBufferID. Bug: b/255414841 Change-Id: I36dcbeaa7bc996f04e6c04bf9ad44cd0d630f61a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4038096 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Solti Ho 7e1ed5f1 2022-12-02T02:32:40 Revert "Vulkan: Enable async pipeline cache sync by default" This reverts commit c7414946b84410bfcc8705759a902577c13d9fc4. Reason for revert: b/260752276 Original change's description: > Vulkan: Enable async pipeline cache sync by default > > Bug: b/246683126 > Change-Id: I593650364250f8802e9f546ab9957cf1c30e596a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031487 > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/246683126 Bug: b/260752276 Change-Id: I0ebac7e46e213790ac39e4124e89feda76551011 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4074765 Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 8ee1b89f 2022-11-04T13:10:37 Refactor pixel local storage options The various different PLS options were getting scattered and unruly. We are also in need of more backend-specific PLS options that would be difficult to add as-is. This CL refactors them into a single "ShPixelLocalStorageOptions" struct that gets initialized all in one place, and shared between the compiler and the backends. Bug: angleproject:7279 Change-Id: Ic58dccb8d1ba350a0b6cc5848ce15bd687e30fad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4006715 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi 90b4541c 2022-11-28T11:39:24 Vulkan: Pass signal semaphore by value to async thread Otherwise the signal semaphore is pointing to whatever was passed in from the main thread. Currently, this is ok because: - For external semaphores, ensureNoPendingWork is called - For surfaces, there's a fixed buffer of semaphores However, an upcoming change passes a semaphore specified on the stack, and the thread should not be referencing it. Bug: angleproject:7847 Change-Id: I9a823214bde59b9d7ff23313694c1749a76e6b8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4060453 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 7f4caaf5 2022-11-23T15:40:53 Vulkan: Fix VulkanPerformanceCounterTest.SubmittingOutsideCom VulkanPerformanceCounterTest.SubmittingOutsideCommandBufferDoesNotCollectRenderPassGarbage depends on the implementation detail on how we flush and submit commands. The recent change crrev.com/c/4038095 fixes one issue that we are now having one less submission on pixel 6 device. This CL adjust the test to account for that. This CL also changed to set mHasDeferredFlush to true only when there is a started renderpass upon FBO bind. This CL also opt in swiftshader into preferSubmitAtFBOBoundary feature for test coverage and ease of debugging since ARM GPU (which enables this flag) is not been tested on CI. Bug: b/255414841 Change-Id: I295cec33a8ca257a5d5a98604b8c4c0c29e97cdf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4054101 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yuxin Hu 1434697f 2022-11-23T14:47:38 Add a vk feature flag to only enable precision match fixer on IMG According to https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5273, RelaxedPrecision does not need to match in the interface matching rules. However, removing the precision match is causing triangle clipping issues on IMG hardware. This change adds a feature flag to only run the code path that applies precision match in SpirV if the hardware is IMG. This is a follow-up change to https://crrev.com/c/4049421. Instead of adding back the code path that handles varying precision mismatch for every hardware, only enabling the code path if the vendor is IMG. Test: On Pixel6: $ adb shell setprop debug.angle.feature_overrides_enabled varyingsRequireMatchingPrecisionInSpirv $ out/AndroidDebug/angle_end2end_tests --gtest_filter="GLSLTest_ES3.MismatchPrecision*" --verbose Bug: angleproject:7488 Change-Id: Ia0155f14d523195df2f47b852ed6642918270e2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4054100 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jason Macnak 2de99d47 2022-11-17T12:19:35 Reset instance/device extensions in RendererVk::onDestroy() RendererVk::initialize() adds a nullptr to the end of RendererVk::mEnabledInstanceExtensions (presumably to ensure the VK implementation crashes if it tries to read past?). If RendererVk::onDestroy() fails to clear this nullptr, it can lead to a crash when sorting the extension lists when the renderer is re-initialized the second time. Bug: b/249457381 Test: cvd start --gpu_mode=guest_swiftshader Test: EGLDisplayTest.InitalizeTerminateInitalize/ES3_Vulkan_NoFixture Change-Id: Ib24af11024cad6b28284f3a75cc862c48abec258 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4035646 Commit-Queue: Jason Macnak <natsu@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jason Macnak 35d1736f 2022-11-28T09:27:06 Update enabled instance extenion handling - Null terminating the instance extensions at the end of initialize to potentially avoid having the nullptr interact poorly with other initialization code that scans through the enabled instance extensions. - Ensure the enabled instance extension sort happens after all desired instance extensions have been added. Bug: b/249457381 Test: cvd start --gpu_mode=guest_swiftshader Change-Id: I2a479065444ffdfd97ecbf281fe6a777e22d584c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4060238 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jason Macnak <natsu@google.com>
Cody Northrop 71ead7b4 2022-11-20T15:56:42 Tests: Add Diablo Immortal trace Test: angle_trace_tests --gtest_filter="*diablo_immortal*" Bug: angleproject:7402 Bug: angleproject:7837 Change-Id: I7c7ccc0099707714213564740f58f04f7965a275 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4041134 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Charlie Lao 7dd8478e 2022-11-17T10:11:02 Vulkan: Make ResourceUse::serial an FastVector of Serials In preparation for per context queue serial, this CL makes ResourceUse::serial a FastVector of Serial. Right now we still limited to one serial index so that it still work the same way as before. This CL adds necessary data type and change the function names to reflect that tracking GPU progress needs a ResourceUse object instead of a single Serial number. Bug: b/255414841 Change-Id: Ic60cdf5ec8da45d1821f65a55947f5c553f65737 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4034548 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Ian Elliott 0e12695c 2022-11-23T08:31:43 Suppress VUID-VkGraphicsPipelineCreateInfo-renderPass-06040 Bug: angleproject:7843 Change-Id: I013dd1d2942c7b9d340ae4e3c4124b592dc9b94b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4049765 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6384f76b 2022-11-16T21:47:04 Vulkan: Move PipelineCacheAccess to namespace vk In preparation for a change that uses it in that namespace. Bug: angleproject:7369 Change-Id: Icc75b8839d702fd3e6d3d00c1d8f81619cdd89cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031150 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi b2f55ec3 2022-11-14T16:07:19 Vulkan: Add memory allocation/deallocation counter * Added a counter to the renderer object to keep track of the memory allocations and deallocations per allocation type. * The counters are updated with the functions onMemoryAlloc() and onMemoryDealloc(), which can be added next to the allocation or deallocation point. * Currently used for buffer memory and image memory. * Removed some of the redundant arguments from vk_helper and suballocation functions. Bug: b/242641395 Change-Id: I58b38f619df7bef0ba5fa3373a8db5aed0ef142c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4014164 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 68b47e58 2022-11-16T10:46:59 Vulkan: Initial support for VK_EXT_graphics_pipeline_library When available, this change uses VK_EXT_graphics_pipeline_library to create pipelines. Currently, it is only used when graphicsPipelineLibraryFastLinking is available. This restricts the use of this extension to devices where monolithic pipelines are not any more performant than linked libraries. A future change adds support for other implementations by providing async pipeline creation. Bug: angleproject:7369 Change-Id: I1e3b7ac4aa56e75c7d6f4d0d5ea91cb0b862e581 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031489 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Steven Noonan <steven@valvesoftware.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 8378032e 2022-11-15T11:47:55 Vulkan: Remove get API for mLastCompletedQueueSerial In preparation for per context queue serial, this CL makes mLastSubmittedQueueSerial and mLastCompletedQueueSerial private to CommandQueue. Before this CL, we have a get function to return the last submitted serial and last completed serial and passing these serials around. This works because the serial is a single uint64_t number. With per context queue serial, this will be an array of serials and there is potential risk associated with access it from different threads. This CL makes these serials private to CommandQueue and when you want to know if GPU is completed with resource, you ask RendererVk/CommandQueue directly. This way we can ensure they have thread safe access in the CommandQueue (no lock is necessary, but all access will be restricted to one class). Bug: b/255414841 Change-Id: Ica565decce4a80588e0b447e179a2b634b55d7c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4021676 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi c7414946 2022-11-16T10:35:33 Vulkan: Enable async pipeline cache sync by default Bug: b/246683126 Change-Id: I593650364250f8802e9f546ab9957cf1c30e596a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031487 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 70cf2322 2022-11-16T10:25:07 Vulkan: Move async pipeline cache sync feature to backend Bug: b/246683126 Change-Id: I194e488e04580cee7055c0674091f1228984edf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031486 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Solti Ho <solti@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7e7a47df 2022-11-16T21:29:20 Vulkan: Adjust logicOp dynamic state workaround Bug: chromium:1379201 Change-Id: I355d0034de12e5aaf95c160efcace34ff7062337 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031149 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Shahbaz Youssefi 5ef24b26 2022-11-16T11:17:53 Vulkan: Limit logicOp dynamic state workaround to old mesa Bug: chromium:1379201 Change-Id: I618507b118b4420793ec172f3ed1f0dddbb2ae86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031492 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 9483002d 2022-11-14T16:01:15 Vulkan: Clean up submitFrame/submitCommands ContextVK has two functions, submitFrame, and submitCommands. ContextVk::SubmitFrame means to be frame boundary or FBO boundary, usually refers to submission triggered by API, for example, glFlush/glFinish or FBO switches. ContextVk::submitCommands was added later to mean any kind of submission. It could be triggered by internal logic, for example, when we think we have accumulated too much staged updates. The odd thing is that ContextVk::submitFrame calls ContextVk::submitCommands, which calls RendererVk::submitFrame. I believe this is because when we introduced ContextVk::submitCommands, we did not bother rename RendererVk's API. This CL renames RendererVk::submitFrame and CommandQueue::submitFrame and CommandProcessor::submitFrame to submitCommands to be consistent with ContextVk's function names. This CL also removes unused function ContextVk::isSerialInUse() This CL also removes unnecessary vk:: namespace in CommandProcessor Bug: b/259148812 Change-Id: If074e381168950143ad56a728f23caa298e5f355 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4027284 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 139b9df8 2022-11-14T15:53:15 Vulkan: getCommandBufferOneOff could reuse if serials are equal When one off commands serial is equal to last completed serial, it means completed. We should reuse command buffer instead of allocate a new one. Bug: b/259148812 Change-Id: Ibc006a93e1ee775a436396a0d35cf4ab2b363940 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4023097 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 5a89387b 2022-11-01T10:50:26 Vulkan: Remove the best-practices layer It doesn't produce anything actionable in ANGLE (any more), but is regularly a source of false positives. Bug: angleproject:5336 Bug: angleproject:7470 Bug: angleproject:7795 Bug: b/166641492 Bug: b/166793850 Change-Id: I7fb322386e779c8c1f9a7805eb522926d8780446 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996803 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 78e28cb8 2022-11-03T11:05:48 Vulkan: Remove glslang fallback ANGLE's SPIR-V generator is battle tested by now. Bug: angleproject:6210 Change-Id: I2ed88642e3ede435e3f906fbd701133be6873fb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4002868 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jason Macnak a032bd10 2022-11-04T10:36:07 Vulkan: Handle extension enumeration returning less than requested Speculative fix for b/249457381 where we have previously seen extensions enabled/disabled based on settings which may be loaded/changed between vkEnumerate*() calls. Bug: b/249457381 Change-Id: I36aa8aec38037ff3d8c9a036d27289e1abb930fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4006713 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Robert Mader dd560015 2022-09-28T14:40:01 Reland "Vulkan: Implement EGL_EXT_device_drm[_render_node]" This is a reland of commit 8900cbf96a3127880b1667d2242dc13a98cfe029 Original change's description: > Vulkan: Implement EGL_EXT_device_drm[_render_node] > > These extensions are needed by Exo for zwp_linux_dmabuf v4 support. > > Unfortunately `VkPhysicalDeviceDrmPropertiesEXT` doesn't give us the > information about the filesystem layout, needed by the EGL version. > As ChromeOS is currently the only user, implement the extension only for > Linux where we can reasonably assume `/dev/dri/...` file paths. > > We do not, however, limit us to the GBM backend - having the extension > working in e.g. a nested X11 or Wayland environment is quite helpful. > > Bug: angleproject:7686 > Change-Id: I6de14e68ffbc479450bd22a182bc138365efb516 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996703 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7686 Change-Id: I66dfd7aa51f76cb9668dbfbd0f3e1f32123bff7c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4003941 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Charlie Lao 71d28a9b 2022-11-02T13:19:20 Vulkan: Remove unused ShaderAndSerial The serial in the ShaderAndSerial is unused. This CL removed ShaderAndSerial and replaced with ShaderModule directly. Bug: b/257116399 Change-Id: I50d42af7818a12888309a80423531d75135e0bfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3998747 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 319f8228 2022-11-03T16:58:07 Revert "Vulkan: Implement EGL_EXT_device_drm[_render_node]" This reverts commit 8900cbf96a3127880b1667d2242dc13a98cfe029. Reason for revert: anglebug.com/7811 Original change's description: > Vulkan: Implement EGL_EXT_device_drm[_render_node] > > These extensions are needed by Exo for zwp_linux_dmabuf v4 support. > > Unfortunately `VkPhysicalDeviceDrmPropertiesEXT` doesn't give us the > information about the filesystem layout, needed by the EGL version. > As ChromeOS is currently the only user, implement the extension only for > Linux where we can reasonably assume `/dev/dri/...` file paths. > > We do not, however, limit us to the GBM backend - having the extension > working in e.g. a nested X11 or Wayland environment is quite helpful. > > Bug: angleproject:7686 > Change-Id: I6de14e68ffbc479450bd22a182bc138365efb516 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996703 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7686 Change-Id: I703351e93c4befbd3415b9ba04730066ee9c6afd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4003857 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>
Robert Mader 8900cbf9 2022-09-28T14:40:01 Vulkan: Implement EGL_EXT_device_drm[_render_node] These extensions are needed by Exo for zwp_linux_dmabuf v4 support. Unfortunately `VkPhysicalDeviceDrmPropertiesEXT` doesn't give us the information about the filesystem layout, needed by the EGL version. As ChromeOS is currently the only user, implement the extension only for Linux where we can reasonably assume `/dev/dri/...` file paths. We do not, however, limit us to the GBM backend - having the extension working in e.g. a nested X11 or Wayland environment is quite helpful. Bug: angleproject:7686 Change-Id: I6de14e68ffbc479450bd22a182bc138365efb516 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996703 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1b88c41f 2022-10-31T10:58:09 Vulkan: Remove the disableFifoPresentMode feature Workaround was added for old Intel bots, no longer applicable. Bug: angleproject:3153 Change-Id: Ib248927fbb1be33d8bd89a0c8185761f7f1ed6fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993361 Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yiwei Zhang 8f420fd0 2022-11-01T18:51:41 Repurpose enableCompressingPipelineCacheInThreadPool For platforms with a higher blob cache limit, say 32MB, compressing the bigger pipeline cache data is better delegated to a background thread. This change repurposes this default disabled workaround as a feature for such platforms. This change also enables enableCompressingPipelineCacheInThreadPool for mesa venus driver. Bug: b/246683126 Test: apps runs normally and cts passing Change-Id: Ied1d9b3ee351f71abedeed04d21c700c1ad7cd18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3997592 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 67ee4976 2022-10-31T15:34:19 Vulkan: Skip BestPractices-ImageBarrierAccessLayout Bug: angleproject:7795 Change-Id: I98f6840f9cd2956f7e73d0496a26f504516c48e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993364 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 7b102c18 2022-10-31T10:29:45 Vulkan: Disable logicOp dynamic state on Intel/Mesa Hits a stack overflow inside the driver. Bug: chromium:1379201 Change-Id: I52e5254b37688a027cbcf5ee5752de36b9b2a3aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993360 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Chia-I Wu 32fb3be6 2022-10-27T16:05:30 Vulkan: disable rasterization order feature if isQualcomm It is simpler to just disable it for Qualcomm. Bug: b/255837430 Change-Id: I884a9635ed2c6049fa4f79e10613f87f3f40f199 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3989644 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Chia-I Wu <olv@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 53abcf15 2022-10-25T15:26:44 Vulkan: Bug fix in supportsTimestampSurfaceAttribute Move the initialization of "vkGetPastPresentationTimingGOOGLE" and the assert check to after vkDevice creation. Bug: angleproject:7489 Change-Id: I1ef50d64af3bea44a182be95dd182532b2c60d36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3979994 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a41c6173 2022-10-16T08:28:53 Simplify trace test names. Originally we had a lot of conditionally enabled test configs in angle_perftests, that we enabled behind a flag because the total runtime would be too large if we left everything enabled. This CL switches to using a single test set, one for each trace, and using a the same command-line API we use in dEQP and the ANGLE samples to pick a single configuration. This makes it easier to pick exactly what configurations you want from the command line. Because we only run one configuration each time, we don't need to specialize the test name to include the configuration info. We can also simplify TracePerfTest -> TraceTest since these tests are run for both perf and correctness. Old name: TracePerfTest.Run/vulkan_trex_200 New name: TraceTest.trex_200 Example for tests that don't use default arguments: Old args: --enable-all-trace-tests Old name: TracePerfTest.Run/native_offscreen_trex_200 New args: --use-gl=native --offscreen New name: TraceTest.trex_200 Bug: angleproject:7755 Change-Id: Id93cf5725eff2e2c6b3b14804bc2902f38306e7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi 025504b9 2022-10-17T17:03:03 Pass worker pools to image load functions In preparation for the ASTC decoder using threaded decoding. Bug: b/250688943 Change-Id: I70d669bcb57b900dbb633304182e174aec362203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961339 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Greg Schlomoff <gregschlom@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao e8f9355c 2022-10-13T16:51:32 Vulkan: Add forceWaitForSubmissionToCompleteForQueryResult flag Add forceWaitForSubmissionToCompleteForQueryResult feature flag and enable it for ARM. Also force host wait if async submission is enabled. Bug: b/253522366 Change-Id: Ie2d7373930f1a2b3fc761d2f8d2df8fa84983c54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3954044 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 8e644365 2022-10-11T11:47:55 Vulkan: Rearrange state specification for pipeline libraries This change splits pipeline state setup based on whether the complete pipeline is being created or only a subset of it. However, no partial pipelines are yet created, that will be done in a following CL. Bug: angleproject:7369 Change-Id: Ife34c4bc39641ab8f06e7c78502f95a6bc16d15d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949917 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 1119dfbd 2022-10-03T16:47:29 Vulkan: disable supportsHostQueryReset feature if func is null This is try to clean up a old fix for chromium security bug chromium:1273344 that in some bots we are seeing supportsHostQueryReset feature enabled but vkResetQueryPoolEXT pointer is null. We fixed that in crrev.com/c/3313382 that added a check of vkResetQueryPoolEXT AND supportsHostQueryReset feature flag. This CL disables the feature flag if vkResetQueryPoolEXT pointer is null so that other places we only need to check feature flag. Bug: b/250706693 Change-Id: I2d9f9726f081e21a37bbb0bb205003c390f2d32c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929236 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Charlie Lao b1d699da 2022-10-04T15:27:51 Vulkan: Don't wait QueueSerial if supportsHostQueryReset enabled In QueryVk::getResult() we are waiting for query's queueSerial to complete, even though QueryHelper::getUint64Result() we are also using VK_QUERY_RESULT_WAIT_BIT to ask vulkan driver to wait for result. Based on the comment, the reason for that queueSerial wait is because "its reset command may not have been performed by the GPU yet.". But if mFeatures.supportsHostQueryReset is enabled, we use vkResetQueryPoolEXT to reset the query, and this host reset is immediate, so there is no need to wait for queueSerial in this case. This CL disables the wait when host reset is enabled and relies on vkGetQueryPoolResults(VK_QUERY_RESULT_WAIT_BIT) to do actual wait. This should help performance on immediate renderer where the query result might be available before renderpass completion. Bug: angleproject:3965 Change-Id: Ibe61c289f1f3d1312e79ac80a2b5de23b90ef87c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935444 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Charlie Lao 76f377c5 2022-06-17T16:05:16 Vulkan: Break renderpass when switch from query to non-query getQueryResult will wait for query result to be available, which means a potential CPU bubble if the result is not yet available. On tiler GPUs it will at least wait for renderpass to complete. Usually query enabled draws are very tiny (usually just draw a point to see if it is occluded or not), and query disabled draws are expensive. Some apps do issue a glFlush when switch from query draw to non-query draw, but app like dead_by_daylight does not issue such flush. In order to reduce the bubble, this CL ends renderpass and issue a flush when we switch from query enabled draws to non-query enabled draw so that the result will be available much earlier, this reduce the CPU bubble. This result in dead_by_daylight frame time improves from 5.45ms to 3.5ms (35% improvement). Bug: b/250706693 Change-Id: Ia3a32a9fb336e6f256809b3cad83f61a45415fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931739 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Mohan Maiya dbbfdd22 2022-10-06T13:39:20 Vulkan: Bug fix in GL_QCOM_shading_rate Don't initialize "vkCmdSetFragmentShadingRateKHR" before creating VkDevice as it leads to a nullptr assertion in RendererVk::canSupportFragmentShadingRate. Separate out instance and device function pointer initializations. Bug: angleproject:7172 Change-Id: I55b5b41313857a2861a197f17d7f88b71aec907f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3938443 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 13195f8a 2022-10-05T11:17:35 Vulkan: Fix missing input attachment usage on MSRTT When combined with advanced blend (or framebuffer fetch for that matter), MSRTT attachments could be used as input attachments. This change fixes the missing usage bit. Bug: angleproject:7739 Change-Id: I2190e4a6e534e120357dd68189fb9de07b6c54fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3936444 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Hailin Zhang 5ddf631c 2022-10-04T11:17:45 Vulkan: Choose host visiable device local based on heap size. set preferDeviceLocalMemoryHostVisible based on the host visiable device local and device local heap memory heap size. Bug: b/246909451 Change-Id: I1e63931baceda02396b0eb8f24671949920ac2a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3934479 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Mateusz Przybylski <mprzybyl@google.com>
Shahbaz Youssefi 391644f4 2022-08-24T14:59:21 Vulkan: Use VK_EXT_rasterization_order_attachment_access When available, this extension makes coherent framebuffer fetch / advanced blend official. Bug: angleproject:7604 Change-Id: Ifc552a0fa7a3612a3fc568feb61d6dd348e856ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855698 Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 34977cc5 2022-10-03T11:55:28 Supress vkDestroySemaphore-semaphore-01137 Bug: angleproject:7729 Change-Id: If93b6411bed472417d62f8e63682991a493dc526 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929750 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Ian Elliott <ianelliott@google.com>
Chris Dalton a7dc51f2 2022-10-01T08:49:11 Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Hailin Zhang 836cc5e2 2022-09-09T22:06:22 Vulkan: add etc to bc compute transcoding. use compute shader to transcode etc format to bc format. Bug: b/243398683 Change-Id: Idbd0820a2df8d92fe690055dae2933bc559e9bfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888501 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Cody Northrop f7a5cce1 2022-09-29T10:42:26 Tests: Add Life is Strange trace Test: angle_perftests --gtest_filter="*life_is_strange*" Bug: angleproject:7711 Bug: angleproject:7723 Change-Id: I83d9d58270a80435dba8991875b20a215372334f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928205 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi f4389797 2022-09-23T15:36:13 GLES1/Vulkan: Enable GL_EXT_multisample_compatibility ... with a non-conformant implementation. This unblocks some tests that unnecessary call glDisable(GL_MULTISAMPLE) and trip up on it generating validation error. Bug: angleproject:7676 Bug: angleproject:7657 Bug: angleproject:3863 Bug: angleproject:3864 Change-Id: Iaebbea66da81fc9a30bf7a87deed7cf88ff38476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891546 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 0d34d4f8 2022-09-21T18:51:04 Suppress more VVL errors about vkCmdDraw*-None * Suppressed the following VVLs: * VUID-vkCmdDrawIndexed-None-02686 * VUID-vkCmdDrawIndirect-None-02686 * VUID-vkCmdDrawIndirectCount-None-02686 * VUID-vkCmdDrawIndexedIndirect-None-02686 * VUID-vkCmdDrawIndexedIndirectCount-None-02686 Bug: angleproject:7685 Change-Id: I41390ee2a2a01509367a6e98697da3ad7e3cc2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910174 Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Amirali Abdolrashidi 7edc6dab 2022-09-21T11:57:37 Suppress VVL error about vkCmdDraw-None * Suppressed the following VVL: * VUID-vkCmdDraw-None-02686 Bug: angleproject:7685 Change-Id: I1c926637729f11f58667d20ea0f5c5f545dc5181 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910798 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 41de8a02 2022-09-21T09:08:12 Suppress VVL error about input attachment desc * Suppressed the following VVL: * UNASSIGNED-input-attachment-descriptor-not-in-subpass Bug: angleproject:7685 Change-Id: I8a23f8d4ddbc91df791f5c98b4ce1e11278b7cc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910796 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ba3b4515 2022-09-15T01:06:51 Vulkan: Implement GL_ANGLE_logic_op Enabled if the logicOp device feature is available. According to gpuinfo, it's pretty much universal except for ARM. Bug: angleproject:7654 Change-Id: I4808b519fdd6273b2f8c1bb17f59517eb65bfe8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898317 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 493bab09 2022-09-15T14:20:41 Add an ShPixelLocalStorageType enum Adds ShPixelLocalStorageType to ShCompileOptionsPLS and adds a getNativePixelLocalStorageType() call to ContextImpl. For now this enum only tells the translater whether PLS formats needs to be packed into r32 images, but it will soon also be able to select framebuffer fetch, native pixel local storage, and other PLS implementations. Bug: angleproject:7279 Change-Id: Ifbd419b20550b8711ae3044782177806796216f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900498 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano a8a04ce1 2022-08-16T17:59:20 Vulkan: Add supportsPresentation feature Some platforms do not support presentation through any Vulkan queue. In this case we should not transition the color image layout to present. Bug: angleproject:7217 Change-Id: I71cad0e52bc1fdb531de5a34e917a1862a4cf070 Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com> Suggested-by: Sungyong Choi <sywow.choi@samsung.com> Suggested-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3853598 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 18f90857 2022-09-09T11:28:00 Vulkan: Use DontCare if attachment is invalidated If an attachment is invalidated, there is no need to preserve the old content. NONE means old content is still preserved, DontCare means discard old content. In this case we do want to discard instead of preserve old content. Bug: b/243711628 Change-Id: I242ac86db6993574b5627d61f7185d155beec0ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888938 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Mohan Maiya ae971cfe 2022-09-07T17:00:17 Vulkan: Expose wide gamut and HDR EGL colorspace extensions Query the underlying Vulkan ICD for the list of supported colorspaces on platforms that support VK_GOOGLE_surfaceless_query extension. Expose corresponding EGL colorspace extensions. Bug: angleproject:7630 Change-Id: If9843ee55100fff5a8cec4ecf2ff27c746c5b205 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3873767 Reviewed-by: Trevor Black <vantablack@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mohan Maiya 5fae671c 2022-09-07T17:00:36 Vulkan: Enable VK_EXT_swapchain_colorspace when supported Enable VK_EXT_swapchain_colorspace instance extension when supported. This expands the number of colorspaces that can be supported by EGL. Bug: angleproject:7630 Change-Id: I10ac62dba80fc7a443ab1cb7be331717855ea74a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3881164 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>