src/libANGLE


Log

Author Commit Date CI Message
Geoff Lang 232e5236 2021-07-08T15:08:35 Remove the explicit context extension. This extension currently has no known users and doubles the number of entry points that ANGLE exports which is a significant binary size cost. This saves about 130kb of binary size on Android. Bug: chromium:1084580 Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 966c6a9a 2021-07-15T12:50:09 Capture/Replay: Don't try to serialize compressed textures. Instead we write out a simple string indicating compressed texel contents. We in the future could implement a GetCompressedTexImage API. Bug: angleproject:6176 Change-Id: I6673ec85ac94d5268b24bda4d510247a63fa97e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3032022 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 04485656 2021-07-15T13:46:54 Capture/Replay: Capture WaitSemaphore and SignalSemaphore Enable tests that now pass, but keep tests that time out or still crash on the skip list. Bug: angleproject:6164 Change-Id: I39e56f0a1bfae09c74a54b06367f7eef41d1063c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3024208 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 1e75181f 2021-07-15T13:39:08 Capture/Replay: redesign capturing of arrays passed by pointer Instead of doing a lookup of the number of passes array when the call is written, store the number of array values in the ParamCapture when the call is captured. Bug: angleproject:6164 Change-Id: I87b0e2f776a6884b999cc50844e0777cda26b380 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3031543 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny 106ed74c 2021-07-12T20:55:33 Capture/Replay: Capture FenceNV parameters Enable according tests. Bug: angleproject:6163 Change-Id: I4435a650530006997ed3f14315461060729b836a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3024206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Qin Jiajia 397fc145 2021-07-15T09:20:28 Fix the ext-texture-norm16 with RG16 failures Don't apply the readPixelsUsingImplementationColorReadFormatForNorm16 workaround for Intel GPU. With this workaround, below error will be printed: GL_INVALID_OPERATION in glReadPixels(invalid format GL_RG and/or type GL_UNSIGNED_SHORT) in FramebufferGL.cpp, readPixelsAllAtOnce Test: conformance2/extensions/ext-texture-norm16.html Bug: chromium:1208297 Change-Id: Ic9016c3afd8a0d2add61247adbf0d9434e8ce9f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028810 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Tom Anderson 298fafd7 2021-07-14T13:57:30 [GLX] Allow usage of multiple visuals When using AMGLE_x11_visual, a single visual is specified for the whole session. This is limiting since windows can have different visuals. For example, one window may want transparency and another window may not. This CL makes it not-an-error to use a window with a visual other than the one set with ANGLE_X11_VISUAL_ID. In this case, ANGLE will fallback to using a child window, as if ANGLE_X11_VISUAL_ID had not been specified. Long term, a better solution would be to allow specifying ANGLE_X11_VISUAL_ID per window. Bug: chromium:1225953 Change-Id: Ibec411cfd1341c30b2842a7ddba3fea6023de2b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028803 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cody Northrop f46df397 2021-07-14T19:41:03 Vulkan: Suppress VVL errors triggered by external formats Since several tests are hitting these and it may be a VVL bug, moving to ignore rather than skips. Bug: angleproject:6155 Bug: angleproject:6168 Change-Id: I38a5be8d792b8b13a490be895a68349bffe69c6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028809 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 669acb00 2021-06-08T13:36:38 Add YUV format utils and validation code 1. Add YuvFormatInfo struct and a few YUV format helpers 2. Update ES3 validation code to account for YUV formats Bug: angleproject:5773 Change-Id: I82ababe8bf2a065e7d5c4f868e4a512ba8c9d7d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947766 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 223cd0ac 2021-06-15T18:46:07 Capture/Replay: Refactor shared context handling This is the initial CL to enable capture/replay of multi-context applications. This CL refactors FrameCapture and FrameCaptureShared to move much of the functionality into FrameCaptureShared, since most everything is shared by Contexts in the share group. For example, the setup of the majority of the GL objects is done in the new SetupReplayContextShared() function in the new $LABEL_capture_context_shared_frame001.cpp file. The setup is performed by (for example): void SetupReplay() { $LABEL::InitReplay(); $LABEL::SetupReplayContextShared(); SetupReplayContext2(); } This performs the shared setup first, followed by the context-specific setup, which may reference shared objects careated by LABEL::SetupReplayContextShared(). No re-capturing is required with this change, since the external APIs (i.e., SetupReplay()) are still the same. Bug: angleproject:5878 Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2 Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya db54b8dd 2021-06-08T21:44:10 Add YUV format support to frontend Add GL_G8_B8R8_2PLANE_420_UNORM_ANGLE and GL_G8_B8_R8_2PLANE_420_UNORM_ANGLE formats to InternalFormatInfoMap Bug: angleproject:5773 Change-Id: Iaad4043f803c2702a5d41d3b9dc3a00c5f6aed73 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947765 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 97987658 2021-06-06T11:36:49 D3D: Update format table with new YUV formats They are currently mapped to angle::FormatID::NONE Bug: angleproject:5773 Change-Id: I0cba77158ef06bf39fbb30702e0fa91a37f660a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947764 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya e66e3344 2021-07-12T13:28:54 Vulkan: Add GL_ANGLE_yuv_internal_format extension 1. Add a new extension to support creation of immutable textures with sized internal YUV formats 2. Rename YUV format enums from *_ANGLEX to *_ANGLE 3. Move YUV format enums from angleutils.h to glext_angle.h Bug: angleproject:5773 Change-Id: Ibfe732f4c9a4a536be56481f33e4768f6227c212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2820153 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 715a49c7 2021-07-03T08:48:07 Vulkan: Handle incompatible immutable sampler formats If the immutable sampler format of an active texture is not compatible with those supported by the pipeline layout, recreate the pipeline layout. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Test: ImageTest.SourceAHBTarget2DExternalCycleThroughYuvTargetsNoData*Vulkan Change-Id: Iea78e1738ea2fb133a24dc88f5b68daf4cc1bdfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2997289 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 31b06f5f 2021-07-12T10:06:04 Vulkan: Account for immutable samplers that need multiple descriptors It is valid for immutable samplers to need more than 1 descriptor count. Account for this possiblity while calculating descriptor pool size. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Bug: angleproject:6141 Change-Id: Ifb0ed3e4b3c01c61d81dd0c628101f31d4c8bd05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3005329 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Cheryl Wei 45965e72 2021-06-17T10:21:26 Vulkan: Translate border color's channel by image view format ANGLE implementes some formats as other formats,such as ALPHA8 to R8, this caused some tests failed due to missing border color's channel translation,this change add a new textureBorderLoadFunction to translate channels of border color by image view format. Bug: angleproject:6046 Change-Id: I94ce719b4db3724ffd3dc862b51a412b5d9f3cce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2972328 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 07c39616 2021-07-08T17:01:31 Vulkan: SPIR-V Gen: Enable GLSLTest* This change includes an assortment of small fixes to enable most of GLSLTest* end2end tests. - User-defined std140 storage buffers were mistakenly turned to std430. - External and WEBGL samplers were redundantly redeclaring the sampler2D type. - `invariant` specified on a field of struct type didn't apply it to said struct's members. - Arrays of struct as a member of an interface block didn't have their size aligned, producing incorrect stride - Interpolation and auxiliary qualifiers are now generated - Arrays of opaque uniforms are now correctly passed to functions when indexed. - atan(x, y)'s built-in Op is fixed - early_fragment_tests is now generated Additionally, the SPIR-V transformer didn't handle the Invariant decoration applied to gl_PerVertex built-ins, which is possible as a result of: #pragma STDGL invariant(all) This bug existed in the transformer due to two bugs: - ANGLE didn't generate this line when generating GLSL to feed to glslang. This is fixed by this change. - glslang itself ignores this line: https://github.com/KhronosGroup/glslang/issues/2689 Bug: angleproject:4889 Change-Id: I15ad9fcc178abc1eae944e7a58f4e6153fa5dfd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia 15581f35 2021-07-13T15:01:56 Fix the INVALID_ENUM error This PR fixes the GL_INVALID_ENUM error caused by framebufferTexture2D in copySubTextureCPUReadback with TEXTURE_EXTERNAL_OES as the texture target. TEST conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html conformance2/textures/video/tex-2d-srgb8-rgb-unsigned_byte.html conformance2/textures/video/tex-2d-rgb9_e5-rgb-float.html conformance2/textures/video/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html conformance2/textures/video/tex-2d-rgb9_e5-rgb-half_float.html conformance2/textures/video/tex-2d-rgb16f-rgb-float.html conformance2/textures/video/tex-2d-rgb16f-rgb-half_float.html conformance2/textures/video/tex-2d-rgb32f-rgb-float.html Bug: chromium:1208297 Change-Id: Ic62ba95ad6fd70f293a7261dc640a95dcabe7ba2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3023666 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jason Macnak 7c4404da 2021-07-09T13:37:29 Vulkan: update D/S state in ContextVk::onFramebufferChange ANGLE needs to ensure that the stencil test is correctly handled when framebuffers are cleared before stencil attachments are configured. Adds two stencil tests for clearing fbo before stencil attached which fail before this change and which replicate the behavior of CtsNativeHardwareTestCases's StencilAffectsDrawAcrossContexts. BUG=b/192315789 TEST=newly added tests on Cuttlefish Change-Id: I58d97af97d3f78787051b069d2594041ccd2bfba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018486 Commit-Queue: Jason Macnak <natsu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jonah Ryan-Davis 428d7c4d 2021-07-12T15:23:45 GL: Widen scope of disable_sync_control_support workaround. Crashes and hangs are still happening on Linux/Intel/Mesa 20. This should already not expose the OML_sync_control extension, so widen the scope of the workaround to see if there is an issue detecting Mesa version. Bug: chromium:1187475 Change-Id: I6397f459cd58dba449913ef1c7ce897e8a06cbd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3022222 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Peng Huang a8e98a23 2021-07-10T15:25:20 Fix gl::Context::unMakeCurrent crashes The crash is because Display::makeCurrent() may fail, in that case, egl_stubs.cpp will not update the current context in global_state and Thread accordingly. And then Context::refCount could be reach 0, and be released, however egl_stubs.cpp still thinks the context is current, and then user-after-free happens. This CL fixes the problem by updating current context of Thread in Display::makeCurrent, and reading the current context of Thread in egl_stubs.cpp and setting it to global_state. Bug: chromium:1171371 Change-Id: Ifc5fffb0e4902c9c72514839d03e5783d50fe283 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3017210 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jonah Ryan-Davis 36eb2f14 2021-07-12T15:21:33 Metal: Populate feature list in the Metal backend. The metal-specific features were not being populated when features were queried (eg. by Chrome's about::gpu page). Only the frontend features were populated. Bug: angleproject:6161 Change-Id: I65703dfb5cf561d734b3698da66a8838187b0ef4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3022221 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 9274911d 2021-07-12T10:41:16 Vulkan: Update cube map array support check. Bug: angleproject:5143 Change-Id: I0b774096ae762ae088a27ef1b4d52bf446562736 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021283 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kyle Piddington d33a2222 2021-04-26T16:56:15 Upstream Apple's direct-to-Metal backend: compile libANGLE. This change is meant to merge the metal backend changes from Apple's direct-to-Metal backend. Taken from Kyle Piddington's CL: https://chromium-review.googlesource.com/c/angle/angle/+/2857366/ The goal of this CL is to merge the metal backend code in a state that compiles, but not to switch the Metal backend over to using the direct-to-metal backend yet. Bug: angleproject:5505 Bug: angleproject:6127 Change-Id: If6783e06e0086b3a1dd25c6f53caca5cfc96cb86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950067 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 8c07f3c1 2021-07-09T12:35:31 Enable cube map arrays on SwiftShader. Bug: angleproject:5142 Change-Id: I51c58d20da155b90980f27425a99cff2555345fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018303 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 913eb916 2021-06-28T12:51:12 Vulkan: (Mostly) re-unify secondary command buffer interfaces SecondaryCommandBuffer and CommandBuffer in vk_wrapper had diverged in API, which this change helps alleviate to some extent. Bug: angleproject:6100 Change-Id: I0d59b24c659afbaf58865b3d85f275c545e3acce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987872 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Qin Jiajia 17a4b6e7 2021-07-07T11:00:48 Fix that clear-srgb-color-buffer is not correct This change removes the limitation that syncClearState/ syncClearBufferState is only for STANDARD_GL_DESKTOP so that it works on chromeos. Test: conformance2/rendering/clear-srgb-color-buffer.html deqp/functional/gles3/fbocolorbuffer/clear.html Bug: chromium:1208297 Change-Id: I7c5fed3545f623cca3f2245c67fddaf3401388b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3010630 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Sergey Ulanov b73eee71 2021-07-07T18:51:35 Reland: [Vulkan] Add DisplayVkNull Currently all DisplayVk implementations depend on VK_KHR_swapchain and VK_KHR_surface extensions. When running Chromium on Fuchsia these extensions are never used (content is shown on the screen using ImagePipe API without dependency on swapchain). ANGLE still depended on these extensions for DisplayVkFuchsia. This CL adds DisplayVkNull, which allows to run ANGLE without dependency on swapchain. It's usable only offscreen and cannot present content on a surface. Bug: chromium:1203879 Change-Id: I5cadcdf46ed1cfb5ebb3cb69dbfef063e9e2b826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3012368 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 89f2a619 2021-07-08T21:45:11 Revert "GL: Use glClear for robust init on Android." This reverts commit 37c5d36fef783406c30a8ed8b8b4455f35374834. Reason for revert: crashes on Pixel 4, see https://chromium-review.googlesource.com/c/chromium/src/+/3016164 Original change's description: > GL: Use glClear for robust init on Android. > > The allowClearForRobustResourceInit was used to work around driver > bugs on other Windows and Linux and has a lot of CPU overhead. > > Re-enable it on Android (except some older Adreno). > > Bug: chromium:983167 > Change-Id: Ibfb4eb4fcdc7310fb6181c57f5c8d7a645ffad9d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011420 > Reviewed-by: Peng Huang <penghuang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:983167 Change-Id: I74e9a61484de77fd66e8dde8d50665fdbb470a95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016763 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Aditya Kushwah c9dcc553 2021-06-22T18:55:39 Move Objectlabel from Texture object to TextureState object. Created a subscriber function onLabelUpdated in the storage base class. The derived storage class will pass the label reference to the base storage class in the constructor. Future changes will use this label reference to update the label string with D3D. Bug: chromium:1164111 Change-Id: Ic5ca73bac61427afe392bb5bcc6a6eab8e785941 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2981451 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Jamie Madill cb87d78c 2021-07-08T08:28:04 Enable -Wshadow with Clang. Also fixes a few instances of variable shadowing in the code. Bug: angleproject:6148 Change-Id: Ic51d722a3f953f246f51af6d74abb302f832cf44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3014875 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e1ed36c 2021-07-02T12:32:03 Trace Tests: Improve state serialization. This encapsulates several colliding states into grouped scopes. It also improves serialization of several of the resources by including the resource ID in the serialization key. Also other minor improvements. This change should improve detection of state mis-management. Bug: angleproject:5133 Change-Id: I6ee5c02bb3ba70e91a595db2408076b15e4a9e67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3003384 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny 5fb5f63b 2021-06-29T09:56:43 Capture: Write captured context for empty frames When a frame is empty, still write the captured context for that frame because the index file will contain the frame file, and the replay will execute the according swapbuffer so that the replay will query the context serialization when testing trace correctness. With that enable RobustResourceInitTest.SurfaceInitializedAfterSwap/* for capture/replay. Bug: angleproject:5939 Change-Id: Ib280d55f739cc2bb8d2da0919e98c37a2cd576ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987991 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 4964513a 2021-06-28T20:07:46 ANGLETest: When on WebGL compatibility then use index buffers WebGL actually requires the use of index buffers, otherwise the call is invalid, therefore explicitely request index buffers in the according VertexAttributeOORTest tests. In addition, assert on the indices when the glDrawElements call is captured. With that we can enable VertexAttributeOORTest.* Bug: angleproject:6125 Change-Id: Id3855c78d4c5fcab5599f19dd74ce745d059fb1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999523 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 68d9f433 2021-06-28T15:39:04 Capture/Replay: capture param of glGetQueryiv Enable TimerQueriesTest.* with that. Add flaky test WebGLCompatibilityTest. DrawElementsBufferOutOfBoundsInVertexBuffer/ ES2_Vulkan_SwiftShader that start to fail because the batches have changed. Bug: angleproject:6114 Bug: angleproject:6136 Change-Id: I91617255a8e3e8783c8e70c17dedd32be421fd66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993092 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny b3e920e2 2021-06-28T14:32:13 Capture/Replay: don't capture DrawElements with count zero Usually Context::noopDraw would reject calls that doen't draw, but FrameCapture::maybeCaptureDrawElementsClientData seems to be called before Context::noopDraw, and since in ComputeTypedIndexRange we would obtain the illegal range [0,0) (which is actually prohibited by an ssertion "count > 0"), we have to exit early. With that the test can be enabled. Bug: angleproject:6111 Change-Id: I4c242712bd90602f84ad6072b02c3a13a26840f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993089 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Trevor David Black 5d314b59 2021-06-01T03:03:22 Fix undefined behavior associated with Runescape Mobile Bug: b/184287970 Change-Id: I5d3baf5e7a8a20c30e1b787b69597110226521d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2929352 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 37c5d36f 2021-07-07T13:15:13 GL: Use glClear for robust init on Android. The allowClearForRobustResourceInit was used to work around driver bugs on other Windows and Linux and has a lot of CPU overhead. Re-enable it on Android (except some older Adreno). Bug: chromium:983167 Change-Id: Ibfb4eb4fcdc7310fb6181c57f5c8d7a645ffad9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011420 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
SeongHwan Park 9f256d10 2021-07-07T02:14:13 D3D11: Fix incorrect bounds checking in Blit11 This could lead to blitting depthStencil buffer incorrectly. Bug: angleproject:6140 Change-Id: I2c5786c0375f8e2fefe862da68929340844ce9ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3009736 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexis Hetu daa19c0a 2021-07-06T16:19:57 Fix alpha setting of WebGL contexts with SwANGLE on MacOS The emulation of the "alpha: false" setting was done with an RGBA format under the hood, which caused some unexpected results, which included non constant alpha values. Replacing GL_BGRA8_EXT with GL_BGRX8_ANGLEX solves this issue. This was discovered while debugging the following test: conformance/context/context-no-alpha-fbo-with-alpha.html but it may fix many other tests (I will update the expectations file after this fix rolls into Chromium) Bug: chromium:1099960 Change-Id: Ib7b2d352a8e920983d3398de28a8c1dde3b97130 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3010579 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Yuly Novikov 0beafe86 2021-07-05T16:12:10 Ignore VUID-VkSpecializationMapEntry-constantID-00776 New check added in https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/2903 Blocks VVL rolls. Bug: chromium:1226682 Change-Id: Iaf12187c33a0c3736acae6e772277dbe6aa4c402 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007137 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill d665593b 2021-07-05T15:02:11 Update TextureState::getEnabledLevelCount. Instead of simply returning a count of all non-empty texture desc levels, we iterate the levels from the base level and return the count of levels that make a consistent mip chain. This will fix edge cases where Textures are defined sequentially with inconsistent mip levels, but valid rendering states. Bug: angleproject:4780 Change-Id: Id3ebf2d7ad706070896cb5cdf2a311dba2c88949 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007135 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peter Kasting 1bffabe8 2021-06-29T18:13:39 Fix -Wunreachable-code-aggressive. Bug: chromium:1066980 Change-Id: I1fa08a40dbf223d60a10681af33ca8a29b12bf8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2991094 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny 16c993c3 2021-06-24T12:03:03 Capture/Replay: Only capture initialized renderbuffer content Enable the DepthStencilTest.* that was failing before. Bug: angleproject:6094 Change-Id: I8c69de4927c0e70143cd632e97f0abdb740a013f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982550 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny dba2e136 2021-05-13T20:33:46 Capture/Replay: Emit InitializeReplay() late Only emit InitializeReplay() after all captured frames have been run, so that the readBufferSize and the maxClientArraySize are really sufficiently large for all frames. To achieve this a layer of indirection is added, that is because InitializeReplay() has to be called from SetupFrame() which is still emitted with the first frame, a new function InitReplay() is added. The call to this function is emitted with the first frame, buts its body is emitted after the last frame has been captured. Bug: angleproject:5965 Change-Id: Ic38791b4c02989594ec87d1ba3f031fd81471314 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940841 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi d6202fce 2021-06-28T16:53:45 Vulkan: Disable GL_KHR_texture_compression_astc_sliced_3d 3D ASTC formats are not supported in Vulkan, sliced or not. The non-sliced extension is already disabled, and this change disables the sliced version. Bug: angleproject:6038 Change-Id: I055838345ccb8ad77fe4c05e65dd8b10a8a4d36b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993459 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lubosz Sarnecki dcfde515 2021-06-24T15:59:04 gl.xml: Add GL_FRAMEBUFFER_SRGB_EXT to EnableCap group. Add GL_EXT_sRGB_write_control in registry_xml.py. This makes FrameCapture write a GL_FRAMEBUFFER_SRGB_EXT enum instead of it's hex value in glEnable/Disable calls. Bug: angleproject:5857 Change-Id: Ifa01118c2958275c7623c6bfe29f015fa8875fce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988356 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Peter Kasting d2816b4e 2021-06-25T14:52:02 Fix a -Wdeprecated-copy warning. Bug: chromium:1221591 Change-Id: Idbbb4aa16e58a9f4e7e25590667cf15706233de4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2989632 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Gert Wollny e793a027 2021-06-28T11:17:01 Capture/Replay: Capture TexSubImage2DRobustAngle, enable tests The tests RobustClientMemoryTest.* now all pass. Bug: angleproject:6108 Change-Id: I980c1fd9e065cb5c4ed575770f86e09faeb19d4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988685 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 3fa51867 2021-06-28T07:44:45 Capture/Replay: Disable GL_OES_depth32 during capture Depth32 is not a renderable format on native mobile GLES drivers. Disabling GL_OES_depth32 during capture provides a more portable trace. Apps fall back to Depth24, i.e.: glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT32, 760, 360); Becomes: glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, 760, 360); Test: Beach Buggy Racing MEC Bug: b/192237726 Bug: angleproject:6113 Change-Id: Id188ca0186c67d2584f8ad7070cdc8c9baaf2aaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992573 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Peng Huang 5a2bd6fd 2021-05-03T14:43:35 Disable shader cache for PowerVR Rogue GPUs. We disable shader cache for Validating decoder in chrome, so port this workaround into ANGLE to see if it can fix crbug.com/1203652. Bug: chromium:1203652,chromium:480992 Change-Id: I08611c148217abc9c32d11fefe8a7d15873f3b30 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2867269 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya e2881e25 2021-06-27T10:45:41 Vulkan: Handle incompatible pipeline layouts It is necessary that a pipeline layout be compatible with active textures. Make sure to recreate the pipeline layout otherwise. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Test: ImageTest.SourceAHBTarget2DExternalCycleThroughRgbAndYuvTargets*Vulkan Change-Id: Iab371a9035b6cd143585e5000e2e68c7302ef447 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992056 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop aec47ff6 2021-06-22T15:47:43 Capture/Replay: Update CopyImageSubData params The parameters to glCopyImageSubData are flexible and can take a TextureID or a RenderbufferID as a GLuint. Our replay needs to remap those values, so we'll convert the GLuint based on the target. This leads to a change like the following. Before: glCopyImageSubData(138, 0x0DE1, 0, 0, 0, 0, 642, 0x0DE1, 1, 0, 0, 0, 256, 256, 1); After: glCopyImageSubData(gTextureMap[138], 0x0DE1, 0, 0, 0, 0, gTextureMap[642], 0x0DE1, 1, 0, 0, 0, 256, 256, 1); Test: PUBG Mobile MEC Bug: angleproject:6087 Bug: angleproject:6104 Change-Id: I5cd422e41ffbb4f08c8909e520bdce63e3008c5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2981464 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Gert Wollny dbc7cb5a 2021-06-11T14:38:42 Capture/Replay: capture GetMaterialfv parameters Enable according tests Bug: angleproject:6052 Change-Id: I67bc4d74c997afecf9ed16c7af217de273557587 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954265 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi 153240b2 2021-06-11T16:36:32 Vulkan: SPIR-V Gen: Support loops Loops are similar to if-else in that they generate a number of blocks where the first block specifies divergence (OpLoopMerge) and the merge block. Differently from if-else, there is a block where the condition is evaluated and a block which `continue;` leads to (this last block is the only one allowed to back-jump to the beginning of the loop). Bug: angleproject:4889 Change-Id: Ic59f4bf3e05fbf93cb5af85acd3bc4b0da8412af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957809 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Gert Wollny 8cf6d8cc 2021-06-28T10:00:54 Capture/Replay: Handle Gen/Delete Semaphores and fix map emit Add capturing of the handles used in GenSemaphores and DeleteSemaphore, fix the emission of the gSemaphoreMap. and enable capture/replay tests. Change-Id: Iabb88bd1d6c22c08271d0883607efb72de9d3d0c Bug: angleproject:6107 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988679 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi 971ba359 2021-06-23T16:45:33 Add angle::BitMask for creating bit masks angle::BitMask(n) implements the common pattern of angle::Bit(n)-1. Bug: angleproject:6048 Change-Id: Icd56ef1504804add59d0804a7249b3035c96f9c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2984099 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny f8d2c429 2021-06-24T11:22:59 Capture/Replay: Add test to capture an uninitialized buffer Handle the serialization in case the buffer is not yet set up. Bug: angleproject:6093 Change-Id: I06a8e15d181c4ec514a334f952ce29a4026970a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982549 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Peter Kasting 5fc3fa9a 2021-06-25T10:18:06 Fix -Wimplicit-int-float-conversions. Bug: chromium:989932 Change-Id: Id7a49a4bd925508ea0362d1e6b9d853bf860ddb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill da17d561 2021-06-23T13:50:15 Trace Tests: Use xvfb consistently on Linux. Previously there were two places where we missed the xvfb script. This was causing the replay to fail. Bug: angleproject:6085 Change-Id: I833916fa0cdacc163ec2bdd08831249807f319c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2979353 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd797f75 2021-06-14T11:27:27 D3D11: Fix OOB write in Blit11. This could happen for specific values of the 'dest' target. Bug: chromium:1219082 Change-Id: Ic19a5dc4a95531f9513403ad9c97a4b4c5dc5a6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2961070 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny c2449441 2021-06-24T13:06:08 Capture/Replay: Make sure EGLImageKHR is a parsable number For some reason on win-trace-rel the pointer value us written as a hex number but without the leading "0x", so the number gets interpreted as octal, and compilation fails. Fixes: cb4f8a79a4def3dd8fd9f941d6674939e1731860 Capture: Add a specialization for TGLeglImageOES Bug: angleproject:6036 Change-Id: I949ace542a0ad257b47fbe539893a56c1c32b0b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982551 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny e5276ca3 2021-06-12T17:25:12 Capture: Add capturing of framebuffer and renderbuffer IDs Also enable the FramebufferObjectTest/* tests Bug: angleproject:6058 Change-Id: Ia82c935e614ccc4ad2c69ccc08544ce2d302fbca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957954 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny c8677c73 2021-06-12T17:23:42 Capture: Add a specialization for const GLuint * Bug: angleproject:6058 Change-Id: I31cad1dd23d313aae625874e140c406747e0f4c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957953 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 78437770 2021-06-12T15:48:26 Capture: read four values for GL_TEXTURE_CROP_RECT_OES This texture parameter describes a cropping region x,y, width, height. Bug: angleproject:6057 Change-Id: I2c71f6aec1e536f42e06c19cb025889094b57a35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2956510 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 79d3a5a1 2021-06-12T15:27:42 Capture/Replay: Capture (Get)TexParameterxv Bug: angleproject:6056 Change-Id: I094d80e5d6a981c01f572e0fba9b578269200bde Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957952 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny f20d2b95 2021-06-12T15:19:42 Capture/Replay: Capture params of (Get)TexEnv calls Bug: angleproject:6055 Change-Id: I44a7bd4b339d7834f9306a0de7baa400c640dda4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957951 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 11489df0 2021-06-12T15:07:25 Capture/Replay: implement CapturePointParameterfv_params Enable tests that are now passing Bug: angleproject:6064 Change-Id: I22d7a41b3e11556c929e4701e0c6c339e3aa7b6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957950 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny fb42cbab 2021-06-11T14:30:49 Capture/Replay: Capture glGetLightfv parameter Enable the according capture/replay tests. Bug: angleproject:6051 Change-Id: I916e6d10756bc24bb3e0644c2b290f55b2066fd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954264 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny b82da851 2021-06-11T13:57:47 Capture/Replay: Add capture for Fogfv parameters Enable FogTest* tests for capture/replay. Bug: angleproject:6050 Change-Id: Ic183ef550f57a790a3d113f20f67946487006166 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954263 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny d42df5c7 2021-06-08T11:42:50 Capture: Only capture texels of initialized textures If a texture is not yet initialized then it may contain random pixels, and since it doesn't make sense to capture this random data, skip its serialization and only mark the data as not initialized in the capture. This also avoid the texture syncronization that would lead to a crash for incomplete cube maps. Bug: angleproject:6034 Change-Id: I0cb30a03a29aecd605f3c61b6df4cd897e1f9093 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2944954 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 22716d31 2021-06-11T13:51:41 Capture: Add specialization for ParamType::TGLubyte Also enable "CurrentColorTest.Set/*" tests. Bug: angleproject:6049 Change-Id: I65e62b6c0805687ad6744a12217e0c08bc97ca1a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954262 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 90f9ddd9 2021-06-10T14:35:13 Capture: Add support for capturing (Get)ClipPlanef equation In addition, correctly handle "const GLfloat *" when replaying, and enable the according capture/replay tests Bug: angleproject:6047 Change-Id: I5dd7510d1b621d4c941490c9d0261559a96dd681 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2951133 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 4375d6c7 2021-06-18T23:51:23 Vulkan: Support multiview queries When using queries with multiview, Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application. Bug: angleproject:6048 Change-Id: I5ea615536f1a357806b7ea8093280b9122f1d66a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971562 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 977a28f3 2021-06-22T12:30:07 No-op glGenerateMipmap on zero-sized textures The spec says: > Otherwise, ... if any dimension is zero, all mipmap levels are left > unchanged. This is not an error. Bug: chromium:1220250 Change-Id: I45e007c1f8e9b80f405d3d096eb896a7246f7c8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2979853 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5b314268 2021-06-15T17:37:45 Vulkan: Support OVR_multiview and OVR_multiview2 Multiview is supported in Vulkan simply by specifying the number of views in the render pass, and creating the appropriate image views. A number of changes to the way image views and render targets are stored are made to support those that don't cover the entire range of layers. One particular detail that is not implemented in this change is the use of queries in combination with multiview. Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application, but this is not currently done. Bug: angleproject:6048 Change-Id: I1d4a9894c232d3a93d7a97c9fa0eedc334e57469 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967625 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 9bad7a19 2021-06-15T23:39:52 Vulkan: Unpack RenderPassDesc Upcoming multiview support needs to add 2~3 more bits to this struct, but this struct is already fully packed. As the combination with emulated multisampled render to texture is not planned, some bits used for MSRTT can be aliased with multiview. However, that makes the packing of this struct even more unwieldy. Since only tens of render passes are expected per frame, increasing the size of the render pass cache key should not have a dramatic effect. Bug: angleproject:6048 Change-Id: I5c9a0d155f23a37e2787b38525d3ce721b54ec1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2966218 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny b6009f64 2021-06-17T14:53:03 Capture/Replay: Add feature for robust resource init Query the feature when creating the display and the context, and pass the flag to the created context and also to durfaces. With that we create surfaces that will be marked "MayNeedInit" and are initialized if the resource is cleared or invalidated. Bug: angleproject:6041 Change-Id: I292f2e3f931736a18db93695441407e17d2265b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976656 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 41f86f35 2021-06-22T11:02:08 Capture: Serialize only the content of initialized attachments If a resource is marked MayNeedInit, then we don't serialize it but mark the data as not initialized. Bug: angleproject:6041 Change-Id: If3d3431a58848f7835692fe10b30fab68c901d8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976657 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Jamie Madill ac795859 2021-06-23T11:17:36 Disable warning on invalid feature name. Because we don't have a centralized feature list, we would fire this warning every time we use a feature override. Disable it until we have a centralized list we can check. Bug: angleproject:6085 Change-Id: Ia5c3f2ae8337141e963e67e1d71243a3d0a01c9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982505 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1b104dd9 2021-05-26T14:29:01 Finish switch to angle_version.h. Bug: b/168736059 Change-Id: I1232c8284f37aadb374840aca8f40e4569382c7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2920490 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b6adeb2f 2021-06-21T11:11:30 Vulkan: Use pipeline statistics query to emulate primitives generated The VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT query produces the same result as the GL primitives generated query. One caveat is that in combination with rasterizer discard this query may not work. This is emulated by disabling rasterizer discard when this query is active and applying an empty scissor instead. When VK_EXT_primitives_generated_query is released and supported, a similar issue with rasterizer discard persists so this change will facilitate using that extension as well. Bug: angleproject:5430 Change-Id: Id45b6f058c5cb6837e04aa64b1efde28c104e4cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Alexey Knyazev dbfc119a 2021-06-22T08:56:33 Fix overflow in gl::ValidateES2TexImageParametersBase Bug: chromium:1222516 Change-Id: I532dc6e1c80c442af2c35d1facc262c48222def3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2978251 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 64ce506d 2021-06-18T14:48:29 Vulkan: SPIR-V Gen: Support most non-texture/image built-ins Most GLSL built-ins map directly to some SPIR-V operation. texture*() and image*() built-ins are not implemented as well as a handful of other built-ins that require special-handling. Bug: angleproject:4889 Change-Id: I72abfb4692c3d66a3c8be43ce44ba6808efe6255 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971646 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Xiaoxuan Liu 96dd515a 2021-03-31T14:21:16 Update glColorspace(EGL_KHR_gl_colorspace) enable logic 1. Enable glColorspace if VK_EXT_swapchain_colorspace is supported, remove dependency on VK_KHR_image_format_list. 2. Enable VK_KHR_image_format_list support on Mali GPU. 3. Fix PbufferTest.ClearAndBindTexImageSrgbSkipDecode test tolerance issue. Bug: angleproject:2514 Bug: angleproject:5281 Change-Id: I2ed54a14afc7c3aee5a5980bd300ab052ebab3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2793852 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
John Plate 44a5c913 2021-06-17T09:29:29 CL: Make CL front end and back end thread-safe Add locking to all mutable variables of the CL objects in the front end and pass-through back end to make them thread-safe. This fixes a crash in a multi-threaded CTS test. Bug: angleproject:6015 Change-Id: I1d6471c851217639411c434c82acd32d14035291 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967468 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate 1891af05 2021-06-16T10:20:32 CL: Refactor TRY macro and fix more conformance bugs Bug: angleproject:6015 Change-Id: Id54be19822fec2ac5584ffe1d1cf5bb8f00c9094 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967467 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
Ian Elliott 3706f9eb 2021-06-10T18:45:15 Vulkan: Fix AGI hierarchy crash for noop'd clears/queries The ASSERT in ContextVk::endEventLogForClearOrQuery() was wrong. Certain glClear*, glBeginQuery*, and glEndQuery* commands may exit early (e.g. noop). When this happens, mQueryEventType will be set to NotInQueryCmd. In such cases, return without trying to finish a non-started debug-util-marker hierarchy. Bug: b/191489405 Change-Id: If40ed00fdc6e420ae6a11c2aeaced19e5aa45a5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2973342 Reviewed-by: Trevor David Black <vantablack@google.com> Reviewed-by: Mark Lobodzinski <mark@lunarg.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Cody Northrop 851fbedb 2021-06-10T21:27:01 Vulkan: Switch viewport and scissor to dynamic state Heavily based on http://crrev/c/1316888 Some apps are creating a large number of viewport combinations and are running out of graphics memory. This CL drops their graphics pipeline use from tens of thousands to tens. Performance testing shows little impact to application traces. Bug: b/190026813 Bug: angleproject:3143 Change-Id: Ib7415be1128f8fedae4a7ca72e067b2815201223 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954925 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Doug Horn 4e1fd371 2021-06-17T10:26:26 Ensure GLES1 state is cleared on context switch. GLES1 support in multi-context D3D mode is broken prior to this change as state in the GLES1Renderer is not being properly dirtied on context switch. The immediate result is a crash on draw commands due to a null program. Introduce a new dirty bit to specify that the program is dirty and should be re-initialized. Test: GLES1 applications work with the D3D11 backend in multi-context mode. Bug: b/191158936 Change-Id: Ib53c1471514ff2cf36ef9fc0d6bfb99a8bb7cf66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2969789 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Doug Horn <doughorn@google.com>
Shahbaz Youssefi 24155b13 2021-06-17T18:09:29 Vulkan: Free DynamicBuffer buffers after dip in allocation size In a pattern like this: - allocate 100 bytes - allocate 200 bytes - allocate 50 bytes - allocate 100000000 bytes - allocate 100 bytes - allocate 200 bytes - allocate 50 bytes The DynamicBuffer class switches to making 100MB allocations even if that allocation was a one-off. A small future allocation would then tie up 100MB in memory for future allocations. Another 100MB is also left tied up in the free list. With this change, if an allocation is made that's less than a quarter of the DynamicBuffer's current allocation size, it's taken as a sign that the previous large allocation was a one-off and the size is moved back to the DynamicBuffer's original initial size. Bug: b/187757166 Change-Id: I0c6f00eec7c81298f9dc41a41cc308510ce76623 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971004 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
John Plate 69562546 2021-06-11T19:12:11 CL: Refactor info structs and fix conformance bug - Remove variable name prefix from Info structs to be more consistent with other ANGLE structs. - Fix CL object validation check with magics, since the Mesa solution doesn't work without RTTI. - Add support for some extensions required by OpenCL 1.1 and for some optional extensions. - Fix more conformance bugs. Bug: angleproject:6015 Change-Id: I41b1c45d95059a9994f5dc78bf9b74476cc6f2d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2956349 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott ecf27c71 2021-06-16T13:13:31 GL: Fix bug with: Skip redundant flushes. The ANGLE-into-Skia autoroller is blocked because of the following CL: https://chromium-review.googlesource.com/c/angle/angle/+/2956453 Michael Ludwig, a Skia engineer, found that this change fixes the problem and will unblock the auto-roller. Bug: chromium:1181068 Change-Id: I514b2762f6643e25b36aab0290a57af4abf3c660 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965615 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Mohan Maiya b77a6c25 2021-06-16T11:01:14 Vulkan: Avoid using VK_WHOLE_SIZE when using dynamic offsets Binding descriptor sets that use VK_WHOLE_SIZE with a dynamic offset results in the VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979 validation error. Updated the updateDefaultUniformsDescriptorSet function to use the uniform's size instead of using VK_WHOLE_SIZE. Bug: angleproject:5924 Tests: dEQP-GLES31.functional.shaders.multisample_interpolation.* SimpleStateChangeTest.UniformUpdateTest*Vulkan UniformTestES3.MatrixUniformUpload*Vulkan Change-Id: Ie4633af61d59a9401f599d336a5b9040cdf18004 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950309 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi af1eed2e 2021-06-10T01:55:59 Vulkan: Generate gl_FragColor/Data declarations in AST gl_FragColor and gl_FragData are not available in Vulkan. Prior to this change, their declaration as webgl_FragColor and webgl_FragData was done in text. This change implements an AST transformation that declares a normal fragment output variable and replaces all references to these built-ins with those variables. Bug: angleproject:4889 Change-Id: If224e089dec25e4aa580beb135e1be2890de7887 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2953042 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexis Hetu 4fbb6f43 2021-06-14T18:20:06 Vulkan: Fix accessing index buffer with uninitialized memory This was discovered by Clusterfuzz on MacOS. The issue was that is index buffer of a draw indexed call was missing, causing SwiftShader to access uninitialized memory, leading to the ASAN crash. The missing index buffer was caused by DIRTY_BIT_INDEX_BUFFER not being set. This was in turn caused by ContextVk::flushDirtyGraphicsRenderPass() not setting dirty bits not included in the dirtyBitMask, despite needing to be set for future processing. Bug: chromium:1183068 Bug: chromium:1190493 Change-Id: I65b398d8737b3df5fd51a03a2c8074a774a94a81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2961690 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 8333d061 2021-06-14T11:01:35 GL: Respect TexSubImage upload limits for robust init The chunked_texture_upload splits texture uploads for glTexSubImage calls but ANGLE uses glTexSubImage internally for robust resource initialization. Also chunk those uploads. Bug: chromium:1181068 Change-Id: Ia6eaac8117173946630f420b396cbc54c163b7ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2961230 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
John Plate 2c8d9a9a 2021-06-09T16:09:35 CL: Remaining functions for OpenCL 1.2 Add support for the remaining functions for OpenCL 1.2 for the front end and pass-through back end. Also fix several bugs discovered by the conformance tests. Bug: angleproject:6015 Change-Id: I1dca1c3f4c1d9aea7f0501094c171116ea01381f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954259 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
Geoff Lang 222a81cf 2021-06-11T14:34:52 Reland: GL: Skip redundant flushes. Skip flushes when there is no work submitted since the last flush. Bug: chromium:1181068 Change-Id: Iab31f8949f7eb07dffb7b0930069cbb3ca69ef57 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2956453 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>