src


Log

Author Commit Date CI Message
Alexey Knyazev 06819324 2023-10-12T00:00:00 Metal: Linearize PVRTC1 blocks for buffer uploads PVRTC1 blocks are stored in a reflected Morton order and need to be linearized for buffer uploads in Metal. Fixed: angleproject:8376 Change-Id: I59497aaf49eb57aa93e346d62d56c69535555fd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973955 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Geoff Lang eca38a10 2023-10-26T11:02:38 Vulkan: Supress new DrawNone VVL errors Errors: VUID-vkCmdDraw-None-09000 VUID-vkCmdDrawIndexed-None-09002 Bug: angleproject:8394 Change-Id: If43390e837df088ba7a6d0c7eb5947927ad186d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4979786 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 3596ab4c 2023-10-26T10:11:17 Metal: Disable prebuilt shaders on iOS. Chromium's Mac SDK is missing files needed to build for iOS: LLVM ERROR: Error opening '/Volumes/Work/s/w/ir/cache/xcode_ios_15a507.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin/../lib/clang/32023.35/lib/darwin/libmetal_rt_ios.a': No such file or directory! Bug: chromium:1385510 Change-Id: Iee7d6f477ffbebbbdca22e8377f244d2d13dfe66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4980045 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Hailin Zhang 5dd0c842 2023-10-24T13:48:29 Vulkan: improve memory type mismatch issue. for dynamic buffer usage, the memoryTypeIndex returned from findMemoryTypeIndexForBufferInfo not used. if we add more flags like VK_MEMORY_PROPERTY_HOST_CACHED_BIT at alloction. the actual memory type allocated may not have such flag. Bug: b/306763053 Change-Id: I778e51fdd5ce0bc0810a965c45b5763a155fc391 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973574 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Mateusz Przybylski fdf4c6a6 2023-10-24T12:09:51 Add test for attrib rebinding from ARRAY_BUFFER to client. Failure was found in Dragonmania game, where on switching from ARRAY_BUFFER to client attrib pointer without updating the stride, ANGLE assumed no change in the pipeline. Bug: b/306472834 Change-Id: I30f7a478ed62f4356317156b50558166cb7c4c01 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4977168 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 43187a24 2023-10-25T09:43:56 Vulkan: remap YUV clearColor component from GL order to vulkan order For EXT_YUV_TARGET, OpenGL and vulkan uses difefrent mapping between YUV to RGB. OpenGL spec says "When clearing YUV Color Buffers, clear color should be defined in yuv color space and so floating point r, g, and b value will be mapped to corresponding y, u and v value and alpha channel will be ignored.", but vulkan spec says "Values in the G, B, and R channels of the color attachment will be written to the Y, CB, and CR channels of the external format image, respectively.". This CL adjusts clear color to remap the clear color from GL ordering to vulkan ordering. This CL also adds a temporary workaround for ARM driver bug where they were looking at unused color attachment instead of resolve attachment. Bug: b/223456677 Change-Id: I9800bffc18ccd9d77b4e86995161cdde06257e1f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973355 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 4f611a1f 2023-10-24T20:56:19 Vulkan: Remove RendererVk::collectAllocationGarbage Instead of adding separate method overload `DestroyGarbage()` method. This will avoid checking `mUse` and creating garbage list twice. Bug: b/218891184 Change-Id: If56ffe72a639021b1fd37feb02ebb91f62ad0933 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4974318 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang 729e19ac 2023-10-24T15:31:17 Remove essl3 extension requirement for ES3 texture parameters The extensions are not clear about support for the swizzle parameters with external textures. Other parameters are mentioned with specific validation (which is handled in ValidateTexParameterBase). Simply let the other validation handle these parameters and allow the swizzle to be forwarded. Bug: chromium:1493448 Change-Id: Ic34d4c124c5493fef796322b5237541e557fd7ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973157 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Geoff Lang a9b01747 2023-10-25T10:49:56 Metal: Add fall back to from-source shader compilation We can't compile Metal shaders at build time without the chromium build directory and mac_sdk.gni. Add a graceful fallback to building the shaders from source at runtime in this case. Also detect the iOS simulator in gn and disable shader compilation. We don't have all the Mac SDK files needed to build shaders for this target yet. Bug: chromium:1385510 Change-Id: Ibd1b36f9d97e7340a9742cba0c9c5f2221cd9a8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4974918 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Chris Forbes 9e5f5188 2023-10-24T18:43:12 Reswizzle results of YUV sampling operations Change-Id: Id6eee9e0d9e2b80d48c80f27bc8e670a5621d263 Test: ImageTestES3.* 24 -> 15 failures Bug: b/223456677 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4970337 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Roman Lavrov 13776ac3 2023-10-24T11:10:25 Compile with optimize_max instead of default_optimization Android builds default to aggressive optimization for size (-Oz) which results in subpar performance in some spots. AFAICT the effect of this change on cflags is: -Oz -enable-ml-inliner=release to -O2 Note that -enable-ml-inliner=release has a more significant impact on the binary size than -Oz/-O2: With it: -Oz 5.7M, -O2 6.15M Without it: -Oz: 6.3M, -O2 7.1M So this change goes 5.7M -> 7.1M (+1.4M). That's in standalone ANGLE builds. Unsure if Chrome builds might be different. Skipping a few dEQP tests where this switch seems to uncover UB. Bug: b/306391262 Bug: b/307584642 Change-Id: I44d0f3bcf25de0c36a4228895cad19ea38502cbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4968419 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Dan Glastonbury 562d4be3 2023-10-20T14:33:05 Clear pending program linking in Context::onDestroy When destroying Context, ANGLE resets any internal state before releasing allocated objects, such as Programs and Shaders. When destroying a program, any pending program linking is resolved via Program::resolveLink. This results in trying to access the Context state that’s just been reset. To work around this, we ensure there are no pending links before resetting the Context state. Bug: angleproject:8380 Change-Id: I599c7e5a82b0e6bf14df1263006e10d8a9cb0b38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4957715 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang db38707a 2023-10-19T18:08:51 Metal: Compile mtllib at build time. Reworks gen_mtl_internal_shaders.py to only generate the combined metal source file, mtl_internal_shaders_autogen.metal. metallibs are now compiled at build time using gn actions. This allows the Chrome and WebKit build process to use the same code for loading the builtin shaders even though they compile them in different ways. We now only build the mtllib for the OS we're currently building for. Bug: chromium:1385510 Change-Id: Ie3b4f66c48a7e0eccd5fe664f988e407f452795c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4583134 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Yuxin Hu c22f46b5 2023-10-23T11:52:20 Update rgb-565-no-depth-no-stencil test suite names Replace the "-" with "_" in the test suite names to be consistent with other test suite name formats. Bug: b/297901032 Change-Id: Idbfc1bc7aa7cef4382e3cdd3e223db28f414f15e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4968792 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Le Hoang Quyen 65f6c2ea 2023-10-22T18:07:55 Metal: always implicitly resolve MSAA render buffers on tiled GPUs. On tile based GPUs, implicitly resolving MSAA render buffers to single-sampled is preferred. Because it would save bandwidth by avoiding storing the MSAA textures to memory. Furthermore resolving as StoreAction is almost a free operation on these GPUs. Traditional desktop GPUs almost always store MSAA textures to memory anyway, so this feature would have no benefit besides adding additional resolve step as well as memory overhead of the hidden single-sampled textures. Bug: chromium:1486094 Change-Id: I5eb3b1314560024dd5c0834b0c0b43a6b4d3d51b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4962114 Commit-Queue: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuxin Hu 4b59e4c6 2023-10-17T17:47:20 Add a test to check glReadPixels format and type In GLES 3.2 spec https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf, section 16.1.2, it says the following glReadPixels type and format should work: The second is an implementation-chosen format from those defined in table 8.2... The values of format and type for this format may be determined by calling GetIntegerv with the symbolic constants IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE, respectively. The implementation-chosen format may vary depending on the format of the selected read buffer of the currently bound read framebuffer. Add a test to check that when reading from the default framebuffer, using the format and type retrieved from IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE works. Bug: b/306256081 Change-Id: I1e94087aac8c803bcc5db3515ed56291349daf28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4950844 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao e4a267e5 2023-10-20T16:10:50 Vulkan: Fix YUV external format resolve attachment load/storeOp When YUV external format resolve attachment is used, and nullColorAttachmentWithExternalFormatResolve is true, the loadOp and storeOp are packed in color attachments.When we setup the resolve attachment, we must use the color attachment information instead of general resolve code path (where there is always a color attachment). Without this fix, the resolve attachment is always uses loadOp=DontCare which is wrong. Bug: b/223456677 Change-Id: Ib41eb438aedbcd9a37c356540e81cdf7b9610a20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4960502 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 9298baa9 2023-10-20T10:26:00 Vulkan: Fix ImageTestES3.RenderToYUVAHB assertion The bug here is that for YUV resolve, we always set mTransience to YuvResolveTransient. And isImageTransient() returns true if mTransience != Default. And if image is transient, we will do unresolve, which is incorrect here. For nullColorAttachmentWithExternalFormatResolve() case, the image is actually not transient. This CL will only set transience to YuvResolveTransient if we need to create a transient color attachment. This CL looks at mImage->getExternalFormat() as the answer for isYUVResolve instead of rely on transience. Bug: b/223456677 Change-Id: I1bc176df22b0abc91d668a178e48d6b90eacbdd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4959194 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yuly Novikov 6188c0a6 2023-10-23T16:47:10 Unsuppress VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 VUID removed in http://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/5941 Bug: chromium:1420265 Change-Id: I8e3b9462df5e250c97c6bff02635cd28fec2a4e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4967241 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Alexey Knyazev 6258acae 2023-10-19T00:00:00 GL: Add resyncDepthRangeOnClipControl workaround Some drivers do not apply GL_CLIP_ORIGIN_EXT and GL_CLIP_DEPTH_MODE_EXT state changes until other transformation states are updated. As a workaround, force-resync the depth range on clip control updates. Fixed: angleproject:8381 Change-Id: I26f95108e9419be30ea0b562e02ab4bae78f65bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4966525 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev ec29008a 2023-10-19T00:00:00 GL: Fix extended dirty bits sync * Use extendedBitMask when syncing extended dirty bits to skip bits ignored by the current operation. * Use extendedBitMask for unsetting backend-local extended dirty bits. Fixed: angleproject:8382 Change-Id: I0bda18d801805b30d7cb071366353af05a44ab57 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4960055 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi ba65feb4 2023-10-18T17:33:38 Vulkan: Limit mutable texture flush to one update In case there are many updates for a mutable texture, flushing it preemptively can reduce performance, especially if it is done repeatedly. * Added getLevelUpdateCount() to ImageHelper. * Previous mutable textures will now be flushed only if they have exactly one update per mip level/cubemap face (if defined). * This means that mutable textures with no data will also not be flushed. * Added unit tests for single-level texture flushing and situations with no updates or more than one update. Bug: b/285613719 Change-Id: I1592ecf502051a55ebfbb7fcd22577c9ce87bf43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953847 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 49fd8eda 2023-10-20T14:23:38 android_helper: improve _RemovePrefix logging Random stuff gets in there sometimes, such as: "cmd: Failure calling service package: Broken pipe (32)" RemovePrefix just raises that it doesn't start with "package:" so the issue doesn't show up in logs. Bug: b/296921272 Change-Id: Ifae4e3c0c7717514401bf1109febf8e70fff6527 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4959473 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Charlie Lao d2de7451 2023-10-19T14:10:44 Vulkan: Fix VK_android_external_format_resolve VVL error part 5 Fix assertion in RendererVk::getFormatFeatureBits(). When formatID is external format, we can not use vkGetPhysicalDeviceFormatProperties to get the formatFeature (since VkFormat is undefined). To fix this, we keep the formatFetaure that returned from AHB in the ExternalYuvFormatInfo and use that in getFormatFeatureBits() if it is external format. This also fixes the VVL error VUID-VkImageCreateInfo-pNext-02396: The Vulkan spec states: If the pNext chain includes a VkExternalFormatANDROID structure whose externalFormat member is not 0, flags must not include VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT Bug: b/223456677 Change-Id: I625c2bf4fe534fa206918b16772ac3ac7c6fa79a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4956117 Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 80e2d8d7 2023-10-19T13:53:32 Vulkan: Update PipelineProgram if mStreamingVertexAttribsMask dirty When mStreamingVertexAttribsMask bit chnages, we are going to switch between a internal buffer and user's buffer. We must update graphics pipeline program, even if bufferOnly is true. Bug: b/303219048 Change-Id: I0536cb7bcd6ed8f1de39aaea5bd6cd6eef61c5e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4957193 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 679fe65d 2023-10-19T13:59:52 Attempt to fix FixedQueue.ConcurrentPushPopWithResize flakiness If dequeueThread has finished while the enqueue thread is sleeping, queue might still be full once enqueueThread wakes up. In this case, push call will hit assertion since queue is full. This CL makes the enqueueThread bail out if dequeueThread already finished. Bug: chromium:1493831 Change-Id: I9e3ad957c5d2eb15c5b409bb818c03dc807f3518 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4957194 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao c153d4a5 2023-10-18T18:12:19 Set isYUV to true for "EXTERNAL" formats These external formats are all YUVs so far. It is more correct to set isYUV to true than set to false. Bug: b/223456677 Change-Id: Ib9eb937754f4c085fbcc6768bb7a93d3c28317c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953919 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 464dbb61 2023-10-18T17:49:14 Vulkan: Fix VK_android_external_format_resolve VVL error part 4 VUID-VkWriteDescriptorSet-descriptorType-01946: The Vulkan spec states: If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, then the imageView member of each pImageInfo element must have been created without a VkSamplerYcbcrConversionInfo structure in its pNext chain. The bug here is that right now these angle::Format::External{n} returns isYUV false. This CL changes the check of isYUV to getYcbcrConversionDesc().valid(). Bug: b/223456677 Change-Id: Ifc97f738972a24c4e5dec3e37d8d5896efa9fe80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953917 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 4d7fc442 2023-10-18T12:49:06 Vulkan: Fix VK_android_external_format_resolve VVL error part 3 VUID-VkRenderPassAttachmentBeginInfo-pAttachments-parameter: The Vulkan spec states: If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkImageView handles. The bug here is that when nullColorAttachmentWithExternalFormatResolve is true, there is no color attachment, but the RenderPassDesc still appears having a color attachment because we need to store the formatID in it. This CL changes to use mFramebuffer.getImageViews().size() instead of mRenderPassDesc.attachmentCount() which is more correct anyway. Bug: b/223456677 Change-Id: I0f0947f0c642bac9cd18a80525b92c62ef0723ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4952969 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com>
Charlie Lao fce367c9 2023-10-18T11:36:59 Vulkan: Fix VK_android_external_format_resolve VVL error part 2 VUID-VkFramebufferCreateInfo-flags-03201 The Vulkan spec states: If flags includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the usage member of any element of the pAttachmentImageInfos member of a VkFramebufferAttachmentsCreateInfo structure included in the pNext chain that refers to an attachment used as a color attachment or resolve attachment by renderPass must include VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT. The bug here is that when we create VkImage for AHB for rendering, we specify mUsage as Sample. This CL adds COLOR_ATTACHMENT if it supports resolve. This CL also adds VkAndroidHardwareBufferFormatProperties2ANDROID format query for debug logging. VUID-VkImageViewCreateInfo-usage-08931 is temporary added to skip list due to ARM driver bug. The bufferFormatProperties returned does include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT. Will remove once driver is fixed. Bug: b/223456677 Change-Id: Ibccf5f19975654fd94b00ae10e15ac986f7866dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4952962 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 889b01ef 2023-10-17T12:13:10 Vulkan: Fix VK_android_external_format_resolve VVL error part 1 VUID-VkSubpassDescription2-nullColorAttachmentWithExternalFormatResolve-09337: The Vulkan spec states: If the nullColorAttachmentWithExternalFormatResolve property is VK_TRUE and pResolveAttachments is not NULL, for each resolve attachment that has a format of VK_FORMAT_UNDEFINED, the corresponding color attachment must have the value VK_ATTACHMENT_UNUSED VUID-VkFramebufferCreateInfo-attachmentCount-00876 The Vulkan spec states: attachmentCount must be equal to the attachment count specified in renderPass Fix assertion in FramebufferVk::getFramebuffer() Bug: b/223456677 Change-Id: I538a44753a2ba9b432fa3b1814748942cd8a3500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4948652 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Solti 05c5cef0 2023-10-17T21:16:52 Manual roll vulkan-deps from 68a0a794aa0a to 92b29883afea (1 revision) Manual roll requested by solti@google.com https://chromium.googlesource.com/vulkan-deps.git/+log/68a0a794aa0a..92b29883afea Changed dependencies: * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/7ef2b9a6bb..deb215c083 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC angle-team@google.com,solti@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: b/306178740 Tbr: solti@google.com Change-Id: I1060b8e021e28e70ca11305dc60a8fa8462e1eff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4950550 Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 384a29a8 2023-07-27T10:51:07 Reland: GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE Now that Chromium no longer uses it. This is a reland of: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 Bug: angleproject:5509 Change-Id: I650e598580539fbe404f2ec4b56b20b56b948f6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu cfc40d2b 2023-07-19T17:47:13 Vulkan: Adjust clear color precision for GL_RGB5_A1 FBO When clear color has more precision than the framebuffer format can hold, dithering is automatically applied on some hardware. This issue causes below dEQP tests to fail when the FBO color attachment format is RGB5_A1: KHR-GLES31.core.draw_buffers_indexed.color_masks KHR-GLES32.core.draw_buffers_indexed.color_masks Adjust the clear color precision for RGB5_A1 format to workaround the issue. We can remove this workaround once the vulkan driver fixes the auto-dithering problem. Bug: b/292282210 Change-Id: Ic3ffebd2d20c8782612619a60d1ec2cc6d613c22 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4937472 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 36439d9c 2023-10-12T00:00:00 Metal: Fix PBO uploads of PVRTC1 textures Do not override row pitch values for PVRTC1 textures during internal backend operations. Instead, set bytesPerRow to 0 before calling replaceRegion just to pass Metal Validation. Enforce CPU path for PBO uploads until GPU block linearization is implemented. Bug: angleproject:8376 Change-Id: I80b9ec69364d55cd9f51005f4d1a180e05e71c2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4949350 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi cc61dded 2023-10-17T13:21:14 Vulkan: Remove fixed VU suppressions Bug: angleproject:2866 Bug: angleproject:4928 Bug: angleproject:5027 Bug: angleproject:7843 Bug: angleproject:8076 Bug: b/175584609 Change-Id: I1a3ccdc92be73874e7599961bae2a0e8c7497b1a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4947653 Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Yiwei Zhang 0be59b3d 2023-10-17T17:31:05 Vulkan: disable warmUpPipelineCacheAtLink for Venus The same cache miss is seen on MESA ANV and MESA RADV drivers. Together with already disabled ARM drivers, we'd disable for Venus as a whole for monolithic pipelines. This won't affect later Venus GPL enablement on supported host drivers like ANV and RADV. Bug: b/299532942 Test: affected title is semi-playable Change-Id: Iaec0d43b15b64b6b74dfa68021f8a5f2fe6cca8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4948694 Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gyuyoung Kim 3b28bca0 2023-10-11T09:49:54 Allow using RGBA IOSurfaces with GL_RGBA format for EAGL backend As https://crrev.com/c/4877334 switched RGBA IOSurfaces to GL_RGBA to work with ANGLE/Metal, some tests(e.g. web tests) on iOS failed to create an IOSurface because ANGLE'S EGL backend still still binds IOSurfaces as GL_BGRA_EXT even though we expect the IOSurface to really be RGBA. To fix it, this CL allows using RGBA IOSurfaces with GL_RGBA format by adding a GL_RGBA entry to kIOSurfaceFormats. See also the comment[1] for better explanation. [1] https://crrev.com/c/4918590/comments/1e44e971_50c3d780 Bug: chromium:1489586 Change-Id: Ifa215318401edb892fd5527c35c7d30871e82a83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4930309 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang e076d6cf 2023-10-17T11:39:10 Move invalid uniform protection to the frontend. The frontend potentialy indexes into mUniformLocations with invalid uniform locations while validation is disabled too. Move the validation from the Metal backend to the frontend. Bug: chromium:1484878 Change-Id: I92bc43aa28cfa26d601bb28f318860375f618608 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4947652 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 2e11fcc5 2023-10-16T16:40:35 Vulkan: Fix assertion when YUV image attached to resolve attachment When YUV image attached to resolve attachment, mSamples is 1. Righ now the code assumes resolve is a MSRT attachment, so it asserts mSamples>1. This CL adds a new API packYUVResolveAttachment so that we can assert properly for YUV and MSRT. Bug: b/223456677 Change-Id: Ib65fd3fe1e6561b85395cc27204bbd85c1f464c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4942907 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 58ffa778 2023-10-11T09:41:23 Vulkan: Implement YUV_TARGET use VK_ANDROID_external_format_resolve This implements EXT_YUV_TARGET using VK_ANDROID_external_format_resolve extension. This CL is based on Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: Ieb6970a0787b0c2a72a76b208695a678d2c79e80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4857459 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 1ea49a22 2023-10-13T11:28:41 Move uniform dirty bits to ProgramExecutable Rather than try to funnel them through Program and ProgramPipeline to the executable in the backend, just move them to ProgramExecutable in the front end. This fixes Dota Underlords at the same time due to not needing to set the Program dirty to propagate bits. Test: Dota Underlords Test: ProgramPipelineTest31.ProgramPipelineBindBufferRange Bug: b/299532942 Change-Id: Ic73c45608e22f89ca400ebf684f8cd287ed2f43a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4922969 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Charlie Lao fee512d9 2023-10-11T18:22:13 Vulkan: Add mapping between FormatID and externalFormat This CL adds support to query the external format from AHB and convert that to one of angle::FormatID::EXTERNALn. Then at the time to create renderPass, we convert that angle::FormatID::EXTERNALn back to actual vendor specific external format that returned from vulkan driver. With this, the rest of angle code should not need to worry about actual vulkan external formats. This CL is based on Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I6d8150741bc590809a9962c1a11a6026f1ebbb74 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932361 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 2450b59e 2023-10-16T15:23:48 Vulkan: Attempt to fix the perf/mem regression of previous CL We should get the size before destroy garbage. Otherwise the size returned likely is "garbage". The accounting may affect other logic and cause memory and perf regression. Bug: b/305752495 Bug: b/305791801 Change-Id: If89bc95c11f43ff3da61fdab3ae961c0211ca92a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4943169 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 57fcee54 2023-10-11T14:48:53 Vulkan: Add feature flag for externalFormatResolve This CL adds supportsExternalFormatResolve feature flag and enable the vulkan extension if existed. This CL is split from Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I731f35dc629c12c7290c6ed24ff54967e2e4eab7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932592 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com>
Charlie Lao 3870655e 2023-10-10T17:04:04 Vulkan: Add 8 external format ID for external_format_resolve For external formats ANGLE does not know the exact that is. The idea is we reserve 8 external format ID for these driver defined formats. Each ID represents one uniquely defined external format. Then we will use this format ID pass around ANGLE just like any other format ID. Eventually vulkan backend will convert this formatID to the actual external format structure that returned from driver. Right now we reserved 8 IDs for this usage. Based on our survey, this is more than enough for now. We will deal with it if we need more than 8 in future. This CL is split from Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I9cf442179af95e04a44796125e0c03dde702a8f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4929749 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Hailin Zhang 493ca47c 2023-10-13T23:22:34 Vulkan: remove unused image view creation remove unused image view creation. Bug: b/303708135 Change-Id: I5e20788a6f3e042db04d739144236c065c407209 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4940252 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Alexey Knyazev dc8c053e 2023-10-12T00:00:00 Split row and depth pitch computation for compressed formats Besides doing extra operations, computeCompressedImageSize cannot be used for computing pitch values for formats that have minimum block layout requirements, such as PVRTC1. Fixed: angleproject:8375 Change-Id: Id276e8cf723f0bb99b6f4a9b20d6d84e4840f6d7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935568 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Stephen White 3892ac14 2023-10-12T13:35:33 Do not flush normal float constants to zero. It's ok to flush denormalized constants to zero. It's not ok to flush perfectly valid normal float constants >= FLT_MIN to zero. Two problems: 1) Values when parsed as doubles with a value less than FLT_MIN are being flushed to zero. This is incorrect when the comparison is done in double, since some values below FLT_MIN in double are equal to FLT_MIN when cast to float. The fix is to perform the comparison in float. 2) Values with a decimal exponent less than FLT_MIN_10_EXP are being flushed to zero. FLT_MIN_10_EXP is -37 but FLT_MIN is 1.1754943E-38. 10^-37 may be the "minimum negative integer such that 10 raised to that power is a normalized float", but being constrained to powers of ten it's above FLT_MIN (which is 2^-126). Since this comparison is done before #1 above, it's only present (AFAIK) to ensure that the exponent will not make the pow() function overflow. Comparing against -38 (FLT_MIN_10_EXP - 1) instead will do the trick. Bug: angleproject:8373, dawn:2077 Change-Id: I1ddf410c2caa9f0d1ba3529ace693dcd326a2cb3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936714 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Alexey Knyazev c54c2f81 2023-10-12T00:00:00 Sync border color on format updates When a texture is redefined, its border color should be resynced because of format-specific adjustments. Used memcmp for comparing ColorGeneric structs. Bug: angleproject:7969 Change-Id: If0e3e0bc7761c26dab6d00ab24462c789f5b90bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935866 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Roman Lavrov 6154bd93 2023-10-12T15:27:44 Remove binding from DescriptorInfoDesc. The issue with hitting the cache falsely is no longer reproduced (tests added in https://crrev.com/c/4104121) Charlie had changed the cache so mWriteDescriptors are no longer part of this class, so some of those changes might have affected that. Also mDescriptorInfos was previously a map and now is a vector, which imposes a specific ordering - and that might be taking care of the sampler swap hitting the cache falsely. Charlie suggested that https://crrev.com/c/4581881 might have taken care of this as textureUnit was used instead of bindingIndex: https://chromium-review.googlesource.com/c/angle/angle/+/4936096/comment/ad2c0aa0_441bd33d/ Bug: angleproject:7974 Change-Id: I58391790a4362313c07c7bd28ed6f38f30720781 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936096 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Hailin Zhang 76608554 2023-10-02T15:07:45 Vulkan: use cpu transcoding for small texture size. Bug: b/250042517 Change-Id: I9a70fb7d4823d10b09f498bfc01b5384951e2ce4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908660 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Alexey Knyazev 1988108e 2023-10-12T00:00:00 Tighten draw buffers validation for dual-source blending Use the front-end DRAW_BUFFER* state instead of the internal mask, which is unset for missing attachments. Bug: angleproject:1085 Bug: angleproject:7177 Change-Id: I5311d1f26043f15035e51957920bf9cd553c3007 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935858 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev b870956e 2023-10-05T00:00:00 GL: Limit depth/stencil texture mode updates The DEPTH_STENCIL_TEXTURE_MODE state must affect only DEPTH_STENCIL textures (OpenGL ES 3.2, Section 8.16). Some drivers do not follow this rule and exhibit various side effects when this mode is set to STENCIL_INDEX for textures of other formats. Bug: angleproject:2373 Change-Id: I20a8168d858cf070762ff0b3b7111cdf30e8166d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936374 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Charlie Lao 5b7763f9 2023-10-12T10:59:59 Fix tsan failure of test FixedQueue.ConcurrentPushPopWithResize Test is accessing q.capacity() without mutex lock protection while modifying it in another thread. The fix here is to have the enqueue thread and dequeue thread always take its own lock and before we call updateCapacity, we take both lock. Bug: chromium:1491867 Change-Id: Ie0b844d5ee8df94c2f1c06263dddd434d1258121 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936334 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 10d4d0ae 2023-10-12T17:48:44 Revert "Fix tsan failure of test FixedQueue.ConcurrentPushPopWithResize" This reverts commit 24dabdbbeee213d7a1fd01a70cddacc1949d3b26. Reason for revert: This did not completely fix the bug. q.full() still accessing mMaxSize. Original change's description: > Fix tsan failure of test FixedQueue.ConcurrentPushPopWithResize > > Test is accessing q.capacity() without mutex lock protection while > modifying it in another thread. The fix here is to let test keep its own > record of queue's capacity so that we dont need to get that from queue. > > Bug: chromium:1491867 > Change-Id: Ie0438ed1f4525bc4021e43098b24cd37bee3ce97 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932359 > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Yuxin Hu <yuxinhu@google.com> Bug: chromium:1491867 Change-Id: I0332399043b369c96d64ae0b944c21e3b6507fea No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935640 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 24dabdbb 2023-10-11T14:09:10 Fix tsan failure of test FixedQueue.ConcurrentPushPopWithResize Test is accessing q.capacity() without mutex lock protection while modifying it in another thread. The fix here is to let test keep its own record of queue's capacity so that we dont need to get that from queue. Bug: chromium:1491867 Change-Id: Ie0438ed1f4525bc4021e43098b24cd37bee3ce97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932359 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 90dd58a2 2023-10-04T11:54:22 Vulkan: Reduce mGarbageMutex lock contention Right now mGarbageMutex is used to control access to mSharedGarbage, mPendingSubmissionGarbage, mSuballocationGarbage, mPendingSubmissionSuballocationGarbage and mOrphanedBufferBlocks. Some times garbage clean up does take a bit longer time, especially on some VM platforms. This some times causes lock contention between main render thread and background garbage clean up thread, which defeats the benefit of having garbage clean up in the background thread. This CL utilizes angle::FixedQueue for garbage list so that enqueue and dequeue can be concurrent, which avoids this lock contention. Bug: b/302739073 Change-Id: I44b2b0e7f9f5ef438266fa277b24a2cb1606e689 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4899299 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Hailin Zhang <hailinzhang@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 2608c622 2023-10-06T13:32:49 Vulkan: Refactor SharedGarbageList into templated class This CL mostly involves non-functional changes to prepare for next CL. No behavior change is expected. This CL wraps the garbage list into its own templated class which maintains std::queue and tracks number bytes in the queue etc. This CL also renames SharedBufferSuballocationGarbageList to BufferSuballocationGarbageList to reduce verbosity a bit. This CL deleted GarbageAndQueueSerial and GarbageQueue since they are no longer being used. This renames vk::GarbageList to vk::GarbageObjects to reduce name confusion with SharedGarbageList. Bug: b/302739073 Change-Id: I7370c147847ffe69ad8aa3b48251d8b5762f97f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4919816 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Hailin Zhang <hailinzhang@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yuxin Hu 43acadab 2023-10-06T15:05:36 Add missing configurations for khr tests KHR-GLES* tests are ran with configurations defined in glcKhronosMustpassEs.hpp: https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/openglcts/modules/runner/glcKhronosMustpassEs.hpp, when launching the conformance test from Khronos Conformance Package. This change adds the missing configurations in test_suites.pyl, for vulkan backends and swiftshader backends. Bug: b/297901032 Change-Id: I87e77ca8756b883ef08551919f67904ecf21aa97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4918582 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Charlie Lao 6f794eab 2023-10-05T11:23:30 Change angle::FixedQueue's storage from std::array to std::vector Right now angle::FixedQueue uses std::array as the storage. In the case when queue is full, the only choice is to wait for dequeue thread to run until there is more room to enqueue. This CL try to add extra flexibility. In this CL< it switches storage to std::vector so that we could reallocate to double the storage when it is full. The trick is that before doing that, you must ensure no one is accessing the queue other than check the size. In a lot of usage cases that is easy to do by just grabbing the necessary locks. Bug: b/302739073 Change-Id: Ibefe0fd0e3e89c17dd6ee2cac6adc3368122adb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915811 Reviewed-by: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Mark Lobodzinski 05c21cfc 2023-10-04T16:59:44 ANGLE Tracer: Make GL API capture threadsafe Multi-context games (Asphalt9, Pokemon Masters Ex) exhibited random crashes when running with capture-enabled builds. Added a frame-capture-only mutex for GL captureCalls to keep shared frame capture data thread-safe. Tests: Start Asphalt 9 with a capture-enabled build Bug: b/303472963 Change-Id: I70f27923e4cf1c150785cdaf71919b235fce0a10 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4912267 Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 53e37a3e 2023-09-29T14:15:37 Replace mActiveTextures.fill(nullptr) with memset std::array::fill yields unoptimized, unrolled loop with 8 byte increments. Surprisingly high (>2%) effect on the instructions counter in my tests (first frame of real_racing3 trace) The number of samples hitting this spot in profiling is also signficantly reduced. Impact on power harder to judge due to noise but does seem to be a bit better. Added a FillWithNullptr utility to check that nullptr is 0 and used it in other places where fill(nullptr) was used in ContextVk. It's not used elsewhere in vulkan. Bug: b/302708437 Change-Id: If7fab66d858bc10ca356418d2ab26232bb9a9ce7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4902288 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Roman Lavrov a0967770 2023-10-06T18:01:45 Add egl/wrapper headers to deqp opengl sources gn gen --check catches these and "include not allowed" Bug: b/303881910 Change-Id: I26728dc2618436daec232152c56d59a7233ca91e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4916365 Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev d1cf2d43 2023-10-05T00:00:00 Cleanup sampler completeness validation * Simplyfied control flow in TextureState::computeSamplerCompleteness * Used special rules for all depth and stencil formats instead of the filter support flag * Fixed DEPTH_STENCIL_TEXTURE_MODE affecting completeness of depth-only textures with REF_TO_TEXTURE compare mode * Skipped mipmap validation for multisample 2D array textures Bug: angleproject:2373 Change-Id: I0f9b6e7401fb85433f2ba4873f271055139bb17e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4922392 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 0afc3ec9 2023-10-05T00:00:00 Metal: Fix robust initialization of PVRTC1 textures Replace Region Validation: rowBytes must be 0 for: * MTLPixelFormatPVRTC_RGB_2BPP * MTLPixelFormatPVRTC_RGB_2BPP_sRGB * MTLPixelFormatPVRTC_RGB_4BPP * MTLPixelFormatPVRTC_RGB_4BPP_sRGB * MTLPixelFormatPVRTC_RGBA_2BPP * MTLPixelFormatPVRTC_RGBA_2BPP_sRGB * MTLPixelFormatPVRTC_RGBA_4BPP * MTLPixelFormatPVRTC_RGBA_4BPP_sRGB Fixed: angleproject:8370 Change-Id: I153bea5bb487f79b0966be0b8670a2ee4e3aeb39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915704 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Roman Lavrov 7e8907db 2023-10-06T15:41:05 Add egl/wrapper to deqp opengl includes Needed to roll VK-GL-CTS upstream change: https://issuetracker.google.com/303881910 Bug: b/303881910 Change-Id: Idffa299cc6c1d277702167bf50e1d944febb9e7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915605 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 0015d1e2 2023-10-05T00:00:00 Allow ETC1_RGB8 for 2D array textures When GL_EXT_compressed_ETC1_RGB8_sub_texture is enabled, ETC1_RGB8 format must be accepted for 2D array textures. Bug: angleproject:5731 Change-Id: Ic5e647ffd4e7d2a171e25ea8cf3f41514cf37072 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915918 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5149d210 2023-10-02T22:27:11 Vulkan: Deduplicate sync's clientWait logic As a side effect, both GL_NV_fence's client wait and external fence client wait is also done in an unlocked tail call. Bug: angleproject:8340 Change-Id: Ia0b882cc67ecf7ac5b2a8f9dc9e721060cca3c9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908351 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi adb17c80 2023-10-06T10:39:17 Vulkan: Copy 3D<->2DArray images with vkCmdBlitImage anyway Despite the validation error, do the copy with vkCmdBlitImage anyway. Drivers seem to work correctly, and the validation restrictions seem unintentional. Bug: angleproject:7291 Change-Id: Ie7a0ecfe559be44738da3eada281ea97424b38ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4916359 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 65e8ae30 2023-10-06T09:42:45 Vulkan: ANGLE_device_vulkan is incompatible w/ asyncCommandQueue The application may use EGL_ANGLE_device_vulkan to retrieve ANGLE's Vulkan queue for direct usage. There is no mechanism for the application to synchronize with the internal thread that uses the same queue when the asyncCommandQueue feature is enabled. This was causing flakiness where VVL reported this error. This change makes sure an ASSERT catches this incompatible usage. Bug: angleproject:7204 Bug: b/299693666 Change-Id: Idf349f99d80b7bbddeb9a0b2d72e3dd7c707fa5c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915594 Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov d6bf8e0d 2023-10-02T18:10:36 Improve capture_replay_tests (win-trace) logging * Get rid of the CRASH expectation as it is always confusing. Replace items in expectations with SKIP_FOR_CAPTURE. This will no longer run the corresponding tests (which was making logs even more confusing) * Use CaptureFailed and ReplayFailed instead of Crashed status (the actual meaning is a non-zero return code from the test harness) * Introduce batch names by indexing them as they are created: batch_000, batch_001, ... This enables easy searching in logs. * When logging a batch (result) include its name and why it is logged * Failed batches are printed with full output instead of "abbreviated" output. One issue with b/303065176 was that an important part of the output (errors) was truncated by this "abbreviation" * Remove "regression log" and "Summary" as these are often just confusing: regression log just duplicates information printed earlier and summary may not be clear w.r.t test expectations. The part that prints what was unexpected is still there. It also now includes batch names so it's much more obvious what comes from where. Example: Unexpected 'CaptureFailed' (8): != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithBellowBaseLevelLOD/ES3_Vulkan_SwiftShader != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithBellowBaseLevelLOD/ES3_Vulkan_SwiftShader_AsyncCommandQueue != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithBellowBaseLevelLOD/ES3_Vulkan_SwiftShader_EnableParallelCompileAndLink != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithSubImageWithBeyondMaxLevel/ES3_Vulkan_SwiftShader != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithSubImageWithBeyondMaxLevel/ES3_Vulkan_SwiftShader_AsyncCommandQueue != Pass: batch_000 FramebufferTest_ES3.RenderAndInvalidateImmutableTextureWithSubImageWithBeyondMaxLevel/ES3_Vulkan_SwiftShader_EnableParallelCompileAndLink != Pass: batch_000 FramebufferTest_ES3.RenderImmutableTextureWithSubImageWithBeyondMaxLevel/ES3_Vulkan_SwiftShader != Pass: batch_000 FramebufferTest_ES3.RenderImmutableTextureWithSubImageWithBeyondMaxLevel/ES3_Vulkan_SwiftShader_AsyncCommandQueue Unexpected 'FailedToTrace' (1): != Pass: batch_001 FramebufferTest_ES3.RenderSampleDepthTextureWithExcludedLevel/ES3_Vulkan_SwiftShader Bug: angleproject:7519 Bug: b/303065176 Change-Id: Ie0c4734c7c4ac965aa6fd38b0c1783e0b92af7a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908349 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 8c341cfd 2023-10-04T12:49:59 Vulkan: Fix blits involving 3D images The layer vs depth value involved with 3D images when calling vkCmdBlitImage is fixed in this change. However, that brought to light that the combination of VUID-vkCmdBlitImage-srcImage-00240 and VUID-vkCmdBlitImage-dstImage-00252 make it impossible to blit between 3D and 2D array images, which is likely a spec oversight. This change makes 3D<->2DArray blits fall back to draw-based blit. This in turn exposed the fact that 3D images as src were not handled in BlitResolve.frag. A new Blit3DSrc.frag shader is added which shares code with BlitResolve.frag to implement this. This is a separate shader to avoid creating unnecessary and invalid combinations of shaders. VK_EXT_image_2d_view_of_3d could have been used to avoid this new shader, but that is not ubiquitous. Bug: angleproject:7291 Bug: dawn:1962 Change-Id: I6a96162f95829304b4731d43208d9d054f538105 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911800 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu 856a6ec0 2023-10-03T17:17:35 Enable rgb-565-no-depth-no-stencil tests on Android Bots Enable gles3 and gles31 rgb-565-no-depth-no-stencil tests on Android Bots. Khronos conformance package ran the gles3 and gles31 tests with rgb-565-no-depth-no-stencil configurations on Android devices: https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/openglcts/modules/runner/glcAospMustpassEs.hpp#L41 Enable the rgb-565-no-depth-no-stencil configuration tests on Android bots to cover them. Non-Android platforms do not support rgb-565-no-depth-no-stencil configuration. We should not enable it on non-Android platforms. This CL also disables this configuration from building on non-android platforms in src/tests/BUILD.gn. Bug: b/297901032 Change-Id: I23d83213818884ea679dd76bf4b001c3b636dffc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908171 Reviewed-by: Roman Lavrov <romanl@google.com>
Yiwei Zhang 3d75b794 2023-10-04T11:10:34 Vulkan: enable preferSubmitAtFBOBoundary for Virtio-GPU Venus Now we see perf gain for the concerning title Asphalt 9 with ANGLE-on-Venus even for low end devices. So enable this by default for Venus since it mitigates 3DMark Sling Shot Physics score regression. Bug: b/302230555 Test: top app affected by the feature and 3DMark Change-Id: I2e115e022eb085a3dc693378fe2f0a960890b7d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911958 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Roman Lavrov f8f98477 2023-10-04T12:54:06 Suppress VUID-VkRenderPassBeginInfo-renderPass-00904 Getting a lot of these, for example: dEQP-GLES31.functional.blend_equation_advanced.basic.multiply Bug: b/303441816 Change-Id: I78bf5c0e34bb65f349c71f324ea1c71ae8b416e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911799 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Roman Lavrov 276e0c78 2023-10-04T12:42:23 Also suppress VUID-VkGraphicsPipelineCreateInfo-pStages-00739 dEQP-GLES31.functional.primitive_bounding_box.points.* are hitting this one Bug: b/303219657 Change-Id: I26ae20ce6feeb84019488689667fa66fb7ca2925 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911798 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com>
Roman Lavrov 43abae13 2023-10-04T10:49:44 Suppress VUID-VkGraphicsPipelineCreateInfo-pStages-00738 Bug: b/303219657 Change-Id: Ibc23ccc700b15c351b2d7ab644bd8fc28bc07dcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911795 Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Alexey Knyazev 777a46bf 2023-09-29T00:00:00 Metal: Fix power function translation GLSL definition of pow(x, y) excludes negative x, so it must be translated to metal::powr, not metal::pow. Fixed: angleproject:8366 Change-Id: Idaa66da73a149119e2a74beddc9a49e187d3e7af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4901995 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi ffb32380 2023-10-02T16:01:37 Vulkan: Fix device creation on multi-queue devices When multiple eligible queue families are exposed by the device, ANGLE defers devices creation until a surface is made current, at which point it selects a queue family that supports presentation to that surface. This path was largely untested and was broken: - Some post-device-creation initialization was not deferred until the device was actually created - Some cap calculation depended on the chosen queue family index - Query of device capabilities was done too late, such that ANGLE could not correctly determine the level of support for ES versions. Bug: angleproject:8300 Change-Id: I2a35396d1fd08ed26d217dff07d10e9a9c1ac55f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4907895 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Roman Lavrov 1eccf863 2023-10-03T16:18:07 Handle non-debuggable com.android.angle.test on device Noticed in capture_tests on CI, and angle_perftests also runs into this. When a non-debuggable test apk is installed on the device the hash check fails as run-as does not work for non-debuggable apps. It's just an optimization to avoid re-installing the apk though, so just warn about the error and re-install the apk. Bug: b/303276423 Change-Id: Iecc68de285454043fc7f090163af373a22e11e41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4910152 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov f29f73d9 2023-10-03T14:31:47 Add missed include <atomic> Following https://crrev.com/c/4886388 Bug: b/302112423 Change-Id: I8d9c1269d5e2470ee9f559eae26eddeb8a956a9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4904696 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 75409184 2023-10-03T18:57:42 Revert "Add VMA version to logcat" This reverts commit 92218933df79a4427b9bd29d0b7af892108e410e. Reason for revert: VMA 3.0 usage is confirmed. Log can be removed. Original change's description: > Add VMA version to logcat > > This is a temporary CL. It will be used to confirm that Android > uses VMA 3.0 with ANGLE as the default driver. > > * Added the VMA version log when the renderer is being initialized. > > Bug: b/295208838 > Change-Id: I054a4e0e080aa5d06533bd7785eea608e14bba39 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868086 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: b/295208838 Change-Id: If1b9883c02c78121ff72601b650ac04aef685527 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4909899 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 7f5143c2 2023-10-02T15:38:15 Vulkan: Notify VAO when VBO's mBufferWithUserSize changed. When buffer robust access is enabled, and bufferData is called with different size and we end up reusing the underline storage, we will have to recreate VkBuffer with user's size, and driver is relying on VkBuffer's size to implement robust access. The bug here is that we notify VAO when storage changes. But when storage is reused and we have dedicated VkBufer with user size and that VkBuffer changed, we were not notifying the VAO. This CL adds that notification so that VAO gets notified and dirty bits processed and its cache of VkBuffer gets updated Bug: chromium:1488055 Bug: b/303138134 Change-Id: Ie693c92c2edde9a22a41a25f5bde493397550d95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4906568 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 8b9500ae 2023-09-28T16:15:21 Enable multisample deqp tests on bots Enable gles3 and gles31 deqp multisample tests on bots. Khronos conformance package ran the tests in gles3 and gles31 mustpass list with multisample config rgba8888d24s8ms4: https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/openglcts/modules/runner/glcAospMustpassEs.hpp#L24 Enable the multisample config tests on bots cover the tests. This CL only enables the multisample tests on Vulkan backends (including swiftshader) on Android, Linux, Windows, as we are prioritizing vulkan backend development. Bug: b/297901032 Change-Id: Iaa830bd466e3564bb1e83c98cc360bd5a85abf86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903430 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi e9719f5c 2023-10-02T12:15:35 Capture/Replay: Disable VK_EXT_host_image_copy during capture Bug: b/303065176 Change-Id: I87f9dd11cd87115f097bb35d44f024db19274d51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903077 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d919870f 2023-09-14T16:00:07 Vulkan: Do host image copy without holding the share group lock When an application uploads texture data such as with `glTexSubImage2D`, the share group lock is being hold while the data is being copied. Without VK_EXT_host_image_copy, this is a copy to a staging buffer, which may itself be expensive. With VK_EXT_host_image_copy, the cost of the copy is higher and so the lock would be held for a longer duration. This is particularly harmful to applications that spawn a separate thread for texture uploads (as the main thread is unable to make GL calls). This change moves the actual copy call to the tail of the call after the share group lock has been released. As a result: - The upload thread may be a bit slower, but - The copy does not interfere with the main thread, and - The copy does not interfere with the GPU's rendering work. As a result, games that load content seamlessly during gameplay should experience less stutter during texture uploads. Bug: angleproject:8341 Change-Id: I818c4389d4bf828847578da89414623e4b5e844e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864290 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 4ace4da1 2023-09-28T00:00:00 Metal: Add 2D array and 3D texture type mappings Do not try to copy texture levels with mismatching layer counts to avoid triggering Metal validation. Fixed: angleproject:8364 Change-Id: I4bc72be753a62dd78dc131562c62e14eb540ab2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4901993 Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Amirali Abdolrashidi 84c30b76 2022-07-12T20:42:00 Vulkan: Add single-level mutable texture flushing So far, the feature to flush mutable textures after switching to a new texture only applied to textures with at least two mip levels. In that case, the whole mip chain would be allocated for those textures. This change will add single-level texture flushing as well. However, the it should be optimized to prevent allocating the whole mip chain for only one defined level, and reduce memory usage. * Updated the code for previous texture flushing to include one-mip textures as well. * Added the condition that the mutable texture not be bound as an attachment for flushing. * Changed ImageMipLevels::FullMipChain to ::EnabledLevels in order to limit the number of allocated mips. * Removed ::FullMipChain from ImageMipLevels. Bug: b/285613719 Change-Id: Ibc76917345820c5a0991f700e9fb93e4cda6efae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3763841 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 961ed7a2 2023-10-02T15:07:44 RepeatedEglInitAndTerminate: 100 -> 50 repetitions One of the variants ES3_1_Vulkan_SwiftShader_EnableParallelCompileAndLink is taking >60s which seems a bit too much time for this kind of test Bug: b/303089709 Change-Id: I75584bf376cfac8e4ddd61b21ccd75b9ac6d2967 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908348 Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 5ab344be 2023-09-28T17:26:29 Remove old VUIDs after renaming Some of the VUIDs were renamed in a recent VVL roll. The new VUIDs for those that were skipped were also added to the list in a prior fix CL. After the related VVL change and the fix also rolled into Chromium, the old VUIDs can be safely removed from the skip list. * Removed the following VUIDs from the skip list * VUID-VkBufferViewCreateInfo-buffer-00934 * VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 Bug: angleproject:8358 Change-Id: I63474cb36408637be8a60def9add1f77c48e9c93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903984 Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Yuxin Hu 32ef34df 2023-10-02T10:30:48 Remove the dEQP-EGL.functional.color_clears*/render* test suppression The dEQP-EGL.functional.color_clears* and dEQP-EGL.functional.render* test failures on Pixel6 have been fixed in https://gerrit.khronos.org/c/vk-gl-cts/+/12272. Remove the test suppression from the expectation files. Bug: b/295394803 Bug: angleproject:8214 Change-Id: I2d99f9ed282eba43dc9c18e4427f5abd5014224e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908191 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Roman Lavrov 34c8778b 2023-09-26T13:45:06 Use atomic counters early in perf warning macros Before this CL, snprintf was called repeatedly to format the warning message which was then discarded after 4 logs. snprintf showed up in profiling at ~2% and this CL appears to yield an ~8% power improvement in one of the traces (egypt_1500). A mutex was previously used to avoid the race condition on the static sRepeatCount variable. This CL avoids the need for that by using static atomics instead. Also updated the Debug macro to use the VK macro vararg approach so that formatting only happens when the message is actually logged. Bug: b/302112423 Change-Id: Ia8a18361cfb5a9f2aa19ff939499754ba861efb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886388 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Mark Lobodzinski 03eea365 2023-09-25T17:50:51 ANGLE Tracer: Mark FBAttachment texture resources as active If a texture and framebuffer were set up before capture and referenced during a capture, the texture resource would not be set as active and the trace may fail. Test: Capture a Diablo Immortal trace and attempt to replay Bug: b/301999483 Change-Id: I5ea114e65b11479a5cdbf496dc8c5ab4eeadbf55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4893251 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Shahbaz Youssefi 1cab871c 2023-09-27T22:11:25 GL: Fix ScalarizeVecAndMatConstructorArgs vs precision If the constructor being expanded has no precision (such as if it's entirely made up of constants and bools), the workaround didn't produce a precision for the helper function, leading to GLES compilation errors. Bug: chromium:1420130 Bug: angleproject:8361 Change-Id: I0de312dfd1bfbf45317db4fb88d685a843052817 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4898697 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 6717a65b 2023-09-28T00:00:00 Metal: Skip maximum render target size validation for Mac GPUs Only GPUs that do not support Mac families have this limitation. Bug: angleproject:8268 Change-Id: I3f9174dd104c2ba4e9781272fbc7062fe14d78a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903722 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Kyle Piddington d55893cd 2023-09-27T16:40:58 Issue 1484512: Out of bounds access to Metal uniform blocks Fixed conversion offset for Uniform buffers: Dynamic buffers were being allocated and copied from the 'updateBufferSubData' offset, than from the previously allocated offset. This meant that when creating a new dynamic buffer to hold the metal uniforms, ANGLE didn't re-convert blocks from the initial source offset, nor did we allocate enough space to read those blocks. Important use cases to test include any UBO-heavy sites. Bug: chromium:1484512 Change-Id: Ia9f505e3df871a401d40682d737019bd5d3f443f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4899369 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
angle-autoroll 621bee25 2023-09-27T22:07:24 Manual roll vulkan-deps from b8fa58ef74a9 to 89aea904c65f (61 revisions) Manual roll requested by abdolrashidi@google.com * Updated the skipped VVL messages in accordance with the following vulkan-deps roll: Vulkan-ValidationLayers to 9fe2f727 https://chromium.googlesource.com/vulkan-deps.git/+log/b8fa58ef74a9..89aea904c65f Changed dependencies: * glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/4c57db1595..2bfacdac91 * spirv-cross: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross.git/+log/5e963d62fa..6e1fb9b09e * spirv-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/fc7d246276..79743b899f * spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/a40483d313..48c97c1311 * vulkan-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers.git/+log/4f51aac14f..df60f03168 * vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/9dc0e31574..f352069ad3 * vulkan-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools.git/+log/1ecbed6db3..576f3286e1 * vulkan-utility-libraries: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries.git/+log/6774c9b24b..8486ee700e * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/c26ff51102..1b8b09b3ab If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC abdolrashidi@google.com,angle-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://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: angleproject:8358 Tbr: abdolrashidi@google.com Change-Id: I7927abe872fbb1d25523b06cc205b13ef2a887f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4898000 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Alexey Knyazev 49c4d87a 2023-08-21T00:00:00 Apply fragment color broadcasting to secondary outputs When GL_EXT_draw_buffers is enabled, gl_FragColor is replaced with gl_FragData. Apply the same transformation to gl_SecondaryFragColorEXT if it is statically used to avoid compiler failures. Bug: angleproject:1085 Change-Id: If154cd20a8e14a92da520847a9c4508971a45fef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4900641 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 25bfe035 2023-09-07T00:00:00 GL: Adjust disableTextureMirrorClampToEdge condition The extension support has been fixed in Mesa 23.1.7. Fixed: angleproject:8319 Change-Id: Ie83dee83773823dad90826267040e40b6f296c53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4901182 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>