src


Log

Author Commit Date CI Message
Charlie Lao 7c69116f 2023-08-08T10:14:47 Vulkan: Fix data race with DynamicDescriptorPool Right now DynamicDescriptorPool::destroyCachedDescriptorSet can be called from garbage clean up thread, while simultaneously accessed from context main thread, and data race will happen and cause bugs. This can only happen when the buffer is not being suballocated. In this case, suballocation owns the bufferBlock and bufferBlock gets destroyed when suballocation is destroyed from garbage collection thread. If buffer is suballocated, the shared group owns pool which owns bufferBlocks and they gets destroyed from shared group with the share group lock. This CL avoids this race problem by release the shared cacheKey when the buffer is released, while we still had the shared group lock. Bug: chromium:1469542 Change-Id: Ic1f99e6b6083d63e4efb9c3f408921da62c006ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4761365 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang ae8a5cfd 2023-08-09T12:00:53 GL: Accept more config options when creating the EGL context Some drivers fail to find any configs in ANGLE but succeed with Chrome's config searching. Widen ANGLE's config searching to include 565 configs and configs without depth stencil. Refactor the config search logic to be used for both backend context and mock pbuffers instead of hard-coded pbuffer config. Bug: chromium:1442132 Change-Id: I52378ec66542ec7aa56849ec8470f8eadb4abf58 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764230 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org>
Yuxin Hu a990ba34 2023-08-02T17:21:00 Fix write out of bounds on non robust contexts crashes dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.* tests are failing, because the test expectes EGL_SUCCESS upon eglMakeCurrent(EGL_NO_CONTEXT), regardless of whether the context was lost. This CL: 1) Changes the validation function of eglMakeCurrent: if the EGLContext passed to eglMakeCurrent is EGL_NO_CONTEXT, do not return EGL_CONTEXT_LOST even if the context is already lost. 2) Adds a lost context check in checkOneCommandBatch. If the context is lost, do not check fence status and assume all of the vulkan commands have finished execution, so that we can properly destroying all the resources before destroying the context. 3) Changes the GL error code from GL_INVALID_OPERATION to GL_CONTEXT_LOST when there is a vulkan device lost. Bug: b/286921997 Bug: b/289544394 Change-Id: I91e8a4105f0d7a3ec3b59bae58da80bc64ffa94a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728466 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Steven Noonan fa3ecccb 2023-08-09T10:48:36 Vulkan: make fragment shading rate depend on renderpass2 The extension depends on renderpass2 and will raise a VVL failure if it's not available and enabled. Note that this doesn't yet work as intended if you only override supportsRenderpass2=false. A subsequent commit will fix this. Bug: angleproject:8291 Change-Id: I6843b342909fb9000ebdcea80e006670c865f858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763095 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Commit-Queue: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi df76f5b1 2023-08-08T15:13:54 Respect KHR_parallel_shader_compile for program link Parellel shader compilation was using the single-threaded vs multi-threaded pool appropriately, while program link was always being multi-threaded. This change makes sure the program link tasks uses the same pool as shader compilation per KHR_parallel_shader_compile. Bug: angleproject:8297 Change-Id: I0508617678a6e875fc0719a2d447cf1a9c5ca40f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762086 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 164ac246 2023-08-08T15:13:10 zero-initialize all memory in LinkedUniform. LinkedUniform is serialized directly, ensure that any padding inserted into the struct is zero so there is no chance of uninitialized reads during serialization. Bug: b/275102061 Bug: chromium:1470644 Change-Id: If6b9f579938019c7e16fb306ed3b7d839953f6d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762085 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 2d87c31d 2023-08-09T07:47:20 Revert "Metal: initialize std::arrays in mtl_render_utils" This reverts commit c40d31b02690788cf61f93d71bbe094ddbb1a004. Reason for revert: Invalid rationale, it does not solve the problem. std::array does run the default constructors of the AutoObjCPtrs held in them. Original change's description: > Metal: initialize std::arrays in mtl_render_utils > > The std::array default constructor does not initialize the memory. > This leads to uninitialized access in mtl_render_utils *Utils. > > Fix by initializing them. > > Bug: angleproject:8293 > Change-Id: I597df067f3c19907a038bb4899a178734158302c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783 > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8293 Change-Id: Ibacacd70fc196b5ecb3d0bc971d6565f7f578d4c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4765207 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Charlie Lao 719165c8 2023-08-04T12:13:37 Remove "const UniformTypeInfo *typeInfo" from struct LinkedUniform This is a cached pointer to the const kInfoTable. There isn't much of performance benefit to cache here compare to directly retrieve from the table. This cached pointer is removed in this CL, which means we do not need to update the pointer in the ProgramExecutable::load(). This and a few earlier CLs that attempt to do memcpy for entire mUniforms reduced average frame time of blade_and_soul_revolution app trace 3%, from 4.3359 ms to 4.2066ms on pixel 7 pro. Bug: b/275102061 Change-Id: I6fd34d665234e3a5cc85344924049bf5b13aaa80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753933 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Kimmo Kinnunen c40d31b0 2023-08-07T12:33:42 Metal: initialize std::arrays in mtl_render_utils The std::array default constructor does not initialize the memory. This leads to uninitialized access in mtl_render_utils *Utils. Fix by initializing them. Bug: angleproject:8293 Change-Id: I597df067f3c19907a038bb4899a178734158302c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Phan Quang Minh d1e26fa2 2023-08-04T11:07:25 gpu_info_util: Close X11 display after usage This ensures that the X11 display connection won't leak if GetNvidiaDriverVersionWithXNVCtrl gets called multiple times. Bug: angleproject:8294 Change-Id: Id9fe8e6b6d5524965c1638841af88416fe28c76a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749333 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell f7d7be8d 2023-08-04T14:16:38 Metal: upstream "UBO convert only whole block". Authored by Dan Glastonbury; reviewed by Dean Jackson. This upstreams https://commits.webkit.org/264375@main . OpenGL doesn't guarantee that the buffer backing uniform blocks needs to be a multiple of the block size. When converting OpenGL layout blocks to Metal layout, ConvertUniformBufferData is rounding up the size of the backing buffer to a multiple of the block size which leads to reading out of bounds. To ensure we don't read outside the source buffer, this change replaces calls to `memcpy` with `memcpy_guarded` which accepts a pointer to the limit of available data and copies as much data as is available, writing zeroes for any unavailable amount. Conversion of bools didn't use memcpy, so the raw pointer is checked against maxSrcPtr and only dereferenced if valid, otherwise zero is used. This has been tested with ASan and UBSan enabled against the OpenGL dEQP tests for Uniform Buffer Objects in ANGLE. Fixed: angleproject:8292 Change-Id: I0d472277889f073e54a9049f01bc04f6965a7b68 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754175 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Auto-Submit: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Mohan Maiya e50d3876 2023-08-04T14:47:41 Vulkan: Retain loadOp when there is a resolve attachment Rendertargets with resolve attachments cannot optimize away loadOp Load or Clear even if they are marked ResourceAccess::Unused and storeOp is RenderPassStoreOp::DontCare. Bug: angleproject:4836 Bug: angleproject:5981 Tests: ImageTest.SourceAHBTarget2DMSRTTInteraction* Change-Id: I39ec67a457de6876ed0bd47d66a963cc59fab064 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753735 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao d1117834 2023-08-04T10:48:22 Simplify struct LinkedUniform a bit more In earlier CL crrev.com/c/4740298, we added mFixedSizedData structure to group the data memebrs that can be memcpy-able into one variable, so that we can memcpy that. Since then, we have made entire LinkedUniform struct memcpy-able (crrev.com/c/4750443 is doing memcpy of entire std::vector<LinkedUniform>). Thus, there is no longer a need for mFixedSizedData. This CL removes that. This CL also removes isStruct and inArrayOfArrays from LinkedUniform, since they are always false. This CL also removes some unused APIs from LinkedUniform. Bug: b/275102061 Change-Id: I6ead3d8f179efc0d383352f7ac0efa6bf3dc8a1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753932 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 41d27ec3 2023-08-03T18:06:08 load/save entire std::vector<LinkedUniform> with one call. Now LinkedUniform is a simple data struct with only fundamental types, we can load the entire vector at once. Bug: b/275102061 Change-Id: I7c030677d02517f86d960de85b0e7ae2c916a26e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750443 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao eff12c1e 2023-08-03T12:10:05 Move name and mappedName out of LinkedUniform struct These are std::string objects. This CL moves these two data out of LinkedUniform and into ProgramExecutable class, side by side with mUniforms. With these two data moved out, LinkedUniform is now a simple struct with basic data types, and I can memcpy entire vector of uniforms. Bug: b/275102061 Change-Id: I9ae13e7daca85f8e5f3662a4718f190bebb5f5d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750442 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi 4963febf 2023-08-02T16:52:52 Vulkan: Remove type indices with host-visible bit Currently, the memory type index for VMA image allocations are selected and returned by the API. However, it could potentially choose a type index with more flags than required or preferred, and ignore the index with exactly the flags we want. For example, it could pick a type index with the host-visible property flag, even if is unnecessary and a type index with a device-local flag would suffice. Using memoryTypeBits during the allocation allows us to filter the unwanted type indices out and use the other indices initially. * Added a new function to RendererVk.cpp to try to remove the memory type indices with the host-visible bit for VMA image allocations if they should be device-local. * GetMemoryTypeBitsExcludingHostVisible() * It also removes the indices with the protected bit if it is not required. * If the allocation is unsuccessful, the fallback resets the field for memoryTypeBits, allowing all available type indices to be used for the allocation. * Added memory type index to the pending allocation log during OOM. Bug: b/294085818 Change-Id: Icc1b218df075170a6baa7ec57c837ed59cd4fa96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743604 Reviewed-by: Kaiyi Li <kaiyili@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao 9c588180 2023-08-02T16:39:44 Change LinkedUniform::arraySizes from std::vector to unsigned int We always flatten multiple dimensional arrays in the uniform to a one dimensional array, so the arraySizes can be simplified to unsigned int instead of a vector. With this, we can now move the arraySize into the simple mFixedSizeData struct and the normal memcpy will cover the load/save. Bug: b/275102061 Change-Id: I24c026f783b755f7aa691a5db5746b6309a21227 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735275 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Brian Ho d2a6b2a0 2023-08-04T14:15:11 Use offscreen DisplayVk on ChromeOS Currently, we always use DisplayVkHeadless on ChromeOS which can fail if the drivers do not support VK_EXT_headless_surface (like on Intel). At the end of the day, CrOS never really uses Vulkan WSI, so it shouldn't need a WSI extension anyways. This CL introduces a simple DisplayVkOffscreen that requires no WSI. We then configure CrOS to use this new DisplayVk. Bug: b/292249282 Change-Id: I1fcbb48d187eb656c6e03bc7ac7b15ac8ad0a4ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752416 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang f4e901b4 2023-08-07T10:52:09 Validate program binaries are the same CPU bit-ness. ANGLE's program binary serialize/deserialize logic uses size_t and other non-fixed sized integer types. This can cause crashes if the CPU architecture changes between saving and loading of binaries. Bug: chromium:1470074 Bug: angleproject:8223 Change-Id: Ib2529e0e6e66e28a184aa1ec94075e343e1f1d5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752265 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell 8ba04f1c 2023-08-05T00:48:35 Metal: disable fastmath less often. Stop disabling fastmath if atan is used in the shader. Application developers will surely prefer the significant performance improvement of the fastmath optimizations over corner-case differences in precision. Make disabling fastmath more precise: only if it's forcibly disabled as a driver bug workaround, or if the shader uses invariance and preserveInvariance is not available. Suppress the test: dEQP-GLES[23].functional.shaders.invariance.lowp.loop_2 which fails when fastmath is enabled for shaders using atan and invariance. Fixed: chromium:1320111 Change-Id: I6e33b14b1d05faedc15373f24af3e22a4074a35b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754018 Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Steven Noonan 30bd0149 2023-08-02T08:06:47 ANGLETest: fix crashes when switching between GLESDriverTypes The condition for mLastLoadedDriver was incorrect. We never initialized it, so it never switched to the correct EGL implementation when alternating between tests using different GLESDriverTypes. This was reproducible with: angle_end2end_tests.exe --gtest_filter="SimpleOperationTest.DrawSingleSampleWithAlphaToCoverage/ES3_D3D11:SimpleOperationTest.DrawSingleSampleWithAlphaToCoverage/ES3_ANGLE_Vulkan_Secondaries_SwiftShader:SimpleOperationTest.DrawSingleMultiSampleWithAlphaToCoverage/ES3_D3D11" The above does three tests: - D3D11 test (using GLESDriverType::AngleEGL) - Vulkan test (using GLESDriverType::AngleVulkanSecondariesEGL) - D3D11 test (using GLESDriverType::AngleEGL) What would happen is this: - the first test would initialize a D3D11 EGLDisplay - the second test would switch the API entry points to use AngleVulkanSecondariesEGL - the third test begins reuses the first test's EGLDisplay, but fails to notice the GLESDriverType change and uses the AngleVulkanSecondariesEGL entry points - when eglQueryString is called with the D3D11 EGLDisplay, the VulkanSecondaries library has no knowledge of this display and fails the call Bug: angleproject:8286 Change-Id: I1f22060e2c5725dad5e410a76385e2802b627844 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749296 Auto-Submit: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 22438ad8 2023-08-02T14:01:45 Embed ActiveVariable into BufferVariable and ShaderVariableBuffer This CL embeds ActiveVariable into BufferVariable and ShaderVariableBuffer struct instead of subclass. This allows us to remove the virtual function of ~ActiveVariable(), which means ActiveVariable is a simple struct with basic types and memcpy can be used for load/save. Thus, in this CL, I also moved activeVariables to LinkedUniform::mFixedSizeData structure and let memcpy handle the load/save. Bug: b/275102061 Change-Id: I8d21080cfdd72d4d22cef927d136ca428d9b12e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722265 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao ee019f58 2023-08-01T17:03:24 Group fixed sized data of LinkedUniform into a struct Most of gl::LinkedUniform struct is a basic types and can be simply initialized with memcpy. This CL groups these together and encapsulate them with get APIs. The load/save is now a single memcpy for the entire fixed size data structure of basic types. Bug: b/275102061 Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 7bb13226 2023-08-01T12:10:44 Pack booleans inside struct LinkedUniform into bitfields Right now every bool is load/stored as integer, which itself is a memcpy. This CL moves them into a bitfield and load/store with one uint32_t, thus improves efficiency of cache load/save. Bug: b/275102061 Bug: angleproject:8223 Change-Id: Id8e8e8861c8fcbd75dbef6056e4ff6c8ad2fc4a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740292 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Alexey Knyazev 2a950c63 2023-07-31T00:00:00 Adjust ANGLE_stencil_texturing specification STENCIL_INDEX enum is not defined in GLES/gl3.h, so the extension has to provide its value. Bug: angleproject:8051 Change-Id: Ia383162afee8cdcffc1d68ddf833fbd91a87b1f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748399 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 34a99db4 2023-08-03T16:46:36 Metal: Check the full generated default shader in Add the default MSL shader text in the repo. Fix an error with include path setup to make the script runnable from an arbitrary directory, for WebKit purposes. WebKit would compile that to a compile-specific metallib and then attach that metallib to the compilation as .h. Current upstream behavior is to compile the metallib once few platforms. Bug: angleproject:8284 Change-Id: Icbf7c0055718496cb380fad0b73d5b9b0d0abb0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748400 Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 1b94197a 2023-08-03T13:45:34 Metal: Enable fast math based on runtime OS version checks. Chrome compiled with a recent SDK but a low minimum required OS version so fast math was always disabled at compile time. Turn this into a two- part check: Use macros to make sure preserveInvariance can be compiled and @available to do the runtime OS check. Fix the UseFastMathForShaderCompilation check. It was incorrectly inverting two negative conditions. Mark some dEQP precision tests as failing due to fast math. We would prefer to have the performance improvement over some precision loss. Bug: chromium:1468346 Bug: angleproject:8287 Change-Id: I31d9c732a12841cb4d0bc1a555ea1f1ea8a434fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750199 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Steven Noonan dbae1804 2023-07-02T18:39:14 Display: remove redundant 'metal' ANGLE_DEFAULT_PLATFORM This one is already handled only a few lines before. Bug: angleproject:8285 Change-Id: Ib62ce6062551faf39360371c46a05f9cc4a70b07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749295 Auto-Submit: Steven Noonan <steven@uplinklabs.net> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Solti 95f09c88 2023-08-01T20:48:45 Vulkan: Drop VkAHBFormatPropertiesANDROID for BLOB VkAndroidHardwareBufferFormatPropertiesANDROID is only valid for images. Test: details in ag/24283178 Bug: b/293592961 Change-Id: I72077ceac867da8522620a67d81f7093efa591f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4739718 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Solti Ho <solti@google.com>
Charlie Lao 79973750 2023-07-27T17:53:24 Let UniformLinker uses its own struct instead of LinkedUniform UniformLinker itself needs more detailed information than the final linked uniforms. Right now they are using the same data structure. This CL adds a new structure for linker to use. Since the linker data structure is temporary, we never needs to load/save from cache, we have more freedom here to use complex data types. The benefit of separate out intermediate structure from LinkedUniform is that it allows us to further simplify LinkedUniform structure without change much of ProgramLinkedResource implementation. As result of this, this CL removes field and outerArraySizes (both are std::vector type) from LinkedUniform. Bug: b/275102061 Change-Id: Ic1291b51b8906ac586a2f25eb1dbbe74eae8fdc5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727742 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao f24ea41e 2023-07-31T11:12:44 Embed sh::ShaderVariable data member into gl::LinkedUniform ProgramExecutable::load and save function is load/save each individual data members. Uniform can be quite large as shown in some app traces and this causes performance problem even when program memory has a cache hit. This CL flattens gl::LinkedUniform structure by embedding sh::ShaderVariable data members so that we can remove unrelated members and also prepare for further optimization in future CLs. Bug: b/275102061 Change-Id: I7c18cb73e359fba7cd6375b4b1635e9040ef140d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735152 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 7b0c78ba 2023-07-28T10:00:28 Remove unused code in ProgramPipeline shaderUniforms is set but never used. Bug: b/275102061 Change-Id: Ided52748f6e8925cdbbb996d70966de2d1fc2c9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727743 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Igor Nazarov c95ffadf 2023-07-24T13:00:32 Perform Display terminate(InternalCleanup) from makeCurrent() Current state: - Call to `eglTerminate()` is canceled if there are Contexts current. - All not current Contexts are invalidated in `eglTerminate()` call. - Full Display termination will happen only when last Context is actually destroyed in `eglDestroyContext()` or last active thread terminates (Android only). Problem: - Context is not marked invalid after it is unmade from current when `eglTerminate()` was already called. - If `eglDestroyContext()` was called while context was current, it will be destroyed when unmade from current - in this case actual Display termination will NOT happen. After this change: - Context immediately invalidated after it is unmade from current when `eglTerminate()` was already called. - Full Display termination will happen after the last Context is unmade from current (all Contexts are invalid). Bug: angleproject:6798 Test: angle_end2end_tests --gtest_filter=EGLDisplayTest.ContextLeakAfterTerminate* Change-Id: Idcce94b041649db58d3d879858fba99109347baf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4708328 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Igor Nazarov 959ccb96 2023-08-02T13:40:16 Add EGL_BAD_ACCESS validation into ValidateMakeCurrent Current code does not generate EGL_BAD_ACCESS in `eglMakeCurrent()` according to the specification: - If context is current to some other thread, or if either draw or read are bound to contexts in another thread, an EGL_BAD_ACCESS error is generated. Additional changes: - replace `Context::getRefCount()` with `isReferenced()` for consistency with added `Surface::isReferenced()` method. - remove duplicate `ValidateSurface` call for the `drawSurface` in case if `readSurface` is the same. - remove duplicate `ValidateCompatibleSurface()` call for the `readSurface` in case if `drawSurface` is different. - Fix EGLContextASANTest.DestroyContextInUse test. - Fix EGLContextSharingTestNoSyncTextureUploads.NoSync test. Bug: angleproject:8282 Change-Id: I2af0d7f50019c2445b42279bdd0e0197dd8ad20f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742382 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Shahbaz Youssefi 6c1bab07 2023-08-02T12:25:51 Add surface to eglAcquireExternalContextANGLE Bug: angleproject:5509 Change-Id: I51284ae4dc865dc31d1c5540c24e1e0abb95fe0f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743719 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 335c6b86 2023-08-02T00:00:00 D3D11: Do not specialize HLSL for multisampled rendering Pass the required state as a driver uniform instead of triggering fragment shader recompilation at draw calls. Bug: angleproject:8097 Bug: angleproject:8131 Fixed: chromium:1468993 Change-Id: I15825c0522b29d48eb2c3b341ba96f139ef26460 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742579 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Cody Northrop cb9dd1c9 2023-08-01T14:48:40 Tests: Add Tesla trace Test: angle_trace_tests --gtest_filter=TraceTest.tesla Bug: b/294106875 Change-Id: Ice844dd989a29cbef5190acf077f0484f17c7e3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4739721 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 01ee134b 2023-08-02T13:43:36 Revert "GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE" This reverts commit 4e0250f1926d25e39023c4ad7862ed358a0ec4b6. Reason for revert: Chromium change was reverted. crbug.com/1468956 Original change's description: > GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE > > Now that Chromium no longer uses it. > > Bug: angleproject:5509 > Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 > Reviewed-by: Peng Huang <penghuang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5509 Change-Id: Id8143b1715ec8162be9351437fbd34a2aa4c2e00 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742521 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov d29f946d 2023-07-26T19:55:56 Reland "Fix ExternalImageTarget EGLImage race" This is a reland of commit 8aa3ca9d177c0ed54926b769de7d0bce0f8482d3 Previous submission was reverted because of a failure in Android's "testDrawingHardwareBitmapNotLeaking" test. Bug was not in the reverted CL itself and is fixed by CL: https://chromium-review.googlesource.com/c/angle/angle/+/4733831 Original change's description: > Fix ExternalImageTarget EGLImage race > > Race may happen when ExternalImageTarget EGLImage is destroyed while its > GLES Texture/Renderbuffer target is modified/destroyed. > > Fixed by providing `egl::Image` with `egl::ContextMutex` even when > `context` is `nullptr`. > > This CL also changes `SharedContextMutex` merging rules when `mRank` is > equal - now priority goes to the `lockedMutex`. This is done to prevent > unnecessary `mRoot` update of Context mutex when merging with > `egl::Image` only mutex. > > Bug: angleproject:6957 > Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Bug: angleproject:6957 Change-Id: Ia698dbea64b8d51ea78f3af6558efc7266f8bdc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732892 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov d61a50c1 2023-07-31T15:09:08 Add "angle_enable_context_mutex_recursion" build option Option is for Android Vulkan. Fixes the recursion problem: #00 pc 000000000004d69c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a) #01 pc 0000000000051e84 /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a) #02 pc 00000000000b41b4 /apex/com.android.runtime/lib64/bionic/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+236) (BuildId: dda896312b8ac9c639f6aeb0175b8a0a) #03 pc 00000000003d8274 /vendor/lib64/egl/libGLESv2_angle.so (std::__Cr::mutex::lock()+12) (BuildId: 203fee8f1cfe9c18) #04 pc 0000000000336494 /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::doLock()+132) (BuildId: 203fee8f1cfe9c18) #05 pc 000000000033668c /vendor/lib64/egl/libGLESv2_angle.so (egl::SharedContextMutex<std::__Cr::mutex>::lock()+124) (BuildId: 203fee8f1cfe9c18) #06 pc 00000000001d6e08 /vendor/lib64/egl/libGLESv2_angle.so (EGL_ClientWaitSyncKHR+100) (BuildId: 203fee8f1cfe9c18) #07 pc 00000000000674f0 /system/lib64/libEGL.so (android::eglClientWaitSyncKHRImpl(void*, void*, int, unsigned long)+112) (BuildId: c4698b8b366f6519dbd7bd3a5f6239f2) #08 pc 0000000000086648 /system/lib64/libgui.so (android::BufferQueueProducer::dequeueBuffer(int*, android::sp<android::Fence>*, unsigned int, unsigned int, int, unsigned long, unsigned long*, android::FrameEventHistoryDelta*)+3240) (BuildId: ff35b91736084ee7c49efe908fb9f8f3) #09 pc 00000000000e24fc /system/lib64/libgui.so (android::Surface::dequeueBuffer(ANativeWindowBuffer**, int*)+392) (BuildId: ff35b91736084ee7c49efe908fb9f8f3) #10 pc 0000000000755770 /system/lib64/libhwui.so (android::uirenderer::renderthread::ReliableSurface::hook_dequeueBuffer(ANativeWindow*, int (*)(ANativeWindow*, ANativeWindowBuffer**, int*), void*, ANativeWindowBuffer**, int*)+80) (BuildId: 0ab7d7584ac800860c4d180557441d1b) #11 pc 00000000000e0b48 /system/lib64/libgui.so (android::Surface::hook_dequeueBuffer(ANativeWindow*, ANativeWindowBuffer**, int*)+92) (BuildId: ff35b91736084ee7c49efe908fb9f8f3) #12 pc 000000000002cc8c /system/lib64/libvulkan.so (vulkan::driver::AcquireNextImageKHR(VkDevice_T*, VkSwapchainKHR_T*, unsigned long, VkSemaphore_T*, VkFence_T*, unsigned int*)+280) (BuildId: 0c72f8685858f73fbb13fd68d401bba5) #13 pc 0000000000266f08 /vendor/lib64/egl/libGLESv2_angle.so (rx::(anonymous namespace)::TryAcquireNextImageUnlocked(VkDevice_T*, VkSwapchainKHR_T*, rx::impl::ImageAcquireOperation*)+128) (BuildId: 203fee8f1cfe9c18) #14 pc 000000000026495c /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::acquireNextSwapchainImage(rx::vk::Context*)+140) (BuildId: 203fee8f1cfe9c18) #15 pc 0000000000265800 /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::doDeferredAcquireNextImageWithUsableSwapchain(gl::Context const*)+148) (BuildId: 203fee8f1cfe9c18) #16 pc 0000000000267bb4 /vendor/lib64/egl/libGLESv2_angle.so (rx::WindowSurfaceVk::getBufferAge(gl::Context const*, int*)+196) (BuildId: 203fee8f1cfe9c18) #17 pc 000000000034143c /vendor/lib64/egl/libGLESv2_angle.so (egl::Surface::getBufferAge(gl::Context const*, int*)+36) (BuildId: 203fee8f1cfe9c18) #18 pc 000000000036c354 /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurfaceAttrib(egl::Display const*, gl::Context const*, egl::Surface*, int, int*)+812) (BuildId: 203fee8f1cfe9c18) #19 pc 00000000001d1674 /vendor/lib64/egl/libGLESv2_angle.so (egl::QuerySurface(egl::Thread*, egl::Display*, egl::SurfaceID, int, int*)+176) (BuildId: 203fee8f1cfe9c18) #20 pc 00000000001d3658 /vendor/lib64/egl/libGLESv2_angle.so (EGL_QuerySurface+200) (BuildId: 203fee8f1cfe9c18) Happens only on platforms that use "EGL_KHR_fence_sync" instead of "EGL_ANDROID_native_fence_sync" for synchronization. Happens only on specific Surface types, that using `EGLConsumer`/`GLConsumer`, such as `SurfaceTexture`. The Android's "testDrawingHardwareBitmapNotLeaking" test may be used for testing the issue. Note: in order to reproduce, `SingleContextMutex` must not be used by context. The "Fix ExternalImageTarget EGLImage race" CL will achieve that. To check what extension is used, call: adb shell "dumpsys SurfaceFlinger | grep 'Sync configuration'" Possible results: Sync configuration: [using: EGL_KHR_fence_sync EGL_KHR_wait_sync] Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync] Bug: angleproject:4354 Change-Id: I915a2c026b59af0a2098ae6b3300f773b29cbfbb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4733831 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alan Zhao 5d4b3645 2023-07-31T14:04:01 Fix a missing symbol with ANGLE e2e tests angle_end2end_tests has the same issue as CaptureRelayTests which was fixed in https://crrev.com/c/4728461 where a symbol was not found during link-time on Windows due to __declspec(dllimport). Bug: chromium:1468150 Change-Id: Id943967b0f32d30ff69dfc013aafa69bd812ccaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735273 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brian Ho 6dc0c9d6 2023-07-31T22:54:03 Revert "Use DisplayVkSimple on ChromeOS" This reverts commit b8ddba2a674158ec6135eda18c3371be84ad6ff7. Reason for revert: Breaks Chromium Original change's description: > Use DisplayVkSimple on ChromeOS > > Currently, we always use DisplayVkHeadless on ChromeOS which can fail > if the drivers do not support VK_EXT_headless_surface (e.g. Intel). > This CL changes the default to use DisplayVkSimple which requires > VK_KHR_display which is better supported. At the end of the day, CrOS > never really uses Vulkan WSI, so the actual WSI extension used > doesn't matter. > > Bug: b/292249282 > Change-Id: I0f8cfafa635405850cda97c84ad45d3f6aec5103 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727450 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Brian Ho <hob@chromium.org> Bug: b/292249282 Change-Id: If3ab1a39cb86dae1bf0652ca16bba323f497fcc4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734578 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Brian Ho <hob@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 4e0250f1 2023-07-27T10:51:07 GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE Now that Chromium no longer uses it. Bug: angleproject:5509 Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 Reviewed-by: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
angle-autoroll cb4b1f36 2023-07-31T14:32:41 Manual Roll VK-GL-CTS from e7b180ad5366 to 00cccd7cf562 (37 revisions) https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS.git/+log/e7b180ad5366..00cccd7cf562 2023-07-28 jbolz@nvidia.com Remove early-outs that break objectreservation counts in VulkanSC 2023-07-28 syoussefi@google.com Fix fence status check in VK_EXT_swapchain_maintenance1 test 2023-07-28 jbolz@nvidia.com Fix extended_dynamic_state tests to run in VulkanSC 2023-07-28 jbolz@nvidia.com Fix shaderexecutor and subgroup supported stage checks 2023-07-28 rgarcia@igalia.com Test PGQ with the availability bit 2023-07-28 rgarcia@igalia.com Check Vulkan version before getting device function pointers 2023-07-28 rgarcia@igalia.com Test dynamic depth clamp and static depth clip 2023-07-28 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9 into vk-gl-cts/main 2023-07-28 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6 into vk-gl-cts/main 2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-cts-4.6.3 into vk-gl-cts/main 2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.9 into vk-gl-cts/main 2023-07-21 ziga@lunarg.com Add dynamic state stencil op tests with multiple pipelines 2023-07-21 rgarcia@igalia.com Check acceleration structure creation does not touch buffers 2023-07-21 rgarcia@igalia.com Test VkDescriptorSetVariableDescriptorCountLayoutSupport 2023-07-21 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6 into vk-gl-cts/main 2023-07-20 aitor@lunarg.com Advance glslang to fix link error for ndk26 2023-07-14 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6 into vk-gl-cts/main 2023-07-14 rgarcia@igalia.com Test strides smaller than vertex attribute sizes 2023-07-14 rgarcia@igalia.com Test RGBA expansion in vertex inputs 2023-07-14 rgarcia@igalia.com Vertex input attribute offset tests 2023-07-14 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6 into vk-gl-cts/main 2023-07-14 javed@igalia.com Add tests for 128b multisample color attachments 2023-07-14 rgarcia@igalia.com Test queries with multiview and availability bit 2023-07-14 dneto@google.com Test round-to-zero behaviour of OpConvertFToU 2023-07-14 dneto@google.com Test round-to-zero behaviour of OpConvertFToS 2023-07-10 slawomir.cygan@intel.com Fix checking support in cooperative matrix test 2023-07-07 rgarcia@igalia.com Test sample shading with dynamic sample counts 2023-07-07 ziga@lunarg.com Add more primitives generated query tests 2023-07-07 ewerness@nvidia.com Add testing for VK_KHR_ray_tracing_position_fetch 2023-07-07 aitor@lunarg.com Add required defines for Android builds with SDK33+ 2023-07-07 piotr.byszewski@mobica.com Test pipeline statistics when blitting 2023-07-07 mohd.faisal@arm.com Fix validation errors in ext_shader_tile_image CTS 2023-07-07 michal.jakubek@mobica.com Removal of copying protected image to host visible buffer 2023-07-07 rgarcia@igalia.com More dynamic rasterization sample count tests 2023-07-07 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.3.6 into vk-gl-cts/main 2023-07-05 ziga@lunarg.com Update vulkan-docs to current version 2023-07-04 slawomir.cygan@intel.com Build fix for MSVC C++ If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll Please CC angle-team@google.com,yuxinhu@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://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: None Tbr: yuxinhu@google.com Change-Id: Ib62a4c52e37902c8f605068f6ca1a786ae58bc49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732743 Reviewed-by: Solti Ho <solti@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Brian Ho 19671376 2023-07-28T13:37:38 Reland "Search for system libvulkan on CrOS" Currently, ANGLE searches in the "module" directory for libvulkan during init on CrOS. The library doesn't exist at this location (/opt/google/chrome/libvulkan.so), and we should instead just call dlopen(libvulkan.so) to search the system library paths. The original CL was reverted because it broke MSAN builds of ChromeOS-on-Linux (CrOS UI that runs on a generic Linux machine). The original CL caused these builds to use the Linux system Vulkan loader library which is most likely not built with MSAN. This caused MSAN violations when combined with an ANGLE built with MSAN [1]. The reland fixes this issue by only using the system libvulkan on real ChromeOS devices. [1] go/msan#false-positives Bug: b/292249282, chromium:1467779 Change-Id: Iafcd8d315a0baddcfbb847c3ad198f267887c8f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727448 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org>
Kenneth Russell d2236b58 2023-07-29T23:50:05 Support substituting translated shaders. Add dumpTranslatedShaders and enableTranslatedShaderSubstitution frontend ANGLE features, which allow ANGLE developers to prototype optimizations and other transforms without fully implementing them in the shader translator. Tested on macOS with ANGLE's Metal backend, but should work with the other source-level translator backends. Add documentation for pre-existing substitution of shader sources, and of translated shaders added in this CL. Fixed: angleproject:8280 Change-Id: I24d5ef88a479b23e81cc8169fe813c263acfc71f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4731553 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Lei Zhang 704469ca 2023-07-31T10:24:59 Remove unused BrokenClampThatShouldNotBeUsed() It has no references. Bug: chromium:1231569,chromium:1373621 Change-Id: Id1477100ed9ec4df28f7d28b09c9e04c1a49125c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734693 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Lei Zhang <thestig@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Mark Lobodzinski 0d886b62 2023-07-14T11:24:53 Check that MRTSS bit is supported by format Bit was added without checking ImageFormatProperties causing failures in some end2end tests. Bug: angleproject:8262 Test: Texture2DTestES3.TexStorage2D*/ES3_Vulkan* Change-Id: I7f9a4ee7c14610ee239ab1f86e4ba2c649ce76b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684549 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Ho b8ddba2a 2023-07-28T14:30:53 Use DisplayVkSimple on ChromeOS Currently, we always use DisplayVkHeadless on ChromeOS which can fail if the drivers do not support VK_EXT_headless_surface (e.g. Intel). This CL changes the default to use DisplayVkSimple which requires VK_KHR_display which is better supported. At the end of the day, CrOS never really uses Vulkan WSI, so the actual WSI extension used doesn't matter. Bug: b/292249282 Change-Id: I0f8cfafa635405850cda97c84ad45d3f6aec5103 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727450 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org>
Geoff Lang 7f6e5354 2023-07-31T13:02:35 Vulkan: Skip vertex conversion if the draw has 0 vertices. If the draw call start vertex is beyond the end of the buffer, vertex conversion will no-op and no conversion buffer is created. Just skip the entire conversion process in this case and bind the empty buffer. Fix GetVertexCount not taking 0 stride into account. Bug: chromium:1464690 Change-Id: Iaffcd329595c3319fe9cd5317aef2402f9db6b1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4734811 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov faca95f7 2023-07-27T21:28:08 Fix memory leak destroying never current Context Regression from the very old CL: Fix gl::Context::unMakeCurrent crashes https://chromium-review.googlesource.com/c/angle/angle/+/3017210 Memory leak may happen when releasing invalid Contexts in `destroyInvalidEglObjects()`. Bug: chromium:1171371 Change-Id: I282baa92cf3ce7faf1b4239c7ed4b85bd52543a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732893 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Alexey Knyazev 143fa68f 2023-07-27T00:00:00 Disallow read type conversions for signed 16-bit color buffers Signed 16-bit color buffers should not be converted to unsigned or 8-bit pixel types during readPixels operations. Bug: angleproject:8048 Change-Id: I27eaeb3d543732b5079bd53ef4fad1711ce3c3ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727392 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 0abd6f54 2023-07-27T10:48:38 Vulkan: Enable dynamic state on working Android drivers Fixes are flowing out in different channels and versions, so add a bit of Pixel specific logic. Test: angle_trace_tests, deqp Bug: b/287318431, b/285196249, b/286224923, b/285124778 Change-Id: Ifc73e2a42d1d060a83a2fb83bcf8bb999f0990b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4726502 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 35605ca7 2023-07-28T14:01:32 VVL VUID-VkDescriptorImageInfo-imageView update https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+/b6c0e88b9fab7e9a93f8c5391ebb26de38d9b9bc the case that we hit as VUID-VkDescriptorImageInfo-imageView-06711 is now VUID-VkDescriptorImageInfo-descriptorType-06713 Bug: angleproject:7865 Change-Id: Ib2981b49890491719df5b474aad2a7b4e597793a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727624 Commit-Queue: Solti Ho <solti@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Alan Zhao 391bfa35 2023-07-27T16:43:09 Fix a missing symbol issue with CaptureReplayTests The constructor for PlatformMethods is declared with __declspec(dllimport) when included in CaptureReplayTests.cpp, Ordinarily, this would fail to link on Windows because this test doesn't link against a library that has an exported definition. This test currently builds on Windows because Clang generates an available_externally definition in the object file for CaptureReplayTests.cpp for inlining. However, this doesn't build if inlining is disabled, and will no longer build once an upcoming Clang change is rolled in. To fix this, we add the config libANGLE_config to the test to change the symbol declaration to __declspec(dllexport), which appears to be what other ANGLE tests do. Bug: chromium:1468150 Change-Id: Ia92dde31ab624bbfe64d2e81fad18956abebc41b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728461 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov c319f34c 2023-07-28T12:30:18 Add VUID-vkCmdDraw-None VUID-vkCmdDrawIndexed-None VUIDs 08753 is now renamed to 09003 https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/6215 as it's being split into multiple cases Bug: angleproject:8242 Change-Id: I64aa75736fdb6ca9664da39f642e64f9f674b696 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727623 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Roman Lavrov <romanl@google.com>
Steven Noonan 613eefa3 2023-06-23T03:28:14 D3D11: fix invalidation of depth/stencil attachments This caused a crash when invalidating the depth/stencil attachments of the default framebuffer. But for non-default framebuffers, discarding depth/stencil just did nothing because "rtv.valid()" would be false. Bug: angleproject:8228 Change-Id: Ic22a29f521256af0ed4fc9c203cd6d750fcc00e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639494 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Roman Lavrov 179924cb 2023-07-27T20:45:26 Revert "Fix ExternalImageTarget EGLImage race" This reverts commit 8aa3ca9d177c0ed54926b769de7d0bce0f8482d3. Reason for revert: Confirmed to break Android's testDrawingHardwareBitmapNotLeaking in this single-commit roll: https://r.android.com/2679397 Original change's description: > Fix ExternalImageTarget EGLImage race > > Race may happen when ExternalImageTarget EGLImage is destroyed while its > GLES Texture/Renderbuffer target is modified/destroyed. > > Fixed by providing `egl::Image` with `egl::ContextMutex` even when > `context` is `nullptr`. > > This CL also changes `SharedContextMutex` merging rules when `mRank` is > equal - now priority goes to the `lockedMutex`. This is done to prevent > unnecessary `mRoot` update of Context mutex when merging with > `egl::Image` only mutex. > > Bug: angleproject:6957 > Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Bug: angleproject:6957 Change-Id: I860a8bfd6dd66eb549045391755a83483109ebbb No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727621 Commit-Queue: Roman Lavrov <romanl@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Charlie Lao 5446e87e 2023-07-24T16:46:56 Improve ProgramExecutable::load performance We are calling push_back for each vector inside ProgramExecutable. This causes c++ run time to constantly re-allocate storage and copy the vector over to new storage, and impacts performance negatively. Since the vector size is know when we load program from cache, this CL calls resize to the correct size first and then update each element as we walk over, thus reduces the vector storage reallocation. This CL reduces blade_and_soul_revolution frame time from 4.48 ms to 4.35 ms on pixel 7 pro. This CL also changes ProgramBinaryTest tests to use slightly more complicated program instead of the simplest program. Bug: b/275102061 Change-Id: I8d92117b07a9ad2d0851850e473ea1b86f9868f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713685 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov d5ddb710 2023-07-27T15:27:52 Suppress 2 end2end tests on iOS Metal GLSLTest_ES3.LiteralInfinityOutput/ES3_Metal GLSLTest_ES3.LiteralNegativeInfinityOutput/ES3_Metal Started failing when testing was switched to iPhone 14 iOS 17.0 Bug: angleproject:8278 Change-Id: Ieca08edd02ea4350fc8362cf98d43d8ab4f0adb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4725466 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Igor Nazarov 8aa3ca9d 2023-07-26T19:55:56 Fix ExternalImageTarget EGLImage race Race may happen when ExternalImageTarget EGLImage is destroyed while its GLES Texture/Renderbuffer target is modified/destroyed. Fixed by providing `egl::Image` with `egl::ContextMutex` even when `context` is `nullptr`. This CL also changes `SharedContextMutex` merging rules when `mRank` is equal - now priority goes to the `lockedMutex`. This is done to prevent unnecessary `mRoot` update of Context mutex when merging with `egl::Image` only mutex. Bug: angleproject:6957 Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Brian Ho af5bf5b8 2023-07-26T19:59:01 Revert "Search for system libvulkan on CrOS" This reverts commit b0b71d59391c99e70b40d7f331f530e6ea1970e5. Reason for revert: Broke MSAN build on ChromeOS-for-Linux Original change's description: > Search for system libvulkan on CrOS > > Currently, ANGLE searches in the "module" directory for libvulkan > during init on CrOS. The library doesn't exist at this location > (/opt/google/chrome/libvulkan.so), and we should instead just call > dlopen(libvulkan.so) to search the system library paths. > > Bug: b/292249282 > Change-Id: I7ab4803fe294e69f0ab8533ebc2fa43e25f189eb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4716242 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Brian Ho <hob@chromium.org> Bug: chromium:1467779 Change-Id: Ib3095b51559660ac438ba9af4327b08d334d19b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722705 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Auto-Submit: Brian Ho <hob@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Mohan Maiya 451b3c31 2023-07-26T10:45:36 Account for overridden features in ANGLEPlatformDisplay key Overridden features were not included in ANGLEPlatformDisplay key causing false cache hits when querying for displays with different feature override requirements. On platforms that reuse displays across end2end test runs it resulted in the tests using the wrong display. Bug: angleproject:8275 Change-Id: Id67f3cefb821d4d0be5945f66e34f366d0768346 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720468 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Yuxin Hu a0977311 2023-07-25T12:18:30 Disable the usage of VK_EXT_legacy_dithering Disable the usage of extension VK_EXT_legacy_dithering on ARM until the bugs in this extension is addressed. Bug: b/293136916 Bug: b/292282210 Change-Id: I1a548a2f6c44a78f8c66f706588a9985326217cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4718306 Reviewed-by: Solti Ho <solti@google.com> Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Kaiyi Li <kaiyili@google.com>
Geoff Lang 84f5295c 2023-07-25T14:24:51 Metal: Flush with NoWait when hitting renderpass count limits This flush was added as an optimization to handle a specific use case where many expensive GPU operations (clears and uploads) were queued without being flushed. The GPU would be idle during these periods. WaitUntilScheduled forced CPU/GPU synchronization when it was not needed. We just want to make sure the work is flushed so the GPU can pick it up later, not synchronize with anything external. WaitUntilScheduled is used on iOS still because the Chrome waterfall does not have coverage of iOS performance. Bug: chromium:1466696 Change-Id: Ia8938eddf5be5ce586a91ad759d1563182176dba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4717367 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Hailin zhang 4cae3b09 2023-06-02T23:52:15 Vulkan: disable pipline cache serialization In old NV drivers, Vulkan pipeline cache will only generate one single huge cache for one process shared by all graphics piplines in the same process, which can be huge. This is temp solution for nvidia driver cache issue. after driver version 520. nvidia fix the cache issue. this might affect second running performance. Bug: b/258207403 Change-Id: I3ea3e9196ad18fb1cec16c931eb744300d6cfdb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713207 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Geoff Lang 05707391 2023-07-25T14:29:26 Metal: Re-add flush to eglBindTexImage but as NoWait Removing the flush entirely caused performance regressions on a couple of benchmarks because the GPU became idle waiting for work. Re-add the flush but with NoWait so there is no CPU/GPU sychronization. Bug: chromium:1466696, chromium:1467392 Change-Id: I5e2d1ca7b7a4590e3e668d2cd214d09d28c4b085 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4718007 Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Brian Ho b0b71d59 2023-07-25T12:53:49 Search for system libvulkan on CrOS Currently, ANGLE searches in the "module" directory for libvulkan during init on CrOS. The library doesn't exist at this location (/opt/google/chrome/libvulkan.so), and we should instead just call dlopen(libvulkan.so) to search the system library paths. Bug: b/292249282 Change-Id: I7ab4803fe294e69f0ab8533ebc2fa43e25f189eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4716242 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org>
Shahbaz Youssefi 7ea61cb3 2023-07-23T21:53:50 GL: Complete EGL_ANGLE_external_context_and_surface This change implements two new entry points added for EGL_ANGLE_external_context_and_surface: glAcquireExternalContextANGLE and glReleaseExternalContextANGLE. These functions remove the need to overload eglMakeCurrent for the purposes of syncing to and from the external context. Bug: angleproject:5509 Change-Id: I5d46299ee0c8addaef7066914a8a8aacb0ea2c17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706027 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 2d5fb09d 2023-07-22T22:34:20 Stubs for EGL_ANGLE_external_context_and_surface Bug: angleproject:5509 Change-Id: I8e2395784abcd2b4e3e1f888e70a879ef49287bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706026 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 2d999f74 2023-07-24T11:53:02 Android: Add a way to prepare traces without running tests Example: % out/Android/angle_trace_tests --gtest_filter='*gacha_life' --prepare-only ... Prepared traces: {'gacha_life'} Can be used as a setup for running restricted_trace_perf.py Bug: b/292249127 Change-Id: I901c086a19e1d182c64ec4150ced98c198e21c4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711826 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Igor Nazarov 5e21d7f0 2023-07-14T14:39:04 Vulkan: Remove dead code Dead code remained after this CL: https://chromium-review.googlesource.com/c/angle/angle/+/3998747 Vulkan: Remove unused ShaderAndSerial Bug: b/257116399 Change-Id: Ica3b941fa98886dff309b5eb1734a1718fa8f6fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4711585 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 5a065592 2023-07-20T17:42:02 Metal: Don't flush on eglBindTexImage. There is nothing that needs synchronization at this point. About 30% of ANGLE's CPU time is spent here. Bug: chromium:1466696 Change-Id: I4993804823790ee9cc38530dea334a6fa3abe7f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706926 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Geoff Lang 430a4f55 2023-07-21T13:45:52 Fix read size validation for RGBX formats. GL_RGBX8_ANGLE is the only format where the upload format is 3-channel RGB, whilethe download format is 4-channel RGBX. As such, the internal format corresponding to format+type expects 3-byte input/output. The format is fixed here for readPixels to output 4 bytes per pixel. Bug: chromium:1458046 Change-Id: Iec737ed64bade003cfab50dc5f595eb4875e81e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706957 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 938ee1e8 2023-07-21T16:16:23 Vulkan: legacy_dithering disallow reactivate when breaking RP Hitting the assert in dEQP GLES2.functional.fragment_ops.random.0: https://crsrc.org/c/third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp;drc=52fe3116ead9a5de51ddad17fcb14bf8ecb3a69d;l=2347 Bug: b/292259684 Change-Id: Ib40b90dde3b271c714b6181e4ba4d70f3e1b5e86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706174 Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Geoff Lang f586ec98 2023-07-20T17:24:09 Metal: Validate max render target size without an allocation We would allocate a MTLRenderPassDescriptor for validating an internal error case only to throw it away immediately afterwards. This happened on every new render pass. This allocation/release amounts to about 10% of ANGLE's CPU time when running Chrome. Bug: chromium:1466696 Change-Id: I0bbe086c0b8006d2ff15ae57f25b591f791acb60 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706925 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 085f25bb 2023-07-20T15:24:56 GL: Protect against drivers returning 0 max clip distances. Some Android devices in the wild were hitting the assert that maxClipDistances must be greater than 0 if ANGLE_clip_cull_distance is exposed. Protect against this by disabling various clip/cull extensions if they don't meet the requirements for number of distances. Bug: angleproject:7904 Change-Id: Ic6a5e959437fa7aad5302a12cf8c92d1d18024b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706684 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2e190280 2023-07-20T14:12:03 GL: Extend disable of EXT_clip_control to Mali-G51. The G51 appears to be the only other device with this issue. Bug: chromium:1434317 Change-Id: Iffbc95a7f612c1862e9d129649a6211f488df6c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706564 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org>
Jason Macnak 8138ae9b 2023-07-07T14:16:07 Vulkan: EGL's DISPLAY_P3_PASSTHROUGH -> VK's DISPLAY_P3_NONLINEAR From https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt If its value is EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT, then a non-linear, sRGB encoded Display-P3 color space is assumed Bug: b/289125521 Test: cvd start Test: cts -m CtsViewTestCases -t android.view.cts.TextureViewTest#testGetBitmap_8888_PassthroughP3 Change-Id: I07c77c86bbc0d82923ad7435cd2a5558770cd2e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4673910 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
Mohan Maiya 4515b270 2023-07-18T14:39:42 Account for implementations that support large gl_PointSize values The PointSizeAboveMaxIsClamped end2end test intends to render a point with gl_PointSize that is 2x the implementation's max value to test if this value is clamped correctly. However, when the max gl_PointSize is large enough, like with AMD drivers, it results in the center of the point being outside of the viewport which according to the spec can be discarded. Update the test to render to a framebuffer, instead of the default window surface, one large enough to contain a point of implementation defined max point size. Bug: angleproject:2113 Test: PointSpritesTest.PointSizeAboveMaxIsClamped* Change-Id: I724440495bf5a3c93c76cc28109937a56c45f274 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4697681 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Phan Quang Minh ef4327f6 2023-07-12T09:12:03 Vulkan: Make UtilsVk::copyImage copy YCbCr images properly This changes the descriptor binding for the image from VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE to VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER for YCbCr source textures and ensures that the copy pipelines and descriptor sets for YCbCr source textures are created with the appropriate YCbCr samplers, and use the `texture()` function instead of `texelFetch()` for YCbCr images. Bug: angleproject:8252 Change-Id: Ife3e230d3669b275f4e0fab1922d75b6b6c4f8bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4675806 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Hailin Zhang 6eea5ff4 2023-07-18T12:52:37 Vulkan: fix default MSAA framebuffer clear issue. Bug: b/290813597 Change-Id: I134c5a99382ca30dbd885a17dfa3c7ac227480ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4698113 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Shahbaz Youssefi 52fe3116 2023-07-17T16:20:54 Vulkan: Deduplicate share group's context set tracking Bug: angleproject:8224 Change-Id: I7a59a37229682fb91ff777f31e02e05d7ab2b80f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690345 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Phan Quang Minh 5eb30562 2023-07-17T07:23:03 Reland "Vulkan: Remove platform restriction of EGL_ANDROID_native_fence_sync" Instead of enabling it on all non-Mac platforms, this time enable it only on Linux-kernel based platforms (Linux, ChromeOS, Android). This should avoid interfering with Fuchsia. Original change description: > Remove platform restriction of EGL_ANDROID_native_fence_sync > extension except for Mac OS. > > Bug: angleproject:7834 > Change-Id: I116f44d8baca9cdcdd90013ca173b04461d06ae1 > Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4027707 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: mohan maiya <m.maiya@samsung.com> > Commit-Queue: mohan maiya <m.maiya@samsung.com> Bug: angleproject:7834 Change-Id: Ida89100e8c30c3a2df5a0a8d6d0c9b7e7ce3e412 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4687427 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 85095480 2023-07-17T12:31:48 Android: Update script with sync progress When running lots of traces, there can be a long pause when syncing traces to the device. Add a small update so it is clear that work is happening. Example output: I12:21:51.806619Z Syncing 1945_air_force trace (1/238) I12:21:52.178401Z Syncing 20_minutes_till_dawn trace (2/238) I12:21:52.463608Z Syncing 2_3_4_player_mini_games trace (3/238) ... Test: angle_trace_tests Bug: b/276742336 Change-Id: Id81d69b3fc678cb94c2e683a907c44950ead2117 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690745 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Saifuddin Hitawala a64537f9 2023-07-14T17:06:37 Angle: Copy multiplanar d3d11 texture for readPixels This change performs a copy to an intermediate texture for multiplanar d3d11 textures before reading from the source texture. This is needed as we cannot read a plane directly from a multiplanar d3d11 texture. It also passes the correct format for the plane for multiplanar formats when initializing the texture instead of getting the format using the internal format. We also add a unittest performing glReadPixels for NV12/P010/P016 formats. Bug: angleproject:7998, chromium:1463924 Change-Id: I9a1708f5a846ace28ac3b6593ea80f1863348333 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4688118 Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org> Auto-Submit: Saifuddin Hitawala <hitawala@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 9f9284b7 2023-07-17T15:41:27 Move ShareGroup to its own files Bug: angleproject:8224 Change-Id: Id6d272018bb5ee8c3e35488f641efa4d99fa836d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690003 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 9aadc7aa 2023-07-13T11:44:51 Metal: Require MSL 2.1. We had previously shipped both MSL 2.0 and 2.1 shaders to support MacOS 10.13 (MSL 2.0 only) while also supporting the stencil blit fast path that MSL 2.1 provides with the has_shader_stencil_output feature. Each configuration of precompiled shaders is ~300kb so we will drop support for MacOS 10.13 and only ship the MSL 2.1 shaders. Rework of the disablement for NVIDIA and GPU family 1 to be more readable. The features themselves are always true because "disable on NVIDIA" is always true and the check for "is NVIDIA" is moved to the code which fails the initialization. Bug: angleproject:8258 Change-Id: Icc8c69540e43fd2b0b237fffbfe170bb3422903f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681130 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 0518a3ff 2023-07-14T14:53:39 Android: Simplify power metrics collection Also check for missing values and dupes Bug: b/291604008 Change-Id: I909ca2bf53d3aa0bf5ba66f7168e9925cfd7da3c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685323 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi bebb83d9 2023-07-14T12:30:15 Translator: Limit variable sizes vs uint overflow Bug: chromium:1464680 Change-Id: I90e204db1ce57c87ed5fe19912e4c157cee18a90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685236 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 05ea1147 2023-07-14T16:49:24 Vulkan: Bugfix in gl_FragData array redeclaration Both OpenGL ES and Vulkan spec allows implementations to limit the number of output attachments when dual-source blending is enabled. Account for this limit when setting gl_FragData array length by re-declaring the gl_FragData array size to match maxFragmentDualSrcAttachments value. Bug: angleproject:5537 Test: EXTBlendFuncExtendedDrawTest.FragData/ES2_Vulkan Change-Id: I5a462344f4c4faf850f56e9c5d4c392370d3d010 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4688396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi bd8001e5 2023-07-17T11:32:23 Fix deadlock on device loss Some backends generate a device loss (propagated to all contexts) while querying the device status. The latter is held under a lock, and the former would attempt to hold the lock when marking the calling context with device loss. Bug: chromium:1465262 Change-Id: I55fd96f3573732953daf2a305b0120dbcae6ea30 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690063 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov c0f2f71e 2023-06-27T16:00:09 Use VK_EXT_legacy_dithering when available instead of emulation Yields improvement in gpu power: http://b/284462263#comment45 Bug: b/284462263 Change-Id: I5bfd115557b6baac17c05639118feaebf19c5cd4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4652590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Yuly Novikov d04dda15 2023-07-17T14:29:44 Skip WebGL2CompatibilityTest.DrawWithZeroSizedBuffer on iOS GL Bug: angleproject:8264 Change-Id: Icac83200b8e9aa35ba3e85be8b34bd45e616a8bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685572 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Dave Tapuska 507f67cc 2023-07-14T15:23:48 Fix cfi issue with Angle invoking worker pool Mark the function as ignoring cfi-icall because of broken upstream builds. https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20CFI/25615/overview Bug: angleproject:8256 Change-Id: I63b5fee27bc0565dc6881bd83fd284abc7a9f1f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685324 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Roman Lavrov c5b7fc36 2023-07-14T15:39:25 Ensure settings get cleaned up on exceptions Before this change, Ctrl-C or another exception leaves settings behind Bug: b/284462263 Change-Id: I5694cbb2ca7d43a4173099d126e6695e07ec9d2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685238 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Yuly Novikov 97368229 2023-07-14T17:09:15 Skip dEQP-EGL.functional.native_[color|coord]_mapping.native_window.* Skip on all platforms instead of the individual suppressions, that let test failures to slip into build failures. Bug: angleproject:8261 Change-Id: I16a5eaceb5fe49dc4e23233bfe4fe146b77a95f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685567 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Geoff Lang 972f8107 2023-07-14T12:05:40 Reject program binaries when the renderer string changes If the underlying driver changes, reject program binaries from the old versions. The driver is supposed to do this for us (on OpenGL, at least) but this adds some extra protection. Bug: angleproject:4981 Change-Id: Id9486d8e6f9136970c0d7c37d59dea5d43b0a50e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685317 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c0cd00e8 2023-07-12T13:51:11 Sync all framebuffer attachments when checking completeness. If the backend requires that a framebuffer is synchronized before checking backend completeness, make sure all attachments are synchronized too. GL has completeness rules based on GL_BASE_LEVEL and GL_MAX_LEVEL of texture attachments which are not syncrhonized until the textures are. If they are left un-sychronized during completeness checks, the driver will tell us that the framebuffer isn't complete. Bug: chromium:1455725 Change-Id: I7c3bf6a38f63feaa863f4d8914c3655e286dd768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678286 Reviewed-by: Brian Ho <hob@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 5032f08b 2023-07-13T15:23:49 Translator: Unconditionally limit variable sizes ... instead of just for WebGL. This is to avoid hitting driver bugs that were prevented with this check for WebGL on a compromised renderer that can create non-WebGL contexts. Bug: chromium:1464682 Change-Id: I47a9d9690bd1ca9d701391fb7d70932f2dbe7334 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685307 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>