winevulkan: Use host Vulkan structures for private thunks arguments.

This commit is contained in:
Jacek Caban 2022-09-23 21:37:45 +02:00 committed by Alexandre Julliard
parent 7d223c5326
commit 000a7bbb5a
4 changed files with 225 additions and 342 deletions

View file

@ -587,7 +587,10 @@ class VkFunction(object):
vk_param = VkParam.from_xml(param, types)
params.append(vk_param)
return VkFunction(_type=func_type, name=func_name, params=params)
func = VkFunction(_type=func_type, name=func_name, params=params)
for param in params:
param.set_conversions(func)
return func
def get_conversions(self):
""" Get a list of conversion functions required for this function if any.
@ -598,7 +601,7 @@ class VkFunction(object):
conversions = []
for param in self.params:
convs = param.get_conversions()
convs = param.get_conversions(self)
if convs is not None:
conversions.extend(convs)
@ -745,7 +748,7 @@ class VkFunction(object):
proto += " {0}(".format(self.name)
# Add all the parameters.
proto += ", ".join([p.definition() for p in self.params])
proto += ", ".join([p.definition(is_thunk=is_thunk) for p in self.params])
if is_thunk and self.extra_param:
proto += ", void *" + self.extra_param
@ -776,9 +779,6 @@ class VkFunction(object):
body = ""
needs_alloc = False
if params_prefix == "" and self.type != "void":
body += " {0} result;\n".format(self.type)
# Declare any tmp parameters for conversion.
for p in self.params:
if p.needs_conversion() and conv:
@ -791,20 +791,20 @@ class VkFunction(object):
body += " {0} *{1}_host;\n".format(p.type, p.name)
else:
body += " {0} {1}_host;\n".format(p.type, p.name)
if (self.thunk_type == ThunkType.PUBLIC or params_prefix == "") and p.needs_alloc(conv):
if p.needs_alloc(conv, unwrap):
needs_alloc = True
if needs_alloc:
body += " struct conversion_context ctx;\n"
if params_prefix:
body += " {0}\n".format(self.trace(params_prefix=params_prefix))
body += " {0}\n".format(self.trace(params_prefix=params_prefix))
if needs_alloc:
body += " init_conversion_context(&ctx);\n"
# Call any win_to_host conversion calls.
unwrap = self.thunk_type == ThunkType.PUBLIC
for p in self.params:
if p.needs_input_conversion(conv) and (conv or (unwrap and p.needs_unwrapping())):
body += p.copy(Direction.INPUT, conv, prefix=params_prefix)
body += p.copy(Direction.INPUT, conv, unwrap, prefix=params_prefix)
# Build list of parameters containing converted and non-converted parameters.
# The param itself knows if conversion is needed and applies it when we set conv=True.
@ -824,21 +824,18 @@ class VkFunction(object):
body += " {0}result = {1}{2}({3});\n".format(params_prefix, func_prefix, self.name, params)
# Call any host_to_win conversion calls.
if conv and unwrap:
if conv:
for p in self.params:
if not p.needs_output_conversion(conv):
continue
body += p.copy(Direction.OUTPUT, conv, prefix=params_prefix)
body += p.copy(Direction.OUTPUT, conv, unwrap, prefix=params_prefix)
if needs_alloc:
body += " free_conversion_context(&ctx);\n"
# Finally return the result.
if params_prefix != "":
body += " return STATUS_SUCCESS;\n"
elif self.type != "void":
body += " return result;\n"
body += " return STATUS_SUCCESS;\n"
return body
@ -879,13 +876,6 @@ class VkFunction(object):
return stub
def thunk(self, prefix=None, conv=False):
if prefix == "thunk_":
thunk = self.prototype(prefix=prefix)
thunk += "\n{\n"
thunk += self.body(conv=conv)
thunk += "}\n\n"
return thunk
thunk = "NTSTATUS {0}{1}(void *args)\n".format(prefix, self.name)
thunk += "{\n"
thunk += " struct {0}_params *params = args;\n".format(self.name)
@ -1203,13 +1193,13 @@ class VkVariable(object):
return False
def needs_alloc(self, conv):
def needs_alloc(self, conv, unwrap):
""" Returns True if conversion needs allocation """
if self.is_dynamic_array():
if (conv and self.needs_conversion()) or self.needs_unwrapping():
if (conv and self.needs_conversion()) or (unwrap and self.needs_unwrapping()):
return True
return self.is_struct() and self.struct.needs_alloc(conv)
return self.is_struct() and self.struct.needs_alloc(conv, unwrap)
class VkMember(VkVariable):
def __init__(self, const=False, struct_fwd_decl=False,_type=None, pointer=None, name=None, array_len=None,
@ -1301,19 +1291,20 @@ class VkMember(VkVariable):
return VkMember(const=const, struct_fwd_decl=struct_fwd_decl, _type=member_type, pointer=pointer, name=name_elem.text,
array_len=array_len, dyn_array_len=dyn_array_len, optional=optional, values=values, object_type=object_type, bit_width=bit_width)
def copy(self, input, output, direction, conv):
def copy(self, input, output, direction, conv, unwrap):
""" Helper method for use by conversion logic to generate a C-code statement to copy this member.
- `conv` indicates whether the statement is in a struct alignment conversion path. """
win_type = "win32" if conv else "win64"
if (conv and self.needs_conversion()) or self.needs_unwrapping():
if (conv and self.needs_conversion()) or (unwrap and self.needs_unwrapping()):
if self.is_dynamic_array():
if direction == Direction.OUTPUT:
LOGGER.warn("TODO: implement copying of returnedonly dynamic array for {0}.{1}".format(self.type, self.name))
else:
# Array length is either a variable name (string) or an int.
count = self.dyn_array_len if isinstance(self.dyn_array_len, int) else "{0}{1}".format(input, self.dyn_array_len)
return "{0}{1} = convert_{2}_array_{5}_to_host(ctx, {3}{1}, {4});\n".format(output, self.name, self.type, input, count, win_type)
host_part = "host" if unwrap else "unwrapped_host"
return "{0}{1} = convert_{2}_array_{5}_to_{6}(ctx, {3}{1}, {4});\n".format(output, self.name, self.type, input, count, win_type, host_part)
elif self.is_static_array():
count = self.array_len
if direction == Direction.OUTPUT:
@ -1337,8 +1328,9 @@ class VkMember(VkVariable):
if direction == Direction.OUTPUT:
return "convert_{0}_host_to_{4}(&{2}{1}, &{3}{1});\n".format(self.type, self.name, input, output, win_type)
else:
ctx_param = "ctx, " if self.needs_alloc(conv) else ""
return "convert_{0}_{4}_to_host({5}&{2}{1}, &{3}{1});\n".format(self.type, self.name, input, output, win_type, ctx_param)
ctx_param = "ctx, " if self.needs_alloc(conv, unwrap) else ""
host_part = "host" if unwrap else "unwrapped_host"
return "convert_{0}_{4}_to_{6}({5}&{2}{1}, &{3}{1});\n".format(self.type, self.name, input, output, win_type, ctx_param, host_part)
elif self.is_static_array():
bytes_count = "{0} * sizeof({1})".format(self.array_len, self.type)
return "memcpy({0}{1}, {2}{1}, {3});\n".format(output, self.name, input, bytes_count)
@ -1381,7 +1373,7 @@ class VkMember(VkVariable):
return text
def get_conversions(self):
def get_conversions(self, func=None):
""" Return any conversion description for this member and its children when conversion is needed. """
# Check if we need conversion either for this member itself or for any child members
@ -1397,18 +1389,19 @@ class VkMember(VkVariable):
for m in struct:
m.needs_struct_extensions_conversion()
if m.needs_conversion() or m.needs_unwrapping():
conversions.extend(m.get_conversions())
conversions.extend(m.get_conversions(func))
struct.needs_struct_extensions_conversion()
direction = Direction.OUTPUT if struct.returnedonly else Direction.INPUT
elif self.is_handle() or self.is_generic_handle():
direction = Direction.INPUT
if self.needs_unwrapping():
conversions.append(ConversionFunction(self, direction, False))
conversions.append(ConversionFunction(self, direction, True))
unwrap = not func or func.thunk_type == ThunkType.PUBLIC
if unwrap and self.needs_unwrapping():
conversions.append(ConversionFunction(self, direction, False, True))
conversions.append(ConversionFunction(self, direction, True, True))
elif self.needs_conversion():
conversions.append(ConversionFunction(self, direction, True))
conversions.append(ConversionFunction(self, direction, True, unwrap or not self.needs_unwrapping()))
return conversions
@ -1438,7 +1431,6 @@ class VkParam(VkVariable):
self._set_direction()
self._set_format_string()
self._set_conversions()
def __repr__(self):
return "{0} {1} {2} {3} {4} {5}".format(self.const, self.type, self.pointer, self.name, self.array_len, self.dyn_array_len)
@ -1478,29 +1470,32 @@ class VkParam(VkVariable):
return VkParam(type_info, const=const, pointer=pointer, name=name, array_len=array_len, dyn_array_len=dyn_array_len, object_type=object_type)
def _set_conversions(self):
def set_conversions(self, func):
""" Internal helper function to configure any needed conversion functions. """
self.func = func
self.input_conv = None
self.input_unwrap = None
self.output_conv = None
self.output_unwrap = None
unwrap = func.thunk_type == ThunkType.PUBLIC;
# Input functions require win to host conversion.
if self._direction in [Direction.INPUT, Direction.INPUT_OUTPUT]:
if self.needs_unwrapping():
self.input_unwrap = ConversionFunction(self, Direction.INPUT, False)
self.input_conv = ConversionFunction(self, Direction.INPUT, True)
if unwrap and self.needs_unwrapping():
self.input_unwrap = ConversionFunction(self, Direction.INPUT, False, True)
self.input_conv = ConversionFunction(self, Direction.INPUT, True, True)
elif self.needs_conversion():
self.input_conv = ConversionFunction(self, Direction.INPUT, True)
self.input_conv = ConversionFunction(self, Direction.INPUT, True, unwrap or not self.needs_unwrapping())
# Output functions require host to win conversion.
if self._direction in [Direction.INPUT_OUTPUT, Direction.OUTPUT]:
if self.needs_unwrapping():
if unwrap and self.needs_unwrapping():
self.output_conv = ConversionFunction(self, Direction.OUTPUT, False)
self.output_conv = ConversionFunction(self, Direction.OUTPUT, True)
elif self.needs_conversion():
self.output_conv = ConversionFunction(self, Direction.OUTPUT, True)
self.output_conv = ConversionFunction(self, Direction.OUTPUT, True, unwrap or not self.needs_unwrapping())
def _set_direction(self):
""" Internal helper function to set parameter direction (input/output/input_output). """
@ -1581,21 +1576,22 @@ class VkParam(VkVariable):
else:
LOGGER.warn("Unhandled type: {0}".format(self.type_info))
def copy(self, direction, conv, prefix=""):
def copy(self, direction, conv, unwrap, prefix=""):
win_type = "win32" if conv else "win64"
if direction == Direction.INPUT:
ctx_param = "&ctx, " if self.needs_alloc(conv) else ""
ctx_param = "&ctx, " if self.needs_alloc(conv, unwrap) else ""
wrap_part = "" if unwrap or not self.needs_unwrapping() else "unwrapped_"
if self.is_dynamic_array():
return " {1}_host = convert_{2}_array_{4}_to_host({5}{0}{1}, {0}{3});\n".format(prefix, self.name, self.type, self.dyn_array_len, win_type, ctx_param)
return " {1}_host = convert_{2}_array_{4}_to_{6}host({5}{0}{1}, {0}{3});\n".format(prefix, self.name, self.type, self.dyn_array_len, win_type, ctx_param, wrap_part)
else:
return " convert_{0}_{3}_to_host({4}{1}{2}, &{2}_host);\n".format(self.type, prefix, self.name, win_type, ctx_param)
return " convert_{0}_{3}_to_{5}host({4}{1}{2}, &{2}_host);\n".format(self.type, prefix, self.name, win_type, ctx_param, wrap_part)
else:
if self.is_dynamic_array():
LOGGER.error("Unimplemented output conversion for: {0}".format(self.name))
else:
return " convert_{0}_host_to_{3}(&{2}_host, {1}{2});\n".format(self.type, prefix, self.name, win_type)
def definition(self, postfix=None, is_member=False):
def definition(self, postfix=None, is_member=False, is_thunk=False):
""" Return prototype for the parameter. E.g. 'const char *foo' """
proto = ""
@ -1603,16 +1599,19 @@ class VkParam(VkVariable):
proto += self.const + " "
proto += self.type
name = self.name
if is_thunk and self.needs_conversion():
proto += "_host"
if is_member and self.needs_alignment():
proto += " DECLSPEC_ALIGN(8)"
if self.is_pointer():
proto += " {0}{1}".format(self.pointer, self.name)
proto += " {0}{1}".format(self.pointer, name)
elif is_member and self.is_static_array():
proto += " *" + self.name
proto += " *" + name
else:
proto += " " + self.name
proto += " " + name
# Allows appending something to the variable name useful for
# win32 to host conversion.
@ -1643,7 +1642,7 @@ class VkParam(VkVariable):
def format_string(self):
return self.format_str
def get_conversions(self):
def get_conversions(self, func):
""" Get a list of conversions required for this parameter if any.
Parameters which are structures may require conversion between win32
and the host platform. This function returns a list of conversions
@ -1673,7 +1672,7 @@ class VkParam(VkVariable):
if not m.needs_conversion() and not m.needs_unwrapping():
continue
conversions.extend(m.get_conversions())
conversions.extend(m.get_conversions(func))
# Conversion requirements for the 'parent' parameter.
if self.input_unwrap is not None:
@ -1716,6 +1715,9 @@ class VkParam(VkVariable):
def needs_unwrapping(self):
""" Returns if parameter needs unwrapping of handle. """
if self.func.needs_private_thunk():
return False
# Wrapped handle parameters are handled separately, only look for wrapped handles in structs
if self.is_struct():
return self.struct.needs_unwrapping()
@ -1980,13 +1982,13 @@ class VkStruct(Sequence):
return True
return False
def needs_alloc(self, conv):
def needs_alloc(self, conv, unwrap):
""" Check if any struct member needs some memory allocation."""
for m in self.members:
if self.name == m.type:
continue
if m.needs_alloc(conv):
if m.needs_alloc(conv, unwrap):
return True
return False
@ -2016,14 +2018,15 @@ class VkStruct(Sequence):
class ConversionFunction(object):
def __init__(self, variable, direction, conv):
def __init__(self, variable, direction, conv, unwrap):
self.direction = direction
self.array = variable.is_static_array()
self.dyn_array = variable.is_dynamic_array()
self.operand = variable.struct if variable.is_struct() else variable.handle
self.type = variable.type
self.conv = conv
self.needs_alloc = direction != Direction.OUTPUT and variable.needs_alloc(conv)
self.unwrap = unwrap
self.needs_alloc = direction != Direction.OUTPUT and variable.needs_alloc(conv, unwrap)
self._set_name()
@ -2077,7 +2080,7 @@ class ConversionFunction(object):
for m in self.operand:
# TODO: support copying of pNext extension structures!
# Luckily though no extension struct at this point needs conversion.
body += " " + m.copy("in[i].", "out[i].", self.direction, self.conv)
body += " " + m.copy("in[i].", "out[i].", self.direction, self.conv, self.unwrap)
elif isinstance(self.operand, VkHandle) and self.direction == Direction.INPUT:
body += " out[i] = " + self.operand.driver_handle("in[i]") + ";\n"
@ -2148,7 +2151,7 @@ class ConversionFunction(object):
else:
for m in self.operand:
# TODO: support copying of pNext extension structures!
body += " " + m.copy("in->", "out->", self.direction, conv=self.conv)
body += " " + m.copy("in->", "out->", self.direction, self.conv, self.unwrap)
body += "}\n"
body += "#endif /* USE_STRUCT_CONVERSION */\n\n"
@ -2191,7 +2194,7 @@ class ConversionFunction(object):
if isinstance(self.operand, VkStruct):
for m in self.operand:
# TODO: support copying of pNext extension structures!
body += " " + m.copy("in[i].", "out[i].", self.direction, conv=True)
body += " " + m.copy("in[i].", "out[i].", self.direction, self.conv, self.unwrap)
elif isinstance(self.operand, VkHandle) and self.direction == Direction.INPUT:
body += " out[i] = " + self.operand.driver_handle("in[i]") + ";\n"
else:
@ -2212,10 +2215,11 @@ class ConversionFunction(object):
name += "array_"
win_type = "win32" if self.conv else "win64"
host_part = "host" if self.unwrap else "unwrapped_host"
if self.direction == Direction.INPUT:
name += "{0}_to_host".format(win_type)
name += "{0}_to_{1}".format(win_type, host_part)
else: # Direction.OUTPUT
name += "host_to_{0}".format(win_type)
name += "{0}_to_{1}".format(host_part, win_type)
self.name = name
@ -2281,8 +2285,8 @@ class StructChainConversionFunction(object):
if m.name == "pNext":
body += " out->pNext = NULL;\n"
else:
convert = m.copy("in->", "out->", self.direction, conv=True)
unwrap = m.copy("in->", "out->", self.direction, conv=False)
convert = m.copy("in->", "out->", self.direction, conv=True, unwrap=True)
unwrap = m.copy("in->", "out->", self.direction, conv=False, unwrap=True)
if unwrap == convert:
body += " " + unwrap
else:
@ -2324,11 +2328,9 @@ class VkGenerator(object):
conversions = func.get_conversions()
for conv in conversions:
# Pull in any conversions for vulkan_thunks.c.
if func.needs_thunk():
# Append if we don't already have this conversion.
if not any(c == conv for c in self.conversions):
self.conversions.append(conv)
# Append if we don't already have this conversion.
if not any(c == conv for c in self.conversions):
self.conversions.append(conv)
if not isinstance(conv.operand, VkStruct):
continue
@ -2391,15 +2393,11 @@ class VkGenerator(object):
continue
f.write("#if !defined(USE_STRUCT_CONVERSION)\n\n")
if vk_func.needs_private_thunk():
f.write(vk_func.thunk(prefix="thunk_"))
f.write("static ")
f.write(vk_func.thunk(prefix="thunk64_"))
f.write("#else /* USE_STRUCT_CONVERSION */\n\n")
if vk_func.needs_private_thunk():
f.write(vk_func.thunk(prefix="thunk_", conv=True))
f.write("static ")
f.write(vk_func.thunk(prefix="thunk32_", conv=vk_func.thunk_type == ThunkType.PUBLIC))
f.write(vk_func.thunk(prefix="thunk32_", conv=True))
f.write("#endif /* USE_STRUCT_CONVERSION */\n\n")
# Create array of device extensions.
@ -2525,23 +2523,6 @@ class VkGenerator(object):
f.write("#define WINE_VK_VERSION VK_API_VERSION_{0}_{1}\n\n".format(WINE_VK_VERSION[0], WINE_VK_VERSION[1]))
# Generate prototypes for device and instance functions requiring a custom implementation.
f.write("/* Functions for which we have custom implementations outside of the thunks. */\n")
for vk_func in self.registry.funcs.values():
if not vk_func.needs_exposing():
continue
if vk_func.needs_thunk() and not vk_func.needs_private_thunk():
continue
f.write("{0};\n".format(vk_func.prototype(prefix=prefix, postfix="DECLSPEC_HIDDEN", is_thunk=True)))
f.write("\n")
f.write("/* Private thunks */\n")
for vk_func in self.registry.funcs.values():
if vk_func.needs_private_thunk():
f.write("{0};\n".format(vk_func.prototype(prefix="thunk_", postfix="DECLSPEC_HIDDEN")))
f.write("\n")
for struct in self.host_structs:
f.write("#if defined(USE_STRUCT_CONVERSION)\n")
f.write(struct.definition(align=False, conv=True, postfix="_host"))
@ -2550,6 +2531,15 @@ class VkGenerator(object):
f.write("#endif\n\n")
f.write("\n")
# Generate prototypes for device and instance functions requiring a custom implementation.
f.write("/* Functions for which we have custom implementations outside of the thunks. */\n")
for vk_func in self.registry.funcs.values():
if not vk_func.needs_exposing() or vk_func.thunk_type == ThunkType.PUBLIC:
continue
f.write("{0};\n".format(vk_func.prototype(prefix=prefix, postfix="DECLSPEC_HIDDEN", is_thunk=True)))
f.write("\n")
f.write("struct conversion_context;\n")
for func in self.struct_chain_conversions:
f.write(func.prototype(postfix="DECLSPEC_HIDDEN") + ";\n")

