<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 19, 2018 at 5:11 PM, Keith Packard <span dir="ltr"><<a href="mailto:keithp@keithp.com" target="_blank">keithp@keithp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> writes:<br>
<br>
> Sometimes the best way to review a patch is with another patch. :-)  I'm<br>
> not sure what you think of this approach but I didn't really relish the<br>
> idea of having 3 get_capabilities entrypoints.  With these two patches,<br>
> we're now down to one.  In order to implement VK_EXT_display_control, all<br>
> you have to do is add support in wsi_display_surface_get_<wbr>capabilities2 for<br>
> the little chain-in struct and off we go.<br>
<br>
</span>I like this plan. Some comments below.<br>
<span class=""><br>
> +   VkSurfaceCapabilities2KHR caps2 = {<br>
> +      .sType = VK_STRUCTURE_TYPE_SURFACE_<wbr>CAPABILITIES_2_KHR,<br>
> +      .pNext = &counters,<br>
> +   };<br>
<br>
</span>I'd like to see an explicit initialization of the<br>
supported_surface_counters field here to make it clear that a WSI layer<br>
that doesn't look for this structure will end up using the right value (0).<span class=""><br></span></blockquote><div><br></div><div>C99 guarantees that, one one field is initialized with a designated initializer then all fields not explicitly initialized get zero-initialized.  I can add it if you'd like none the less.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +/* This is guaranteed to not collide with anything because it's in the<br>
> + * VK_KHR_swapchain namespace but not actually used by the extension.<br>
> + */<br>
> +#define VK_STRUCTURE_TYPE_WSI_SURFACE_<wbr>SUPPORTED_COUNTERS_MESA \<br>
> +   (VkStructureType)1000001005<br>
<br>
</span>This should probably be at the top of wsi_common.h with the other<br>
structure type values so we don't accidentally re-use this value.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Sure.</div><div><br></div><div>--Jason<br></div></div><br></div></div>