[Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

Chad Versace chadversary at chromium.org
Mon Jan 23 23:31:23 UTC 2017

On Mon 23 Jan 2017, Jason Ekstrand wrote:
> On Mon, Jan 23, 2017 at 2:28 PM, Chad Versace <chadversary at chromium.org> wrote:
>     Implement each vkFoo2KHR() by trivially passing it through to the
>     original vkFoo().
> As I mentioned to Lionel when he wrote basically this exact same patch, I think
> that may be backwards.  I can see two ways of doing this long-term:

If we look into the future, my patch is indeed backwards.
> 1) Implement all of the queries (of a particular type) in a single function and
> the legacy query calls the query2 variant and then copies the data over.

Option 1 is definitely better than my patch.

> 2) Implement each query as its own function and the queries2 function loops
> over the data structures calling the appropriate function on each one.

I don't see exactly what you're proposing in option 2. Do you mean, for example,
that vkGetPhysicalDeviceFormatProperties2KHR() would, for each structure
chained off of the input and output structs, including the toplevel
structs themselves, call some function specific to those structs?

> TBH, I'm not sure which of those two I prefer but I would like to at least
> think about the future so we don't have to come through and rewrite it.  I
> think I'm slightly leaning towards option 2 but I'm not sold.  Thoughs?

More information about the mesa-dev mailing list