src/libANGLE


Log

Author Commit Date CI Message
Geoff Lang f17cd288 2020-09-18T11:36:50 Refactor IsMipmapFiltered to take the min filter directly. This function is more useful if it takes just the min filter mode instead of the entire sampler struct to read a single member. Bug: b/167404532 Change-Id: Ie8c01c4095a615f06fe046fb175cdfb92fa54cbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419111 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 68c424fe 2020-09-17T10:34:07 Vulkan: Workaround oldSwapchin bug on Android When vkCreateSwapchainKHR is called with a valid oldSwapchain, the Android framework destroys the images in oldSwapchain. This is not correct, as it should be deferred to the actual vkDestroySwapchainKHR call performed later by ANGLE. This is because rendering to the oldSwapchain could still be in progress. While this issue affects all of Android, currently only ARM shows any symptoms. A workaround is added for ARM to vkDeviceWaitIdle before recreating the swapchain if oldSwapchain is valid. Bug: angleproject:5061 Change-Id: I308e4798c6418d7891d880218b0ebcfd7a795643 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416238 Reviewed-by: Sunny Sun <sunny.sun@arm.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 4043b9d1 2020-09-17T12:03:12 Guard against data race with MemoryProgramCache. Uses the display global mutex. Caught with angle_end2end_tests MultithreadingTest and TSAN. Bug: b/168744561 Change-Id: I5a60346cb5f95ff506dc166604eeae501863a774 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415182 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 5f8af83f 2020-09-17T11:06:08 Vulkan: Add perf warning for mid-RP clear Bug: angleproject:3461 Change-Id: Id80ccc81db3cb66438b6b5e6d504eda613f481d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416244 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8d4331ee 2020-09-16T00:42:08 Vulkan: Free up 5 bits in RenderPassDesc Leveraging the fact that there are only a handful of depth/stencil formats, the last element of RenderPassDesc::mAttachmentFormats can contain other information in addition to the depth/stencil format ID. The FormatID enum is rearranged such that depth/stencil formats are placed first, as a result occupying values in [1, 7]. These values take up 3 bits in an element of RenderPassDesc::mAttachmentFormats (which could be the last element if all color draw buffers are attached). As a result, the upper 5 bits of the last element of RenderPassDesc::mAttachmentFormats is unused. It is intended for these bits to be used in the implementation of multisampled-render-to-texture depth/stencil renderbuffers. Bug: angleproject:4836 Change-Id: I0786e0712539cdbbf5494ec83aeee1dd93f936dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413165 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 32de9efe 2020-09-17T12:03:12 Guard against race in perf warnings. Expose the "debug" mutex so insertPerfWarning can use it. This was detected using TSAN and MultithreadingTest. Bug: b/168744561 Change-Id: Idde95a7b217f21f007893192a4a1f0a69b4ed3a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415184 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 6939a023 2020-09-17T12:03:12 Vulkan: Fix racy access to VkPipelineCache. Use a mutex to guard against the object init. The accesses to the cache internals are internally synchronized. There is a Vulkan ext that allows for external cache synchronization that we could investigate at some point. Detected by looking at MultithreadingTest with TSAN enabled. Bug: b/168744561 Change-Id: I1d4744e1aa970bcd57cac49f7ecaf8c238ea61c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415183 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill f2749096 2020-09-17T12:03:12 Fix racy global in gl::Compiler. We introduce a new Display Global Mutex in egl::Display that can guard access to gActiveCompilers in Compiler.cpp. Was detected by running MultithreadingTest against TSAN. Bug: b/168744561 Change-Id: I97866b60a173f60899cd0406fe0f71000035c0cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415181 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott 1c79e9ea 2020-09-17T09:50:46 Vulkan: Delay vkAcquireNextImageKHR till later Currently, ANGLE calls vkAcquireNextImageKHR() immediately after calling vkQueuePresentKHR(), which can cause the process to stall (even with multi-threading). Delay it until it is absoluately needed. Test: angle_end2end_tests --gtest_filter=*EGLPreRotationSurfaceTest*/* Test: angle_white_box_tests --gtest_filter=VulkanPerformanceCounterTest.*Invalidate*/* Test: angle_deqp_egl_tests --gtest_filter=dEQP.EGL/functional_query_context_get_current_display_rgba8888_window* --use-angle=vulkan Test: angle_perftests --gtest_filter=GenerateMipmapBenchmark.Run/vulkan_webgl Bug: angleproject:5064 Bug: b/162082698 Change-Id: I466df9237136dd59a9556faa8cf2dbad94e076fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2399509 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi 37457d08 2020-09-15T14:38:53 Vulkan: Support MSRTT color renderbuffers Color renderbuffers are similar to multisampled-render-to-texture textures, but much simpler. The same mechanism is used to implement them. Bug: angleproject:4836 Change-Id: I298529c9fd1b03e78b1e37cdbe595e66166ee130 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412847 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill bb96aefa 2020-09-11T13:50:09 GN: Componentize D3D back-ends. This also isolates headers for D3D9 / D3D11 from each other. Bug: angleproject:3943 Change-Id: I04edbe7db68461ae4fc78ac7f9c22451debcb768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya c99c22bb 2020-09-15T16:53:26 EGL: Add support for EGL_ANDROID_create_native_client_buffer This EGL extension will add support for creating EGLClientBuffer backed by an Android window buffer (struct ANativeWindowBuffer) which can be later used to create an EGLImage. Bug: angleproject:5018 Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceNativeClientBufferTarget* Change-Id: If78ed7b80ad09629b8c5f5b5a0eb07a548e82e6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404320 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Amy Liu 83c7e1ae 2020-09-17T16:42:19 Fix the regression of color blit. Move the offset aligning code to stencilBlitResolveNoShaderExport to avoid affecting color blit. Test: dEQP-GLES3.functional.fbo.blit.default_framebuffer.*_linear_* Bug: angleproject:5044 Change-Id: Ic2ebef94091853146424d567b0035161611ba32d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416008 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 233cc31b 2020-09-15T11:05:17 Vulkan: Use linkedShaderStages in GlslangGetShaderSpirvCode() The parameter linkedShaderStages is passed to GlslangGetShaderSpirvCode(), but is unused. This CL uses the parameter, rather than gl::AllShaderTypes(). This CL also removes the unused parameter variableInfoMap from the call chain. Bug: angleproject:3570 Change-Id: Ic60084e87cb2aa2a245e3e963598851331379e89 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412364 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a65a7f3d 2020-09-16T19:45:55 GN: Fix CrOS build due to buggy "defines". This config is unfortunately not covered on the ANGLE CQ. Test: local GN CrOS build Bug: angleproject:3943 Bug: chromium:1129075 Change-Id: Ie1a9b2fdfb47f2a4631e118ab88eccfb7ad7eaf8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415186 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten f12e4123 2020-08-25T12:01:12 Vulkan: Match descriptor pool sizes to descriptor set layouts When a descriptor pool is created, a list of descriptor types and counts are given to vkCreateDescriptorPool(). Later, when allocating a descriptor set from the pool, we pass along a descriptor set layout to vkAllocateDescriptorSets() which is used to determine how many of each type of descriptor (i.e. binding) to allocate from the pool. In order for our "free descriptor set" counts to be accurate for each pool, the descriptor pools need to be created with descriptor counts that match the descriptor set layout binding counts. This change fixes a bug where the descriptor set layouts were created with more bindings than the descriptor pool sizes, causing the "free descriptor set" count to be inaccurate, leading to allocating too many descriptor sets from a pool. Bug: angleproject:3570 Test: VulkanDescriptorSetTest Change-Id: I660bf02d29a1291391fb15f39e6479bf348d0f83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391114 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a2d670c5 2020-08-15T21:13:33 Run trace tests against Vulkan Mock ICD. Required an upstream fix: https://github.com/KhronosGroup/Vulkan-Tools/pull/437 Also a workaround filed as an issue: https://github.com/KhronosGroup/Vulkan-Tools/issues/445 Bug: angleproject:4950 Change-Id: I21333464d2a8e52d5d85d35654f0e6372f9650db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358517 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 972441af 2020-09-16T17:15:45 GN: Fix missing pkg_config import in GL back-end. This was causing a build break on ChromeOS builers and brekaing the ANGLE roll into Chromium. Bug: chromium:1129075 Bug: angleproject:3943 Change-Id: Ic7976c0b506f5af67823da8de1f8c850e43abee0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415169 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 22d30378 2020-09-15T23:19:48 Vulkan: Change VK suffix to Vk For consistency with the rest of the backend. Level index variables were using the VK suffix while color index variables used Vk. Bug: angleproject:4881 Change-Id: I0c2799da34cdfe19cb04adbebba042ac8876af96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413155 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Charlie Lao 71e7a5a6 2020-09-14T13:56:19 Vulkan: Move mAttachedColorBufferMask to FramebufferState This moves the bit mask of attached color buffer to front end. No function change is expected. Bug: b/167301719 Change-Id: I4eec3a419560b91875260b812a036ceaaeb6b5bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2410790 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi d8b037d6 2020-09-15T05:05:14 Change renderbuffer width/height/sample types to GLsizei This matches the types used by GL and stored in the state. setStorage and setStorageMultisampled calls were using size_t instead with a number of unnecessary casts in places which are now removed. Bug: angleproject:4836 Change-Id: Ibb570f0c088a6f29abe10f513de27c30ba4dd098 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411697 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop b328e044 2020-09-16T10:30:05 EGL: Add another config for Mali Test: angle_end2end_tests Bug: angleproject:5053 Change-Id: I7aef6b5babe8f582e7500464f53e65721eaf0520 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2414733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 2d74170f 2020-09-11T12:30:04 GN: Componentize GL back-end. Bug: angleproject:3943 Change-Id: I88c2ec8a9f49746f6ce9838b0d1c8e8ea0a8ae9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405806 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev ed01473e 2020-09-12T13:01:05 Vulkan: Fix blendEnable-02023 VU Enable BlendIntegerTest Add DrawBuffersTest.BlendWithGaps test Add BlendPackedTest Bug: angleproject:4548 Bug: angleproject:4571 Bug: angleproject:4583 Change-Id: I139183099b26f0fe1ac9e43f96d18b8ccb134a2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407772 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4d3a0f60 2020-09-11T12:36:05 GN: Componentize D3D format tables. These tables are used by both the GL and D3D11 back-ends. Also moves them to renderer_utils to be in a shared place. Bug: angleproject:3943 Change-Id: I1f5d79842396a87e795547fa03c6855d6f9c5e9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405805 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5532e99d 2020-09-15T10:04:54 GN: Remove build/ dependency in "Null" GN file. This was breaking the Skia roller. Bug: angleproject:3943 Change-Id: I5b54feb2e4abc8a6bf157e35f69aa12c7334dda2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411474 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b0b1830 2020-09-12T23:21:41 Add feature for disabling compressed formats. Can be useful when doing captures to make the replay more portable. Bug: angleproject:5040 Change-Id: I3a045c636bc2638d601aff2536eed3d0e49c3643 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2408714 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Xinyi He 377e7487 2020-08-27T17:11:35 Vulkan: Support array of array image type Implement supporting the array of array of image type in uniform. Add a new end2end test for it. Bug: angleproject:3881 Change-Id: Idd757ae1d0ed34d585ae1ca5e0b6577459a0acb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2379335 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3a8f0bc 2020-09-11T15:41:16 Distinguish MSRTT renderbuffers in the front-end glRenderbufferStorageMultisampleEXT has different semantics from glRenderbufferStorageMultisample. This change makes this differentiation in the front-end and passes a flag to the backends. This extension is currently only supported on Vulkan and D3D backends. Support for the former will be done in a follow up. Support for the latter is not planned. Bug: angleproject:4836 Change-Id: I75bc3d7990a4b1ce06264280a386d5e467983b7d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405396 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao 06b4fb92 2020-09-11T21:24:46 Vulkan: Fool proof packed attachment index to vulkan and from OpenGL ANGLE packs FBO attachments from OpenGL and uses packed attachments to create VkFramebuffer and renderpass. When we use attachment index into the attachment array, we must be very careful to use packed index for vulkan objects. It is easy to make mistakes here and introduce hard to debug bugs. This CL defines a PackedAttachmentIndex class that uses that to index into vulkan attachments and pass around APIs so that compiler would catch the error when wrong index is used. This also introduces PackedClearValuesArray that stores clear value in packed attachment index so that it is impossible to mix it with ClearValuesArray that stores clear value in GL attachment index. Bug: b/167301719 Change-Id: I68680522c60beeb5096e5211eaef89da28c7097e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2410366 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao c03c4490 2020-08-28T11:03:20 Vulkan: Defer glFlush issued in middle of renderpass to endRenderpass Manhattan is calling glFlush in middle of a renderpass. This CL defers the flush that issued in the middle of renderpass to the end of renderpass. Bug: b/166475273 Change-Id: I6baa3898d5efc456e2205c44e13c64f3d79d1464 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381942 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 852f61f7 2020-09-11T11:54:35 GN: Componentize "Null" back-end. This moves more build configuration out of libGLESv2.gni. Bug: angleproject:3943 Change-Id: I58293f98c917e785cdf3bb1beb706f02ee8a3801 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405800 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao e4e2a016 2020-09-01T11:23:09 Vulkan: Use color mask to handle draw buffer disabled case When draw buffers set to GL_NONE, instead of remove the attachment from renderpass which breaks renderpass, we force vulkan's per buffer color mask to false while keep the disabled draw buffer attached. This CL also always create FrameBuffer with all color attachments regardless it is enabled or not. Bug: b/167301719 Change-Id: Ice9fca9aacf774a47d13b749f822b222cc050174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2389007 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 821aabb3 2020-09-11T14:53:21 Add Context::renderbufferStorageMultisampleEXT glRenderbufferStorageMultisampleEXT is special in that it doesn't have the same semantics as glRenderbufferStorageMultisample, but is aliased in gl.xml for the sake of desktop GL (where it does have the same semantics). This change special-cases this function so multisampled-render-to-texture renderbuffers can be supported. Bug: angleproject:4881 Change-Id: Iaa321dd0671dd82ea802df22a1ae935942789c21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405395 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 63c91a3b 2020-08-04T20:09:05 Metal: autogen for PBO related shaders. Bug: angleproject:2634 Change-Id: I36e5a6a4cb11d82f666c410b33fdb39ad35a5e80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336557 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Amy Liu b3c7d39a 2020-09-03T15:51:02 Align the sample position in blitResolveStencil compute shader The input coordinates of blitResolveStencil compute shader start from 0,we need to align the sample position to start from 0 if x/y is flipped. Test: dEQP-GLES3.functional.fbo.invalidate.*.unbind_blit_msaa_* Bug: b/159995959 Change-Id: If0c9f5b7cacddbe1a2d7062469a757a63bcc1378 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392162 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya ed518d15 2020-09-11T12:47:52 EGL: Refcount external AHB when backing an image When an image is backed by an external source like an AHB we need to refcount the buffer appropriately to prevent deletion of the buffer while in use. Bug: angleproject:5018 Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceAHBTarget2DEarlyDelete* Change-Id: Ib6318fc3dc442460d1a2bdd6d75a4458895667bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2406615 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7870cf3f 2020-09-10T17:30:13 Vulkan: Fix RAW hazard with storage images Semantic revert of 78304b470 and 7bce5194d. 7bce5194d assumed that a read transition between same layouts is a noop, but that's not true if said layout is GENERAL. This is only possible if an image is simultaneously bound as storage and sampled image. This bug was discovered by the new syncval VVL warning. Bug: b/156661359 Change-Id: I05f94160ca1b05b715701564e27fccee31a8aa45 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404742 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang 2999ad4e 2020-09-09T09:16:27 Flush less frequently in QueryGL. StandardQueryGL flushes with every pause/resume/end operation to make sure the list of pending queries does not grow too large. This ended up trying to flush the queries as soon as they were ended and unlikely to have results ready. Add a threshold of pending queries before flushing, hopefully delaying the flush calls until the queries are ready. This is a speculative fix for a GPU hang in query flushing. Bug: chromium:1078754 Change-Id: I38300995ee6576dee8c8c26fa9ccad26e269337a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2401178 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Courtney Goeltzenleuchter ef315fdc 2020-09-10T14:56:35 Vulkan: Use current commandBuffer pointer We were using a passed in commandBuffer in ImageHelper::flushStagedUpdates which became invalid during the process of handling the flush upon which subsequent uses could cause problems when threading is enabled (and maybe when it's not as well, just harder to see.) Have ImageHelper::flushStagedUpdates use the current OutsideRenderPassCommandBuffer and the code will use the proper one. Bug: b/168144059 Change-Id: Ib9849efe9366cf61df5e68fd25d17df165dbd3a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2402354 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Courtney Goeltzenleuchter 19b4dfc6 2020-08-11T15:53:49 Enable precision qualifiers. This enables precision qualifiers to be included in the translated GLSL and the generated SPIR-V. We do not enable precision qualifiers on Pixel 2 with Android Q due to bugs in the Vulkan driver. Issues appear to be fixed with later Android releases and later devices. Bug: angleproject:3078 Change-Id: Ia5f40befc7ec80fbb63fb6bbe88600301967f9c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2350583 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 0c8f66c7 2020-09-04T11:01:55 OpenGL: Get VendorID and DeviceID with angle::GetSystemInfo() Previously on the OpenGL backend we get the device ID with funtion GetDeviceID() which just supports a few types of devices. This patch fixes this issue by using angle::GetSystemInfo() instead. Bug: angleproject:5011 Change-Id: Ief0e1228bb1871a73755f05f2debd3a8e5c75597 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392634 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Jamie Madill 3486ec96 2020-09-10T17:55:28 Enable -Wweak-template-vtables. Needs one suppression due to Clang warning about multiple vtables in a cpp file. Bug: skia:7647 Change-Id: If7f318b7539d23f783b0ef6d6478ce24a0b72bc7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404746 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Courtney Goeltzenleuchter ae09e889 2020-09-10T17:00:13 Fix mismatch issue with precision qualifiers. GLSL allows varyings passed from one stage to another to not match in precision (e.g. float & half-float). Vulkan doesn't allow that so adjust those mismatches to use the higher precision. To fix we keep track of the precision of varyings and in the Vulkan backend if we see they are different patch up the SPIR-V to make them match. Bug: angleproject:3078 Change-Id: I385d31e082da46ccdd4817b6612f5f9d9cbce17c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2337755 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Courtney Goeltzenleuchter c5b5cf6c 2020-09-10T16:58:18 Refactor to pass ProgramMergedVaryings to link impl Follow-on CL needs the ProgramMergedVaryings in the Vulkan backend to generate valid SPIRV. Bug: angleproject:3078 Change-Id: Ic442a3e0bd713fec36bd6b9420f67f3b1118e5ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404336 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill a4ef812c 2020-09-10T17:06:53 De-templatize ResourceManagerBase. Bug: skia:7647 Change-Id: I568cb63118c944c7eca7efcd2445718dc7fda350 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404745 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 1ab73f0f 2020-09-10T14:32:58 Cleanup disable_program_binary workaround This workaround should also clear the shader binary formats. Also, we can use this workaround when disabling program binaries for capture/replay. Bug: angleproject:5007 Change-Id: I57c78e2cc95e7148cb8a1e7fb9bf3ed958fa69c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404383 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Alexis Hetu e99a9df2 2020-09-10T13:21:39 Added integer overflow detection to ClipRectangle Used angle::CheckedNumeric to make sure none of the additions in ClipRectangle produces an integer overflow. Bug: chromium:1091364 Change-Id: I23b7943259010bb6bfde3d8ebc41e87a04f5b4f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404441 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Shahbaz Youssefi 1bd71b48 2020-09-08T13:54:33 Make gl::DrawBufferMask a BitSet8 This shrinks the size of the mask for use in cache key classes. Bug: angleproject:4881 Change-Id: I87c234832c61e6a663c609b7f6da5d69977b21c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2399182 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Maksim Ivanov fe822457 2020-09-10T03:33:26 Fix useless move() in SizedMRUCache_unittest.cpp Drop std::move() calls in places where there's no actual moving happing, and only the "bugprone-use-after-move" clang-tidy warning is triggered. Bug: chromium:1122844 Change-Id: I692da5af4f96305f09008d1c7fd18f9be7f6273f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2401241 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten d29d4c6b 2020-08-25T12:40:06 Vulkan: Avoid linking to SPIR-V validation if possible We unconditionally link to $angle_spirv_tools_dir:spvtools_val, but we only use SPIR-V validation with ASSERTs. This CL removes this dependency when ASSERTs are disabled. Bug: angleproject:4887 Test: CQ Change-Id: Ic403b78196ecd895e4a0cdefb54ab4497651ccac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2375872 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Shahbaz Youssefi 29b1f07f 2020-09-08T13:52:49 Vulkan: Boilerplate for vkCmdNextSubpass Bug: angleproject:4881 Change-Id: I5c46c07e8c7865ef2bfd8aff0d3f8b5ba3ecd750 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2399181 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Courtney Goeltzenleuchter cbbf9587 2020-09-09T17:01:00 Fix ASAN issue with accessing application name ASAN caught reference outside scope issue regarding RendererVk::initialize. Need to have a local copy of the string so that it stays alive for the Vulkan call. Bug: b/168145220 Change-Id: I13d751a48fe86a5a3d603d892c86c5a7186f2606 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2402353 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 9a7b0a2d 2020-09-01T15:46:02 Workaround bogus MscRate reported by some XWayland drivers. XWayland defaults to a 1hz refresh rate when the surface is not visible, but this can sometimes cause issues in Chrome. If we see a bogus rate like that, ANGLE can just report 30hz. Bug: chromium:1042393 Change-Id: I554b05b4107cea528525ced6e95a5ce529eec3b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2388700 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jose Dapena Paz cee57483 2020-09-09T18:18:07 GCC: init kImageMemoryBarrierData with initializer constructor GCC fails to automatically map the initializer assignment for initializing the angle::PackedEnumMap. So this change adds the type hint ImageMemoryBarrierData to the second part of the pairs passed to construct the PackedEnumMap. GCC error: ./../third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:387:1: error: could not convert ‘{{rx::vk::ImageLayout::Undefined, {"Undefined", ...}}}’ from ‘<brace-enclosed initializer list>’ to ‘const angle::PackedEnumMap<rx::vk::ImageLayout, rx::vk::{anonymous}::ImageMemoryBarrierData>’ 387 | }; | ^ | | | <brace-enclosed initializer list> Bug: chromium:819294 Change-Id: I314c43c0795e54cabd891205ee935c6354d11658 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2401778 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 957079aa 2020-09-03T16:20:55 Vulkan: Free 8 bits in RenderPassDesc These bits will be used in a follow up change to determine which color attachments need to take their value from a corresponding resolve attachment in an initial subpass. Bug: angleproject:4881 Change-Id: I76b6b3339fe209f93dd259ca087d84ecaa3004b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2397205 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 41c93c55 2020-09-01T11:34:32 Vulkan: Bug fix in atomic counter buffer count calculation When binding a new atomic counter buffer to a slot it is necessary to take into account the previous binding of that slot. This rectifies a bug introduced in f7b607c63c Bug: angleproject:3566 Test: angle_unittests.exe --gtest_filter=AtomicCounterBufferTest31.AtomicCounterBuffer* Change-Id: If78954d27c3345e8620294a84e839058d7dd7b9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2388431 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott d4b029e3 2020-09-08T11:00:56 Vulkan: Suppress VVL PushConstantOutOfRange errors VVL Error: UNASSIGNED-CoreValidation-Shader-PushConstantOutOfRange Bug: angleproject:5027 Change-Id: I60eef046df5569f4d76bf065ea6df7565793a6b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2399178 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Corentin Wallez e5882825 2020-09-07T10:55:35 Texture::copyImage: Correctly compare against FBAttachment There is no functional changes, but avoids an incorrect static_cast of pointers when looking to skip the clear in a copyImage of an image onto itself. Change-Id: I35949005016dab5df01e58d27de53dccf38d50c7 Bug: chromium:1125354 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2395617 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 50704dc3 2020-08-04T12:08:00 Metal: Implement EXT_occlusion_query_boolean. - Metal's occlusion(called visibility) query operates per render pass. Implementation details are in src/libANGLE/renderer/metal/doc/OcclusionQueries.md. - New tests: - OcclusionQueriesTest.ClearNotCounted. - OcclusionQueriesTest.MultiQueries (failure on OpenGL/D3D11 back-end). Bug: angleproject:2634 Change-Id: Idd1327b5472d0e8c2b69307a7f04a1da4a847a40 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336121 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Ian Elliott 4a41204d 2020-09-02T05:04:33 Vulkan: Improve invalidate for depth/stencil Improve state tracking when the depth and/or stencil attachments are invalidated. Since no draw-time tracking is done, we use the number of command-buffer commands to determine when an attachment is drawn to. That allows all cases to be handled for store ops. Still need to handle mContentDefined at endRP time (we have the data, just not the plumbing). Test: angle_white_box_tests --gtest_filter=VulkanPerformanceCounterTest.*Invalidate*/* Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_* --use-angle=vulkan Bug: b/167276207 Change-Id: Iae10857dbb4d43b934c51ad7e400b71ae0db4f55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378670 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Courtney Goeltzenleuchter 999c85ee 2020-09-02T10:26:47 Correct PCI Device ID for Pixel1 & Pixel2 Testing on my Pixel 1XL and Pixel 2XL indicate that the IDs were swapped. Bug: b/167573470 Change-Id: Ie6881bf06acd77d3349f7a4b879fda8f18b1dfe0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390824 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Shahbaz Youssefi cba9bbbe 2020-09-02T09:55:31 Vulkan: Fix resolve-with-subpass retaining resolve attachment The temporary resolve attachment used to optimize blit was not removed from the framebuffer and render pass descriptions, resulting in subsequent draws to be resolved again. Bug: b/159903491 Change-Id: I9a9c90d25cb07ba9a25999f808b164f9085387d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390441 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 0c25fbe3 2020-09-02T17:17:57 Vulkan: Remove accidental padding in push constants Bug: chromium:1124379 Change-Id: I45f4511c836858c70d4dae23c7b3954e0bc65ab4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391616 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 84bd9dad 2020-08-26T22:01:44 Vulkan: Allow pbuffer usage if no window support Vulkan allows rendering to non-swapchain images, so pbuffers can always be supported on every config. With this change, if the window system does not support a configuration, EGL_WINDOW_BIT is removed from the config instead of dropping the config entirely. Bug: chromium:1034840 Change-Id: Ib972ed8ddf7660c327123fa83ae0674456cf2a35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378921 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Geoff Lang a568b7e3 2020-06-30T17:03:56 Add a frontend feature to disable anisotropic filtering. This allows us to disable support for GL_EXT_texture_filter_anisotropic at runtime and make performance comparisons. Bug: b/167404532 Change-Id: Id80458e7f116e195366432fe73e8e776e9a3047b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278024 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi b2944fcf 2020-09-02T11:10:00 Vulkan: Don't break the RP on masked/scissored clears Bug: b/166809097 Change-Id: Iedd10a6528808e859c5693a2d30c98aca1a1159c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390862 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Alexis Hetu d0d523f4 2020-09-02T14:47:27 Make copyTexImage2D robust when source area is out of bounds Whenever the source area of the texture being copied is out of bounds and robust resource init is enabled, it is necessary to clear the invalid portion of the source area to 0 in the copy operation, EXCEPT if the source and the destination are the same, in which case clearing the destination would also clear the source. Bug: angleproject:3930 Change-Id: Ie9e0c52fff86b5626c82a511319688392b7b073b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391281 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Shahbaz Youssefi d701eae2 2020-09-02T12:23:21 Vulkan: Fix resolve with different formats vkCmdResolveImage and subpass resolve attachments cannot be used if the source and destination formats aren't identical per Vulkan spec: vkCmdResolveImage: > srcImage and dstImage must have been created with the same image > format VkSubpassDescription: > each resolve attachment that is not VK_ATTACHMENT_UNUSED must have the > same VkFormat as its corresponding color attachment Bug: chromium:1123524 Change-Id: Iaf7182dbcad0420483ac2c23d0acf8c109688565 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390781 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 543a3962 2020-09-02T09:40:10 Vulkan: Fix resolve-with-subpass with non-zero read attachment The draw framebuffer's color index was used to get the read buffer of the source framebuffer. Bug: b/159903491 Change-Id: I7a1626e6732367c14d46f1e1be4057998fdbf011 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2390440 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 6b2639b0 2020-08-31T16:00:29 Workaround to disable OES_get_program_binary This is a useful workaround for testing/diagnostics. Disabled by default. Bug: angleproject:5007 Change-Id: If459f60ae7f8a2cd4ea934fe3e54d890387d57db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2385933 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexis Hétu e3db3d20 2020-09-02T12:29:28 Revert "Make copyTexImage2D robust when source area is out of bounds" This reverts commit e1e6f2940c25b3899a13f9f76815ddbb2d00e245. Reason for revert: This fix is incorrect, it ends up being a noop. Reverting this first before landing a different fix. Original change's description: > Make copyTexImage2D robust when source area is out of bounds > > Whenever the source area of the texture being copied is out of > bounds and robust resource init is enabled, it is necessary to > clear the invalid portion of the source area to 0 in the copy > operation. > > Bug: angleproject:3930 > Change-Id: If1605b917097006c37e7d59c66babbc32d0ba6d8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378004 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> > Commit-Queue: Alexis Hétu <sugoi@chromium.org> TBR=sugoi@chromium.org,geofflang@chromium.org,jmadill@chromium.org,sugoi@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:3930 Change-Id: I9e37a3f739eb7ce5d6d6ab5ca59d11ce9aae8483 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2388718 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Geoff Lang 6eeb3d8b 2020-08-07T16:09:53 Support DXT textures with non-block sized mip levels. The block size requirement for each mip level meant that all DXT textures had to be POT sized. Relax these restrictions for non-zero mip levels to allow NPOT DXT textures. Increase the size of the D3D11 staging textures to the nearest block size to make sure allocation succeeds. Bug: angleproject:4841 Change-Id: I42fa295a0965241d77f81e57b17454091fda9376 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380237 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7e815c77 2020-07-08T13:43:40 Implement EXT_shadow_samplers Bug: angleproject:4863,b/161716126 Change-Id: I6beb45d91f59a851787c9f40b40266fb985198d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288330 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis e5f188b2 2020-08-31T15:36:31 Check for "Radeon" in renderer string. AMD workarounds relied on the vendor string containing "AMD" or "ATI". Some vendor strings only contain "Radeon", which lead to workarounds not being enabled. Bug: angleproject:5004 Change-Id: Ie32852212afd1df1f3f691c87a5459e1b53b74b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2385932 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao c0dda021 2020-08-26T11:20:06 Vulkan: release the ImageHelper's staging buffer after flush For mutable textures, right now glTexImage call and some of other cases, we are still using the ImageHelper's staging buffer. This will release the staging buffer after flush to reduce memory footprint. Bug: b/164511310 Change-Id: Ie1e52865a1c3a8f235c88331c4bb83c50d3f04da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378179 Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
James Darpinian 59d28532 2020-08-27T17:04:32 Fix GL_EXT_texture_compression_s3tc_srgb on macOS GL_EXT_texture_compression_s3tc_srgb wasn't being exposed on macOS because formatutilsgl.cpp was looking for GL_EXT_texture_sRGB, but it was moved to core in 2.1 and the macOS driver doesn't report it anymore. Bug: angleproject:4997 Change-Id: Iae736fac6d315f567ff5d834a043134f91625e59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380516 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Mohan Maiya f7b607c6 2020-08-29T16:34:30 Vulkan: Optimize atomic counter buffer offset calculations Call writeAtomicCounterBufferDriverUniformOffsets method only if there are valid atomic counter buffers Bug: angleproject:3566 Change-Id: I03c3fd2095e30381597bfc66acae0ccbf828d401 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2383787 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexis Hetu e1e6f294 2020-08-26T15:06:25 Make copyTexImage2D robust when source area is out of bounds Whenever the source area of the texture being copied is out of bounds and robust resource init is enabled, it is necessary to clear the invalid portion of the source area to 0 in the copy operation. Bug: angleproject:3930 Change-Id: If1605b917097006c37e7d59c66babbc32d0ba6d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378004 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Tobin Ehlis a25b165a 2020-08-28T12:01:44 Vulkan: Add transient flag to command pool Add the VK_COMMAND_POOL_CREATE_TRANSIENT_BIT flag when creating the PersistentCommandPool since the command buffers are only used once and then reset. Update the tracking bugs. Bug: b/166641492 Bug: b/166793850 Change-Id: I5827b5df7dd150756325421fc6ff0283bbd8b8e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381943 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Shahbaz Youssefi a0d048a4 2020-08-27T12:03:02 Vulkan: Fool-proof usage of GL and VK level indices Using boxed types, this change allows the compiler to catch errors when a level index in one space (e.g. GL) is mistakenly used in another space (e.g. VK). This change uncovered a number of bugs due to such mistakes which are fixed. Mistakes are still possible when the index is explicitly extracted, for example to be given to a Vulkan command, or when it's created, for example when retrieved from gl::ImageIndex::getLevelIndex. Future work can include using gl::LevelIndex in gl::ImageIndex directly to alleviate the latter at least. Bug: angleproject:4880 Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 8d412db2 2020-08-29T22:25:18 Revert "Convert unordered_map to absl::flat_hash_map for select files" This reverts commit 1acaf4eced42a26f09b4d9180a9e5db0f37bc9a4. Reason for revert: Fails when is_component_build is not set: lld-link: error: <root>: undefined symbol: public: __cdecl absl::Condition::Condition<struct std::__1::atomic<bool> const>(bool (__cdecl *)(struct std::__1::atomic<bool> const *), struct std::__1::atomic<bool> const *) <snip> Original change's description: > Convert unordered_map to absl::flat_hash_map for select files > > This is the initial CL to start migrating to abseil in various places: > - formatutils.h > - FramebufferVk.h > - Program.h > - ProgramExecutableVk.h > - RewriteRowMajorMatrices.cpp > > This intentionally hits a couple different places in the code to make > sure the abseil dependencies are added to the required targets. > > Bug: angleproject:4873 > Change-Id: I68c7d067b6912b0cc0ecde231501dbed92f0b189 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321735 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> TBR=timvp@google.com,jmadill@chromium.org,cclao@google.com Change-Id: I75041532fc5126b4c7cc5e0d4529883fb357e05b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4873 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2383870 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b4efc051 2020-08-28T14:45:18 Enable -Wdeprecated-copy. This is another warning turned on in Skia. It enforces an explicit copy assignment operator in some implicitly-generated cases. It caught one potential error in SubresourceUpdate. Bug: skia:7647 Change-Id: Ia501f619cf7f3d2e8647cdbbda2936f51f9721ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381953 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 331581e9 2020-08-27T11:55:16 Make copy*Texture parameters consistent for level indices They were passed as size_t, while GL level indices are GLint throughout ANGLE. Bug: angleproject:4880 Change-Id: I43bc9f01a607e457b55a061f473450d3360db808 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380230 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Charlie Lao fbafb46c 2020-08-26T10:56:33 Vulkan: Use context staging buffer for CopyTexSubImage This will avoid allocate staging buffer if there isn't one already. Bug: b/164511310 Change-Id: Ieb5ef12fa58c52c0a62276cab6de135fdd62780c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2377121 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten 1acaf4ec 2020-07-24T11:58:45 Convert unordered_map to absl::flat_hash_map for select files This is the initial CL to start migrating to abseil in various places: - formatutils.h - FramebufferVk.h - Program.h - ProgramExecutableVk.h - RewriteRowMajorMatrices.cpp This intentionally hits a couple different places in the code to make sure the abseil dependencies are added to the required targets. Bug: angleproject:4873 Change-Id: I68c7d067b6912b0cc0ecde231501dbed92f0b189 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321735 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 330c8673 2020-08-28T17:44:13 Enable MSVC warning 4312. This is caught in the Skia build. Bug: skia:7647 Change-Id: I9b164f6fcc55b7e13981659ee8a08766a99a2122 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381084 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Le Hoang Quyen 966a62cb 2020-08-04T12:08:00 Metal: autogen for EXT_occlusion_query_boolean. Bug: angleproject:2634 Change-Id: I4d6a6378a269ea9e38e9282d6dbfa45e4e3d4d5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336126 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao 5ac807b2 2020-08-26T10:18:00 Vulkan: Let stageSubresourceUpdateAndGetData use ctx staging buffer stageSubresourceUpdateAndGetData call are made and then flush the commands out, so they could just switch to use context's staging buffer instead of use per object's staging buffer. Bug: b/164511310 Change-Id: Iff7944a37073bb3641498e334847f599903858b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376895 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1ab8b75a 2020-08-28T14:45:15 Enable -Wreturn-std-move-in-c++11. Only one fix needed. Bug: skia:7647 Change-Id: I048d54ed67fbb09f4dce6c918db26ea63e7127a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376719 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao 9e544a84 2020-08-24T18:37:59 Vulkan: Fix alignment issue with context staging buffer Context's staging buffer is shared for all kind of usages. We should pass in alignment requirement for allocate call whenever it is different from the default alignment. This adds allocateWithAlignment call to DynamicBuffer call and switch ImgeHelper's usage of it to allocateWithAlignment Bug: b/164511310 Change-Id: Idcb6b6f95d6862ee6cb8fca9c164910b7e085a17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2373590 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Le Hoang Quyen 1c654d54 2020-08-26T00:16:52 Metal: Fix handling of vertex attrib offset not multiple of 4 Metal requires the vertex attribute offset to be multiples of 4, and its stride must not be less than attribute's size. This should fix the WebGL's test: conformance/attribs/gl-vertexattribpointer-offsets.html Bug: angleproject:4846 Bug: angleproject:2634 Change-Id: I0784a8ccaedd5e6c58a266243bfa94ba36e53e11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2374829 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5c56f228 2020-08-28T14:45:14 Enable two override suggestion warnings. -Wsuggest-destructor-override and -Wsuggest-override. Bug: skia:7647 Change-Id: Iaac1baa8f34fdf210baf2fdbe811a582b3ac2d14 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376717 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 34120d07 2020-08-27T15:29:04 Capture/Replay: Track groups of strings When string counters were added, it accidentally broke transform feedback varyings. All the strings were combined, resulting in: const char *glTransformFeedbackVaryings_varyings_0[] = { R"(out_Posout_Aout_Bout_C)" }; Instead, generate the counter for the entire group. This CL results in: const char *glTransformFeedbackVaryings_varyings_0[] = { R"(out_Pos)", R"(out_A)", R"(out_B)", R"(out_C)", }; Test: Manhattan MEC works again Bug: angleproject:4941 Change-Id: Ie605395942c9105ba234009989f41a2a1cd8c53e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381565 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Le Hoang Quyen 91004654 2020-08-25T01:08:00 Metal: Implement ANGLE_robust_resource_initialization. Bug: angleproject:4929 Bug: angleproject:2634 Change-Id: Ib99b810059420e69d939f1bbb644c2b95de62850 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2374826 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
David Reveman 9a19a996 2020-08-26T09:00:50 Vulkan: Use 4 MB as preferredLargeHeapBlockSize for allocator. This reduces preferredLargeHeapBlockSize from the default value of 256 MB to 4 MB, which reduces the initial block size from 32 MB to 512 KB. 4 MB is the same size as used by Chromium and Skia. It seems to be a good compromise of not wasting unused allocated space and not making too many small allocations. This change is limited to non-Qualcomm GPUs as a number of tests are failing on Qualcomm after this change and the initial investigation indicates a potential driver bug. See http://anglebug.com/4995 for more details. Bug: chromium:1122718 Bug: fuchsia:58959 Change-Id: Ifdaf863ef38e72098a04ee57dec46ee71cab6ac3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376891 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: David Reveman <reveman@chromium.org>
Shahbaz Youssefi 167a0f22 2020-08-25T17:11:54 Vulkan: Fixes to transform feedback emulation path Two bugs were affecting the following scenario: - Create program with xfb and no default uniforms - Draw without xfb - Begin xfb - Draw with xfb - End xfb - map and validate The first bug was that the descriptor set that contains the xfb buffers and default uniforms was never allocated for the first draw call resulting in VVL errors and crashes. The second bug was that "Begin xfb" was not setting the xfb buffers dirty bit, which meant that after the first draw call bound dummy buffers to the descriptor set, they would not get updated. This was simultaneously fixed in 5d3a4ca4e, but the added test nevertheless tests this. Bug: angleproject:4660 Change-Id: I16eee315e39ec5a657481e54ecd0491581e886aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376172 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi fde4d2f7 2020-08-28T04:19:25 Revert "Vulkan:Clean up best practices exceptions" This reverts commit 15438d3f906f4dffbd445ef01a934ffe1b8ccfbe. Reason for revert: Running end2end tests on Linux, this validation error pops a lot. Original change's description: > Vulkan:Clean up best practices exceptions > > Assign new bug ID for clean-up work. It appears that the > UNASSIGNED-BestPractices-vkCreateCommandPool-command-buffer-reset > error was already fixed. > > Bug: b/166641492 > Change-Id: I536017e0386cf5f57bb53bcba32d5df048050343 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380510 > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Commit-Queue: Tobin Ehlis <tobine@google.com> TBR=tobine@google.com,courtneygo@google.com,timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org Change-Id: I90ee856b8bcac3e3f2b8104fb8642185a26f3e63 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/166641492 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381077 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill dfddb983 2020-08-27T17:14:08 Fix warnings that show up in Skia with MSVC. Bug: skia:7647 Change-Id: I6951dcfc1eacd0426dfa7f8142780a5065fae1b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380715 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter a08495d9 2020-08-27T13:47:19 Revert "Vulkan: restore mContentDefined at endRP()" This reverts commit 53ee431e3d36692cbe50a96ebbf0ff898ec4d523. Bug: chromium:1122621 Change-Id: Ifd63aa0694e00ed6ef74b385466b874604355e79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380610 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>