Wine Vulkan ICD repository

Roderick Colenbrander thunderbird2k at gmail.com
Fri Nov 17 10:38:45 CST 2017


On Fri, Nov 17, 2017 at 5:09 AM, Sebastian Lackner
<sebastian at fds-team.de> wrote:
> On 17.11.2017 09:38, Roderick Colenbrander wrote:
>> Hi all,
>>
>> I have created a temporary Wine fork containing my Vulkan ICD work at:
>> https://github.com/roderickc/wine-vulkan
>>
>> The repo is meant to show the current design without having to spam
>> wine-devel with a ton of patches. I rebased all my code and split it
>> up well. There are a few hacky patches like x11 window support just
>> for me to get some actual applications to work to test the ICD design.
>>
>> The last 3 or so patches contain a proof-of-concept for some of the
>> 32-bit struct handling support. I have 32-bit support mostly working,
>> but it required some changes to my script which I need to cleanup
>> before I share it. Obviously the 32-bit work will be rebased across
>> earlier patches in the series.
>
> I find it a bit difficult to check how well 32-bit support is working
> when there is just an example for a single wrapper function. Are you aware
> that some functions also take arrays of structs as parameters, or have
> arrays embedded in other structs?

Most of it is handled, handling of those cases was fairly
straight-forward. I just didn't have enough time before I went to bed
to get it into a presentable enough state.

substructs are easy to detect as the parser is stateful. Arrays are
handled based on 'len'.

I only generate the exact number of required conversion functions as I
know which conversions are needed.

> For a function which takes an array of VkSwapchainCreateInfoKHR structs,
> please take a look at vkCreateSharedSwapchainsKHR.
>
> For a struct which contains an embedded array that has to be converted,
> take a look at VkGraphicsPipelineCreateInfo (pStages array) or
> VkSparseBufferMemoryBindInfo (pBinds array).
>
> Obviously, you also want to avoid the conversion overhead when the
> host and windows struct matches. Is that also implemented?

The conversion function will be a no-op in those cases. I found that
the cleanest way to avoid messy #ifdefs in the thunks themselves.

>>
>> The patches also include the Vulkan generation script I wrote. Parsing
>> Vulkan is quite a pain due to all the structures and its object
>> design. For this reason my parser is quite stateful, which made it
>> more work to write, but now it is easy to generate code and do awful
>> things like the 32-bit generation.
>>
>> Feel free to play around with the code. I added some instructions to
>> the project. Currently 64-bit applications such as cube.exe,
>> vulkaninfo.exe and vkquake.exe are known to work. 32-bit support is in
>> progress, vulkaninfo.exe kind of works, but anything needing structure
>> conversion will currently fail.
>>
>> Let me know your thoughts.
>>
>> Thanks,
>> Roderick
>>
>>
>



More information about the wine-devel mailing list