winevulkan: Use local params struct declarations for 32-bit thunks.

This commit is contained in:
Jacek Caban 2022-10-23 14:12:56 +02:00 committed by Alexandre Julliard
parent b88d373bfb
commit ab36f7d5ed
2 changed files with 3516 additions and 516 deletions

View file

@ -860,7 +860,18 @@ class VkFunction(object):
def thunk(self, prefix=None, conv=False):
thunk = "NTSTATUS {0}{1}(void *args)\n".format(prefix, self.name)
thunk += "{\n"
thunk += " struct {0}_params *params = args;\n".format(self.name)
if conv:
thunk += " struct\n"
thunk += " {\n"
for p in self.params:
thunk += " {0};\n".format(p.definition(is_member=True))
if self.extra_param:
thunk += " void *{0};\n".format(self.extra_param)
if self.type != "void":
thunk += " {0} result;\n".format(self.type)
thunk += " } *params = args;\n"
else:
thunk += " struct {0}_params *params = args;\n".format(self.name)
thunk += self.body(conv=conv, unwrap=self.thunk_type == ThunkType.PUBLIC, params_prefix="params->")
thunk += "}\n\n"
return thunk

File diff suppressed because it is too large Load diff