src/tests/gl_tests/VulkanExternalImageTest.cpp


Log

Author Commit Date CI Message
Michael Spang 0117ba26 2020-06-03T17:44:39 Re-enable ShouldClearOpaqueFdRGBA8 on Pixel2 Vulkan Bug: angleproject:4630 Change-Id: Ib1e7ecd9bedf6841489f7fb5bba9cae8881aa33e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229067 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 9a78f6cf 2020-05-12T01:25:09 Add a test for mandatory Fuchsia handle types FEMU isn't reporting zircon events correctly in vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, which causes the tests to be skipped. There's no test that can catch this problem, so add one. Bug: angleproject:4625 Change-Id: I0733e84eccb630569230c360fb900a1f04bf0f9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195690 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang f0efc9c4 2020-05-12T00:22:07 Apply compression algorithm to VulkanExternalImageTest These tests have opaque fd and zircon handle variants that only differ in the handle operations. Turn the test into a template that runs twice with an opaque fd and fuchsia template argument. Bug: angleproject:3289 Change-Id: Ibb3baaa8eef239e3747a0e74ce17396637c8bcd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195686 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang 6067c7d8 2020-05-12T18:18:47 Reland "Vulkan: Add semaphores test to VulkanExternalImageTest" This is a reland of 69e46942563b30be8a79512252e92fcf00c1a522 Original change's description: > Vulkan: Add semaphores test to VulkanExternalImageTest > > Add a more substantial test that uses semaphores to > VulkanExternalImageTest. > > It's still just a clear in GL, which exposed a bug that a staged clear > wasn't be flushed by a call to glSignalSemaphoreEXT. > > Bug: angleproject:3289 > Change-Id: Id938eaf2c8c20cb0ae9fb948fbfcf3448980b577 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195684 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:3289 Change-Id: Idce1e8944b72445c92be9ad08d8c5869ca0b7df2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197735 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Michael Spang c4734bf6 2020-05-12T22:15:02 Revert "Vulkan: Add semaphores test to VulkanExternalImageTest" This reverts commit 69e46942563b30be8a79512252e92fcf00c1a522. Reason for revert: Broke the build due to VulkanExternalHelper API change Original change's description: > Vulkan: Add semaphores test to VulkanExternalImageTest > > Add a more substantial test that uses semaphores to > VulkanExternalImageTest. > > It's still just a clear in GL, which exposed a bug that a staged clear > wasn't be flushed by a call to glSignalSemaphoreEXT. > > Bug: angleproject:3289 > Change-Id: Id938eaf2c8c20cb0ae9fb948fbfcf3448980b577 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195684 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I50b2af80cd0214bd3c317eb5ba211ddc66803d74 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3289 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197193 Reviewed-by: Michael Spang <spang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Michael Spang 69e46942 2020-05-12T01:46:50 Vulkan: Add semaphores test to VulkanExternalImageTest Add a more substantial test that uses semaphores to VulkanExternalImageTest. It's still just a clear in GL, which exposed a bug that a staged clear wasn't be flushed by a call to glSignalSemaphoreEXT. Bug: angleproject:3289 Change-Id: Id938eaf2c8c20cb0ae9fb948fbfcf3448980b577 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195684 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang 7c6a30c2 2020-05-11T18:47:12 Enable validation layers in VulkanExternalHelper If validation layers are requested by default, also enabled them in VulkanExternalHelper. Bug: angleproject:3289 Change-Id: Ic75089d38992be3b4745ce0309bf4ce6b8a702b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2195683 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Michael Spang d654234e 2020-05-10T19:35:05 Vulkan: Use dedicated allocations in VulkanExternalHelper This removes the coverage of non-dedicated allocations, but we've never supported that properly anyway (we require that the offset passed to glTexStorageMem2DEXT be zero). Bug: angleproject:4627 Change-Id: I14b0f39e5e13c3aafc4549dc59b6e3ac4ec6ad8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2192500 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Michael Spang dae210e6 2020-05-04T00:44:16 Fix validation errors & re-enable VulkanExternalImageTest clear tests These tests previously encountered errors attempting to transfer images from VK_QUEUE_FAMILY_EXTERNAL back to itself (this is not valid because one of the queues families in a memory barrier must be the family of the queue that executes the barrier). These invalid transfers were made because our ownership tracking started all resources in the "externally owned" state, with the expectation that the first operation on the resource would be a call to glWaitSemaphoreEXT to acquire ownership. It is far from clear that a call to glWaitSemaphoreEXT is always required to gain ownership of a resource. The EXT_external_objects extension inherits Vulkan's semantics, and what the Vulkan spec says is that the first entity to access a resource implicitly assumes ownership (see 11.7.1 "External Resource Sharing"). Binding a resource to memory does not constitute an access to that resource, or affect its ownership. Allocations should not be accesses, either; they happen at a lower level and the entire discussion about determining initial ownership from first access would serve no purpose if the mere allocation of the underlying memory was sufficient to assume ownership. This patch therefore adjusts the initial queue family ownership of resources created in memory objects to be the ANGLE renderer's queue family, just like a locally allocated image would be. Since this ownership state may not be correct (an external API may have already accessed the image, and assumed ownership) we must relax our assertions to allow a call to glWaitSemaphoreEXT while in this state. For images, this is only permitted while the layout is undefined. An alternative would be to set the initial queue family to a sentinel value that indicates that we don't know, but that would require checking for this value before making any accesses, and only then asserting local ownership. There's no real upside to this; the net effect of the first access rule is that we must effectively assume ownership until proven otherwise. Besides appearing to be the spec's intent, this change simplifies some usage scenarios because a queue submission is not required in the source Vulkan instance in order to allocate resources that will be initially accessed from GL. This seems especially important since there's no mechanism to allocate an external memory object from inside GL. The only downside is that the initial ambiguity in ownership prevents us from diagnosing certain errors, but this limitation is temporary; ownership becomes clear as soon as there is at least one access or at least one synchronization operation affecting the resource. Bug: angleproject:4229 Change-Id: Ibca2bfe373810c55352b1d849d07733d5fcfe5f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2178946 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 4271443d 2020-03-04T20:33:36 Fix VulkanExternalImageTest on SwiftShader Check isSwiftShader() for whether to load swiftshader instead of the default ICD. The spec says we should query GL_DEVICE_UUID_EXT & co for this, but we haven't implemented those queries yet. Bug: angleproject:4092 Change-Id: Ifd74d6b6706f7b1fcbe5d82a33ecf70e631e26b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2088660 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Geoff Lang 13ea5b7f 2020-03-19T12:43:12 Implement gl[Get]MemoryObjectParameterivEXT These functions are required to tell the driver that the memory object is dedicated memory. This is required for AMD drivers on Linux. Bug: chromium:1049218 Change-Id: I17d69cde5e6308791dc90784f4d6e348503a6ed6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2110051 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Michael Spang 55228e53 2020-03-04T18:25:47 Add Chrome texture formats test for VulkanExternalImageTest This make sure the VkFormat/internalformat combinations that Chrome uses succeed import, which in particular requires the object size to match. Allowing VK_FORMAT_R8G8B8_UNORM VkFormat for GL_RGB8 will make this test fail when run on a native vulkan that supports that format. Bug: chromium:1058521 Change-Id: I91483568ba8552f40314f10215bfea59e5ca2b94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2088652 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang c4197713 2019-06-03T19:23:02 Implement glImportMemoryZirconHandle & glImportSemaphoreZirconHandle Implement import of fuchsia external objects passed by zircon handle. This works exactly the same as with file descriptors. Bug: angleproject:3492 Change-Id: I4d46917dfc5902f00c94550158a9f8073097f0a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642334 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 17217c6e 2019-12-17T17:31:17 Vulkan: Fix layers being disabled in tests. The ANGLE_ENABLE_VULKAN_VALIDATION_LAYERS_BY_DEFAULT define shouldn't be being checked in tests. Enable the debug layers by default. Bug: angleproject:4227 Bug: angleproject:4229 Change-Id: I9717cb1c611ebd585a5c03ba2057036e1b086001 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1972497 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tobin Ehlis c1776c61 2019-11-13T11:36:35 Vulkan:Add Swiftshader configs Add Swiftshader configs to existing test instantiation macros for all ESX variants. This causes Swiftshader to be used to run end2end tests. Added detection code to know when tests are running on Swiftshader and skipping a number of fails initially. Note that when running ANGLE end2end tests within Chromium build on Win32 bots there were crashes with Swiftshader config for tests that should have been skipped. Due to this, just skipping Swiftshader configs on Win32 for now. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I32527a62304c5fad90f645b372edf9411ca2b212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1914126 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Michael Spang 6bb193c8 2019-05-22T16:32:21 Vulkan: Implement glImportSemaphoreFdEXT Allow importing file descriptors into semaphores on linux. This can be used to synchronize ANGLE's GL renderer with respect to vulkan composition in chromium. Bug: angleproject:3289 Change-Id: I04ba3bbb2e343baa000ff89c21c03ca36163a713 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623812 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Michael Spang f02a767d 2019-04-09T18:45:23 Vulkan: Implement glTexStorageMem2DEXT This implements support for creating textures that alias vulkan images allocated inside external memory. Bug: angleproject:3289 Change-Id: Iad071f353a217793102ae737647c7cd572f7b0ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552029 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Michael Spang 3b2c6bfd 2019-04-16T17:19:50 Vulkan: Implement glImportMemoryFdEXT Allow importing opaque file descriptors into memory objects on linux. Currently this just holds onto the file descriptor rather than calling vkAllocateMemory immediately. The latter will be easier once we have support for suballocation (anglebug.com/2162). Bug: angleproject:3289 Change-Id: Ia80ce07b2a9ec95b9063feb9bfeb24ffe77fa40e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552028 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>