src/libANGLE/renderer/vulkan/RendererVk.cpp


Log

Author Commit Date CI Message
Yuly Novikov b1b760e7 2021-08-09T13:37:10 Ignore VUID-vkCmdClearAttachments-baseArrayLayer-00018 New message added in https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/3133 Blocks vulkan-deps rolls. Bug: angleproject:6262 Change-Id: Iaaafe7539092cbe7eadd01e47b67071d60779929 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3081376 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ac5bcdb3 2021-08-02T18:04:49 Vulkan: Use custom volk init function. This should ensure we're using ANGLE's version of the loader. Bug: chromium:1235314 Change-Id: Ia7318a922e192ce669a8cece070ab518ea421fd5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3067511 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peter Kasting 0d06c3cf 2021-07-26T04:30:39 Fix some instances of -Wunused-but-set-variable. Bug: chromium:1203071 Change-Id: I144165ae5ec47aba88658030a6ba3e371bf31ee7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053616 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov bd19620f 2021-07-27T23:45:11 Revert "VulkanExternalHelper: Use VK_KHR_image_format_list extension." This reverts commit 4222d5e5a03f85ca07253d54f3087684fe9447b3. Reason for revert: errors on multiple builders when rolling into Chromium https://chromium-review.googlesource.com/c/chromium/src/+/3057227 e.g. https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_asan_rel_ng/924126/overview Original change's description: > VulkanExternalHelper: Use VK_KHR_image_format_list extension. > > To retrieve correct size requirements when the VK_KHR_image_format_list > extension is enabled, it must be used to match VkImages created in > vk_helpers. > > RendererVk: Fully enable VK_KHR_image_format_list. > Enable the extension on non-AMD and non-ARM platforms. > > Bug: angleproject:5281 > Change-Id: I3ca60bf6efcf9d9c10d4d96a3fe91b999eb044f7 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035047 > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Bug: angleproject:5281, chromium:1233561 Change-Id: I3b15bb2fc2fb779adac8bbf5d805727a25b5795c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3057071 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Lubosz Sarnecki 4222d5e5 2021-07-16T16:26:17 VulkanExternalHelper: Use VK_KHR_image_format_list extension. To retrieve correct size requirements when the VK_KHR_image_format_list extension is enabled, it must be used to match VkImages created in vk_helpers. RendererVk: Fully enable VK_KHR_image_format_list. Enable the extension on non-AMD and non-ARM platforms. Bug: angleproject:5281 Change-Id: I3ca60bf6efcf9d9c10d4d96a3fe91b999eb044f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035047 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Shahbaz Youssefi d0c03ff4 2021-07-22T14:55:51 Vulkan: SPIR-V Gen: Fix lvalues passed to in/inout parameters In GLSL, these values are semantically copied when passed to a function as an in or inout parameter. For example in: bool f(inout vec4 a, inout vec4 b) { a = vec4(0); return all(equal(a, b)); } var = vec4(1); bool result = f(var, var); result is expected to be false. In SPIR-V, every parameter is semantically passed by "reference". glslang conservatively uses temporaries to pass to functions. An optimization in ANGLE didn't create temporaries for unindexed lvalues, which did not take into account the above fact. This optimization is limited to out parameters now. Bug: angleproject:4889 Change-Id: Ie1b4b1cecba847ba63d5810d01d0856823b89ddc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046103 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill c5f83c34 2021-07-22T11:56:25 Revert "Vulkan: Suppress VVL errors triggered by external formats" This reverts commit f46df3978ab6102768048a6bf40e6f4989276065. Reason for revert: VVL change rolled into ANGLE + Chrome. Original change's description: > Vulkan: Suppress VVL errors triggered by external formats > > Since several tests are hitting these and it may be a VVL bug, > moving to ignore rather than skips. > > Bug: angleproject:6155 > Bug: angleproject:6168 > Change-Id: I38a5be8d792b8b13a490be895a68349bffe69c6e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028809 > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Mohan Maiya <m.maiya@samsung.com> > Commit-Queue: Cody Northrop <cnorthrop@google.com> Bug: angleproject:6155 Bug: angleproject:6168 Change-Id: I11696095300c214ca0b68624b0eb6763ba9d31f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043888 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1a4ac82a 2021-07-21T09:39:46 Vulkan: Disable border color on SwiftShader. A bug with floating point clamping is breaking some tests on SwS. Bug: angleproject:6200 Change-Id: Id608f5610a09e85f1bc41e38f20c6f7f0330f77b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041741 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jeff Vigil d2b659f9 2021-03-25T15:40:58 EGL: implement EGL_EXT_protected_content Context Add Validation check to Contexts and Surfaces Add Vulkan protected memory features and properties Add protected member to Surfaces and Contexts Implement hasProtectedContent in Vulkan Add QueueFamily helper, extent DeviceQueueMap Protected Swapchains always on for Android Add EGLProtectedContentTest Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: I9352b1e594f71bb4e89cee7137a468940d186b1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800413 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 011ef7ed 2021-07-09T01:33:57 Revert "Ignore VUID-VkSpecializationMapEntry-constantID-00776" This reverts commit 0beafe862b4c21299d40b5ffcf98816828254a2a. Reason for revert: VVL error no longer reproducible Original change's description: > Ignore VUID-VkSpecializationMapEntry-constantID-00776 > > New check added in > https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/2903 > Blocks VVL rolls. > > Bug: chromium:1226682 > Change-Id: Iaf12187c33a0c3736acae6e772277dbe6aa4c402 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007137 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bug: chromium:1226682 Change-Id: I7df7373fb52a1a64d94fd1973927cef4f89f2f05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3017555 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Mohan Maiya 5c8bf081 2021-06-08T13:12:24 Vulkan: Add support for YUV internal format extension 1. Add a function to upload YUV image data to textures 2. Modify stageSubresourceUpdate method to account for YUV images 3. Create VkSamplerYcbcrConversion when initializing ImageHelper 4. Update hasImmutableSampler to account for native YUV format support 5. Skip initializeNonZeroMemory for YUV formats Bug: angleproject:5773 Test: Texture2DTestES3.TexStorage2D*Yuv*Vulkan* Change-Id: I270f04bbf903cf2bf19f100eb95f32953d491c39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947767 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a3f44ab8 2021-07-19T08:23:27 Vulkan: Remove loader logging message in RendererVk. This was causing issues with a Chrome test. Bug: chromium:1230474 Change-Id: I0e5e3df5c9ad5774d6f5a2b41f4f1429000fe81e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035247 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop f46df397 2021-07-14T19:41:03 Vulkan: Suppress VVL errors triggered by external formats Since several tests are hitting these and it may be a VVL bug, moving to ignore rather than skips. Bug: angleproject:6155 Bug: angleproject:6168 Change-Id: I38a5be8d792b8b13a490be895a68349bffe69c6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028809 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 31b06f5f 2021-07-12T10:06:04 Vulkan: Account for immutable samplers that need multiple descriptors It is valid for immutable samplers to need more than 1 descriptor count. Account for this possiblity while calculating descriptor pool size. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Bug: angleproject:6141 Change-Id: Ifb0ed3e4b3c01c61d81dd0c628101f31d4c8bd05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3005329 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jamie Madill 9274911d 2021-07-12T10:41:16 Vulkan: Update cube map array support check. Bug: angleproject:5143 Change-Id: I0b774096ae762ae088a27ef1b4d52bf446562736 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021283 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8c07f3c1 2021-07-09T12:35:31 Enable cube map arrays on SwiftShader. Bug: angleproject:5142 Change-Id: I51c58d20da155b90980f27425a99cff2555345fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018303 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sergey Ulanov b73eee71 2021-07-07T18:51:35 Reland: [Vulkan] Add DisplayVkNull Currently all DisplayVk implementations depend on VK_KHR_swapchain and VK_KHR_surface extensions. When running Chromium on Fuchsia these extensions are never used (content is shown on the screen using ImagePipe API without dependency on swapchain). ANGLE still depended on these extensions for DisplayVkFuchsia. This CL adds DisplayVkNull, which allows to run ANGLE without dependency on swapchain. It's usable only offscreen and cannot present content on a surface. Bug: chromium:1203879 Change-Id: I5cadcdf46ed1cfb5ebb3cb69dbfef063e9e2b826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3012368 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 0beafe86 2021-07-05T16:12:10 Ignore VUID-VkSpecializationMapEntry-constantID-00776 New check added in https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/2903 Blocks VVL rolls. Bug: chromium:1226682 Change-Id: Iaf12187c33a0c3736acae6e772277dbe6aa4c402 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007137 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 153240b2 2021-06-11T16:36:32 Vulkan: SPIR-V Gen: Support loops Loops are similar to if-else in that they generate a number of blocks where the first block specifies divergence (OpLoopMerge) and the merge block. Differently from if-else, there is a block where the condition is evaluated and a block which `continue;` leads to (this last block is the only one allowed to back-jump to the beginning of the loop). Bug: angleproject:4889 Change-Id: Ic59f4bf3e05fbf93cb5af85acd3bc4b0da8412af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957809 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 5b314268 2021-06-15T17:37:45 Vulkan: Support OVR_multiview and OVR_multiview2 Multiview is supported in Vulkan simply by specifying the number of views in the render pass, and creating the appropriate image views. A number of changes to the way image views and render targets are stored are made to support those that don't cover the entire range of layers. One particular detail that is not implemented in this change is the use of queries in combination with multiview. Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application, but this is not currently done. Bug: angleproject:6048 Change-Id: I1d4a9894c232d3a93d7a97c9fa0eedc334e57469 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967625 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi b6adeb2f 2021-06-21T11:11:30 Vulkan: Use pipeline statistics query to emulate primitives generated The VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT query produces the same result as the GL primitives generated query. One caveat is that in combination with rasterizer discard this query may not work. This is emulated by disabling rasterizer discard when this query is active and applying an empty scissor instead. When VK_EXT_primitives_generated_query is released and supported, a similar issue with rasterizer discard persists so this change will facilitate using that extension as well. Bug: angleproject:5430 Change-Id: Id45b6f058c5cb6837e04aa64b1efde28c104e4cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Xiaoxuan Liu 96dd515a 2021-03-31T14:21:16 Update glColorspace(EGL_KHR_gl_colorspace) enable logic 1. Enable glColorspace if VK_EXT_swapchain_colorspace is supported, remove dependency on VK_KHR_image_format_list. 2. Enable VK_KHR_image_format_list support on Mali GPU. 3. Fix PbufferTest.ClearAndBindTexImageSrgbSkipDecode test tolerance issue. Bug: angleproject:2514 Bug: angleproject:5281 Change-Id: I2ed54a14afc7c3aee5a5980bd300ab052ebab3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2793852 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya b77a6c25 2021-06-16T11:01:14 Vulkan: Avoid using VK_WHOLE_SIZE when using dynamic offsets Binding descriptor sets that use VK_WHOLE_SIZE with a dynamic offset results in the VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979 validation error. Updated the updateDefaultUniformsDescriptorSet function to use the uniform's size instead of using VK_WHOLE_SIZE. Bug: angleproject:5924 Tests: dEQP-GLES31.functional.shaders.multisample_interpolation.* SimpleStateChangeTest.UniformUpdateTest*Vulkan UniformTestES3.MatrixUniformUpload*Vulkan Change-Id: Ie4633af61d59a9401f599d336a5b9040cdf18004 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950309 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao 5e631c5f 2021-05-20T11:21:18 Vulkan: Disable shadowBuffers feature For PixelUnpack, if the feature is enabled, it always create a shadow CPU mapped memory. Then when mapBuffer is called, it let user write to the shadow memory. At unmapBuffer time, it memcpy the shadow buffer data to context's staging buffer and then issue a vkCmdCopyBuffer from context staging buffer to the PixelUnpack buffer. This involves too many data copies. The proper way to do it is simply make sure to create the buffer as CPU map-able and let user directly write to it. If we find cases that CPU waiting for GPU to finish is causing performance issues, there are two ways to improve/fix it: 1)Add event at end of each renderpass or FBO so that we know if GPU access is finished or not without have to wait for entire frame to finish rendering. 2) Create multiple buffers and ping-pong between them, at least there will be no VkCmdCopyBuffer call involved like shadow buffers do. But we will leave that to future time when we find such need. Bug: angleproject:5986 Change-Id: Ib8300e46e779d20533c1f7f81624de0ce003788b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2909758 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill fad9053f 2021-05-20T15:52:38 infra: Add isolated script tests to Pixel 4. This includes angle_perftests and angle_restricted_trace_gold_tests. Bug: angleproject:5941 Change-Id: I6f24d2c2752086ae6f7abba26880070c4a4f0472 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911034 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mohan Maiya dd312cc6 2021-05-21T08:49:48 Reland "Vulkan: Add support for EXT_texture_border_clamp" This is a reland of 4b92e089c01e94730fe26c4c743d76d6c935088d Initializes mPadding to 0 in SamplerDesc::update Original change's description: > Vulkan: Add support for EXT_texture_border_clamp > Add support for GL_EXT_texture_border_clamp. This is implemented by > using VK_EXT_custom_border_color. > > Bug: angleproject:3577 > Test: dEQP-GLES31.functional.texture.border_clamp* > Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: angleproject:3577 Change-Id: I8684242c4bce6e1a006dbe926defaa495fcc2282 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911571 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Yuly Novikov 44fabb7b 2021-05-21T00:51:06 Revert "Vulkan: Add support for EXT_texture_border_clamp" This reverts commit 4b92e089c01e94730fe26c4c743d76d6c935088d. Reason for revert: breaks "Linux MSan Tests" bot https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/28489/overview Original change's description: > Vulkan: Add support for EXT_texture_border_clamp > > Add support for GL_EXT_texture_border_clamp. This is implemented by > using VK_EXT_custom_border_color. > > Bug: angleproject:3577 > Test: dEQP-GLES31.functional.texture.border_clamp* > Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: angleproject:3577, angleproject:5996 Change-Id: I6b62f1a4a43fcfe2d0df2c73de24db83606ce430 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911533 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 2add8d9f 2021-05-19T18:47:40 Don't use VK_EXT_debug_utils with non-Android Vulkan < 1.1.91 Due to a bug in Vulkan Loader < 1.1.91 https://github.com/KhronosGroup/Vulkan-Loader/pull/95 Bug: chromium:1205999 Change-Id: Icdedc2e80abe3c5578e811759f66ddbb71abb2ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2907095 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 88156d26 2021-05-18T23:55:32 Revert "[Vulkan] Add DisplayVkNull" This reverts commit cbbaf76b758fb6a37175795b1f424549d535fbdc. Reason for revert: Suspecting this breaks the fuchsia_x64 bot WebGL tests. Ex: https://chromium-review.googlesource.com/c/chromium/src/+/2904812 Original change's description: > [Vulkan] Add DisplayVkNull > > Currently all DisplayVk implementations depend on VK_KHR_swapchain and > VK_KHR_surface extensions. When running Chromium on Fuchsia these > extensions are never used (content is shown on the screen using > ImagePipe API without dependency on swapchain). ANGLE still depended > on these extensions for DisplayVkFuchsia. > This CL adds DisplayVkNull, which allows to run ANGLE without dependency > on swapchain. It's usable only offscreen and cannot present content on > a surface. > > Bug: chromium:1203879 > Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: chromium:1203879 Change-Id: I6701ffff48fcb925f387e63b356d2d5cf360ea7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904183 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 4b92e089 2021-05-12T09:20:24 Vulkan: Add support for EXT_texture_border_clamp Add support for GL_EXT_texture_border_clamp. This is implemented by using VK_EXT_custom_border_color. Bug: angleproject:3577 Test: dEQP-GLES31.functional.texture.border_clamp* Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Sergey Ulanov cbbaf76b 2021-04-29T16:09:09 [Vulkan] Add DisplayVkNull Currently all DisplayVk implementations depend on VK_KHR_swapchain and VK_KHR_surface extensions. When running Chromium on Fuchsia these extensions are never used (content is shown on the screen using ImagePipe API without dependency on swapchain). ANGLE still depended on these extensions for DisplayVkFuchsia. This CL adds DisplayVkNull, which allows to run ANGLE without dependency on swapchain. It's usable only offscreen and cannot present content on a surface. Bug: chromium:1203879 Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao 09dad082 2021-05-07T17:28:15 Vulkan: Add feature flag to flush at framebuffer boundary Testing shows most app traces seeing performance improved on ARM GPU when we flush at FBO boundary instead of one submit per frame. This likely due to more frequent submission means less chance of GPU starvation. This also helps ANGLE to detect GPU finish at finer grain since the queue serial is per submission. Finer grain detection of object completion means memory gets recycled quicker and mapBufferRange able to hit fast code path more often. With this CL, manhattan 3.1 offscreen score also score improves 7%. This may also helps onscreen performance if frame time is on the edge of 16ms by submit FBO rendering earlier instead of been blocked by vkAcquireNextImage. Bug: b/187993625 Bug: angleproject:5295 Change-Id: I2946a7159231d36019ace89805a69ac8e906ce94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2888709 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yuly Novikov 859ed396 2021-05-11T16:58:55 Follow up on Vulkan headers update to 1.2.177 Removing duplicate definitions in ANGLE. Bug: angleproject:5905 Change-Id: Ie62ad39a1ebc0d8b0d2c005723f461bc7309eade Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
angle-autoroll 23ff18f9 2021-04-30T16:45:04 Roll vulkan-deps from 42d8716d0294 to c5559fe406e3 (24 revisions) https://chromium.googlesource.com/vulkan-deps.git/+log/42d8716d0294..c5559fe406e3 Changed dependencies: * glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/18eef33bd7..56b17b2f2d * spirv-cross: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross.git/+log/c624d5387c..72a2ec4c1b * spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/22b82872b4..8ec9f456e6 * vulkan-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers.git/+log/074fa3055c..3f437c4a94 * vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/d0f1abe22e..5dcea8a449 * vulkan-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools.git/+log/eb3d67bd17..4ee5f2a8be * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/f6b4a3dea4..7ab4afe505 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 jonahr@google.com,ynovikov@google.com on the revert to ensure that a human is aware of the problem. 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/master/autoroll/README.md Bug: angleproject:5905 Tbr: jonahr@google.com,ynovikov@google.com Change-Id: I462413910900b8dc38b3e88b78d9ff2e10b103b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2863562 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Charlie Lao a4588e33 2021-04-29T14:24:20 Vulkan: Disable logMemoryReportStats if driver extension not exist logMemoryReportCallbacks and logMemoryReportCallbacks features are useful for memory debugging. But they rely on VK_EXT_device_memory_report extension. Right now if this extension is not there and you enable the log, you still see the logs but everything is all zero. This CL will disable the feature and print out warning message if the extension is not supported. Bug: None Change-Id: I478ae0ac7ba1ee43245a9fd8a3f1d9907f5d833c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861310 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Tim Van Patten 54e99d36 2021-04-23T13:02:43 Vulkan: Cleanup garbage when destroying EGL images SurfaceFlinger will optimistically create EGL images just in case it does need them in the future, since creating them can be slow and waiting until they're necessary can cause jank on 90hz+ devices. However, since the images are never actually used, ANGLE's garbage is never cleaned up so vkDestroyImage() and the memory is never freed. This can lead to exhausting the device's memory when many EGL images are allocated. For example, when running the CTS test CtsBiometricsTestCases. This CL adds a call to always cleanup the renderer's garbage when an EGL image is destroyed via eglDestroyImageKHR(), since we can't know if a draw will ever be performed in the future (which would normally cleanup the garbage). Bug: b/184388756 Test: atest CtsBiometricsTestCases Change-Id: I104c05c7be44f1e57123ac7eed23effaa982837a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2848131 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jason Macnak <natsu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Jonah Ryan-Davis 9c66461c 2021-04-29T11:47:16 Suppress VUID-VkImageViewCreateInfo-pNext-01585 temporarily Vulkan validation failures are happening on ComputeShaderTest on Linux and Windows with AMD. Suppress for now while the issue is investigated Bug: angleproject:5912 Change-Id: If89f7c85bb311a68d6cab85e397112b4178e34d7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2860044 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 61288549 2021-04-27T17:42:21 Vulkan: Turn on cubemap arrays for Qualcomm The feature works on Pixel 3 and later, so only disable it on Pixel 2. Bug: angleproject:5143 Change-Id: I824fc9ea71cb612fd99e23b7f37a1a3c278d92aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2855218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Geoff Lang ccd984ff 2021-04-08T12:06:57 Reland "Add a Vulkan feature to compress float32 vertex formats." This reverts commit 8ace36f8c15877264fb58af7b54baad635899dca. Original change's description: > Revert "Add a Vulkan feature to compress float32 vertex formats." > > Bug: b/167404532 > Bug: b/161716126 > Change-Id: I95157a006d5c1fd2d3c0c2c2be37fa0403c07f93 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510011 > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: b/167404532 Bug: b/161716126 Change-Id: Ic6811fe3a7124e6eb1efe7c72a1a03a120217753 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815260 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Ian Elliott e167d453 2021-04-21T14:14:33 Vulkan: Allow logging with VVL and/or AGI debug utils to be used A recent change allowed logging API commands on Android to be used with Vulkan Validation Layers (VVL). That broke debug utils for AGI (i.e. when the ANGLE-built VVL is not being used). This allows both use cases to be supported. Bug: b/183133198 Change-Id: Ide83ed63fad99d0eca97998365276a1ef365a4e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2842325 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 718022e8 2021-04-16T20:50:34 Reland "Revert "Vulkan: Suppress draw-time push constant VVL warnings. "" This is a reland of b027dfeb83d028ae72ed1957ba81e6c5dc3baffa Original change's description: > Revert "Vulkan: Suppress draw-time push constant VVL warnings. > " > > This reverts commit f34b40dab0487bbabc37645918bed87048107e14. > > Reason for revert: VVL bug is fixed. > > Original change's description: > > Vulkan: Suppress draw-time push constant VVL warnings. > > > > > > > > VUID-vkCmdDraw-None-02698 > > > > VUID-vkCmdDrawIndexed-None-02698 > > > > VUID-vkCmdDrawIndirect-None-02698 > > > > VUID-vkCmdDrawIndirectCount-None-02698 > > > > VUID-vkCmdDrawIndexedIndirect-None-02698 > > > > VUID-vkCmdDrawIndexedIndirectCount-None-02698 > > > > VUID-vkCmdDispatch-None-02698 > > > > > > > > Bug: angleproject:5821 > > Change-Id: Ic8ca6178ce50b409ac8d256848654f43f91fae8e > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2808854 > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Jamie Madill <jmadill@chromium.org> > > Bug: angleproject:5821 > Change-Id: I771e81a46893f2875605e472273f1388587e042e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2831997 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5821 Change-Id: I56ccb80eb76c3cedca2a40b8cc0223a879ab1edf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2842309 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amy Liu 95935176 2021-03-26T17:38:21 Handle the compression of big pipeline cache. Big pipeline cache will cost much time to compress. Regarding the perfomance, handle the compression of big pipeline cache in this way: 1)Return when the pipeline cache data is larger than 10M. 2)Use worker thread to complete compression. Bug: angleproject:4722 Change-Id: I62eb69d8c46729261f0502af01450ec301c258f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2788169 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 39d8dde8 2021-04-19T15:02:02 Revert "Revert "Vulkan: Suppress draw-time push constant VVL warnings." This reverts commit b027dfeb83d028ae72ed1957ba81e6c5dc3baffa. Reason for revert: Breaking win-trace-rel b/c of missing VVL roll. Original change's description: > Revert "Vulkan: Suppress draw-time push constant VVL warnings. > " > > This reverts commit f34b40dab0487bbabc37645918bed87048107e14. > > Reason for revert: VVL bug is fixed. > > Original change's description: > > Vulkan: Suppress draw-time push constant VVL warnings. > > > > > > > > VUID-vkCmdDraw-None-02698 > > > > VUID-vkCmdDrawIndexed-None-02698 > > > > VUID-vkCmdDrawIndirect-None-02698 > > > > VUID-vkCmdDrawIndirectCount-None-02698 > > > > VUID-vkCmdDrawIndexedIndirect-None-02698 > > > > VUID-vkCmdDrawIndexedIndirectCount-None-02698 > > > > VUID-vkCmdDispatch-None-02698 > > > > > > > > Bug: angleproject:5821 > > Change-Id: Ic8ca6178ce50b409ac8d256848654f43f91fae8e > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2808854 > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Jamie Madill <jmadill@chromium.org> > > Bug: angleproject:5821 > Change-Id: I771e81a46893f2875605e472273f1388587e042e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2831997 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5821 Change-Id: If9f80d052736e40c4c6d3e9a1cd629205901ba49 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2836285 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b027dfeb 2021-04-16T20:50:34 Revert "Vulkan: Suppress draw-time push constant VVL warnings. " This reverts commit f34b40dab0487bbabc37645918bed87048107e14. Reason for revert: VVL bug is fixed. Original change's description: > Vulkan: Suppress draw-time push constant VVL warnings. > > > > VUID-vkCmdDraw-None-02698 > > VUID-vkCmdDrawIndexed-None-02698 > > VUID-vkCmdDrawIndirect-None-02698 > > VUID-vkCmdDrawIndirectCount-None-02698 > > VUID-vkCmdDrawIndexedIndirect-None-02698 > > VUID-vkCmdDrawIndexedIndirectCount-None-02698 > > VUID-vkCmdDispatch-None-02698 > > > > Bug: angleproject:5821 > Change-Id: Ic8ca6178ce50b409ac8d256848654f43f91fae8e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2808854 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5821 Change-Id: I771e81a46893f2875605e472273f1388587e042e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2831997 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 065c2329 2021-04-08T11:59:43 Reland "Vulkan: Add features to modify sampling parameters" This reverts commit a51b57fa2dc73f8bc8acdf0b818cc0315fb23d75. Original change's description: > Revert "Vulkan: Add features to modify sampling parameters" > > Bug: b/167404532 > Change-Id: Iae19dfe165074e8c01216312bddd744c4fb504a4 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510012 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: b/167404532 Change-Id: I2c756b8eb0f61701ef6e33275e557bc199a4d3b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815259 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Nicolas Capens 15f4925a 2021-04-12T15:38:10 Restore EGL_EXT_buffer_age for SwiftShader Vulkan EGL_EXT_buffer_age was previously disabled for SwiftShader Vulkan because of an Android test timing out on Cuttlefish when the buffer age is queried. aosp/1672445 addresses the root cause of the timeout, so EGL_EXT_buffer_age can be supported again. Bug: b/182521420 Bug: angleproject:3529 Change-Id: I5949f721316855d9138eb9f657a6df4e7b49ed71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821750 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Ian Elliott b17a9317 2021-04-09T14:39:37 Vulkan: damage rectangles must never be pre-rotated Remove the SurfaceVk::present() code that rotated damage rectangles and the feature flag that controlled that rotation. The Vulkan specification was changed so that the rectangles provided to the VK_KHR_incremental_present extension must never be pre-rotated. The spec change requires the same behavior on all platforms (just in case), even though Android is the only platform known to support rotation. FYI: the Vulkan spec change was merge request 4442. Bug: b/182930524 Change-Id: I5128fd76e718f3d964c9091830bcc5886d265543 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818826 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ba7531da 2021-04-07T12:51:17 Add tests that use, then update, then use buffers This triggers vk::DynamicBuffer allocations in BufferVk. Bug: angleproject:5719 Change-Id: Ida855b23618497f76102e55f89ab1678f9c08753 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809856 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao e249239c 2021-04-08T09:46:48 Vulkan: Add featue flag to force highp to mediump in fragment shader. Adding feature flag that forces highp in fragment shader to mediump. It is disabled by default. You can enable it for experiment. Bug: b/184850002 Change-Id: I73980be4ad160eb1b17a3a3ecfc09f2e4aeb468c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815240 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Jamie Madill f34b40da 2021-04-06T17:56:48 Vulkan: Suppress draw-time push constant VVL warnings. VUID-vkCmdDraw-None-02698 VUID-vkCmdDrawIndexed-None-02698 VUID-vkCmdDrawIndirect-None-02698 VUID-vkCmdDrawIndirectCount-None-02698 VUID-vkCmdDrawIndexedIndirect-None-02698 VUID-vkCmdDrawIndexedIndirectCount-None-02698 VUID-vkCmdDispatch-None-02698 Bug: angleproject:5821 Change-Id: Ic8ca6178ce50b409ac8d256848654f43f91fae8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2808854 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi aac1b494 2021-03-26T21:52:30 Vulkan: Remove spam output regarding pipeline cache The warning regarding pipeline cache not having been found in the blob cache is of little utility. Between emitting it once and not at all, concensus was on the latter. Bug: angleproject:4722 Change-Id: I6d6b2758035e8c5e880b77c5f5be84772cb58a18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2788812 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 776c6015 2021-02-26T00:00:57 Vulkan: Call glslang at compile time With this change, the ANGLE translator immediately compiles the generated GLSL into SPIR-V with glslang and discards the source. This is in preparation for generating SPIR-V directly, by making the frontend and backend already able to digest it. This change also allows the expensive glslang calls to be parallelized, improving the following perf test by about 20%: LinkProgramBenchmark.Run/vulkan_compile_and_link_multi_thread Previously, the test was run as such in the Vulkan backend: Main Thread 1 Thread 2 Compile1 ---> Compile2 ---------------------> Translator Translator <--- <--------------------- Link glslang for shader1 glslang for shader2 Done With this change, it is run as such: Main Thread 1 Thread 2 Compile1 ---> Compile2 ---------------------> Translator Translator glslang glslang <--- <--------------------- Link Done glslang_wrapper_utils no longer interacts with glslang! A rename will follow. Bug: angleproject:4889 Change-Id: If4303e8ba0ba43b1a2f47f8c0a9133d0bee1a19a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721195 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao 9a79ee78 2021-03-22T17:56:28 Vulkan: Add A few other *-None-04584 VVL error to skip list If app uses textureLoad to fetch a texture level and mean time renders to the same texture but with different level, this will generate vulkan validation errors. Previously we are only skipping VUID-vkCmdDraw-None-04584, but it is necessary to skip all other-04584 VVL error that stem from other draw calls as well. Aztec ruins can run into VUID-vkCmdDrawIndexed-None-04584 on QComm GPU, for example. Bug: b/175584609 Change-Id: I2da6945415975350e36f533f007ae1e2a5feddfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2780563 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Amy Liu 1fb7f648 2021-03-18T16:17:25 Compression of the data from vkGetPipelineCacheData. The size of pipelineCacheData sometimes is greater than 64k which cannot be saved because of the Android blob cache limitation (single cache data size should be < 64k). Implement the compression to store more cache data. Re-land this patch before fixing the performance regression of big pipeline cache. Bug: angleproject:4722 Change-Id: I4bc05a88334c3e7e9e945d1a0877429db1750422 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2771840 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi d1462228 2021-03-09T11:25:36 Vulkan: Use VK_EXT_multisampled_render_to_single_sampled Additionally, makes the emulation path not require independentResolveNone. This was only used to select the NONE resolve mode when the attachment format doesn't have either of depth or stencil aspects, but it's ok to specify the same resolve mode for both aspects even if one aspect is missing. Bug: chromium:1088005 Change-Id: Ifc37cbf5331145179c5927853b996a0d62b871ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743666 Reviewed-by: David Reveman <reveman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Nicolas Capens 135385a1 2021-03-19T00:09:31 Disable EGL_EXT_buffer_age for SwiftShader Vulkan Cuttlefish with SwANGLE failed to pass the android.graphics.cts. BitmapTest#testDrawingHardwareBitmapNotLeaking test, due to a timeout in dequeueBuffer (error = -110) during an EGL_BUFFER_AGE_EXT surface query. This change conservatively works around the issue by leaving EGL_EXT_buffer_age support disabled for SwiftShader. Further investigation is required to check whether this timeout can also occur with other Vulkan drivers, and if it can be addressed robustly. Bug: b/182521420 Bug: angleproject:3529 Change-Id: I54e3767e74bf922f273d8860f9f4cfc8b6589536 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774030 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Charlie Lao d5bc8a27 2021-03-17T18:21:35 Vulkan: Add VUID-vkCmdDraw-None-04584 validation error to ignore list Aztec ruins is using the same texture (but different level controlled by a uniform variable) for textureLod and rendering. This triggers vulkan validation error. This CL put it in the ignore list so that it can pass. Bug: b/175584609 Change-Id: I7623e7b448514b3c12268aa5fe154f4c2f59b059 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770686 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 716b2cba 2021-03-12T14:46:53 Use bitset masks for active shader buffers. This switches the tracking for the uniform, shader storage, and atomic counter buffers to use bitset masks to determine where there are active buffers. This will make iterating these buffer sets faster. Also renames the limit for atomic counter buffers to be consistent with the other buffer types. Also applies the implementation limit to atomic counter buffer bindings. This fixes out-of-bounds access on some Linux platforms that expose a large number of bindings. Bug: angleproject:5736 Change-Id: Ice801645697592d1dda6aebf0cb69767594cc0c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757509 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Tim Van Patten bbed8813 2021-03-05T17:40:27 Create GN arg to enable non-conformant features The GN arg angle_expose_non_conformant_extensions_and_versions is being added to control exposeNonConformantExtensionsAndVersions, which enables non-conformant features and extensions. In particular, this is being done to enable EXT_texture_buffer on devices that don't support all of the necessary formats since many Android games rely on this extension, such as "Special Forces Group 2", "Fortnite", and "PUBG". # Enables non-conformant extensions and features angle_expose_non_conformant_extensions_and_versions = false Users/vendors can now toggle the value with a GN arg, rather than a code change, to make it easier to test the conformant version of ANGLE with CTS, dEQP, etc. and/or app-compatibility. Bug: angleproject:5592 Change-Id: Icbf18b48a2751c03e277ae964e1ec278a43324cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2740643 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Ian Elliott 92db3c68 2021-03-10T15:09:15 Vulkan: Disable rotating damage rectangles on Android This fixes visual problems with Android games that use eglSwapBuffersWithDamageKHR(). In 90/270-degree cases, the damage rectangles are being double-rotated, leaving them 90-degrees out of alignment with the window. On Android, VK_KHR_incremental_present is built on top of the same platform code as eglSwapBuffersWithDamageKHR(). The platform code rotates all damage rectangles (assuming they are application-provided). Therefore, ANGLE should not also pre-rotate damage rectangles. Test: Black Desert Mobile Test: Grand Theft Auto: San Andreas Test: Extreme Car Driving Simulator Bug: b/181796746 Change-Id: I6510e7540bb00afc75863e8ae8a9ea3841d1641d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2744984 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Peng Huang b27740f3 2021-03-09T16:15:15 Revert "Vulkan: Support EXT_sRGB_write_control" This reverts commit 6073af536cf627742696823edc82c9b0a481a8bc. Reason for revert: crbug.com/1186140 Original change's description: > Vulkan: Support EXT_sRGB_write_control > > Implement support for EXT_sRGB_write_control. This extension > requires VK_KHR_image_format_list to be supported. > > The spec requires this functionality to work with glBlitFramebuffer > as well but support for that will be added in a follow up change. > As such, this extension is only exposed in non-conformant mode. > > Bug: angleproject:5075 > Tests: SRGBFramebufferTest.*Vulkan* > Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5075,chromium:1186140 Change-Id: Ib0d4d60fe7434fb950f99db2c210aab9af7d2d0e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743663 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Peng Huang <penghuang@chromium.org>
Mohan Maiya 6073af53 2021-03-08T11:21:31 Vulkan: Support EXT_sRGB_write_control Implement support for EXT_sRGB_write_control. This extension requires VK_KHR_image_format_list to be supported. The spec requires this functionality to work with glBlitFramebuffer as well but support for that will be added in a follow up change. As such, this extension is only exposed in non-conformant mode. Bug: angleproject:5075 Tests: SRGBFramebufferTest.*Vulkan* Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amy Liu 0ee360de 2021-03-05T06:02:25 Revert "Compression of the data from vkGetPipelineCacheData." This reverts commit cc5083e071e9e0663979c02376e7848c7de11765. Reason for revert: Re-land this patch after fixing the performance regression of big blob cache (discussed in angle issue 4722). Original change's description: > Compression of the data from vkGetPipelineCacheData. > > The size of pipelineCacheData sometimes is greater than > 64k which cannot be saved because of the Android blob cache > limitation (single cache data size should be < 64k). > Implement the compression to store more cache data. > > Bug: angleproject:4722 > Change-Id: I435b086d70d0e6378f1141464ae2bafbe076f193 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631511 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:4722 Change-Id: Ie4de10eabf5cd8f0b4748e2c1a4c3ab6b8ea092c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2739098 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 6edba641 2021-03-02T11:36:59 VK: Suppress VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979 This validation is blocking the vulkan-deps roll. Suppressing until we fix the issue. Bug: chromium:1183542 Change-Id: I05ca95af8bcf77ddb70f01049e5cb07967420c25 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2727645 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 19e4cf86 2021-02-09T21:49:42 Capture/Replay: Some fixes for capturing WebGL Bug: angleproject:5635 Change-Id: I756471fbad34660c494fb7f9ba1144accd5c08b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686119 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill a8a2a71b 2021-02-01T17:18:18 Vulkan: Support y-flip with no driver support. We can reuse the surface rotation matrix code to do the y-flip. This requires the SPIR-V transformation support. Because not all rotations are encoded into the table we can only support rotation with the driver support for y-flip (currently). Includes some very minimal regression testing. This work is targeted towards supporting vk-portability implementations which are not as up-to-date with Vulkan features. Bug: angleproject:5596 Change-Id: I270fa1efc03267551d28df33ddac9972e1343d60 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665892 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Schade 6cc845bb 2020-12-07T18:14:50 Vulkan: Add support for EXT_blend_func_extended This implementation utilizes vulkan's dualSrcBlend feature. Expose this extension if the underlying vulkan backend allows the use of this feature. Test: angle_end2end_tests --gtest_filter=EXTBlendFuncExtendedDrawTest* Bug: angleproject:5074 Change-Id: I7d2f611df89d65e5cac35158cb5f41a0ebd58aae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2593151 Commit-Queue: Brandon Schade <b.schade@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 0be050a4 2020-09-23T15:12:56 Pass GL_VERSION info through ANGLE's GL_RENDERER string Chrome needs ANGLE to pass through the underlying driver vendor and version, which cannot always be determined by the SystemInfo library. This is done by construction GL_RENDERER in the frontend through combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends. Example changes are in the doc: https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing Bug: chromium:1126526 Bug: chromium:1131248 Bug: chromium:1134669 Bug: chromium:1169861 Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi eae262e7 2021-01-27T13:56:49 Vulkan: Fix image layout barriers for tessellation shaders Also fixes a bug where invalid stages may be specified for example if AllGraphicsReadOnly or DepthStencilReadOnly layouts are used and geometry or tessellation shaders are not supported by the implementation. Bug: angleproject:5557 Change-Id: Ia25a6aec8138c67701c63da65783263d8a7bda27 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653911 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Peng Huang 53105997 2021-01-28T07:42:15 Initialize some missing vulkan function pointers Those methods are used by VMA. However VMA can get those methods by itself, if null function pointers are provided for creating the VMA. But it will cause problem, when ANGLE & Chromium are sharing one VMA implementation, since the VMA implementation in chromium will be built with VMA_STATIC_VULKAN_FUNCTIONS=0 & VMA_DYNAMIC_VULKAN_FUNCTIONS=0. Bug: chromium:1170339 Change-Id: I5bf435698e4e361bfa7a6afce84390ccc4355b53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2655795 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Amy Liu cc5083e0 2021-01-15T10:29:36 Compression of the data from vkGetPipelineCacheData. The size of pipelineCacheData sometimes is greater than 64k which cannot be saved because of the Android blob cache limitation (single cache data size should be < 64k). Implement the compression to store more cache data. Bug: angleproject:4722 Change-Id: I435b086d70d0e6378f1141464ae2bafbe076f193 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631511 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi ea71c6b6 2021-01-12T14:13:35 Vulkan: Emulate R32F images with R32UI GL requires that imageAtomicExchange be supported for r32f formats. However VK_FORMAT_FEATURE_STORAGE_*_ATOMIC_BIT is nearly unsupported everywhere without some Vulkan extension that brings in unnecessary support. This GL feature is emulated by transforming the shader to use r32ui for all images that originally specified r32f. floatToUintBits and uintBitsToFloat is used to maintain correct usage of the image* builtin functions. Bug: angleproject:5535 Change-Id: Ie607089935d3283b3ffa054f4b4385b81fb8f53d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2635453 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 186fe990 2021-01-15T15:49:30 Vulkan: Redo RewriteAtomicCounters With MonomorphizeUnsupportedFunctionsInVulkanGLSL and RewriteArrayOfArrayOfOpaqueUniforms transformations run, it is no longer possible to encounter array of array of atomic counters, or have any passed to functions. As a result, RewriteAtomicCounters is greatly simplified. Additionally, it is no longer necessary to pass binding/offset information for atomic counters around and they can use constants. This change removes dependency on the shaderStorageBufferArrayDynamicIndexing Vulkan feature. Bug: angleproject:3726 Bug: angleproject:3881 Change-Id: Ia43092a668f60d009eccbbceeed5deaf105a5895 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633687 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill b912eec5 2020-11-27T11:08:41 Vulkan: Support GL_EXT_tessellation_shader. Shader translator changes done in http://crrev.com/c/2633936 Adds a new DIRTY_BIT_PATCH_VERTICES state to Context. Supportes state query and transform feedback. 4 test suppressions remain as follow-up fixes. Adds a new varying packing mode for a simple Vulkan rule set. Based on work by Mohan Maiya (m.maiya@samsung.com). Test: dEQP-GLES31.functional.tessellation.* Bug: angleproject:3572 Change-Id: I4cad2cca30adb754fd12c83027673906541f566a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568234 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 60015ff6 2021-01-14T02:03:07 Vulkan: Redo RewriteStructSamplers This transformation is split into two. The first transformation solely takes out the samplers out of structs, and potentially generates array of array of samplers. A second transformation is added that takes any array of array of opaque uniforms and flattens it. A follow up change will simplify RewriteAtomicCounters which also handles array of arrays (which is no longer possible), and removes dependency on shaderStorageBufferArrayDynamicIndexing. Bug: angleproject:2703 Bug: angleproject:3881 Bug: angleproject:4071 Bug: angleproject:4211 Change-Id: I352bb2bbe65ac49f4d7d753c0ba3160fa3cc925a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628138 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya cea86910 2021-01-14T08:13:00 Vulkan: Support EXT_clip_cull_distance extension EXT_clip_cull_distance extension is supported except for some features related to EXT_tessellation_shader and EXT_geometry_shader. Also added a few compiler tests to validate the transformation from ESSL to GLSL for Vulkan backend. Bug: angleproject:5458 Tests: angle_end2end_tests --gtest_filter=Clip*DistanceTest* angle_unittests --gtest_filter=*Clip*Distance* Change-Id: Ie74e6b2b55112ad92ad111191d629b63506032ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2585987 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jamie Madill fb4eea2e 2021-01-11T16:58:02 Vulkan: Index mandatory support table by ANGLE format. This removes another instance of indexing a flat array by VkFormat. With the introduction of YUV formats we no longer have a compact table. Switching to ANGLE format indexing allows us to keep a flat array and avoid using an unordered map. Bug: angleproject:5438 Change-Id: I96caa19e3b7ce419ce09680399919447f002b0bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2622238 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2e9706d8 2021-01-08T17:29:42 Vulkan: Use angle::FormatID instead of VkFormat. This change switches the internal enums we pass around from VkFormat to FormatID. The end goal of the refactor is to allow the Vulkan back-end to store packed tables indexed by FormatID. Because VkFormat has large gaps in its enum space we'd otherwise need to use unordered data structures like unordered_map. The change removes the redundant VkFormat storage from vk::Format and uses a new table query to return the VkFormat that 1:1 matches an angle::FormatID. We also include a reverse mapping for use with native Vulkan get functions for Android. Also moves sRGB conversion functions into renderer_utils. A couple sRGB formats that don't exist in GL are no longer handled by the sRGB conversion functions. These formats should be extremely rare. Bug: angleproject:5438 Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
jchen10 c0bbe6cf 2020-12-16T11:56:52 Unsuppress TextureCubeTest.CubeMapFBO on Intel/Win/Vulkan This disables forceCpuPathForCubeMapCopy as well Bug: angleproject:2822 Bug: angleproject:3055 Change-Id: Iecb37d0c2d109e319c67310dd64ad8d4bbc14fd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2594707 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 909ea88b 2020-11-20T13:07:53 Reland "Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9" This is a reland of 5cf7472dd161bbda329dfc5e4e65bb6ce0c06fbd The ShareGroupVk::mResourceUseLists was not being cleared each call to RendererVk::submitFrame(), so it was growing indefinitely. Each vk::ResourceUseList within it was cleared, so it was holding an essentially "infinite" list of empty lists, but that caused the loop in RendererVk::submitFrame() to take more and more time until the tests timed out. The fix is to do 'resourceUseLists.clear()' once the loop to release all resources has completed, like releaseResourceUsesAndUpdateSerials() does for each individual list. Additionally, ASSERTs are added to guarantee that the lists are empty when the ContextVk and ShareGroupVk are destroyed. Original change's description: > Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9 > > Multithreaded apps can use the following pattern: > > glDrawElements() > glFenceSync() > glFlush() > glWaitSync() > > This currently results in a vkQueueSubmit for every glFlush() to ensure > that the work has landed in the command queue in the correct order. > However, ANGLE can instead avoid the vkQueueSubmit during the glFlush() > in this situation by instead flushing the ContextVk's commands and > ending the render pass to ensure the commands are submitted in the > correct order to the renderer. This improves performance for Asphalt 9 > by reducing frame times from 150-200msec to 35-55msec. > > Specifically, ANGLE will call flushCommandsAndEndRenderPass() when > there is a sync object pending a flush or if the ContextVk is currently > shared. > > Additionally, on all devices except Qualcomm, ANGLE can ignore all other > glFlush() calls entirely and return immediately. For Qualcomm devices, > ANGLE is still required to perform a full flush (resulting in a > vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0 > offscreen score by ~3%. > > Bug: angleproject:5306 > Bug: angleproject:5425 > Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5306 Bug: angleproject:5425 Bug: angleproject:5470 Change-Id: I14ee424d032f22e5285d67accbec078ad1955dd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595811 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez a19bd601 2020-12-16T13:04:38 Revert "Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9" This reverts commit 5cf7472dd161bbda329dfc5e4e65bb6ce0c06fbd. Reason for revert: causes timeouts, see anglebug.com/5470 Original change's description: > Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9 > > Multithreaded apps can use the following pattern: > > glDrawElements() > glFenceSync() > glFlush() > glWaitSync() > > This currently results in a vkQueueSubmit for every glFlush() to ensure > that the work has landed in the command queue in the correct order. > However, ANGLE can instead avoid the vkQueueSubmit during the glFlush() > in this situation by instead flushing the ContextVk's commands and > ending the render pass to ensure the commands are submitted in the > correct order to the renderer. This improves performance for Asphalt 9 > by reducing frame times from 150-200msec to 35-55msec. > > Specifically, ANGLE will call flushCommandsAndEndRenderPass() when > there is a sync object pending a flush or if the ContextVk is currently > shared. > > Additionally, on all devices except Qualcomm, ANGLE can ignore all other > glFlush() calls entirely and return immediately. For Qualcomm devices, > ANGLE is still required to perform a full flush (resulting in a > vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0 > offscreen score by ~3%. > > Bug: angleproject:5306 > Bug: angleproject:5425 > Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=timvp@google.com,jmadill@chromium.org,cclao@google.com Change-Id: I9886bf901a835d408b6a4b8be7ea408fa2121be0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:5306 Bug: angleproject:5425 Bug: angleproject:5470 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595032 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Mohan Maiya 98b56e60 2020-12-12T16:28:21 Vulkan: Accumulate internal cache stats in renderer The CacheStats of all internal caches are accumulated by the renderer. In order to see the hit ratios of all caches, the following GN args must be enabled: is_debug = true angle_enable_perf_counter_output = true Bug: angleproject:5447 Test: Manual verification with angle_end2end_tests Change-Id: Iaca3249192e9e4e130d8291b7759c459d79b06ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588430 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 5cf7472d 2020-11-20T13:07:53 Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9 Multithreaded apps can use the following pattern: glDrawElements() glFenceSync() glFlush() glWaitSync() This currently results in a vkQueueSubmit for every glFlush() to ensure that the work has landed in the command queue in the correct order. However, ANGLE can instead avoid the vkQueueSubmit during the glFlush() in this situation by instead flushing the ContextVk's commands and ending the render pass to ensure the commands are submitted in the correct order to the renderer. This improves performance for Asphalt 9 by reducing frame times from 150-200msec to 35-55msec. Specifically, ANGLE will call flushCommandsAndEndRenderPass() when there is a sync object pending a flush or if the ContextVk is currently shared. Additionally, on all devices except Qualcomm, ANGLE can ignore all other glFlush() calls entirely and return immediately. For Qualcomm devices, ANGLE is still required to perform a full flush (resulting in a vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0 offscreen score by ~3%. Bug: angleproject:5306 Bug: angleproject:5425 Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya da8c2261 2020-12-12T16:39:55 Vulkan: Enable FramebufferVk cache on Apple This effectively reverts ff60aba. The crash no longer occurs on Apple. Bug: angleproject:4442 Change-Id: I4aa745c80a482eb99311f3810e34124afe950cfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588429 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Courtney Goeltzenleuchter aafcb504 2020-12-08T09:32:10 Vulkan: Add ensureSubmission to queueSubmitOneOff Some callers of queueSubmitOneOff require that the command being queued to have been sent to the GPU. The new ensureSubmission parameter indicates that behavior and when running with threaded worker will wait for the worker queue to empty before returning. Bug: b/170312581 Change-Id: Ib620fb37f4b9b4431451ccbd10807c0dff1842af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2579041 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Alexis Hetu f2a15485 2020-12-04T14:07:24 Suppress memory leaks detected by LSAN In order to be able to land SwANGLE in Chromium, this cl adds suppressions for memory leaks detected by LSAN. Some of these should be fixed and some are intentional leaks of global variables. This cl should allow the linux_chromium_asan_rel_ng bot to pass while using SwANGLE and shouldn't break the win-libfuzzer-asan-rel bot. Bug: chromium:972686 Bug: angleproject:5377 Change-Id: I7e2336aba43fcfeb95716d6c0aa05caf855134aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2575200 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Ian Elliott 51a0e95d 2020-12-04T16:34:53 Revert "Suppress memory leaks detected by LSAN" This reverts commit 2ded93db0a0d0767e6101dfaf738167ee406b2e6. Reason for revert: Appears to be breaking the ANGLE roll Original change's description: > Suppress memory leaks detected by LSAN > > In order to be able to land SwANGLE in Chromium, this cl adds > suppressions for memory leaks detected by LSAN. Some of these > should be fixed and some are intentional leaks of global > variables. > > This cl should allow the linux_chromium_asan_rel_ng bot to pass > while using SwANGLE. > > Bug: chromium:972686 > Bug: angleproject:5377 > Change-Id: I50a30e74a7d7c799c9dfa4d307792a56cb9d2017 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562748 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Alexis Hétu <sugoi@chromium.org> TBR=sugoi@chromium.org,syoussefi@chromium.org,jmadill@chromium.org,sugoi@google.com Change-Id: I2ab53f3ab89143ea639424f108c404f884c3aaf9 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:972686 Bug: angleproject:5377 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2574796 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Alexis Hetu 2ded93db 2020-11-27T11:15:55 Suppress memory leaks detected by LSAN In order to be able to land SwANGLE in Chromium, this cl adds suppressions for memory leaks detected by LSAN. Some of these should be fixed and some are intentional leaks of global variables. This cl should allow the linux_chromium_asan_rel_ng bot to pass while using SwANGLE. Bug: chromium:972686 Bug: angleproject:5377 Change-Id: I50a30e74a7d7c799c9dfa4d307792a56cb9d2017 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562748 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Ian Elliott 968fccb2 2020-12-02T13:28:30 Vulkan: Use VK_EXT_device_memory_report extension This CL can enable and use the VK_EXT_device_memory_report extension. This is disabled by default. To enable, link with the required extension, enable one or both of two features, AND build with the following GN arg: angle_enable_trace = true The two added features are: - logMemoryReportStats provides per-swap statistics - logMemoryReportCallbacks provides per-callback logging If either or both of the features are enabled, if the VK_EXT_device_memory_report extension is available, it is enabled. Bug: b/173636655 Change-Id: Ic5cf6c06efdb34f2313ef143853b3cc90f55faa5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2543506 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Mohan Maiya e674625d 2020-11-20T13:05:49 Reland "Vulkan: Fix incorrect exposure of sRGB extensions" This is a reland of abcabb474bf1c25eea48d7dca14bcafde737eba7 only we continue to suppress the validation error Original change's description: > Vulkan: Fix incorrect exposure of sRGB extensions > > When we check to see what formats we can reinterpret for sRGB > extensions, we need to make sure we can match the image usage > flags as well. If the original format supports framebuffer > attachment usage, we need to make sure that the reinterpreted > format can support it as well. > > Bug: angleproject:5309 > Change-Id: I7e84d01004504f854a3e22227e99b1740ed1a2b2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2549156 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5309 Change-Id: I0efb6180b7be4e14d24b4bb339de01a2b9177e7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2556571 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Anders Leino 4e913d34 2020-11-02T10:44:51 Vulkan: Work around Nvidia depth clamping bug In GL ES, depth is always clamped to [0,1]. The same is true in Vulkan, but not for implementations affected by Nvidia bug 3171019. This patch implements a workaround. The workaround introduced test failures on Linux with Nvidia Quadro P400 and driver version 418.56, so it's only applied conditionally, and as a result the test failure expectations are not removed completely. Bug: angleproject:3970 Change-Id: I0d9f855d7f3df72fea4af9f9b134ae3177cf820d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514377 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 9041ca0c 2020-11-20T16:27:48 Limit testing of in-progress work to ANGLE's build of dEQP A new feature is added, exposeNonConformantExtensionsAndVersions, which is set by ANGLE's build of dEQP to allow exposing ES3.2 or extensions that are not yet entirely conformant. This would allow ANGLE to expose WIP extensions for regression testing without affecting partners that test ANGLE with dEQP's standalone build. Bug: angleproject:3647 Change-Id: Id1e6219f26b41d3f8cdc9763131b8052227761c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552926 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Sunny Sun <sunny.sun@arm.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5fac02c8 2020-11-24T14:20:36 Revert "Vulkan: Fix incorrect exposure of sRGB extensions" This reverts commit abcabb474bf1c25eea48d7dca14bcafde737eba7. Reason for revert: Failed on CQ and build passed, see bug. Bug: angleproject:5394 Original change's description: > Vulkan: Fix incorrect exposure of sRGB extensions > > When we check to see what formats we can reinterpret for sRGB > extensions, we need to make sure we can match the image usage > flags as well. If the original format supports framebuffer > attachment usage, we need to make sure that the reinterpreted > format can support it as well. > > Bug: angleproject:5309 > Change-Id: I7e84d01004504f854a3e22227e99b1740ed1a2b2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2549156 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=syoussefi@chromium.org,jmadill@chromium.org,m.maiya@samsung.com Change-Id: I211802eb17deff3399ec680eeae4c4ff33e52d9d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:5309 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2557567 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya abcabb47 2020-11-20T13:05:49 Vulkan: Fix incorrect exposure of sRGB extensions When we check to see what formats we can reinterpret for sRGB extensions, we need to make sure we can match the image usage flags as well. If the original format supports framebuffer attachment usage, we need to make sure that the reinterpreted format can support it as well. Bug: angleproject:5309 Change-Id: I7e84d01004504f854a3e22227e99b1740ed1a2b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2549156 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter 040de921 2020-11-20T09:26:35 Vulkan: Move FenceRecyler to CommandQueue. SharedFences are now only used by CommandQueue so move fence recycler to live there instead of RendererVk. Bug: b/170312581 Change-Id: Ib055ec50fbebe675a0064e1059089720e63b96b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551792 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4e5a50b6 2020-11-13T22:56:59 Vulkan: Drop dependency to VK_EXT_shader_atomic_float This VK extension exposes features that are not necessary for GL_OES_shader_image_atomic. Instead, support for necessary features for VK_FORMAT_R32_SFLOAT is used to determine support for this GL extension. Bug: angleproject:5342 Change-Id: Ia504cba69ffe51cfd7da69df28f58563cb1f0744 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2536908 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Charlie Lao 8930f182 2020-11-18T13:12:03 Vulkan: Add feature flag to fallback rotation to use driver uniform It appears that older Qualcomm driver has some serious performance issue with specialization constant. This does not happen with latest development driver. This adds a feature flag to pick driver uniform path for older driver. Bug: b/173636783 Change-Id: Ia494fedbb1e0e69fbd8c44f8457c1bc30bc9fa4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2547809 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Mohan Maiya 8a401051 2020-11-19T07:58:05 Vulkan: Support OES_sample_variables extension Enable OES_sample_variables extension on Vulkan backend. Add support for built-in variables, uniform state and constants - gl_SampleId, gl_SamplePosition, gl_SampleMask, gl_SampleMaskIn - gl_NumSamples - gl_MaxSamples Bug: angleproject:3588 Tests: dEQP-GLES31.functional.shaders.sample_variables.* KHR-GLES31.core.sample_variables.* Change-Id: Idf37c7b4ccb0331dbda7acd6389ff4e1022ba959 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2477907 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8d63a7fc 2020-11-17T15:15:44 Basic support for running deqp khr gles32 tests Bug: angleproject:3647 Change-Id: Ia707ffcd41926662d1513f1a3bf49149b76f6b9c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2544920 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>