include


Log

Author Commit Date CI Message
Gregg Tavares 968041b5 2022-08-19T12:11:23 Metal: Optimized BufferSubData per device Adds a staging buffer path which means there are 4 paths for bufferSubData. 1. direct copy * get a pointer to the buffer * copy the new data to the buffer * if the buffer is managed, tell metal which part was updated 2. use a shadow copy * copy the data to a shadow copy * copy the entire shadow to a new buffer * start using the new buffer 3. use a new buffer * get a new buffer (or unused) * put the new data in the new buffer * blit any unchanged data from the old buffer to the new buffer * start using the new buffer 4. use a staging buffer * get a staging buffer * put the new data in the staging buffer * blit from the staging buffer to the existing buffer. Further, there are 3 types of memory storage modes. Managed, Staged, Private. Based on the GPU type different storage modes and different paths in different sitatutions are more performant. So, add feature flags to select paths by GPU. Bug: angleproject:7544 Change-Id: I741dd1874201043416374194bd2001ded8dbd9b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3842641 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Charlie Lao e8f9355c 2022-10-13T16:51:32 Vulkan: Add forceWaitForSubmissionToCompleteForQueryResult flag Add forceWaitForSubmissionToCompleteForQueryResult feature flag and enable it for ARM. Also force host wait if async submission is enabled. Bug: b/253522366 Change-Id: Ie2d7373930f1a2b3fc761d2f8d2df8fa84983c54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3954044 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Charlie Lao 76f377c5 2022-06-17T16:05:16 Vulkan: Break renderpass when switch from query to non-query getQueryResult will wait for query result to be available, which means a potential CPU bubble if the result is not yet available. On tiler GPUs it will at least wait for renderpass to complete. Usually query enabled draws are very tiny (usually just draw a point to see if it is occluded or not), and query disabled draws are expensive. Some apps do issue a glFlush when switch from query draw to non-query draw, but app like dead_by_daylight does not issue such flush. In order to reduce the bubble, this CL ends renderpass and issue a flush when we switch from query enabled draws to non-query enabled draw so that the result will be available much earlier, this reduce the CPU bubble. This result in dead_by_daylight frame time improves from 5.45ms to 3.5ms (35% improvement). Bug: b/250706693 Change-Id: Ia3a32a9fb336e6f256809b3cad83f61a45415fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931739 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi b3b855d2 2022-10-09T21:39:16 Vulkan: Features for two exts - VK_EXT_graphics_pipeline_library - VK_EXT_pipeline_protected_access Bug: angleproject:7369 Bug: angleproject:7714 Change-Id: I42b5b5a2758b32625dc12352d521cfa1dff1aa90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3939919 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 2d31fe98 2022-09-22T21:04:22 Implement PLS on Apple Silicon Implements a subset of EXT_shader_framebuffer_fetch in the Metal translator that is sufficient to support pixel local storage. Metal's "programmable blending" feature is available on all Apple family GPUs beginning with version 2. Support for non-Apple GPUs will come later via readWrite textures, which can also be coherent by annotating them with [[raster_order_goup(0)]]. Bug: angleproject:7279 Change-Id: Ic74f6c0d21e87eb919e1f487163388d08d126857 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3916794 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Gregg Tavares <gman@chromium.org>
Chris Dalton a7dc51f2 2022-10-01T08:49:11 Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Hailin Zhang 836cc5e2 2022-09-09T22:06:22 Vulkan: add etc to bc compute transcoding. use compute shader to transcode etc format to bc format. Bug: b/243398683 Change-Id: Idbd0820a2df8d92fe690055dae2933bc559e9bfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888501 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Chris Dalton a81679bc 2022-09-26T23:56:34 Support EXT_shader_framebuffer_fetch on GLES All the frontend functionality for EXT_shader_framebuffer_fetch is already present, but only supported on Vulkan. This change wires it up for the native GLES backend as well. Bug: angleproject:7279 Bug: angleproject:7703 Change-Id: Ie1fce79e08a78662c8af65d33f3d8417c96cf58e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920577 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Robert Mader bf22843c 2022-09-22T16:58:37 EGL: Update EGL headers In order to implement EGL_EXT_device_drm_render_node Bug: angleproject:7686 Change-Id: If9b0e2852a816071bad79c103f1e291dd43eb45c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3913209 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Robert Mader <robert.mader@collabora.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 01285f16 2022-09-26T23:19:28 Remove Platform.h Overloaded name. Causing trouble with gles1's platform.h on case-insensitive file systems despite the different case. Bug: angleproject:3408 Change-Id: Icc1644a4c6a9c9076a2bbafbfb1d6eac578b731a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920895 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 163e56e4 2022-09-20T00:40:55 Allow feature overrides to end in * (wildcard) Makes it easier to apply overrides to features with long names. Also works around Android's limit of 92 characters for debug properties. Bug: b/238024366 Change-Id: I8f417287f92b2439de1a7b7d6abbaf9e61b405e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906222 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Geoff Lang 25bad36c 2022-09-23T13:23:57 Metal: Remove unpackLastRowSeparatelyForPaddingInclusion This speculative fix did not work. Bug: angleproject:7573 Change-Id: I345db1746f8725d82420aabffb37c8dd01230a34 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915182 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 70e5e90f 2022-09-23T13:17:34 Metal: Avoid locking IOSurfaces in glReadPixels on AMD. The AMD driver tends to crash when locking IOSurfaces. Avoid this by using the copyIOSurfaceToNonIOSurfaceForReadOptimization feature to do a texture-texture copy before reading back data to the CPU. This is a *speculative* fix due to seeing crashes in the ClientLockIOSurface function in the AMD driver. Bug: angleproject:7573 Change-Id: Ia120f2a96eed65431b5f8a99cf1da7d7e85da639 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915181 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Geoff Lang 2aa52da7 2022-09-23T13:15:44 Metal: Upload IOSurface data with staging buffers on AMD Crashes have been seen in the AMD driver when locking IOSurfaces. Avoid this by always using a staging buffer and doing a GPU-GPU copy for uploading client side data to IOSurfaces. Bug: angleproject:7573 Change-Id: I4d981a24554a755a7248199699b486d98cbad83d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915180 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Dan Glastonbury d2a58f00 2022-09-08T14:19:21 EGL: Implement eglCopyMetalSharedEventANGLE Add eglCopyMetalSharedEventANGLE function to the ANGLE_metal_shared_event_sync extension. This brings the extension on par with the EGL_ANDROID_native_fence_sync extension. eglCopyMetalSharedEventANGLE allows for copying the Metal event object from EGLSync objects implemented by the ANGLE Metal renderer. This function follows Objective-C convention for "copy" methods and increases the retain count of the Metal event object. The EGL API user is thus responsible for ensuring to release the returned object to avoid memory leaks. Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.* Bug: angleproject:7561 Change-Id: I8c35b559014b85cb8c6a0e76ac2ab7891eed5da0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3881423 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Dan Glastonbury a89f678f 2022-06-16T13:59:16 EGL: Implement ANGLE_metal_shared_event_sync on metal Implement creation of fence sync object taking an external MTLSharedEvent and optional value to use when signaling completion of prior commands. Extended end2end test suite with metal shared event test cases. Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.* Bug: angleproject:7561 Change-Id: I0e72b5417275a20a24e535670ceb995ecc87abcb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3865060 Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi ba3b4515 2022-09-15T01:06:51 Vulkan: Implement GL_ANGLE_logic_op Enabled if the logicOp device feature is available. According to gpuinfo, it's pretty much universal except for ARM. Bug: angleproject:7654 Change-Id: I4808b519fdd6273b2f8c1bb17f59517eb65bfe8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898317 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi de73f7cd 2022-09-14T22:27:28 Introduce GL_ANGLE_logic_op This extension exposes the desktop GL glLogicOp function as a GLES extension. This is supported by Vulkan through the logicOp feature as well. The goal is to directly use this extension in GLES1 emulation where the backend supports it, avoiding a more costly fallback. Bug: angleproject:3862 Change-Id: I7ed436cdf401437157ca9724168849b4c819b91b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898310 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton 493bab09 2022-09-15T14:20:41 Add an ShPixelLocalStorageType enum Adds ShPixelLocalStorageType to ShCompileOptionsPLS and adds a getNativePixelLocalStorageType() call to ContextImpl. For now this enum only tells the translater whether PLS formats needs to be packed into r32 images, but it will soon also be able to select framebuffer fetch, native pixel local storage, and other PLS implementations. Bug: angleproject:7279 Change-Id: Ifbd419b20550b8711ae3044782177806796216f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900498 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano a8a04ce1 2022-08-16T17:59:20 Vulkan: Add supportsPresentation feature Some platforms do not support presentation through any Vulkan queue. In this case we should not transition the color image layout to present. Bug: angleproject:7217 Change-Id: I71cad0e52bc1fdb531de5a34e917a1862a4cf070 Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com> Suggested-by: Sungyong Choi <sywow.choi@samsung.com> Suggested-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3853598 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 04f46f39 2022-09-12T10:15:16 Reland "Generate stubs for ANGLE_shader_pixel_local_storage" This is a reland of commit 8208e8a234d05b413d79e7a93b6a428adea41b33 In Take 2 we omit the GLenum groups PixelLocalLoadOpANGLE and PixelLocalInternalFormatANGLE. We can add these back once the extension is published and we can update Khronos's gl.xml, or else once we figure out how to make this work without updating the Khronos gl.xml. Original change's description: > Generate stubs for ANGLE_shader_pixel_local_storage > > Bug: angleproject:7279 > Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972 > Commit-Queue: Chris Dalton <chris@rive.app> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7279 Change-Id: I02f42c1cfc685ed95164744108e0c185d3a7fefb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900491 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 8c45e3c4 2022-09-15T01:07:47 Revert "Generate stubs for ANGLE_shader_pixel_local_storage" This reverts commit 8208e8a234d05b413d79e7a93b6a428adea41b33. Reason for revert: Compile failures Original change's description: > Generate stubs for ANGLE_shader_pixel_local_storage > > Bug: angleproject:7279 > Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972 > Commit-Queue: Chris Dalton <chris@rive.app> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7279 Change-Id: Ic9a232f9d722b42e615de3827ce118616f3acc71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3897425 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Chris Dalton <chris@rive.app> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app>
Chris Dalton 8208e8a2 2022-09-12T10:15:16 Generate stubs for ANGLE_shader_pixel_local_storage Bug: angleproject:7279 Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 09446a6b 2022-09-02T11:29:32 Metal: Upload the last texture row separately on AMD. Speculative fix for crashes seen when uploading texture data on AMD. Port of the unpackLastRowSeparatelyForPaddingInclusion workaround from the GL backend. Currently constrained to client data 2D uploads to non-compressed textures. Bug: angleproject:7573 Change-Id: Idd036b92619d309e5b2a8062043e8644f4d5b2e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3870655 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Gregg Tavares 662226a3 2022-09-06T14:12:26 Metal: Preemptively Start Provoking Vertex CmdBuffer on AMD There seems to be a bug in older AMD drivers and this appears to work around it Bug: angleproject:7635 Change-Id: I1b22e4b7d5d1ce0d405e422d08d33eeeb731050a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3877666 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Ian Elliott 9aeb6311 2022-08-29T10:50:01 Revert "Extra buffer logging/checking on Android Cuttlefish" This reverts commit 5cb05e0482ed1a2c4048f76c1a7fd444849410d8. The root cause was found, and this extra logging/checking is no longer needed. Bug: b/236098131 Bug: b/245339714 Change-Id: Ibefbeec30be974788789650f2dc86696a6eba11a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3862408 Auto-Submit: Ian Elliott <ianelliott@google.com> Reviewed-by: Jason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
Chris Dalton d0fad24c 2022-08-30T23:24:06 Add noncoherent PLS tests Coherent pixel local storage is so widely supported now that we have a testing gap on the noncoherent version. This change adds backend features to disable the extensions we use for fragment synchronization and tests that disable them. Bug: angleproject:7279 Change-Id: If71a1a1016922cb9e3b68024dd2616483c700395 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3866163 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield ba4b6913 2022-08-23T09:34:27 Fix data race in BlobCache * Re-enable shader cache feature * Improve BlobCache thread-safety test * Improve EGLProgramCacheControlTest to not check the size of the BlobCache, since the shader cache interferes with this. * Include the arguments to ConstructCompiler() and Compile() in the key hash for the shader cache. Bug: angleproject:7036 Change-Id: Ied4e11f9160552f2f9358d99b5656315239ba856 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3851161 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Chris Dalton 9d41585e 2022-08-12T14:20:34 Make PLS coherent on D3D 11.3 Adds a new internal memory qualifier to the compiler called "rasterOrdered", which we set in RewritePixelLocalStorage.cpp when D3D 11.3 Rasterizer Order Views are supported. The HLSL translator then generates RasterizerOrderedTexture2D<> instead of RWTexture2D<> when this qualifier is set. Bug: angleproject:7279 Change-Id: I39b8c3279b7bff93b7e57272e8fb84d9c0312616 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3830288 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi 5bcfad04 2022-08-25T10:32:57 Vulkan: Add a handful of features This commit bunches a couple of features in one to reduce merge conflicts. Bug: angleproject:4836 Bug: angleproject:5845 Bug: angleproject:7162 Bug: angleproject:7319 Bug: angleproject:7604 Change-Id: Icbb33f5b6d61822c5f4a61f08078bb2de4e7d2fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856646 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield d89c027e 2022-08-22T11:40:40 Add unimplemented GLX entry points to desktop GL Test: Run glxgears and hit unimplemented in ANGLE Bug: angleproject:7533 Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mohan Maiya aa2a558e 2022-08-23T09:47:02 Vulkan: Add support for setting timestamp surface attribute On Android the EGL wrapper handles most of the functionality required by EGL_ANDROID_get_frame_timestamps. However if for some reason the swapchain is recreated, the timestamp state would be lost resulting in stuttering. Introduce EGL_ANGLE_timestamp_surface_attribute extension that adds support for toggling the EGL_TIMESTAMPS_ANDROID attribute of a surface. Cache this state and recreate the swapchain accordingly. Bug: angleproject:7489 Test: EGLSurfaceTest.TimestampSurfaceAttribute* Test: dEQP-EGL.functional.get_frame_timestamps* Change-Id: I3660f7137c006d904164d243a682a4ff520eabd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3753396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi 952d6e8f 2022-08-21T21:51:03 Vulkan: Workaround ARM driver bug with dynamic vertex strides According to ARM, vkCmdBindVertexBuffers2EXT is broken when more than one attribute binding is involved. In this change, the vertex strides dynamic state is avoided altogether on ARM. Bug: fuchsia:107106 Change-Id: Ie41fc07037083214d2dc99e4ed062485384911c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3844640 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lingfeng Yang caf2b427 2022-07-01T18:17:30 Vulkan: Add feature to use PASS_THROUGH for EGL_NONE color spaces This is a temporary solution to fix media tests until ANGLE also has the ability to query the "preferred color space" from Surfaces. Bug: b/235995022 Test: Launch Cuttlefish with this change and the feature enabled with aosp/2167231 Test: cts -m CtsMediaCodecTestCases -t android.media.codec.cts.EncodeDecodeTest Test: cts -m CtsMediaCodecTestCases -t android.media.codec.cts.DecodeEditEncodeTest Change-Id: I17d1a2c1701cd1707b34f5bf2f222e9ad57c7a61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3770291 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Jason Macnak <natsu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi 4330a827 2022-08-19T02:59:26 Reland "Vulkan: Use VK_EXT_primitive_topology_list_restart" This reverts commit 29d18b303189bf31b3af3a85c3df6013114eebc8. Reason for revert: Fixed VVL suppressions not working Original change's description: > Revert "Vulkan: Use VK_EXT_primitive_topology_list_restart" > > This reverts commit e79c9cd63053b6cb7c33235f3a0a0310255df073. > > Reason for revert: Causing timeouts on some headless tests: anglebug.com/7579 > > Original change's description: > > Vulkan: Use VK_EXT_primitive_topology_list_restart > > > > From ANGLE's point of view, there is nothing to do with this extension > > other than enable a feature that silences a validation error. > > > > Bug: angleproject:3832 > > Change-Id: I094343d09c322e2848a65a5bc775d0f21388fb46 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3562380 > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: mohan maiya <m.maiya@samsung.com> > > Bug: angleproject:3832 > Change-Id: Ifec7c9eaea1d3a949f15e0b6d868742f53cf8377 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3838391 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:3832 Change-Id: Ia79b1f3b716f0df1991f605704135b4af48fb639 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3841366 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 29d18b30 2022-08-18T18:18:04 Revert "Vulkan: Use VK_EXT_primitive_topology_list_restart" This reverts commit e79c9cd63053b6cb7c33235f3a0a0310255df073. Reason for revert: Causing timeouts on some headless tests: anglebug.com/7579 Original change's description: > Vulkan: Use VK_EXT_primitive_topology_list_restart > > From ANGLE's point of view, there is nothing to do with this extension > other than enable a feature that silences a validation error. > > Bug: angleproject:3832 > Change-Id: I094343d09c322e2848a65a5bc775d0f21388fb46 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3562380 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: mohan maiya <m.maiya@samsung.com> Bug: angleproject:3832 Change-Id: Ifec7c9eaea1d3a949f15e0b6d868742f53cf8377 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3838391 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield 955adb77 2022-08-12T10:14:48 Cache compiled shader By storing the compiled shader in the blob cache, the time to recompile the same shader is reduced. Based on work by <hckim.kim@samsung.com> Bug: angleproject:7036 Change-Id: I884ae40e715c49a9ccd12903012e8327811e3557 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3808235 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi e79c9cd6 2022-03-30T23:06:54 Vulkan: Use VK_EXT_primitive_topology_list_restart From ANGLE's point of view, there is nothing to do with this extension other than enable a feature that silences a validation error. Bug: angleproject:3832 Change-Id: I094343d09c322e2848a65a5bc775d0f21388fb46 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3562380 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com>
Chris Dalton 4a636cdd 2022-07-20T22:44:30 Require all PLS formats to consume exactly 4 bytes of storage D3D 11.0 UAVs only support R32_FLOAT, R32_UINT, R32_SINT formats. EXT_shader_pixel_local_storage explicitly states that all PLS variables consume exactly 4 bytes. ESSL images can only have both read and write access if their format is r32f, r32i, r32ui. (We were able to circumvent this via aliasing, but it was a huge source of bugs.) There is a large precedent for only supporting 4 bytes of storage in the capabilities we use for PLS, so this CL removes support for all PLS storage formats that are not 4 bytes. It also implements an "R32" mode for PLS, that does manual packing and unpacking of r32* image formats. If the application wants larger formats, it can always define multiple PLS planes and piece them together. Next up we ought to be able to support rg16* types with more packing/unpacking. With aliasing gone, and with a bit of tweaking, the PLS tests now pass on the Pixel 4 GLES bot. Bug: angleproject:7279 Bug: angleproject:7388 Bug: angleproject:7524 Bug: angleproject:7527 Change-Id: I6b8f62c2428ade6cb5413e33360d734e55dda0eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782579 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton fa3d7d5c 2022-08-05T00:57:40 Make PLS coherent on Vulkan Uses the VK_EXT_fragment_shader_interlock extension to make the shader image implementation of PLS coherent on Vulkan. This extension is supported on AMD, Apple, NVIDIA, and Intel. Bug: angleproject:7279 Change-Id: Ic0253eb20932eb6be0b1f433ba454e48b57be2f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813816 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 876da4ae 2022-08-09T22:30:24 Vulkan: Query support for VK_KHR_imageless_framebuffer In preparation for using it. Bug: angleproject:7553 Change-Id: I579af8ce2c0dd1d58bf750ee494e06a071b798fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3823620 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi f7d4c614 2022-03-30T23:33:27 Vulkan: Use VK_EXT_primitives_generated_query This Vulkan extension implements OpenGL's primitives generated query. The heavy lifting in ANGLE's implementation was done when this query was emulated with pipeline statistics query. This change simply switches pipeline statistics query usage to this dedicated query when available. Bug: angleproject:5430 Change-Id: I5d2c7d64e4627bcbd33d428d6a7c836b1129e5fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813815 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Chris Dalton 7c6a5459 2022-08-10T10:09:18 Rename ShFragmentSynchronizationType::None -> NoSynchronization Use a less generic name. X11.h contains: #define None 0L /* universal null resource or null atom */ Bug: angleproject:7279 Change-Id: I7d245b9f771211dea151bfc12363a03374264ac4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3824717 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 493b5aff 2022-08-09T14:57:24 Vulkan: Workaround ARM bug with stencil write mask Bug: angleproject:7556 Change-Id: I0aa17c178071cc15d8ee15f700b0c4932819c72a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3821367 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi 8050079c 2022-08-08T16:35:10 Vulkan: Remove basicGLLineRasterization * Removed basicGLLineRasterization from the ANGLE features. * Removed "viewport" from the extended driver uniform classes. Bug: angleproject:2830 Bug: angleproject:7558 Change-Id: I289b1e2b536a6bd0c1ab24844835221e617a296d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3818165 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6f80f0f0 2022-08-06T02:29:19 Translator: Clean up the compile flag passing interface Historically, compile flags were sent to the translator as a bitmask. Recently, we were getting close to running out of bits. Additionally, direct-to-metal work had started to introduce constants to be passed to the translator, which were misplaced in ShBuiltInResources and Caps. Recent work on Pixel Local Storage adds even more constants, aggravating the situation. In this change, the interface to passing compile flags is reworked. A struct is passed (instead of a bitmask) that has one bit for each flag. This can be indefinitely extended. Additionally, the constants needed by metal and PLS are also placed in this struct. In turn, the backends can set these options directly, and don't have to hack them into Caps to further get hacked into ShBuiltInResources. Bug: angleproject:7559 Change-Id: If93f1e1b8818ad3a0ac708ab04ab93b4b397d114 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812562 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 861149c7 2022-08-03T15:43:29 Make PLS coherent on desktop OpenGL Implements ANGLE_shader_pixel_local_storage_coherent using fragment shader synchronization extensions: NV_fragment_shader_interlock INTEL_fragment_shader_ordering ARB_fragment_shader_interlock With these extensions combined, we get coherency all 3 big desktop vendors: NVIDIA, Intel, and AMD. Bug: angleproject:7279 Change-Id: Ie20b251fb772898e89994b799640f1f2806581eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3773990 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bo Liu 57ccd974 2022-06-30T16:47:52 Make limit_max_texture_size_to_4096 webgl only Bug: chromium:1319451 Change-Id: I7dedeb8d738c1070e650650e893d57984a9e7956 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739439 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 3ccaddf9 2022-07-26T10:02:01 Vulkan: EXT_YUV_target: layout(yuv) support This CL adds support for layout(yuv) in the shader, via a new decoration. The SPIRV decoration enum number is WIP and depends on final spec. The decoration is only active if enabled via a flag in ShaderLang, which will be connected with the feature supports_yuv_target in a future CL. Bug: b/223456677 Change-Id: I29a724e689d1336a3e42c83d7afa944a11e07353 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3765890 Auto-Submit: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Lingfeng Yang 6142b839 2022-07-26T13:57:53 Vulkan: EXT_YUV_target: add vk feature This Vulkan feature will be set to true once we detect support from underlying Vk driver (method TBD). Bug: b/223456677 Change-Id: I5003068c3119f43befb92579d4b656e3a9346363 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3788564 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi be708446 2022-07-25T15:24:52 Vulkan: Remove the bindEmptyForUnusedDescriptorSets workaround Only applied to older Qualcomm-based phones. Bug: angleproject:2727 Change-Id: I37a611e2ff79d898eff9401467407543f3c690b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3785290 Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Chris Dalton 15cc0013 2022-07-14T23:32:05 Add a GL_ANGLE_shader_pixel_local_storage extension Plumbs through "GL_ANGLE_shader_pixel_local_storage" and "GL_ANGLE_shader_pixel_local_storage_coherent" extension strings advertised by ANGLE and stubs out an initial spec document. This change doesn't add any new procedures or shader constructs, but it does allow the PLS tests to start checking for the real extension strings and requiring the GL_ANGLE_shader_pixel_local_storage extension. Bug: angleproject:7279 Change-Id: I36877fe4117185a2121f803288123cd69a447cf3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Amirali Abdolrashidi d9763c60 2022-07-14T14:42:27 Disable mutable texture upload on Win/Intel devs After adding the mutable texture upload CL, we are experiencing some instances of flakiness in the form of lost context/device errors in the perf tests in Win/Intel cases. * Added mutableMipmapTextureUpload as an ANGLE feature, which is used to determine if onMutableTextureUpload() should be called. * It is disabled on Windows when using an Intel GPU. * Disabled the related unit tests on Win/Intel cases. Bug: angleproject:7308 Bug: b/202744914 Change-Id: Ib8c1bddc39cc4354468831a4a599a7c343d05f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764460 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Alexey Knyazev 5897d6f5 2022-07-07T00:00:00 GL: Add emulateCopyTexImage2D workaround Using texImage2D + copyTexSubImage2D seems to be more stable than using copyTexImage2D directly. Added missing HALF_FLOAT fix to the code path that requires target texture initialization. Fixed target texture dimensions when initialization is not required. Fixes Apple GPU crashes in: * CopyTexImageTest.DeleteAfterCopyingToTextures * conformance/textures/misc/texture-copying-and-deletion.html * conformance/textures/misc/texture-copying-feedback-loops.html Bug: angleproject:5038 Bug: angleproject:5360 Bug: chromium:1130703 Change-Id: I5cce087983601e768902f01b3462ec2106e2500a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3749921 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Ian Elliott d88f7906 2022-07-01T12:57:09 Extra buffer logging/checking on Android Cuttlefish This adds a feature that will be enabled on Android Cuttlefish systems, to catch a rare crash. Test: Visual inspection of logcat output Bug: b/236098131 Change-Id: Ie35d7e017f69b36da9caf3e47c31fcc71846caed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726963 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Mohan Maiya 9070e279 2022-06-30T09:35:59 Vulkan: Handle platforms that have imprecise float division issues Even when the dividend and divisor have the same value some platforms do not return 1.0f. We need to emit sepcial division code on such platforms. Bug: angleproject:3586 Tests: KHR-GLES31.core.blend_equation_advanced.blend*HSL* Change-Id: Ibb81f57c959ae2c8edb6d361bf6241c019dfb988 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3738439 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e50351cb 2022-06-10T22:28:58 Vulkan: Don't close render pass on framebuffer fetch For applications that use framebuffer fetch in the same RP as non-fetch programs, we can save some extra RenderPasses by always creating our RP objects with input attachments enabled. This works almost identically except for needing to use the images in a "GENERAL" layout instead of "COLOR_ATTACHMENT_OPTIMAL". According to partners it is possible to achieve performance parity even with GENERAL layout. To remove any potential negative impacts of using the GENERAL layout, the context enters this always-framebuffer-fetch mode only and as soon as a framebuffer fetch program is created. Applications that don't use framebuffer fetch are thus unaffected. This eliminates 20 render passes in the Genshin Impact trace (out of about 58). On a Pixel 6 the resulting benchmark score speeds up by ~25%. For Real Racing 3, the speed up is ~30%. Based on change by jmadill@chromium.org Bug: angleproject:7375 Change-Id: Ib6c73e95d06229f8545d502b388ee2a55a582323 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697308 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 97a6e581 2022-05-30T16:50:26 Vulkan: Useful implementation of program binaries ANGLE already serializes the pipeline state for the sake of OES_get_program_binary. This serialization had limited usefulness however, since the Vulkan driver hasn't actually created any pipelines yet (which is a costly part of program creation). Simultaneously, ANGLE deferred Vulkan pipeline creation to draw time, which causes hitching. In this change, a handful of Vulkan pipelines are precreated at link time; those at least that are sure to create different blobs in the pipeline cache (different spec consts or SPIR-V generation). These pipelines are created in the program executable's cache. The cache is then merged into the shared renderer cache (for potential blob reuse by other programs). With this, two goals are achieved: - Most pipelines created at draw time hit the pipeline cache, avoiding costly compilation. - When the program binary is retrieved, the contents of the program executable's pipeline cache is also returned. On reload, the cache is recovered, resulting in faster startup. Bug: angleproject:5881 Change-Id: I46c5451a7d0b16dffd40e44015e094640886880b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671977 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 0f8f760d 2022-06-07T17:52:52 Disable KHR_no_error for Android/SwiftShader Speculatively fix crash in Skia on ANGLE that has been happening. In addition, prevent other crashes in the future. Bug: b/220069903 Change-Id: I01b9896a6feb8be524849dafbc1df9526fc98754 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3694160 Commit-Queue: Ian Elliott <ianelliott@google.com> Auto-Submit: Ian Elliott <ianelliott@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 5fbb0417 2022-05-26T15:05:52 Vulkan: Handling VK_EXT_load_store_op_none on ARM There is a bug on at least one ARM device when either depth or stencil load op is none. Add a temporary work around to avoid this case for ARM driver until angleproject:7370 is addressed. Also add a test to reproduce the deqp test failures with simiplied draw calls. Bug: angleproject:7370 Bug: angleproject:7351 Change-Id: I74ac49a75f85b1e006ed3b1d77f234f63d314ae0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671696 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4ea62009 2022-06-07T15:35:51 Vulkan: Prefer driver uniforms over spec consts On hardware that's not seeing any benefit from specialization constants, this change switches to using driver uniforms to reduce the number of pipelines created. Bug: angleproject:7406 Bug: b/173636783 Change-Id: Ic1ea1b389b0b27169427643f811370943195f331 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3692270 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang d670b5a3 2022-06-07T11:43:02 GL: Disable texture border clamp on imagination. IMG GPUs generate INVALID_ENUM when setting the texture border color. Bug: angleproject:7405 Change-Id: I04a28d36943c143ad5e18bf80e618230b116a632 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3692265 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 3b988fef 2022-06-01T10:54:03 Vulkan: Remove enableLineRasterEmulation * Removed the Bresenham line raster emulation specialization constant, along with related variables and functions. Bug: angleproject:7366 Change-Id: If17c8ce9b459ad801bae8e887e5674bd9a3ff2bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3680860 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi ce3c0fe9 2022-06-06T12:09:45 Vulkan: Make depth-correction uniform controlled This change makes sure SPIR-V transformations are not required for depth correction, having the number of potential pipelines. Bug: angleproject:5881 Change-Id: If3f66b34bdd1127ae588cbc822ea7cf01fa8621f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691801 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 53ec886e 2022-05-30T16:49:11 Vulkan: Externally synchronize the pipeline cache In preparation for a future change that requires this as it may perform pipeline cache merges during creation of pipelines. Bug: angleproject:5881 Change-Id: Ic7921b781aa773ae23b60a0bb6fa2111b1fc401e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679479 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade eb282de0 2022-05-20T18:36:46 Vulkan: Add feature to use VK_FILTER_LINEAR for YUVConversionInfo VK_FILTER_NEAREST is default for chromaFilter in ConversionInfo. Add feature to allow VK_FILTER_LINEAR to be used instead. This feature controls the quality when sampling YUV images. Bug: angleproject:7382 Change-Id: I3f67d7620d94b5b33c42754adfef84b97c798637 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3684351 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor Black <vantablack@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares 94320a83 2022-05-27T17:41:29 Metal: Validate total bits used in color attachments Metal has 2 limits for color attachments. 1 the number of attachments supported. 2 the total number of bits it can write per pixel. So for example Apple4 through Apple8 GPUs can have 8 attachments but only 512bits of output. That means you can attach 8 RGBA8 textures (256bits), but you can't attach 8 RGBA32UI textures (1024bits). If there are too many bits then return FRAMEBUFFER_UNSUPPORTED from checkFramebufferStatus and INVALID_FRAMEBUFFER_OPERATION from draws Bug: angleproject:7280 Change-Id: I935aebad4d57664f59a60be20a927d6b69afb4ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3674322 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Gregg Tavares 8a0351a5 2022-05-26T14:29:21 Metal:Dynamically choose max draw buffers. The code was hard coded to 4 which is lower than OpenGL's 8. This implementation keeps a hard coded array of size 8 in rx::mtl::RenderPassDesc and rx::mtl::RenderPipelineOutputDesc but only uses up to the display's limit. Bug: angleproject:7280 Bug: angleproject:5730 Change-Id: Idd7e64dc47697882b44540804159566158e1e924 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671695 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi 28b4c378 2022-05-27T15:45:59 Vulkan: Pipeline creation feedback in perf counters Bug: angleproject:5881 Change-Id: I42917cab3c97abb50a14035972a96728dcb990b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3672851 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 23f213d1 2022-05-26T23:43:44 Vulkan: Make drawable size uniform As a specialization constant, it's impossible to predict the value the drawable size may take, which in turn makes it impossible to warm up the Vulkan pipeline cache at link time. Bug: angleproject:7366 Change-Id: Ia3d1860a4fcb8e3078fdcb8d02a2e0cd173ea028 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671976 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 2df17a12 2022-05-25T16:18:37 Vulkan: Pack driver uniforms Previously 5 vec4s were used for driver uniforms + 2 vec4s if specialization constants couldn't be supported. The driver uniforms are rearranged and packed such that only 2 vec4s are normally used, which include fallback for specialization constants as well. In the future, most of the specialization constants may turn into uniforms, and this change prepares for that. Additional uniforms are used (3 vec4s) only if common extensions are missing; transform feedback and bresenham lines. This change makes it more practical for driver uniforms to be turned into push constants. Additionally, these uniforms could potentially be loaded and cached at the beginning of the shader for more efficient memory access. On Pixel6, with this change, the traces show no difference in wall time. On most traces, CPU time shows up to ~7% improvement. Bug: angleproject:7366 Change-Id: I0f47f863955af06a19c69d1f1d7c45b97d95476e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668151 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 98c2e169 2022-05-20T16:17:49 Vulkan: Reduce pre-rotation spec const to bool The specialization constant now only dictates whether x and y should be swapped. The complete 8 possible states of rotation and y-flip are achieved by using this swap in combination with a driver uniform for x and y flip. Swapping is still a specialization constant to avoid degrading performance of dFdx/dFdy which otherwise would need both to be evaluated instead of one. On platforms which don't support pre-rotation, the specialization constant will never change and driver uniforms entirely govern y-flip. On platforms that do support pre-rotation, only two variations of the pipeline are needed. Bug: angleproject:7366 Change-Id: I73f84e89fa9349d2098fa5b21573aee57d93a30c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3663151 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi fea19567 2022-05-17T17:44:06 Vulkan: Remove removeEarlyFragmentTestsOpt flag * Removed removeEarlyFragmentTestsOptimization and the related SPIRV transformation and variables. * Removed mUsesEarlyFragmentTestsOptimization. * Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION. * Merged updateUsesEarlyFragmentTestsOptimization() into updateFragmentInoutRange(). Bug: angleproject:7347 Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 7c83a363 2022-05-16T22:22:44 Vulkan: Dynamic state for rasterizer discard enable Interaction with primitives generated query are tested by those tests added in https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Bug: angleproject:5906 Change-Id: I0ab9f54995504be770a93bf13337a5ffe20bf7eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651582 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 2fdd7bfd 2022-05-17T13:31:58 Vulkan: Support binding 2D slice of a 3D texture to an image unit Support binding a 3d texture as a 2d texture by specifying that it is non-layered during glBindImageTexture and expose support for EGL_KHR_gl_texture_3D_image when VK_EXT_image_2d_view_of_3d vulkan extension is supported. Tests: ComputeShaderTest.BindImageTexture3D dEQP-GLES31.functional.image_load_store.3d.*single_layer Bug: angleproject:7320 Change-Id: Ie2f0dfcdf302a4aa58990f74329ca36e62cd3902 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648586 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4e5da2d2 2022-05-11T13:58:07 Vulkan: Dynamic state for cull mode Bug: angleproject:5906 Change-Id: I3d7b888e7999d4892ff71d636ea16a2edcf7a27f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3642800 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 31321cb7 2022-05-09T16:17:25 Vulkan: Remove suppressions and workarounds for old AMD/Windows The old AMD/Windows bots are decomissioned. This change removes suppressions and workarounds that were added for that bot. Bug: angleproject:2463 Bug: angleproject:2809 Bug: angleproject:2847 Bug: angleproject:3243 Bug: angleproject:4720 Bug: angleproject:6123 Bug: angleproject:6652 Bug: angleproject:7144 Bug: angleproject:7227 Bug: chromium:1224996 Change-Id: I333ed6d76dfa2916b713ccb49127deceb5b1b551 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634728 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yiwei Zhang e316203a 2022-05-07T21:31:52 Vulkan: add forceContinuousRefreshOnSharedPresent feature Android EGL wrapper filters EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID, making it impossible for angle to provide an implementation for EGL_ANDROID_front_buffer_auto_refresh. Thus angle currently is only able to choose demand refresh for swapcahin present mode. This change adds a feature to force angle to create the swapchain with continuous refresh mode without affecting angle internal tracking for shared present. This feature will be enabled on integrations without the auto_refresh hint passthrough to angle, as well as before the platform allows angle to implement EGL_ANDROID_front_buffer_auto_refresh on its own. Bug: b/229267970 Test: angle_end2end_tests --gtest_filter="EGLSingleBufferTest*" Test: smooth draw with gpu accelerated low latency stylus in ChromeOS Change-Id: I29d72830d4e3d9fd5cdd44b8e1ce51fd7d9789fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3633358 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 38a53d65 2022-05-06T18:06:05 Revert "Remove limit_max_texture_size_to_4096 workaround" This reverts commit bcc03bd62200ffb0301fbcaa7e7984a06232c83d. Reason for revert: ANGLE autoroller fails on some Pixel 4 web conformance tests. Original change's description: > Remove limit_max_texture_size_to_4096 workaround > > Chromium will apply workaround to gpu command buffer clients only. So > removing it from angle which is no longer needed. > > See crbug.com/1319451 and in particular crrev.com/c/3626252 > > Bug: chromium:1319451 > Change-Id: I723e525600aa7b93e784c98348e060a503c09657 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3618501 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Lingfeng Yang <lfy@google.com> > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: chromium:1319451 Change-Id: I0db424e97ebb0f9141076b409667aa49faeb2ec4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3630919 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Bo Liu bcc03bd6 2022-05-01T14:47:11 Remove limit_max_texture_size_to_4096 workaround Chromium will apply workaround to gpu command buffer clients only. So removing it from angle which is no longer needed. See crbug.com/1319451 and in particular crrev.com/c/3626252 Bug: chromium:1319451 Change-Id: I723e525600aa7b93e784c98348e060a503c09657 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3618501 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5113ae8e 2022-04-29T22:42:59 Vulkan: Explicitly enable per-sample shading if `sample` used The Vulkan spec is not explicit about the `Sample` decoration implicitly enabling per-sample shading. While this is being corrected in the spec, the ARM Vulkan driver does not have this implicit behavior. A workaround is added such that the usage of the `sample` qualifier is reported, and used to explicitly enable per-sample shading through the API. Bug: angleproject:6876 Change-Id: Idb8345aacdcfa45cb37fefcd30aa5405168d21e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615738 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev f7615d0a 2022-05-02T18:59:22 OpenGL: Add allow_astc_formats workaround Enable ASTC on Mesa only for supported hardware Bug: angleproject:7259 Change-Id: I872ebdead1206ee911c5e0f0f10b6985022dbe47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621055 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 4dc4c0f0 2022-05-02T11:03:57 Remove whitespace from features json files Bug: angleproject:6435 Change-Id: I7f653a9836180d0f2e0198302e11ae2b0ca49d3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621315 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 454efd1d 2022-04-26T23:57:46 Add forceDepthAttachmentInitOnClear frontend workaround AMD on D3D11 skips depth buffer updates in some cases. Bug: angleproject:7246 Bug: angleproject:7200 Change-Id: I27bbea30fbf4173470063a670b9c43a805286c39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3608092 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 3b65b803 2022-04-27T11:04:22 Vulkan: Work around Qualcomm imprecision with dithering On qualcomm, sometimes the output is ceil()ed instead of round()ed. With ditering emulation affecting values, some dEQP tests fail due to the excessive change in value when dithering bumps the value slightly over to the next quantum. In this change, a workaround is added to round() the value before outputting it. Bug: angleproject:6953 Change-Id: Iae7df5ca20055b4db3185c6153f3c0bf4ba07f68 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611064 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares 1a144edf 2022-04-13T17:15:29 Metal:ReadPixels AMD Copy Texture to Buffer optimization On AMD GPUs it's faster to copy a texture to a buffer for read back than to read via a texture. For reading from a normal texture 24-27ms -> 6-9ms For reading from a IOSurface texture 17-20ms -> 7-10ms Bug: angleproject:7117 Change-Id: I7c7f276a3121e87f5c52a1a4287d13203a6b1b37 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584423 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Gregg Tavares <gman@chromium.org>
Mohan Maiya ea76cb0f 2022-04-21T15:52:39 Vulkan: Add entry points for GL_QCOM_shading_rate Bug: angleproject:7172 Change-Id: I837d2697d95c44f47a2fab7411cfd87a4ec65e90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3599873 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi 400d9fe4 2022-04-23T01:08:19 Rename feature files to *_autogen.h To clarify further that they are not to be edited by hand. Bug: angleproject:6435 Change-Id: Iaf79706d2b688a43b3ebb65700cfbdd71a49a742 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603842 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 3b38b379 2022-04-20T10:44:24 Vulkan: Add feature avoid HOST_VISIBLE and DEVICE_LOCAL combination Discrete GPUs device local memory usually is not CPU accessible. This adds a feature flag to control that. Fixed bug in BufferVk that when mapRangeImpl is called from angle internal, unmapImpl was using front end mapping parameters that is incorrect. We have to cache the mapping parameters in the backend to hangle the mapRangeImpl/unmapImpl calls from internal. Fixed the test bug in ComputeShaderTest.BufferImageBufferMapWrite that we are calling glMapBufferRange with GL_MAP_READ_BIT but are actually writing to the map pointer. This should result in undefined behavior per spec. Fixed the test bug in GLSLTest.* that VerifyBuffer calls glMapBufferRange, but was giving incorrect length which result in data only been partially copied. This bug was hidden due to previously all buffers are CPU accessible and there is no copy needed. Fixed the test bug in ReadPixelsPBOTest.* and ReadPixelsPBONVTest.* that calls glMapBufferRangeEXT, but was giving incorrect length which result in data only been partially copied. This bug was hidden due to previously all buffers are CPU accessible and there is no copy needed. Added new skipped syncval messages. Because this CL triggers a copyToBuffer call for some of the buffers and that changes the syncval message signature for the same reasons (i.e, feedback loop or synval does not know the exact range of buffer been used for vertex buffers etc). Bug: angleproject:7047 Change-Id: I28c96ae0f23db8e5b51af8259e5b97e12e8b91f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3597711 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi fcec6904 2022-04-13T14:18:06 Generate feature variable names from display names The json file now only contains the feature display name. The variable name is automaticaly derived. For consistence with Chromium and other Chromium-based projects, the display name is now always snake_case, and that's what's specified in the json files. This also makes camelCase variable name generation trivial (as opposed to the other way around). Feature overrides now accept both snake_case and camelCase names to ensure compatibility with existing scripts. This is done by removing _ and comparing override names with feature names in lower case. Bug: angleproject:6435 Change-Id: I0b6ed2bbf5c312bc4f4be7b3c7d55dbaca2a9886 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584630 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares 87187835 2022-04-07T13:51:10 Metal: For readPixels copy IOSurface to non-IOSurface texture For intel GPU/Drivers, it's faster to copy an IOSurface texture to a non-IOSurface texture and read from the copy than it is to read directly from the IOSurface texture. Bug: angleproject:7117 Change-Id: I786009444480f75be6feb05f09f87fb45a3186b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573078 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi c5271e8e 2022-04-04T23:28:35 Vulkan: Emulate GL_KHR_blend_equation_advanced Based on a change by Brandon Schade <b.schade@samsung.com> In the translator, when advanced blend is enabled, an input attachment is added. Based on the listed advanced blend equations, emulation code is added that performs those equations' functions. The blend equation itself is passed through a driver uniform. Note that the advanced blend extension only allows a single output to use advanced blend, and that should be at location 0. In the Vulkan backend, when advanced blend is used, the driver uniform to select the equation is updated and normal blending is disabled. Bug: angleproject:3586 Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8074061d 2022-04-09T01:03:53 Remove feature override platform methods Instead, the tests now use the enable() functions to override the feature at platform level. This fixes the forceFallbackFormat feature mistakenly not having been tested. Bug: angleproject:6435 Change-Id: I605e4133407282bd52232887b595af0d2c13575d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577369 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 797e627e 2022-04-08T22:49:51 Autogenerate list of features as enum The WithX() and WithNoX() helpers are removed and replaced with enable() and disable() member functions that take the name of the feature (as a Feature::X enum constant). This has two benefits: - Adding tests that override a feature no longer requires additional helper functions to be written. - There's no mistaking the feature name. This change doesn't yet fix the main issue in anglebug.com/6435, but does fix the following helpers using an old feature name (so they were ineffective): - WithMetalForcedBufferGPUStorage - WithNoVulkanViewportFlip A follow up would remove the old way of overriding features in tests and replaces them with the new way. Bug: angleproject:6435 Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi eeb39653 2022-04-08T16:09:48 Autogenerate features Features are now specified in a json file and autogenerated. This is in preparation for more autogeneration to support feature override in tests. This change doesn't yet fix the issues in anglebug.com/6435 and should be a no-op. Bug: angleproject:6435 Change-Id: Icdb63a94dc37b5fef0a356e0fc0b49937e083c8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579941 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Nathan Zabriskie 9d486a85 2022-04-01T11:48:58 GL: Unbind textures from FBO after calls to frameBufferTexture2D OOPR canvas uncovered an Nvidia driver bug in which binding a texture level > 0 to a framebuffer and then later binding a renderbuffer to the same FBO causes the FBO to be marked as having an incomplete attachment. This CL expands UnbindResources() in BlitGL.cpp to unbind textures in addition to RBOs and adds new calls to unbind in functions that call framebufferTexture2D. Also adds a GL workaround--alwaysUnbindFramebufferTexture2D-- that forces FramebufferGL to first unbind any existing attachments using framebufferTexture2D before attaching a new render buffer. Bug: angleproject:5536 Change-Id: I46c115b3895f8fccb251dbf4531d5c1bd4705ebc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3527465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang be53aea8 2022-03-10T11:04:22 Reland: Emulate RGB10 (no alpha) on desktop OpenGL. The OpenGL ES extension GL_EXT_texture_type_2_10_10_10_REV requires RGB and RGBA formats to be supported but Desktop OpenGL does not support RGB. Emulate it with the existing emulatedAlphaChannel path in TextureGL. Bug: chromium:1300575 Change-Id: I5efea52d3da628cf82b43fece23894e6f47df650 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533141 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 20e7bbb7 2022-03-18T17:03:18 Vulkan: Fix invalidate of attachments with emulated format Some image formats may be emulated such that the emulated format has more channels than the original. ANGLE clears the image once so that these extra channels contain valid values, and carefully ensures they are never modified. For swapchain images with such formats, as they are automatically invalidated at the end of the frame, a workaroud was added to make sure they are re-cleared in the beginning of the next frame. This however doesn't fix the issue of glInvalidateFramebuffer resulting in the contents of attachments with such formats to be discarded (even if the following render pass clears it, the contents are invalid in between). This change instead makes sure invalidate of images with emulated formats that have extra channels are handled appropriately: - On IMR hardware, the invalidate is dropped altogether as it provides little to no benefit. - On TBR hardware, a clear is automatically staged on the invalidated image. The latter replaces the workaround that was added to make the following render pass use loadOp=CLEAR, by adding a clear that's respected regardless of what the future usage is. This change also paves the way for a future change where the invalidate of color attachments is tracked in render passes similarly to how depth/stencil currently is. With this change, the image is no longer in an inconsistent state where its contents are considered invalid, even though some channels are meant to remain valid. Bug: angleproject:6860 Change-Id: Iec5b4854dfbe3a0bf93cd5aa82c19fe116065744 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536389 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 9637185c 2022-03-10T15:38:13 Add ForceGPUSwitch to EGL_ANGLE_power_preference eglHandleGPUSwitch() does not work with WebKit sandbox profile. The root cause is that we do not know the primary display, and as such we do not know which GPU drives this. Add eglForceGPUSwitchANGLE(display, gpuIDHigh, gpuIDLow). This lets the caller figure out the GPU in another process. Then the caller can just set the GPU in the sandboxed process. Add tests that are disabled by default until the runner and the infrastructure supports running the tests with automatic switching enabled. Bug: angleproject:7092 Change-Id: I316ee431156596effbdb89659a5e24291719a204 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516274 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Geoff Lang 44e84661 2022-03-17T15:02:21 Revert "Emulate RGB10 (no alpha) on desktop OpenGL." This reverts commit 6404be2defd3ded3ff2f0437bb87fe515e10f2a7. Reason for revert: Extension was not fully enabled due to test bug. Original change's description: > Emulate RGB10 (no alpha) on desktop OpenGL. > > The OpenGL ES extension GL_EXT_texture_type_2_10_10_10_REV > requires RGB and RGBA formats to be supported but Desktop OpenGL > does not support RGB. Emulate it with the existing > emulatedAlphaChannel path in TextureGL. > > Bug: chromium:1300575 > Change-Id: I0e6d1044afbc55cf6d4f987cc98b357ff11ff006 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3517346 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:1300575 Change-Id: Ib3810a18888544f1700a1f648a5094c19973d86d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533139 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>