src/tests/gl_tests/VulkanImageTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 3f572905 2024-06-19T17:46:38 Add basic begin/end support for perf counters The AMD_performance_monitor extension has explicit begin/end calls to capture counters. This was not implemented in ANGLE and the tests were relying on ANGLE always capturing counters (incurring a small overhead). This change does not complete the implementation of that extension, but does add basic support for starting and stopping perf counter measurements. While inactive, most counters are not updated. Bug: angleproject:42267038 Change-Id: I3ff6448b22ca247c217401cb2d76ef4142c9d759 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5639343 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
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>
Amirali Abdolrashidi e7a77053 2023-09-12T13:40:47 Update VulkanMemoryTest after adding context flush After adding context flushing to the memory allocation fallbacks in a previous CL (https://crrev.com/c/4787949), some tests in the VulkanMemoryTest suite no longer test the success path of the fallback to wait for submitted commands to finish. * Updated AllocateVMAImageAfterFreeing2DGarbageWhenDeviceOOM * The test now uses an additional allocation and draw after the first sync, followed by a second sync. During the allocation of the last texture, it would wait to finish the submitted command and free the garbage without flushing the whole context. Bug: b/280304441 Change-Id: Idc583e120b8d9e1cc550f6cba4cb0b2b197e4944 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4860367 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jeff Vigil 1bd45c4f 2023-07-17T14:18:53 Add tiling mode for GL_EXT_memory_objects Add set and get TexParameter for pName GL_TEXTURE_TILING_EXT Add test case to VulkanImageTest for import LINEAR memory object Bug: angleproject:8274 Change-Id: I4432093e41f45e3926a27e3dee00d48c0438cae5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752793 Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: mohan maiya <m.maiya@samsung.com>
Amirali Abdolrashidi b1b12d4a 2023-06-22T15:27:48 Vulkan: Move device OOM tests to new test suite * Moved the device OOM tests from VulkanImageTest to a new test suite, VulkanMemoryTest. * It is instantiated for ES3. * Moved the slow tests in the expectation file to the end. Bug: b/280304441 Change-Id: Icc958b5eb071567f8e6671661302760c7f5e3621 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639041 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi 232506e1 2023-05-15T19:19:39 Vulkan: Free the garbage memory before realloc The previous CL added the feature of freeing garbage memory in the event of device OOM. However, it was for image allocations only. * Extended finishing commands and freeing the garbage to buffers. * Added unit test to allocate buffer after freeing memory space on the device. Bug: b/280304441 Change-Id: I540b27a41b34d1ceb1cd3119213341c9f290ea38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4540209 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi 5f9548c3 2023-05-19T11:51:04 Vulkan: Free the garbage memory before realloc Currently image allocations fall back to system memory in case of a device OOM. However, in some cases, it is also possible to gain some memory by freeing garbage memory from the device. This allows us to keep the allocation on the device memory. * Updated the image allocation fallback, so we will try cleaning the garbage memory through the renderer before retrying the allocation. * finishOneCommandBatchAndCleanup() in RendererVk, which will call a similar function in its CommandQueue. It will be called until there are no more in-flight submissions. * The existing finishOneCommandBatchAndCleanup() in CommandQueue has been renamed to finishOneCommandBatchAndCleanupImpl(). * Updated the flags used for VMA image allocations. If any device memory is freed after garbage cleanup to make enough space for the new allocation, it will take precedence over the system memory. * Added unit tests in which a new image allocation could happen on the device after freeing the garbage memory. * They use a 2D texture and a 2D texture array for garbage. Bug: b/280304441 Change-Id: Ia5e605e180833b44af8c77550ab1b0b8ba21724e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4547941 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi 6f959e07 2023-04-28T16:00:11 Vulkan: Add non-device memory option for VMA image * Updated the required flags for allocateAndBindMemory() to no longer include VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, though still preferred. This allows VMA to allocate from another memory type if the device is out of memory. * Added a debug message to indicate when allocated memory for VMA image does not have all the preferred property flags. * Also added a warning in the case of memory allocation fallback. * Added a perf counter to keep track of image allocation fallbacks from the device memory. * deviceMemoryImageAllocationFallbacks * Added a test to make sure that VMA images can still be allocated from other memory types even if device memory is unavailable. * VulkanImageTest.AllocateVMAImageWhenDeviceOOM Bug: b/280304441 Change-Id: Ic452c18ded25345cdb7e271442372b99aede045e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4493483 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi f1872822 2022-12-22T17:17:37 Vulkan: Fix imageless framebuffer VVL issue In some tests, including some blink tests, there were cases of VVL messages spamming the output log, even though they did not always cause a failure. Investigation showed that in some cases, the call to EGL_CreateImageKHR() was not setting all the attributes in the ImageHelper object that is used later for an imageless framebuffer, specifically the one created in VkImageImageSiblingVk::initImpl(). * Added the usage flags and view formats in the new image created in VkImageImageSiblingVk. * Added a Vulkan image test to make sure the error is fixed. Bug: b/261473248 Bug: angleproject:7845 Change-Id: I1874b2930e9ce62e5b603cf7acff6fd78b957d5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4117584 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@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>
Sunny Sachanandani d4cbd9bf 2022-04-11T16:55:39 vulkan: Mark external memory textures as preinitialized Textures initialized from external memory objects should be considered preinitialized so that they're not cleared on first access with robust resource init. This is essential for Vulkan-GL (WebGPU-WebGL) interop on Linux where Skia or Dawn could be first used to render into a VkImage backed by an external memory object, and a GL texture is created lazily on first GL access. This CL also includes an end-to-end test for such interop, and changes to support that test: 1) Add writePixels() to VulkanHelper to upload pixels to a VkImage 2) Detect external memory / semaphore extensions when VulkanHelper is initialized from ANGLE. 3) Allow importing external memory object that's larger than VkImage size requirements. Bug: angleproject:7188 Change-Id: I60c250b64df1766a179edd1cc67c3f0765e8aa0f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582954 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Peng Huang 32f572b7 2021-12-03T17:58:51 Support creating EGLImage from VkImage Bug: chromium:1264439 Change-Id: I520182143e748f25b44d0725f3f171b7b33a85d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3311131 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Peng Huang <penghuang@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>