Mesa (master): anv/android: fix assert in anv_import_ahw_memory

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 21 11:57:29 UTC 2020


Module: Mesa
Branch: master
Commit: f06e4ab3190a0a715447c4df4017892adb8708dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f06e4ab3190a0a715447c4df4017892adb8708dc

Author: Abhishek Kumar <abhishek4.kumar at intel.com>
Date:   Tue Apr 21 06:28:31 2020 +0000

anv/android: fix assert in anv_import_ahw_memory

Commit fixes assert that triggers when running
   dEQP-VK.api.external.memory.android_hardware_buffer.dedicated.buffer#bind_export_import_bind

on a debug build of Mesa.

Fixes: c79a528d ("anv/android: support import/export of AHardwareBuffer objects")
Signed-off-by: Abhishek Kumar <abhishek4.kumar at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4655>

---

 src/intel/vulkan/anv_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
index 74b5b062286..b46a990b32e 100644
--- a/src/intel/vulkan/anv_android.c
+++ b/src/intel/vulkan/anv_android.c
@@ -308,7 +308,7 @@ anv_import_ahw_memory(VkDevice device_h,
    VkResult result = anv_device_import_bo(device, dma_buf, 0,
                                           0 /* client_address */,
                                           &mem->bo);
-   assert(VK_SUCCESS);
+   assert(result == VK_SUCCESS);
 
    /* "If the vkAllocateMemory command succeeds, the implementation must
     * acquire a reference to the imported hardware buffer, which it must



More information about the mesa-commit mailing list