[PATCH v2 1/5] winevulkan: Support prefixing function parameters.

Jacek Caban jacek at codeweavers.com
Fri Dec 10 09:12:49 CST 2021


On 12/10/21 4:06 PM, Georg Lehmann wrote:
>
>
> On 10.12.21 14:21, Jacek Caban wrote:
>> On 12/10/21 10:26 AM, Rémi Bernon wrote:
>>> On 12/10/21 03:07, Jacek Caban wrote:
>>>>
>>>> To allow them being accessed from a struct.
>>>>
>>>> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
>>>> ---
>>>> v2: make remaining direct calls more similar to __wine_unix_call
>>>>
>>>>   dlls/winevulkan/make_vulkan | 59 
>>>> ++++++++++++++++++++-----------------
>>>>   1 file changed, 32 insertions(+), 27 deletions(-)
>>>>
>>>>
>>>
>>> Thanks, it indeed fixes the issue with Control DX12.
>>>
>>> Now that it works I could measure that the series causes a ~25% fps 
>>> drop in that same game, from an average of 165fps to 125fps measured 
>>> with WINEDEBUG=+fps, while being steady near the beginning of the game. 
>>
>>
>> That's interesting, it's worse than what I've seen in cases that 
>> seemed to be pretty bad examples wrt. an impact of those patches. I 
>> will look at it myself as well, but for comparison, could you please 
>> try the attached patch on top of the series? If it's similar to what 
>> I've seen so far, that should mitigate the problem.
>>
>>
>> This is related to a possibility of further optimizations. Majority 
>> of Vulkan calls are usually command buffer recording calls. We could 
>> record their parameters ourselves on PE side, with no syscall 
>> involved, and replay them on Unix side when needed (usually in 
>> vkEndCommandBuffer). That should cover majority of syscall overhead 
>> at expense of additional layer of command buffer recording.
>>
>
> In vkd3d-proton's case a big problem might be vkUpdateDescriptorSets, 
> and unlike vkCmd* I don't see a way to avoid one unix call per 
> vkUpdateDescriptorSets. 


Yes, I was about to write that, vkUpdateDescriptorSets is the single 
most frequently used call in this case. If I disable syscalls for that, 
syscall overhead goes down drastically. I could adjust the patch to do 
direct call for that, but yeah, a solution like vkCmd* will not work here.


Thanks,

Jacek




More information about the wine-devel mailing list