<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/01/2017 06:17 AM, Jason Ekstrand
wrote:<br>
</div>
<blockquote
cite="mid:CAOFGe94rE7Y13HdLA54XS3fGSc9kgNc51awVm=PTOKozROOwog@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Feb 28, 2017 at 7:52 PM,
Randy Xu <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:randy.xu@intel.com" target="_blank">randy.xu@intel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">The
VK_ANDROID_native_buffer is implemented in Android Vulkan
HAL,<br>
not driver, but must be claimed in device extension list.
Otherwise,<br>
this extension will be screened off in framework and
driver.<br>
</blockquote>
<div><br>
</div>
<div>This seems rather odd. Can't the Vulkan HAL just hook
into vkEnumerateDeviceExtensionProperties and add it to
the list there? It seems a bit odd to advertise an
extension but not actually provide any of the
functionality.<br>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
This was my question as well. I proposed Randy to include
functionality, at the moment it would be along these lines:<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/android-ia/external-mesa/commit/8b6b2fc4de933c03feba33e5b57c20262e7983cc">https://github.com/android-ia/external-mesa/commit/8b6b2fc4de933c03feba33e5b57c20262e7983cc</a><br>
<br>
I don't have a strong preference where functionality exists but it
seems like ideally the whole thing would exist in one single
component. If the extension list cannot be modified in HAL then this
becomes harder to achieve in HAL.<br>
<br>
<blockquote
cite="mid:CAOFGe94rE7Y13HdLA54XS3fGSc9kgNc51awVm=PTOKozROOwog@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Test: Pass Vulkan dEQP-VK.wsi.android.swapchain.<wbr>* on
Android platform<br>
<br>
Signed-off-by: Randy Xu <<a moz-do-not-send="true"
href="mailto:randy.xu@intel.com">randy.xu@intel.com</a>><br>
---<br>
<a moz-do-not-send="true" href="http://Android.common.mk"
rel="noreferrer" target="_blank">Android.common.mk</a>
| 3 +++<br>
src/intel/vulkan/anv_device.c | 9 +++++++++<br>
2 files changed, 12 insertions(+)<br>
<br>
diff --git a/<a moz-do-not-send="true"
href="http://Android.common.mk" rel="noreferrer"
target="_blank">Android.common.mk</a> b/<a
moz-do-not-send="true" href="http://Android.common.mk"
rel="noreferrer" target="_blank">Android.common.mk</a><br>
index 611162a..f49189b 100644<br>
--- a/<a moz-do-not-send="true"
href="http://Android.common.mk" rel="noreferrer"
target="_blank">Android.common.mk</a><br>
+++ b/<a moz-do-not-send="true"
href="http://Android.common.mk" rel="noreferrer"
target="_blank">Android.common.mk</a><br>
@@ -116,6 +116,9 @@ else<br>
LOCAL_CFLAGS += -DDEFAULT_DRIVER_DIR=\"/<wbr>system/lib/$(MESA_DRI_MODULE_<wbr>REL_PATH)\"<br>
endif<br>
<br>
+# Enable VK_ANDROID_native_buffer<br>
+LOCAL_CFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR<br>
+<br>
# uncomment to keep the debug symbols<br>
#LOCAL_STRIP_MODULE := false<br>
<br>
diff --git a/src/intel/vulkan/anv_device.<wbr>c
b/src/intel/vulkan/anv_device.<wbr>c<br>
index 0db96f2..478d753 100644<br>
--- a/src/intel/vulkan/anv_device.<wbr>c<br>
+++ b/src/intel/vulkan/anv_device.<wbr>c<br>
@@ -258,6 +258,15 @@ static const VkExtensionProperties
device_extensions[] = {<br>
.extensionName = VK_KHR_MAINTENANCE1_EXTENSION_<wbr>NAME,<br>
.specVersion = 1,<br>
},<br>
+#ifdef VK_USE_PLATFORM_ANDROID_KHR<br>
+ {<br>
+ // Refer <a moz-do-not-send="true"
href="https://source.android.com/devices/graphics/implement-vulkan.html"
rel="noreferrer" target="_blank">https://source.android.com/<wbr>devices/graphics/implement-<wbr>vulkan.html</a><br>
+ // "Window System Integration (WSI) extensions are
exported by the loader<br>
+ // and primarily implemented in it rather than the
driver."<br>
+ .extensionName = "VK_ANDROID_native_buffer",<br>
</blockquote>
<div><br>
</div>
<div>In the other places, we use the EXTENSION_NAME #define<br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
+ .specVersion = 1,<br>
+ },<br>
+#endif<br>
{<br>
.extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_<wbr>EXTENSION_NAME,<br>
.specVersion = 1,<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev"
rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mesa-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>