winevulkan: Use generated thunks for VkPipelineCreationFeedback conversion.

This commit is contained in:
Jacek Caban 2022-11-08 01:25:00 +01:00 committed by Alexandre Julliard
parent 9ff9f81855
commit 923aa288aa
4 changed files with 323 additions and 150 deletions

View file

@ -202,8 +202,6 @@ FUNCTION_OVERRIDES = {
# Device functions
"vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE},
"vkCreateCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"},
"vkCreateComputePipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE},
"vkCreateGraphicsPipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE},
"vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE},
"vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE},
"vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE},
@ -249,9 +247,6 @@ FUNCTION_OVERRIDES = {
"vkGetDeviceGroupSurfacePresentModesKHR" : {"dispatch" : True, "driver" : True, "thunk" : ThunkType.PUBLIC},
"vkGetPhysicalDevicePresentRectanglesKHR" : {"dispatch" : True, "driver" : True, "thunk" : ThunkType.PUBLIC},
# VK_KHR_ray_tracing_pipeline
"vkCreateRayTracingPipelinesKHR" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE},
# VK_EXT_calibrated_timestamps
"vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE},
"vkGetCalibratedTimestampsEXT" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE},
@ -263,9 +258,6 @@ FUNCTION_OVERRIDES = {
# VK_EXT_debug_report
"vkCreateDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
"vkDestroyDebugReportCallbackEXT" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE},
# VK_NV_ray_tracing
"vkCreateRayTracingPipelinesNV" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE},
}
STRUCT_CHAIN_CONVERSIONS = {
@ -1954,9 +1946,6 @@ class VkStruct(Sequence):
# FIXME: needs pointer array support
if self.name == "VkAccelerationStructureGeometryKHR":
return False
# FIXME: get rid of private thunks conversion
if self.name == "VkPipelineCreationFeedback":
return False
# pFixedRateFlags field is missing const, but it doesn't need output conversion
if direction == Direction.OUTPUT and self.name == "VkImageCompressionControlEXT":
@ -2008,10 +1997,6 @@ class VkStruct(Sequence):
return False
def needs_host_type(self):
# FIXME: get rid of private thunks conversion
if self.name == "VkPipelineCreationFeedback":
return False
for m in self.members:
if self.name == m.type:
continue

View file

@ -1587,121 +1587,6 @@ void wine_vkDestroyDebugReportCallbackEXT(VkInstance handle, VkDebugReportCallba
free(object);
}
static void fixup_pipeline_feedback(VkPipelineCreationFeedback *feedback, uint32_t count)
{
#if defined(USE_STRUCT_CONVERSION)
struct host_pipeline_feedback
{
VkPipelineCreationFeedbackFlags flags;
uint64_t duration;
} *host_feedback;
int64_t i;
host_feedback = (void *) feedback;
for (i = count - 1; i >= 0; i--)
{
memmove(&feedback[i].duration, &host_feedback[i].duration, sizeof(uint64_t));
feedback[i].flags = host_feedback[i].flags;
}
#endif
}
static void fixup_pipeline_feedback_info(const void *pipeline_info)
{
VkPipelineCreationFeedbackCreateInfo *feedback;
feedback = find_next_struct(pipeline_info, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
if (!feedback)
return;
fixup_pipeline_feedback(feedback->pPipelineCreationFeedback, 1);
fixup_pipeline_feedback(feedback->pPipelineStageCreationFeedbacks,
feedback->pipelineStageCreationFeedbackCount);
}
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;
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
res = device->funcs.p_vkCreateComputePipelines(device->device, pipeline_cache, count, create_infos,
NULL /* allocator */, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
return res;
}
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;
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
res = device->funcs.p_vkCreateGraphicsPipelines(device->device, pipeline_cache, count, create_infos,
NULL /* allocator */, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
return res;
}
VkResult wine_vkCreateRayTracingPipelinesKHR(VkDevice handle, VkDeferredOperationKHR deferred_operation,
VkPipelineCache pipeline_cache, uint32_t count,
const VkRayTracingPipelineCreateInfoKHR_host *create_infos,
const VkAllocationCallbacks *allocator, VkPipeline *pipelines)
{
struct wine_device *device = wine_device_from_handle(handle);
VkResult res;
uint32_t i;
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
res = device->funcs.p_vkCreateRayTracingPipelinesKHR(device->device, deferred_operation, pipeline_cache,
count, create_infos, NULL /* allocator */, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
return res;
}
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;
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
res = device->funcs.p_vkCreateRayTracingPipelinesNV(device->device, pipeline_cache, count, create_infos,
NULL /* allocator */, pipelines);
for (i = 0; i < count; i++)
fixup_pipeline_feedback_info(&create_infos[i]);
return res;
}
NTSTATUS vk_is_available_instance_function(void *arg)
{
struct is_available_instance_function_params *params = arg;

View file

@ -1611,6 +1611,42 @@ static inline void convert_VkBufferViewCreateInfo_win32_to_host(const VkBufferVi
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPipelineCreationFeedback_host_to_win32(const VkPipelineCreationFeedback_host *in, VkPipelineCreationFeedback *out)
{
if (!in) return;
out->flags = in->flags;
out->duration = in->duration;
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline VkPipelineCreationFeedback_host *convert_VkPipelineCreationFeedback_array_win32_to_host(struct conversion_context *ctx, const VkPipelineCreationFeedback *in, uint32_t count)
{
VkPipelineCreationFeedback_host *out;
if (!in || !count) return NULL;
out = conversion_context_alloc(ctx, count * sizeof(*out));
return out;
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPipelineCreationFeedback_array_host_to_win32(const VkPipelineCreationFeedback_host *in, VkPipelineCreationFeedback *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
convert_VkPipelineCreationFeedback_host_to_win32(&in[i], &out[i]);
}
}
#endif /* USE_STRUCT_CONVERSION */
#if !defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPipelineShaderStageCreateInfo_win64_to_host(struct conversion_context *ctx, const VkPipelineShaderStageCreateInfo *in, VkPipelineShaderStageCreateInfo *out)
{
@ -1852,13 +1888,13 @@ static inline void convert_VkComputePipelineCreateInfo_win32_to_host(struct conv
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
VkPipelineCreationFeedbackCreateInfo_host *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
const VkPipelineCreationFeedbackCreateInfo *in_ext = (const VkPipelineCreationFeedbackCreateInfo *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
out_ext->pNext = NULL;
out_ext->pPipelineCreationFeedback = in_ext->pPipelineCreationFeedback;
out_ext->pPipelineCreationFeedback = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineCreationFeedback, 1);
out_ext->pipelineStageCreationFeedbackCount = in_ext->pipelineStageCreationFeedbackCount;
out_ext->pPipelineStageCreationFeedbacks = in_ext->pPipelineStageCreationFeedbacks;
out_ext->pPipelineStageCreationFeedbacks = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header->pNext = (void *)out_ext;
out_header = (void *)out_ext;
break;
@ -1908,6 +1944,36 @@ static inline void convert_VkComputePipelineCreateInfo_win32_to_host(struct conv
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkComputePipelineCreateInfo_host_to_win32(const VkComputePipelineCreateInfo_host *in, const VkComputePipelineCreateInfo *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = find_next_struct(out_header, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
const VkPipelineCreationFeedbackCreateInfo_host *in_ext = (const VkPipelineCreationFeedbackCreateInfo_host *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineCreationFeedback, out_ext->pPipelineCreationFeedback, 1);
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineStageCreationFeedbacks, out_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header = (void *)out_ext;
break;
}
default:
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
#if !defined(USE_STRUCT_CONVERSION)
static inline VkComputePipelineCreateInfo *convert_VkComputePipelineCreateInfo_array_win64_to_host(struct conversion_context *ctx, const VkComputePipelineCreateInfo *in, uint32_t count)
{
@ -1944,6 +2010,20 @@ static inline VkComputePipelineCreateInfo_host *convert_VkComputePipelineCreateI
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkComputePipelineCreateInfo_array_host_to_win32(const VkComputePipelineCreateInfo_host *in, const VkComputePipelineCreateInfo *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
convert_VkComputePipelineCreateInfo_host_to_win32(&in[i], &out[i]);
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkCuFunctionCreateInfoNVX_win32_to_host(const VkCuFunctionCreateInfoNVX *in, VkCuFunctionCreateInfoNVX_host *out)
{
@ -6035,13 +6115,13 @@ static inline void convert_VkGraphicsPipelineCreateInfo_win32_to_host(struct con
}
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
VkPipelineCreationFeedbackCreateInfo_host *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
const VkPipelineCreationFeedbackCreateInfo *in_ext = (const VkPipelineCreationFeedbackCreateInfo *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
out_ext->pNext = NULL;
out_ext->pPipelineCreationFeedback = in_ext->pPipelineCreationFeedback;
out_ext->pPipelineCreationFeedback = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineCreationFeedback, 1);
out_ext->pipelineStageCreationFeedbackCount = in_ext->pipelineStageCreationFeedbackCount;
out_ext->pPipelineStageCreationFeedbacks = in_ext->pPipelineStageCreationFeedbacks;
out_ext->pPipelineStageCreationFeedbacks = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header->pNext = (void *)out_ext;
out_header = (void *)out_ext;
break;
@ -6167,6 +6247,36 @@ static inline void convert_VkGraphicsPipelineCreateInfo_win32_to_host(struct con
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkGraphicsPipelineCreateInfo_host_to_win32(const VkGraphicsPipelineCreateInfo_host *in, const VkGraphicsPipelineCreateInfo *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = find_next_struct(out_header, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
const VkPipelineCreationFeedbackCreateInfo_host *in_ext = (const VkPipelineCreationFeedbackCreateInfo_host *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineCreationFeedback, out_ext->pPipelineCreationFeedback, 1);
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineStageCreationFeedbacks, out_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header = (void *)out_ext;
break;
}
default:
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
#if !defined(USE_STRUCT_CONVERSION)
static inline VkGraphicsPipelineCreateInfo *convert_VkGraphicsPipelineCreateInfo_array_win64_to_host(struct conversion_context *ctx, const VkGraphicsPipelineCreateInfo *in, uint32_t count)
{
@ -6203,6 +6313,20 @@ static inline VkGraphicsPipelineCreateInfo_host *convert_VkGraphicsPipelineCreat
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkGraphicsPipelineCreateInfo_array_host_to_win32(const VkGraphicsPipelineCreateInfo_host *in, const VkGraphicsPipelineCreateInfo *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
convert_VkGraphicsPipelineCreateInfo_host_to_win32(&in[i], &out[i]);
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkImageCreateInfo_win32_to_host(struct conversion_context *ctx, const VkImageCreateInfo *in, VkImageCreateInfo *out)
{
@ -6673,10 +6797,13 @@ static inline void convert_VkRayTracingPipelineCreateInfoKHR_win64_to_host(struc
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoKHR_win32_to_host(struct conversion_context *ctx, const VkRayTracingPipelineCreateInfoKHR *in, VkRayTracingPipelineCreateInfoKHR_host *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->pNext = NULL;
out->flags = in->flags;
out->stageCount = in->stageCount;
out->pStages = convert_VkPipelineShaderStageCreateInfo_array_win32_to_host(ctx, in->pStages, in->stageCount);
@ -6689,6 +6816,73 @@ static inline void convert_VkRayTracingPipelineCreateInfoKHR_win32_to_host(struc
out->layout = in->layout;
out->basePipelineHandle = in->basePipelineHandle;
out->basePipelineIndex = in->basePipelineIndex;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo_host *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
const VkPipelineCreationFeedbackCreateInfo *in_ext = (const VkPipelineCreationFeedbackCreateInfo *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
out_ext->pNext = NULL;
out_ext->pPipelineCreationFeedback = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineCreationFeedback, 1);
out_ext->pipelineStageCreationFeedbackCount = in_ext->pipelineStageCreationFeedbackCount;
out_ext->pPipelineStageCreationFeedbacks = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header->pNext = (void *)out_ext;
out_header = (void *)out_ext;
break;
}
case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT:
{
VkPipelineRobustnessCreateInfoEXT *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
const VkPipelineRobustnessCreateInfoEXT *in_ext = (const VkPipelineRobustnessCreateInfoEXT *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT;
out_ext->pNext = NULL;
out_ext->storageBuffers = in_ext->storageBuffers;
out_ext->uniformBuffers = in_ext->uniformBuffers;
out_ext->vertexInputs = in_ext->vertexInputs;
out_ext->images = in_ext->images;
out_header->pNext = (void *)out_ext;
out_header = (void *)out_ext;
break;
}
default:
FIXME("Unhandled sType %u.", in_header->sType);
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoKHR_host_to_win32(const VkRayTracingPipelineCreateInfoKHR_host *in, const VkRayTracingPipelineCreateInfoKHR *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = find_next_struct(out_header, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
const VkPipelineCreationFeedbackCreateInfo_host *in_ext = (const VkPipelineCreationFeedbackCreateInfo_host *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineCreationFeedback, out_ext->pPipelineCreationFeedback, 1);
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineStageCreationFeedbacks, out_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header = (void *)out_ext;
break;
}
default:
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
@ -6728,6 +6922,20 @@ static inline VkRayTracingPipelineCreateInfoKHR_host *convert_VkRayTracingPipeli
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoKHR_array_host_to_win32(const VkRayTracingPipelineCreateInfoKHR_host *in, const VkRayTracingPipelineCreateInfoKHR *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
convert_VkRayTracingPipelineCreateInfoKHR_host_to_win32(&in[i], &out[i]);
}
}
#endif /* USE_STRUCT_CONVERSION */
#if !defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoNV_win64_to_host(struct conversion_context *ctx, const VkRayTracingPipelineCreateInfoNV *in, VkRayTracingPipelineCreateInfoNV *out)
{
@ -6750,10 +6958,13 @@ static inline void convert_VkRayTracingPipelineCreateInfoNV_win64_to_host(struct
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoNV_win32_to_host(struct conversion_context *ctx, const VkRayTracingPipelineCreateInfoNV *in, VkRayTracingPipelineCreateInfoNV_host *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->pNext = NULL;
out->flags = in->flags;
out->stageCount = in->stageCount;
out->pStages = convert_VkPipelineShaderStageCreateInfo_array_win32_to_host(ctx, in->pStages, in->stageCount);
@ -6763,6 +6974,59 @@ static inline void convert_VkRayTracingPipelineCreateInfoNV_win32_to_host(struct
out->layout = in->layout;
out->basePipelineHandle = in->basePipelineHandle;
out->basePipelineIndex = in->basePipelineIndex;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo_host *out_ext = conversion_context_alloc(ctx, sizeof(*out_ext));
const VkPipelineCreationFeedbackCreateInfo *in_ext = (const VkPipelineCreationFeedbackCreateInfo *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
out_ext->pNext = NULL;
out_ext->pPipelineCreationFeedback = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineCreationFeedback, 1);
out_ext->pipelineStageCreationFeedbackCount = in_ext->pipelineStageCreationFeedbackCount;
out_ext->pPipelineStageCreationFeedbacks = convert_VkPipelineCreationFeedback_array_win32_to_host(ctx, in_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header->pNext = (void *)out_ext;
out_header = (void *)out_ext;
break;
}
default:
FIXME("Unhandled sType %u.", in_header->sType);
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoNV_host_to_win32(const VkRayTracingPipelineCreateInfoNV_host *in, const VkRayTracingPipelineCreateInfoNV *out)
{
const VkBaseInStructure *in_header;
VkBaseOutStructure *out_header = (void *)out;
if (!in) return;
for (in_header = in->pNext; in_header; in_header = in_header->pNext)
{
switch (in_header->sType)
{
case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO:
{
VkPipelineCreationFeedbackCreateInfo *out_ext = find_next_struct(out_header, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
const VkPipelineCreationFeedbackCreateInfo_host *in_ext = (const VkPipelineCreationFeedbackCreateInfo_host *)in_header;
out_ext->sType = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO;
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineCreationFeedback, out_ext->pPipelineCreationFeedback, 1);
convert_VkPipelineCreationFeedback_array_host_to_win32(in_ext->pPipelineStageCreationFeedbacks, out_ext->pPipelineStageCreationFeedbacks, in_ext->pipelineStageCreationFeedbackCount);
out_header = (void *)out_ext;
break;
}
default:
break;
}
}
}
#endif /* USE_STRUCT_CONVERSION */
@ -6802,6 +7066,20 @@ static inline VkRayTracingPipelineCreateInfoNV_host *convert_VkRayTracingPipelin
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkRayTracingPipelineCreateInfoNV_array_host_to_win32(const VkRayTracingPipelineCreateInfoNV_host *in, const VkRayTracingPipelineCreateInfoNV *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
convert_VkRayTracingPipelineCreateInfoNV_host_to_win32(&in[i], &out[i]);
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkSamplerCreateInfo_win32_to_host(struct conversion_context *ctx, const VkSamplerCreateInfo *in, VkSamplerCreateInfo *out)
{
@ -17045,7 +17323,7 @@ static NTSTATUS thunk64_vkCreateComputePipelines(void *args)
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win64_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateComputePipelines(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17062,7 +17340,8 @@ static NTSTATUS thunk32_vkCreateComputePipelines(void *args)
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);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
convert_VkComputePipelineCreateInfo_array_host_to_win32(pCreateInfos_host, params->pCreateInfos, params->createInfoCount);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17437,7 +17716,7 @@ static NTSTATUS thunk64_vkCreateGraphicsPipelines(void *args)
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win64_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateGraphicsPipelines(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17454,7 +17733,8 @@ static NTSTATUS thunk32_vkCreateGraphicsPipelines(void *args)
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);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
convert_VkGraphicsPipelineCreateInfo_array_host_to_win32(pCreateInfos_host, params->pCreateInfos, params->createInfoCount);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17786,7 +18066,7 @@ static NTSTATUS thunk64_vkCreateRayTracingPipelinesKHR(void *args)
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoKHR_array_win64_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);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17803,7 +18083,8 @@ static NTSTATUS thunk32_vkCreateRayTracingPipelinesKHR(void *args)
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);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
convert_VkRayTracingPipelineCreateInfoKHR_array_host_to_win32(pCreateInfos_host, params->pCreateInfos, params->createInfoCount);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17822,7 +18103,7 @@ static NTSTATUS thunk64_vkCreateRayTracingPipelinesNV(void *args)
init_conversion_context(&ctx);
pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoNV_array_win64_to_host(&ctx, params->pCreateInfos, params->createInfoCount);
params->result = wine_vkCreateRayTracingPipelinesNV(params->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, params->pAllocator, params->pPipelines);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}
@ -17839,7 +18120,8 @@ static NTSTATUS thunk32_vkCreateRayTracingPipelinesNV(void *args)
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);
params->result = wine_device_from_handle(params->device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(params->device)->device, params->pipelineCache, params->createInfoCount, pCreateInfos_host, NULL, params->pPipelines);
convert_VkRayTracingPipelineCreateInfoNV_array_host_to_win32(pCreateInfos_host, params->pCreateInfos, params->createInfoCount);
free_conversion_context(&ctx);
return STATUS_SUCCESS;
}

View file

@ -955,6 +955,17 @@ typedef struct VkBufferViewCreateInfo_host
typedef VkBufferViewCreateInfo VkBufferViewCreateInfo_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkPipelineCreationFeedback_host
{
VkPipelineCreationFeedbackFlags flags;
uint64_t duration;
} VkPipelineCreationFeedback_host;
typedef VkPipelineCreationFeedback VkPipelineCreationFeedbackEXT;
#else
typedef VkPipelineCreationFeedback VkPipelineCreationFeedback_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkShaderModuleValidationCacheCreateInfoEXT_host
{
@ -994,6 +1005,20 @@ typedef struct VkPipelineShaderStageCreateInfo_host
typedef VkPipelineShaderStageCreateInfo VkPipelineShaderStageCreateInfo_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkPipelineCreationFeedbackCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkPipelineCreationFeedback_host *pPipelineCreationFeedback;
uint32_t pipelineStageCreationFeedbackCount;
VkPipelineCreationFeedback_host *pPipelineStageCreationFeedbacks;
} VkPipelineCreationFeedbackCreateInfo_host;
typedef VkPipelineCreationFeedbackCreateInfo VkPipelineCreationFeedbackCreateInfoEXT;
#else
typedef VkPipelineCreationFeedbackCreateInfo VkPipelineCreationFeedbackCreateInfo_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI_host
{
@ -2398,14 +2423,10 @@ typedef VkCopyDescriptorSet VkCopyDescriptorSet_host;
/* 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;