src/libANGLE/renderer/vulkan/MemoryObjectVk.h


Log

Author Commit Date CI Message
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>
Jeff Vigil 6136620b 2021-03-25T15:43:06 Reland "EGL: GLES: Implement GL_EXT_protected_textures" This is a reland of 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa This removes changes in gl backend. Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: Id36d697c53afc0f0dadf92bda4565f9157f4fc2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076825 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c408926f 2021-07-22T12:00:59 Revert "EGL: GLES: Implement GL_EXT_protected_textures" This reverts commit 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa. Reason for revert: Suspected for breaking ANGLE->Chrome roller. Bug: angleproject:6204 Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:3965 Change-Id: Ia3ef260a17097b474189ccad5b235a9db99ee00b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043889 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jeff Vigil 6210a9b3 2021-03-25T15:43:06 EGL: GLES: Implement GL_EXT_protected_textures Implement EGL_EXT_protected_content Images Add protected member to Images and Textures Add error when creating objects if not supported or does't match native buffer When creating siblings pass protected state Add extension caps Add Validation Add GetTexParameter and SetTextparameter Add protected to Texture and state Expand tests for images and textures Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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 3ff24d6f 2020-05-10T18:16:55 Vulkan: Add dedicated allocation support to MemoryObjectVk Add a VkMemoryDedicatedAllocateInfo to the vkAllocateMemory pNext chain if the client specifies the memory object was a dedicated allocation. We don't yet support suballocation of external memory objects, so all allocations are already effectively dedicated allocations regardless of whether vulkan requires it. The spec requires that memory passed to vkBindImageMemory be created with a VkMemoryDedicatedAllocateInfo if the driver requires dedicated allocations for that VkImage. If the driver does not require a dedicated allocation, there actually seems to be no explicit requirement to use this structure even if it was passed in at allocation time. Bug: angleproject:4627 Change-Id: I8a660e871bdf72815815f0c0b3000f3b0570bd2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2192501 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 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>
Michael Spang e4ba2d87 2020-02-20T16:05:02 Pass ContextVk instead of gl::Context to internal methods Minor cleanup to change funciton signatures of vulkan specific methods in MemoryObjectVk & SemaphoreVk. Bug: angleproject:2475 Change-Id: I230664548004ebc48b559e0f25264ea948ce5a1f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067500 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: 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>
Michael Spang a0b00e97 2019-04-09T18:45:22 Vulkan: Expose GL_EXT_memory_object_fd & GL_EXT_semaphore_fd If the vulkan driver has support for VK_KHR_external_memory_fd or VK_KHR_external_semaphore_fd, add the GL versions of these to the vulkan renderer's extensions. Bug: angleproject:3289 Change-Id: I7f04b5cf883f93f6ccd579c2b75d6831b854bfd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552027 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>