summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEleni Maria Stea <elene.mst@gmail.com>2021-02-04 23:19:48 +0200
committerEleni Maria Stea <elene.mst@gmail.com>2021-02-05 20:32:01 +0200
commit6566714d2a68efab97f03fb648162976fbf7c89c (patch)
tree934222c19fdb57a93d7d173e58fe5b66fd3fbcb8
parent05677320be1850607017c9c2c50fd9b170f37fab (diff)
ext_external_objects: add mutable flag bit to external images
Added VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT at image creation. According to issue 17 of EXT_external_objects: Vulkan applications will be required to set the mutable format bit when creating an image that will alias with an OpenGL texture on an OpenGL implementation that supports ARB_texture_view, OES_texture_view, EXT_texture_view, or OpenGL 4.3 and above. Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--tests/spec/ext_external_objects/vk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/spec/ext_external_objects/vk.c b/tests/spec/ext_external_objects/vk.c
index 3694f7774..9d1e4a2be 100644
--- a/tests/spec/ext_external_objects/vk.c
+++ b/tests/spec/ext_external_objects/vk.c
@@ -1054,6 +1054,12 @@ vk_create_ext_image(struct vk_ctx *ctx,
img_info.usage = props->usage ? props->usage : VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
img_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
img_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+ /* issue 17 of EXT_external_objects
+ * Required in OpenGL implementations that support
+ * ARB_texture_view, OES_texture_view, EXT_texture_view,
+ * or OpenGL 4.3 and above.
+ */
+ img_info.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
if (vkCreateImage(ctx->dev, &img_info, 0, &img->img) != VK_SUCCESS)
goto fail;