venus: fix android wsi with global fencing disabled
authorYiwei Zhang <zzyiwei@chromium.org>
Mon, 28 Nov 2022 22:29:11 +0000 (22:29 +0000)
committerEric Engestrom <eric@engestrom.ch>
Wed, 30 Nov 2022 21:12:44 +0000 (21:12 +0000)
Fixes: b21e4a7990c ("venus: put android wsi on the sub-optimal path")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20049>
(cherry picked from commit 6148ccef6372e634ea4875b75419bfdc64e6b219)

.pick_status.json
src/virtio/vulkan/vn_android.c

index 69b4cc3..2821ca0 100644 (file)
         "description": "venus: fix android wsi with global fencing disabled",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "b21e4a7990cf4d68948f5b3379bd828626e6f8a1"
     },
index b38530a..a4066e4 100644 (file)
@@ -826,8 +826,9 @@ vn_QueueSignalReleaseImageANDROID(VkQueue _queue,
    struct vn_device *dev = queue->device;
    const VkAllocationCallbacks *alloc = &dev->base.base.alloc;
    const bool has_sync_fd_fence_export =
-      dev->physical_device->renderer_sync_fd_fence_features &
-      VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT;
+      dev->instance->experimental.globalFencing == VK_TRUE &&
+      (dev->physical_device->renderer_sync_fd_fence_features &
+       VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT);
    VkDevice device = vn_device_to_handle(dev);
    VkPipelineStageFlags local_stage_masks[8];
    VkPipelineStageFlags *stage_masks = local_stage_masks;