summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-09-24 13:56:05 +0200
committerBas Nieuwenhuizen <[email protected]>2019-10-10 17:02:34 +0000
commit9ea72b53372e28451c82f798bf557ca516ea7adb (patch)
tree527751312256a9bec767dd26c0a6ccdf42b252d5 /src/amd/vulkan
parent4a495e1a857ba344ec14924cf2247f1124c80e85 (diff)
radv: Add VK_ANDROID_external_memory_android_hardware_buffer.
Still disabled but now we can add entrypoints. Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_extensions.py1
-rw-r--r--src/amd/vulkan/radv_private.h13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
index 12596df1364..3405f8f86e1 100644
--- a/src/amd/vulkan/radv_extensions.py
+++ b/src/amd/vulkan/radv_extensions.py
@@ -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),
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 20a3cd38903..2f5062d99a1 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -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;