summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-11-26 16:26:35 +0100
committerJuan A. Suarez Romero <[email protected]>2018-12-04 12:33:52 +0100
commiteb453b3f9da3078f8ea644bfce2e4e2d69daee22 (patch)
treeae3a3c6b37cc5ae415a13a818bbc20bdedd7621e /src/amd
parentd22db70cea577a344d68517b9204b090c32bb0f1 (diff)
radv/android: Mark android WSI image as shareable.
Fixes: b1444c9ccb0 "radv: Implement VK_ANDROID_native_buffer." Acked-by: Samuel Pitoiset <[email protected]> (cherry picked from commit 51091b3e1f212be956f91ac5214191c14e83ac59)
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_android.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_android.c b/src/amd/vulkan/radv_android.c
index f5d70825dd2..93799b87b8f 100644
--- a/src/amd/vulkan/radv_android.c
+++ b/src/amd/vulkan/radv_android.c
@@ -110,9 +110,19 @@ radv_image_from_gralloc(VkDevice device_h,
struct radv_bo *bo = NULL;
VkResult result;
+ VkImageCreateInfo updated_base_info = *base_info;
+
+ VkExternalMemoryImageCreateInfo external_memory_info = {
+ .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
+ .pNext = updated_base_info.pNext,
+ .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
+ };
+
+ updated_base_info.pNext = &external_memory_info;
+
result = radv_image_create(device_h,
&(struct radv_image_create_info) {
- .vk_info = base_info,
+ .vk_info = &updated_base_info,
.scanout = true,
.no_metadata_planes = true},
alloc,