View file

@ -638,7 +638,7 @@ static void wine_vk_instance_free(struct wine_instance *instance)
free(instance);
}
VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAllocateInfo *allocate_info,
VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAllocateInfo_host *allocate_info,
VkCommandBuffer *buffers )
{
struct wine_device *device = wine_device_from_handle(handle);
@ -1196,14 +1196,16 @@ void wine_vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice phys_d
memset(&properties->externalMemoryProperties, 0, sizeof(properties->externalMemoryProperties));
}
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice phys_dev,
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice phys_dev_handle,
const VkPhysicalDeviceImageFormatInfo2 *format_info,
VkImageFormatProperties2 *properties)
VkImageFormatProperties2_host *properties)
{
struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle);
VkExternalImageFormatProperties *external_image_properties;
VkResult res;
res = thunk_vkGetPhysicalDeviceImageFormatProperties2(phys_dev, format_info, properties);
res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(phys_dev->phys_dev,
format_info, properties);
if ((external_image_properties = wine_vk_find_struct(properties, EXTERNAL_IMAGE_FORMAT_PROPERTIES)))
{
@ -1216,14 +1218,16 @@ VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice phys_de
return res;
}
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice phys_dev,
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice phys_dev_handle,
const VkPhysicalDeviceImageFormatInfo2 *format_info,
VkImageFormatProperties2 *properties)
VkImageFormatProperties2_host *properties)
{
struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle);
VkExternalImageFormatProperties *external_image_properties;
VkResult res;
res = thunk_vkGetPhysicalDeviceImageFormatProperties2KHR(phys_dev, format_info, properties);
res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(phys_dev->phys_dev,
format_info, properties);
if ((external_image_properties = wine_vk_find_struct(properties, EXTERNAL_IMAGE_FORMAT_PROPERTIES)))
{
@ -1466,13 +1470,15 @@ static inline void adjust_max_image_count(struct wine_phys_dev *phys_dev, VkSurf
}
}
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice handle, VkSurfaceKHR surface,
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice handle, VkSurfaceKHR surface_handle,
VkSurfaceCapabilitiesKHR *capabilities)
{
struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(handle);
struct wine_surface *surface = wine_surface_from_handle(surface_handle);
VkResult res;
res = thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev->handle, surface, capabilities);
res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev->phys_dev,
surface->driver_surface, capabilities);
if (res == VK_SUCCESS)
adjust_max_image_count(phys_dev, capabilities);
@ -1481,13 +1487,19 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice handle,
}
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice handle,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info,
const VkPhysicalDeviceSurfaceInfo2KHR_host *surface_info,
VkSurfaceCapabilities2KHR *capabilities)
{
struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(handle);
struct wine_surface *surface = wine_surface_from_handle(surface_info->surface);
VkPhysicalDeviceSurfaceInfo2KHR_host host_info;
VkResult res;
res = thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev->handle, surface_info, capabilities);
host_info.sType = surface_info->sType;
host_info.pNext = surface_info->pNext;
host_info.surface = surface->driver_surface;
res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev->phys_dev,
&host_info, capabilities);
if (res == VK_SUCCESS)
adjust_max_image_count(phys_dev, &capabilities->surfaceCapabilities);
@ -1642,15 +1654,16 @@ static void fixup_pipeline_feedback_info(const void *pipeline_info)
feedback->pipelineStageCreationFeedbackCount);
}
VkResult wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipeline_cache,
uint32_t count, const VkComputePipelineCreateInfo *create_infos,
VkResult wine_vkCreateComputePipelines(VkDevice handle, VkPipelineCache pipeline_cache,
uint32_t count, const VkComputePipelineCreateInfo_host *create_infos,
const VkAllocationCallbacks *allocator, VkPipeline *pipelines)
{
struct wine_device *device = wine_device_from_handle(handle);
VkResult res;
uint32_t i;
res = thunk_vkCreateComputePipelines(device, pipeline_cache, count, create_infos,
allocator, pipelines);
res = device->funcs.p_vkCreateComputePipelines(device->device, pipeline_cache, count, create_infos,
allocator, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
@ -1658,15 +1671,16 @@ VkResult wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipeline
return res;
}
VkResult wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeline_cache,
uint32_t count, const VkGraphicsPipelineCreateInfo *create_infos,
VkResult wine_vkCreateGraphicsPipelines(VkDevice handle, VkPipelineCache pipeline_cache,
uint32_t count, const VkGraphicsPipelineCreateInfo_host *create_infos,
const VkAllocationCallbacks *allocator, VkPipeline *pipelines)
{
struct wine_device *device = wine_device_from_handle(handle);
VkResult res;
uint32_t i;
res = thunk_vkCreateGraphicsPipelines(device, pipeline_cache, count, create_infos,
allocator, pipelines);
res = device->funcs.p_vkCreateGraphicsPipelines(device->device, pipeline_cache, count, create_infos,
allocator, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
@ -1674,16 +1688,17 @@ VkResult wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelin
return res;
}
VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferred_operation,
VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice handle, VkDeferredOperationKHR deferred_operation,
VkPipelineCache pipeline_cache, uint32_t count,
const VkRayTracingPipelineCreateInfoKHR *create_infos,
const VkRayTracingPipelineCreateInfoKHR_host *create_infos,
const VkAllocationCallbacks *allocator, VkPipeline *pipelines)
{
struct wine_device *device = wine_device_from_handle(handle);
VkResult res;
uint32_t i;
res = thunk_vkCreateRayTracingPipelinesKHR(device, deferred_operation, pipeline_cache,
count, create_infos, allocator, pipelines);
res = device->funcs.p_vkCreateRayTracingPipelinesKHR(device->device, deferred_operation, pipeline_cache,
count, create_infos, allocator, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
@ -1691,15 +1706,16 @@ VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperatio
return res;
}
VkResult wine_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipeline_cache, uint32_t count,
const VkRayTracingPipelineCreateInfoNV *create_infos,
VkResult wine_vkCreateRayTracingPipelinesNV(VkDevice handle, VkPipelineCache pipeline_cache, uint32_t count,
const VkRayTracingPipelineCreateInfoNV_host *create_infos,
const VkAllocationCallbacks *allocator, VkPipeline *pipelines)
{
struct wine_device *device = wine_device_from_handle(handle);
VkResult res;
uint32_t i;
res = thunk_vkCreateRayTracingPipelinesNV(device, pipeline_cache, count, create_infos,
allocator, pipelines);
res = device->funcs.p_vkCreateRayTracingPipelinesNV(device->device, pipeline_cache, count, create_infos,
allocator, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);

View file

@ -48,6 +48,19 @@ static inline void convert_VkAcquireProfilingLockInfoKHR_win32_to_host(const VkA
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkCommandBufferAllocateInfo_win32_to_unwrapped_host(const VkCommandBufferAllocateInfo *in, VkCommandBufferAllocateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->commandPool = in->commandPool;
out->level = in->level;
out->commandBufferCount = in->commandBufferCount;
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkDescriptorSetAllocateInfo_win32_to_host(const VkDescriptorSetAllocateInfo *in, VkDescriptorSetAllocateInfo_host *out)
{
@ -2122,8 +2135,8 @@ static inline void convert_VkPhysicalDeviceProperties2_host_to_win32(const VkPhy
}
#endif /* USE_STRUCT_CONVERSION */
#if !defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win64_to_host(const VkPhysicalDeviceSurfaceInfo2KHR *in, VkPhysicalDeviceSurfaceInfo2KHR *out)
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win32_to_host(const VkPhysicalDeviceSurfaceInfo2KHR *in, VkPhysicalDeviceSurfaceInfo2KHR_host *out)
{
if (!in) return;
@ -2133,8 +2146,8 @@ static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win64_to_host(const V
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win32_to_host(const VkPhysicalDeviceSurfaceInfo2KHR *in, VkPhysicalDeviceSurfaceInfo2KHR_host *out)
#if !defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win64_to_host(const VkPhysicalDeviceSurfaceInfo2KHR *in, VkPhysicalDeviceSurfaceInfo2KHR *out)
{
if (!in) return;
@ -5361,9 +5374,11 @@ static NTSTATUS thunk64_vkAllocateCommandBuffers(void *args)
static NTSTATUS thunk32_vkAllocateCommandBuffers(void *args)
{
struct vkAllocateCommandBuffers_params *params = args;
VkCommandBufferAllocateInfo_host pAllocateInfo_host;
TRACE("%p, %p, %p\n", params->device, params->pAllocateInfo, params->pCommandBuffers);
params->result = wine_vkAllocateCommandBuffers(params->device, params->pAllocateInfo, params->pCommandBuffers);
convert_VkCommandBufferAllocateInfo_win32_to_unwrapped_host(params->pAllocateInfo, &pAllocateInfo_host);
params->result = wine_vkAllocateCommandBuffers(params->device, &pAllocateInfo_host, params->pCommandBuffers);
return STATUS_SUCCESS;
}
@ -11444,13 +11459,6 @@ static NTSTATUS thunk32_vkCreateCommandPool(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
result = wine_device_from_handle(device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
return result;
}
static NTSTATUS thunk64_vkCreateComputePipelines(void *args)
{
struct vkCreateComputePipelines_params *params = args;
@ -11462,24 +11470,17 @@ static NTSTATUS thunk64_vkCreateComputePipelines(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
VkComputePipelineCreateInfo_host *pCreateInfos_host;
struct conversion_context ctx;
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win32_to_host(&ctx, pCreateInfos, createInfoCount);
result = wine_device_from_handle(device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_conversion_context(&ctx);
return result;
}
static NTSTATUS thunk32_vkCreateComputePipelines(void *args)
{
struct vkCreateComputePipelines_params *params = args;
VkComputePipelineCreateInfo_host *pCreateInfos_host;
struct conversion_context ctx;
TRACE("%p, 0x%s, %u, %p, %p, %p\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
params->result = wine_vkCreateComputePipelines(params->device, params->pipelineCache, params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win32_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateComputePipelines(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -11807,13 +11808,6 @@ static NTSTATUS thunk32_vkCreateFramebuffer(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
result = wine_device_from_handle(device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
return result;
}
static NTSTATUS thunk64_vkCreateGraphicsPipelines(void *args)
{
struct vkCreateGraphicsPipelines_params *params = args;
@ -11825,24 +11819,17 @@ static NTSTATUS thunk64_vkCreateGraphicsPipelines(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
VkGraphicsPipelineCreateInfo_host *pCreateInfos_host;
struct conversion_context ctx;
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win32_to_host(&ctx, pCreateInfos, createInfoCount);
result = wine_device_from_handle(device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_conversion_context(&ctx);
return result;
}
static NTSTATUS thunk32_vkCreateGraphicsPipelines(void *args)
{
struct vkCreateGraphicsPipelines_params *params = args;
VkGraphicsPipelineCreateInfo_host *pCreateInfos_host;
struct conversion_context ctx;
TRACE("%p, 0x%s, %u, %p, %p, %p\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
params->result = wine_vkCreateGraphicsPipelines(params->device, params->pipelineCache, params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win32_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateGraphicsPipelines(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -12123,13 +12110,6 @@ static NTSTATUS thunk32_vkCreateQueryPool(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(device)->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
return result;
}
static NTSTATUS thunk64_vkCreateRayTracingPipelinesKHR(void *args)
{
struct vkCreateRayTracingPipelinesKHR_params *params = args;
@ -12141,24 +12121,17 @@ static NTSTATUS thunk64_vkCreateRayTracingPipelinesKHR(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
VkRayTracingPipelineCreateInfoKHR_host *pCreateInfos_host;
struct conversion_context ctx;
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoKHR_array_win32_to_host(&ctx, pCreateInfos, createInfoCount);
result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(device)->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_conversion_context(&ctx);
return result;
}
static NTSTATUS thunk32_vkCreateRayTracingPipelinesKHR(void *args)
{
struct vkCreateRayTracingPipelinesKHR_params *params = args;
VkRayTracingPipelineCreateInfoKHR_host *pCreateInfos_host;
struct conversion_context ctx;
TRACE("%p, 0x%s, 0x%s, %u, %p, %p, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), wine_dbgstr_longlong(params->pipelineCache), params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
params->result = wine_vkCreateRayTracingPipelinesKHR(params->device, params->deferredOperation, params->pipelineCache, params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoKHR_array_win32_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateRayTracingPipelinesKHR(params->device, params->deferredOperation, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -12166,13 +12139,6 @@ static NTSTATUS thunk32_vkCreateRayTracingPipelinesKHR(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
return result;
}
static NTSTATUS thunk64_vkCreateRayTracingPipelinesNV(void *args)
{
struct vkCreateRayTracingPipelinesNV_params *params = args;
@ -12184,24 +12150,17 @@ static NTSTATUS thunk64_vkCreateRayTracingPipelinesNV(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
VkResult result;
VkRayTracingPipelineCreateInfoNV_host *pCreateInfos_host;
struct conversion_context ctx;
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoNV_array_win32_to_host(&ctx, pCreateInfos, createInfoCount);
result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_conversion_context(&ctx);
return result;
}
static NTSTATUS thunk32_vkCreateRayTracingPipelinesNV(void *args)
{
struct vkCreateRayTracingPipelinesNV_params *params = args;
VkRayTracingPipelineCreateInfoNV_host *pCreateInfos_host;
struct conversion_context ctx;
TRACE("%p, 0x%s, %u, %p, %p, %p\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
params->result = wine_vkCreateRayTracingPipelinesNV(params->device, params->pipelineCache, params->createInfoCount, params->pCreateInfos, params->pAllocator, params->pPipelines);
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoNV_array_win32_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateRayTracingPipelinesNV(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -15696,13 +15655,6 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceImageFormatProperties(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties)
{
VkResult result;
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, pImageFormatProperties);
return result;
}
static NTSTATUS thunk64_vkGetPhysicalDeviceImageFormatProperties2(void *args)
{
struct vkGetPhysicalDeviceImageFormatProperties2_params *params = args;
@ -15714,22 +15666,15 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceImageFormatProperties2(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties)
{
VkResult result;
VkImageFormatProperties2_host pImageFormatProperties_host;
convert_VkImageFormatProperties2_win32_to_host(pImageFormatProperties, &pImageFormatProperties_host);
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win32(&pImageFormatProperties_host, pImageFormatProperties);
return result;
}
static NTSTATUS thunk32_vkGetPhysicalDeviceImageFormatProperties2(void *args)
{
struct vkGetPhysicalDeviceImageFormatProperties2_params *params = args;
VkImageFormatProperties2_host pImageFormatProperties_host;
TRACE("%p, %p, %p\n", params->physicalDevice, params->pImageFormatInfo, params->pImageFormatProperties);
params->result = wine_vkGetPhysicalDeviceImageFormatProperties2(params->physicalDevice, params->pImageFormatInfo, params->pImageFormatProperties);
convert_VkImageFormatProperties2_win32_to_host(params->pImageFormatProperties, &pImageFormatProperties_host);
params->result = wine_vkGetPhysicalDeviceImageFormatProperties2(params->physicalDevice, params->pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win32(&pImageFormatProperties_host, params->pImageFormatProperties);
return STATUS_SUCCESS;
}
@ -15737,13 +15682,6 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceImageFormatProperties2(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties)
{
VkResult result;
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, pImageFormatProperties);
return result;
}
static NTSTATUS thunk64_vkGetPhysicalDeviceImageFormatProperties2KHR(void *args)
{
struct vkGetPhysicalDeviceImageFormatProperties2KHR_params *params = args;
@ -15755,22 +15693,15 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceImageFormatProperties2KHR(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties)
{
VkResult result;
VkImageFormatProperties2_host pImageFormatProperties_host;
convert_VkImageFormatProperties2_win32_to_host(pImageFormatProperties, &pImageFormatProperties_host);
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win32(&pImageFormatProperties_host, pImageFormatProperties);
return result;
}
static NTSTATUS thunk32_vkGetPhysicalDeviceImageFormatProperties2KHR(void *args)
{
struct vkGetPhysicalDeviceImageFormatProperties2KHR_params *params = args;
VkImageFormatProperties2_host pImageFormatProperties_host;
TRACE("%p, %p, %p\n", params->physicalDevice, params->pImageFormatInfo, params->pImageFormatProperties);
params->result = wine_vkGetPhysicalDeviceImageFormatProperties2KHR(params->physicalDevice, params->pImageFormatInfo, params->pImageFormatProperties);
convert_VkImageFormatProperties2_win32_to_host(params->pImageFormatProperties, &pImageFormatProperties_host);
params->result = wine_vkGetPhysicalDeviceImageFormatProperties2KHR(params->physicalDevice, params->pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win32(&pImageFormatProperties_host, params->pImageFormatProperties);
return STATUS_SUCCESS;
}
@ -16202,15 +16133,6 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombi
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities)
{
VkResult result;
VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo_host;
convert_VkPhysicalDeviceSurfaceInfo2KHR_win64_to_host(pSurfaceInfo, &pSurfaceInfo_host);
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities);
return result;
}
static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args)
{
struct vkGetPhysicalDeviceSurfaceCapabilities2KHR_params *params = args;
@ -16222,21 +16144,14 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities)
{
VkResult result;
VkPhysicalDeviceSurfaceInfo2KHR_host pSurfaceInfo_host;
convert_VkPhysicalDeviceSurfaceInfo2KHR_win32_to_host(pSurfaceInfo, &pSurfaceInfo_host);
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities);
return result;
}
static NTSTATUS thunk32_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args)
{
struct vkGetPhysicalDeviceSurfaceCapabilities2KHR_params *params = args;
VkPhysicalDeviceSurfaceInfo2KHR_host pSurfaceInfo_host;
TRACE("%p, %p, %p\n", params->physicalDevice, params->pSurfaceInfo, params->pSurfaceCapabilities);
params->result = wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(params->physicalDevice, params->pSurfaceInfo, params->pSurfaceCapabilities);
convert_VkPhysicalDeviceSurfaceInfo2KHR_win32_to_host(params->pSurfaceInfo, &pSurfaceInfo_host);
params->result = wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(params->physicalDevice, &pSurfaceInfo_host, params->pSurfaceCapabilities);
return STATUS_SUCCESS;
}
@ -16244,13 +16159,6 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args)
#if !defined(USE_STRUCT_CONVERSION)
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
{
VkResult result;
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, wine_surface_from_handle(surface)->driver_surface, pSurfaceCapabilities);
return result;
}
static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(void *args)
{
struct vkGetPhysicalDeviceSurfaceCapabilitiesKHR_params *params = args;
@ -16262,13 +16170,6 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(void *args)
#else /* USE_STRUCT_CONVERSION */
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
{
VkResult result;
result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, wine_surface_from_handle(surface)->driver_surface, pSurfaceCapabilities);
return result;
}
static NTSTATUS thunk32_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(void *args)
{
struct vkGetPhysicalDeviceSurfaceCapabilitiesKHR_params *params = args;

View file

@ -14,60 +14,6 @@
#define WINE_VK_VERSION VK_API_VERSION_1_3
/* Functions for which we have custom implementations outside of the thunks. */
VkResult wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
VkResult wine_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugUtilsMessengerEXT *pMessenger) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN;
void wine_vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceLayerProperties(uint32_t *pPropertyCount, VkLayerProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceVersion(uint32_t *pApiVersion) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) DECLSPEC_HIDDEN;
void wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
VkResult wine_vkGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT *pTimestampInfos, uint64_t *pTimestamps, uint64_t *pMaxDeviation) DECLSPEC_HIDDEN;
PFN_vkVoidFunction wine_vkGetDeviceProcAddr(VkDevice device, const char *pName) DECLSPEC_HIDDEN;
void wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) DECLSPEC_HIDDEN;
void wine_vkGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2 *pQueueInfo, VkQueue *pQueue) DECLSPEC_HIDDEN;
PFN_vkVoidFunction wine_vkGetInstanceProcAddr(VkInstance instance, const char *pName) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t *pTimeDomainCount, VkTimeDomainEXT *pTimeDomains) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
/* Private thunks */
VkResult thunk_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult thunk_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult thunk_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult thunk_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkAcquireNextImageInfoKHR_host
{
@ -1170,20 +1116,6 @@ typedef struct VkDebugMarkerObjectTagInfoEXT_host
typedef VkDebugMarkerObjectTagInfoEXT VkDebugMarkerObjectTagInfoEXT_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkPhysicalDeviceGroupProperties_host
{
VkStructureType sType;
void *pNext;
uint32_t physicalDeviceCount;
VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE];
VkBool32 subsetAllocation;
} VkPhysicalDeviceGroupProperties_host;
typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR;
#else
typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupProperties_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkMappedMemoryRange_host
{
@ -1959,6 +1891,50 @@ typedef VkCopyDescriptorSet VkCopyDescriptorSet_host;
#endif
/* Functions for which we have custom implementations outside of the thunks. */
VkResult wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo_host *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
VkResult wine_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo_host *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugUtilsMessengerEXT *pMessenger) DECLSPEC_HIDDEN;
VkResult wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo_host *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance, void *client_ptr) DECLSPEC_HIDDEN;
VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR_host *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV_host *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) DECLSPEC_HIDDEN;
VkResult wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN;
void wine_vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
void wine_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceLayerProperties(uint32_t *pPropertyCount, VkLayerProperties *pProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumerateInstanceVersion(uint32_t *pApiVersion) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) DECLSPEC_HIDDEN;
VkResult wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) DECLSPEC_HIDDEN;
void wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN;
VkResult wine_vkGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT *pTimestampInfos, uint64_t *pTimestamps, uint64_t *pMaxDeviation) DECLSPEC_HIDDEN;
PFN_vkVoidFunction wine_vkGetDeviceProcAddr(VkDevice device, const char *pName) DECLSPEC_HIDDEN;
void wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) DECLSPEC_HIDDEN;
void wine_vkGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2 *pQueueInfo, VkQueue *pQueue) DECLSPEC_HIDDEN;
PFN_vkVoidFunction wine_vkGetInstanceProcAddr(VkInstance instance, const char *pName) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t *pTimeDomainCount, VkTimeDomainEXT *pTimeDomains) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties) DECLSPEC_HIDDEN;
void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2_host *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2_host *pImageFormatProperties) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR_host *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) DECLSPEC_HIDDEN;
struct conversion_context;
VkResult convert_VkDeviceCreateInfo_struct_chain(struct conversion_context *ctx, const void *pNext, VkDeviceCreateInfo *out_struct) DECLSPEC_HIDDEN;
VkResult convert_VkInstanceCreateInfo_struct_chain(struct conversion_context *ctx, const void *pNext, VkInstanceCreateInfo *out_struct) DECLSPEC_HIDDEN;