src/tests/gl_tests/VulkanExternalImageTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi c75bd915 2024-12-10T23:01:44 Vulkan: Remove asyncCommandQueue It's been years and it never showed an advantage. In the meantime, performance without this feature seems close to native drivers (i.e. the feature has lost its appeal) and it's frequently a source of complication and bugs. Bug: angleproject:42262955 Bug: angleproject:42265241 Bug: angleproject:42265934 Bug: angleproject:42265368 Bug: angleproject:42265738 Bug: angleproject:42266015 Bug: angleproject:377503738 Bug: angleproject:42265678 Bug: angleproject:173004081 Change-Id: Id8d7588fdbc397c28c1dd18aafa1f64cbe77806f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6084760 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi fad2adb2 2024-01-12T14:43:33 Vulkan: Fix importing external object and using as storage image The create flags used to create the imported object was 0. Later, when the texture was used as a storage image, TextureVk::syncState would recreate the image (losing connection to external object). This change makes sure the create flags include all the necessary create flags such that the texture can be correctly used as storage image. Bug: angleproject:8464 Change-Id: I6587b53b1c2819a11dec8f2d5a3a30c889a4c63f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5194064 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ed2a8ef8 2023-12-20T00:06:10 Vulkan: Defer QFOT when acquiring texture with GL_NONE layout Instead of issuing a queue family ownership transfer with the UNDEFINED layout (and then hack its dst layout to be GENERAL), this change simply lets the queue family be changed when the image is next accessed (at which point a layout transition is necessary anyway). Bug: angleproject:8464 Change-Id: Iab36af0c641bd04029bdc0d9097e766e8a0f4145 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5138657 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 0aaa8de9 2023-12-19T23:23:40 Vulkan: Fix memory tracking vs external texture acquire ... with a layout of GL_NONE. Bug: angleproject:8464 Change-Id: I94690c5693c5bcb6d510e4a27097206f0da58a41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5138656 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e9c0241d 2023-12-19T10:23:13 Vulkan: Rely on Vulkan 1.1 entry points in tests Some KHR entry points that were promoted to Vulkan 1.1 no longer seem to be loadable with their KHR symbols. Bug: angleproject:8464 Change-Id: Id5417e5b047e6bd34d144fead518f771c17658e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5135676 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 2debd07d 2022-09-21T11:40:18 Automatically query status of features for tests Now tests can skip based on what features exist, compared to what features are explicitly asked for. For example, a test suite may override-enable a (normally disabled) feature that depends on a hardware capability. With this change, it can be skipped if said hardware capability doesn't exist. As a bonus, tests now correctly skip if the feature is overriden through an environment variable. This change also cleans up VulkanPerformanceCounterTest tests which did the same for a number of specific features. Bug: b/243398683 Change-Id: I84f026e3394eab56fd123e02bee72720c7ed94c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909789 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 797e627e 2022-04-08T22:49:51 Autogenerate list of features as enum The WithX() and WithNoX() helpers are removed and replaced with enable() and disable() member functions that take the name of the feature (as a Feature::X enum constant). This has two benefits: - Adding tests that override a feature no longer requires additional helper functions to be written. - There's no mistaking the feature name. This change doesn't yet fix the main issue in anglebug.com/6435, but does fix the following helpers using an old feature name (so they were ineffective): - WithMetalForcedBufferGPUStorage - WithNoVulkanViewportFlip A follow up would remove the old way of overriding features in tests and replaces them with the new way. Bug: angleproject:6435 Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 65720272 2021-11-26T17:42:16 Add end2end gl test for *_ANGLE_vulkan_image extensions Bug: chromium:1264439,angleproject:6741 Change-Id: I12d332995138a020ba514fba34024c3e666b8e6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3304396 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6fe13477 2021-11-11T00:47:14 Vulkan: Add external's pNext to ANGLE_external_objects_flags ANGLE was chaining VkImageFormatListCreateInfoKHR to VkImageCreateInfo::pNext to support sRGB extensions. For external images, it was unknown whether that was valid because there was no way to know if external used an identical chain of pNexts. This was causing a discrepancy between images created by Chrome and those created by ANGLE as part of an import. This change updates ANGLE_external_objects_flags to take in the pNext chain external has used to create the image so ANGLE could create the image identically. Bug: chromium:1266094 Change-Id: I479b9e7ff39d437425dc91c79834880749766f99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3274177 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 96b587b0 2021-11-10T15:10:09 Vulkan: Fix rendering to RGB external images Based on the provided usage flags, the texture's image access mode is updated to be renderable. Bug: chromium:1266094 Change-Id: I5d092a2786fc12537ef0ad1f224137cc1fd8f864 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270980 Reviewed-by: Craig Stout <cstout@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten eb1d2474 2021-10-04T20:23:26 Vulkan: Add R8G8B8_UNORM to vk_format_map.json The map of R8G8B8_UNORM -> VK_FORMAT_R8G8B8_UNORM is missing from vk_format_map.json. This leads to attempting to get format bits for angle::FormatID::NONE / VK_FORMAT_UNDEFINED. This CL adds R8G8B8_UNORM to vk_format_map.json, so devices that support it, like ARM, can use it. This allows those devices to import AHBs created with R8G8B8_UNORM. This CL also adds some additional ASSERT() and UNREACHABLE() calls to catch missing formats sooner. This allows the EGL tests to pass on ARM devices, but the tests are still skipped due to Qualcomm not having the necessary support for optimal tiling. Bug: angleproject:6277 Test: dEQP-EGL.functional.image* Change-Id: I41b7ead97a10ae80be4b6048d36d0d85ad71784f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204152 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Peter Kasting 4f2b2995 2021-09-23T09:50:46 Fix -Wshadow. This still disables the warning for glmark2 instead of fixing it, to avoid needing to upstream a patch. Bug: chromium:794619 Change-Id: Ice602996041d6090c9b09ee81c8ed095c4fa6b2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3179860 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev a5e95c07 2021-08-26T02:40:10 Adjust TexStorage2DEXT validation; update tests - Use common texture format support function. - Enforce size restrictions for compressed formats. - Expand CompressedTexture* and WebGLCompatibilityTest.CompressedTexImage* tests. - Adjust GL_DEPTH_COMPONENT16 support condition on ES 2.0. - Adjust GL_DEPTH24_STENCIL8 support condition on ES 2.0. - Adjust GL_RGB10_A2 support condition on ES 2.0; adjust VulkanExternalImageTest.TextureFormatCompatChromium* tests. - Do not use integer formats in TextureRectangleTest.TexStorage2D. Bug: angleproject:5731, angleproject:6230 Change-Id: I2f288f459b511cc004601238df717aa78433be7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3118553 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Yuly Novikov ba233b6a 2021-02-25T13:44:32 Suppress 1 VulkanExternalImageTest on Linux AMD Vulkan VulkanExternalImageTest.TextureFormatCompatChromiumMutableNoStorageFd Bug: angleproject:5682 Change-Id: Id2aa15f4943f9132d133eeb540e35e405896a3b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2718530 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov a304f111 2020-11-22T18:47:39 Skip tests failing on Linux AMD RX 5500 XT Crashes: OpenGL: MemoryObjectTest.MemoryObjectQueries MemoryObjectTest.MemoryObjectShouldBeMemoryObject MemoryObjectTest.ShouldFailValidationOnImportFdUnsupportedHandleType UniformBufferTest.SizeOverMaxBlockSize VulkanExternalImageTest.ShouldClearOpaqueFdWithSemaphores VulkanExternalImageTest.ShouldDrawOpaqueFdWithSemaphores VulkanExternalImageTest.WaitSemaphoresRetainsContentOpaqueFd Vulkan: MultisampledRenderToTextureTest.2DColorDepthMultisampleDrawTest MultisampledRenderToTextureTest.DepthReadWriteToggleWithStartedRenderPass MultisampledRenderToTextureES3Test.RenderbufferClearDrawCopyThenBlendWithDepthStencilSameProgram MultisampledRenderToTextureES3Test.RenderbufferDepthStencilClearDrawCopyThenBlend MultisampledRenderToTextureES3Test.RenderbufferDepthStencilDrawCopyClearThenBlend MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndDepthStencilThenTwoColors MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndDepthThenTwoColors MultisampledRenderToTextureES3Test.RenderbufferUnresolveColorAndStencilThenTwoColors SimpleStateChangeTest.RebindTranslatedAttribute Failures: OpenGL: GLSLTest_ES31.MixedRowAndColumnMajorMatrices_WriteArrayOfArray GLSLTest_ES31.MixedRowAndColumnMajorMatrices_WriteSideEffect PixmapTest.BindTexImage ReadPixelsPBONVTest.Basic SimpleStateChangeTestES31.InvalidateThenStorageWriteThenBlend StateChangeTestES3.DrawPausedXfbThenNonXfbLines Bug: angleproject:5379, angleproject:5380, angleproject:5381 Bug: angleproject:5382, angleproject:5383, angleproject:5384 Bug: angleproject:5385, angleproject:5386, angleproject:5387 Bug: angleproject:5388, chromium:1004356 Change-Id: I73c6ba193ef230f576c804e8880f326ac5eabe0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552940 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 38016632 2020-11-11T08:04:45 Vulkan: Enable async feature in end2end_tests. This adds a new async-command-queue-enabled config that we run against most of the GLES tests in angle_end2end_tests. The tests now test both with and without the threaded command queue. Bug: b/172704839 Change-Id: Ife75f8328f23ac150cddf8ad8a6c4b8fc2d83986 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532655 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 62bba4ae 2020-10-13T12:12:34 Vulkan: Regression test for content defined of external images Bug: b/167275320 Bug: angleproject:4836 Change-Id: Iedbe1dfc8562c4c28477bf6a5a298620fcd48a67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468457 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 426fa735 2020-10-13T11:51:50 Vulkan: Fix command reordering on release to external When releasing buffer/image to external, the necessary barrier was recorded on the "outside render pass command buffer". However, if the resource was used in the current render pass, that render pass should have closed before this, otherwise the barrier was reordered before it which is incorrect. Bug: chromium:1136367 Bug: chromium:1135792 Bug: angleproject:5002 Change-Id: I237d5e6bb46189a4ce61c2f4602e356955cc87a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468456 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
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>
Shahbaz Youssefi fc4bd898 2020-08-03T16:29:06 Vulkan: Support ANGLE_external_objects_flags With this extension, it is possible to import Vulkan images into ANGLE (similar to EXT_external_objects) while specifying the Vulkan create and usage flags used to create that image. This can be used by the application to drop usage flags it does not need to improve performance, or add create flags as it requires. Bug: angleproject:4912 Bug: fuchsia:52759 Change-Id: Ia568973b19670999dd0e69f6ac5548e8ef0c3eec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335020 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org>
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>