<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 6, 2017 at 1:09 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad@kiwitree.net" target="_blank">chad@kiwitree.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
<br>
Jason, did you envision a cleanup like this?<br></blockquote><div><br></div><div>Yes, this is better. Eventually, I think we can make it better.</div><div><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
src/intel/vulkan/anv_<wbr>extensions.py | 18 +++++++++++-------<br>
1 file changed, 11 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>extensions.py b/src/intel/vulkan/anv_<wbr>extensions.py<br>
index 18062359d31..747b36b71f5 100644<br>
--- a/src/intel/vulkan/anv_<wbr>extensions.py<br>
+++ b/src/intel/vulkan/anv_<wbr>extensions.py<br>
@@ -44,7 +44,7 @@ class Extension:<br>
else:<br>
self.enable = enable;<br>
<br>
-# On Android, disable all surface and swapchain extensions. Android's Vulkan<br>
+# On Android, we disable all surface and swapchain extensions. Android's Vulkan<br>
# loader implements VK_KHR_surface and VK_KHR_swapchain, and applications<br>
# cannot access the driver's implementation. Moreoever, if the driver exposes<br>
# the those extension strings, then tests dEQP-VK.api.info.instance.<wbr>extensions<br>
@@ -66,7 +66,7 @@ EXTENSIONS = [<br>
Extension('VK_KHR_external_<wbr>semaphore_fd', 1, True),<br>
Extension('VK_KHR_get_memory_<wbr>requirements2', 1, True),<br>
Extension('VK_KHR_get_<wbr>physical_device_properties2', 1, True),<br>
- Extension('VK_KHR_get_surface_<wbr>capabilities2', 1, '!ANDROID'),<br>
+ Extension('VK_KHR_get_surface_<wbr>capabilities2', 1, 'ANV_HAS_SURFACE'),<br>
Extension('VK_KHR_incremental_<wbr>present', 1, True),<br>
Extension('VK_KHR_<wbr>maintenance1', 1, True),<br>
Extension('VK_KHR_push_<wbr>descriptor', 1, True),<br>
@@ -74,12 +74,12 @@ EXTENSIONS = [<br>
Extension('VK_KHR_sampler_<wbr>mirror_clamp_to_edge', 1, True),<br>
Extension('VK_KHR_shader_draw_<wbr>parameters', 1, True),<br>
Extension('VK_KHR_storage_<wbr>buffer_storage_class', 1, True),<br>
- Extension('VK_KHR_surface', 25, '!ANDROID'),<br>
- Extension('VK_KHR_swapchain', 68, '!ANDROID'),<br>
+ Extension('VK_KHR_surface', 25, 'ANV_HAS_SURFACE'),<br>
+ Extension('VK_KHR_swapchain', 68, 'ANV_HAS_SURFACE'),<br>
Extension('VK_KHR_variable_<wbr>pointers', 1, True),<br>
- Extension('VK_KHR_wayland_<wbr>surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR && !ANDROID'),<br>
- Extension('VK_KHR_xcb_surface'<wbr>, 6, 'VK_USE_PLATFORM_XCB_KHR && !ANDROID'),<br>
- Extension('VK_KHR_xlib_<wbr>surface', 6, 'VK_USE_PLATFORM_XLIB_KHR && !ANDROID'),<br>
+ Extension('VK_KHR_wayland_<wbr>surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR')<wbr>,<br>
+ Extension('VK_KHR_xcb_surface'<wbr>, 6, 'VK_USE_PLATFORM_XCB_KHR'),<br>
+ Extension('VK_KHR_xlib_<wbr>surface', 6, 'VK_USE_PLATFORM_XLIB_KHR'),<br>
Extension('VK_KHX_multiview', 1, True),<br>
]<br>
<br>
@@ -176,6 +176,10 @@ _TEMPLATE = Template(COPYRIGHT + """<br>
# define ANDROID false<br>
#endif<br>
<br>
+#define ANV_HAS_SURFACE (VK_USE_PLATFORM_WAYLAND_KHR || \\<br>
+ VK_USE_PLATFORM_XCB_KHR || \\<br>
+ VK_USE_PLATFORM_XLIB_KHR)<br>
+<br>
bool<br>
anv_instance_extension_<wbr>supported(const char *name)<br>
{<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.5<br>
<br>
</font></span></blockquote></div><br></div></div>