radv: Add VK_ANDROID_external_memory_android_hardware_buffer.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 24 Sep 2019 11:56:05 +0000 (13:56 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 10 Oct 2019 17:02:34 +0000 (17:02 +0000)
Still disabled but now we can add entrypoints.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_private.h

index 12596df13641ef2767a802c6fdf05c33be10466e..3405f8f86e101071f4a12ba1ccca6af361817965 100644 (file)
@@ -50,6 +50,7 @@ class Extension:
 # the those extension strings, then tests dEQP-VK.api.info.instance.extensions
 # and dEQP-VK.api.info.device fail due to the duplicated strings.
 EXTENSIONS = [
+    Extension('VK_ANDROID_external_memory_android_hardware_buffer', 3, False),
     Extension('VK_ANDROID_native_buffer',                 5, 'ANDROID && device->rad_info.has_syncobj_wait_for_submit'),
     Extension('VK_KHR_16bit_storage',                     1, '!device->use_aco'),
     Extension('VK_KHR_bind_memory2',                      1, True),
index 20a3cd389036d51a90e8fc5850b187877e8d04cb..2f5062d99a1880ff106f0a035b18cc260a569023 100644 (file)
@@ -84,6 +84,19 @@ typedef uint32_t xcb_window_t;
 #include "wsi_common.h"
 #include "wsi_common_display.h"
 
+/* Helper to determine if we should compile
+ * any of the Android AHB support.
+ *
+ * To actually enable the ext we also need
+ * the necessary kernel support.
+ */
+#if defined(ANDROID) && ANDROID_API_LEVEL >= 26
+#define RADV_SUPPORT_ANDROID_HARDWARE_BUFFER 1
+#else
+#define RADV_SUPPORT_ANDROID_HARDWARE_BUFFER 0
+#endif
+
+
 struct gfx10_format {
     unsigned img_format:9;