Mesa (staging/20.1): radv: fix build on Android 7 (v2)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 20:07:37 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 5dfdd9b9f04e481de5951bc89f64a6e842344257
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5dfdd9b9f04e481de5951bc89f64a6e842344257

Author: Mauro Rossi <issor.oruam at gmail.com>
Date:   Thu Jul 23 22:50:32 2020 +0200

radv: fix build on Android 7 (v2)

Fixes the following building error:

external/mesa/src/amd/vulkan/radv_android.c:28:10: fatal error:
'vndk/hardware_buffer.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~

(v2) use the existing preprocessor condition #if ANDROID_API_LEVEL >= 26

Fixes: f36b527 "radv/android: Add android hardware buffer queries."
Reported-and-tested-by: youling 257 <youling257 at gmail.com>
Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6051>
(cherry picked from commit 80c135e6a6ade34f451e694d1c54598a75b1243e)

---

 .pick_status.json             | 2 +-
 src/amd/vulkan/radv_android.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index aded9cee1df..80507a22856 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
         "description": "radv: fix build on Android 7 (v2)",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "f36b52740a026c46f718a4cb63e70da0322d4b48"
     },
diff --git a/src/amd/vulkan/radv_android.c b/src/amd/vulkan/radv_android.c
index 567d2b1f1fa..68cb275ca2c 100644
--- a/src/amd/vulkan/radv_android.c
+++ b/src/amd/vulkan/radv_android.c
@@ -25,13 +25,13 @@
 #include <hardware/gralloc.h>
 #include <hardware/hardware.h>
 #include <hardware/hwvulkan.h>
-#include <vndk/hardware_buffer.h>
 #include <vulkan/vk_android_native_buffer.h>
 #include <vulkan/vk_icd.h>
 #include <libsync.h>
 
 #if ANDROID_API_LEVEL >= 26
 #include <hardware/gralloc1.h>
+#include <vndk/hardware_buffer.h>
 #endif
 #endif
 



More information about the mesa-commit mailing list