Commit 2657bffe authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

winevulkan: Implement various device functions.

parent 9721ec92
......@@ -397,7 +397,10 @@ class VkFunction(object):
if self.name == "vkCreateSwapchainKHR":
return False
if self.is_device_func():
if self.name in ["vkAllocateCommandBuffers", "vkFreeCommandBuffers"]:
return True
if self.params[0].type in ["VkCommandBuffer", "VkQueue"]:
return True
return False
......@@ -1495,7 +1498,7 @@ class ConversionFunction(object):
return_type = "{0}_host".format(self.type)
# Generate function prototype.
body = "static inline {0} * {1}(".format(return_type, self.name)
body = "static inline {0} *{1}(".format(return_type, self.name)
body += ", ".join(p for p in params)
body += ")\n{\n"
......@@ -1503,7 +1506,7 @@ class ConversionFunction(object):
body += " unsigned int i;\n\n"
body += " if (!in) return NULL;\n\n"
body += " out = ({0} *)heap_alloc(count * sizeof(*out));\n".format(return_type)
body += " out = heap_alloc(count * sizeof(*out));\n"
body += " for (i = 0; i < count; i++)\n"
body += " {\n"
......@@ -1863,7 +1866,16 @@ class VkGenerator(object):
LOGGER.debug("skipping {0} in vulkan_device_funcs".format(vk_func.name))
continue
f.write(" {0};\n".format(vk_func.pfn(conv=False)))
# Temporary filter out functions, which need conversion, but for which
# we are only implemented stubs at this point.
if not vk_func.needs_stub() and vk_func.needs_conversion():
f.write("#if defined(USE_STRUCT_CONVERSION)\n")
f.write(" {0};\n".format(vk_func.pfn(conv=True)))
f.write("#else\n")
f.write(" {0};\n".format(vk_func.pfn(conv=False)))
f.write("#endif\n")
else:
f.write(" {0};\n".format(vk_func.pfn(conv=False)))
f.write("};\n\n")
f.write("/* For use by vkInstance and children */\n")
......
......@@ -12,6 +12,248 @@
WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkDescriptorSetAllocateInfo_win_to_host(const VkDescriptorSetAllocateInfo *in, VkDescriptorSetAllocateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->descriptorPool = in->descriptorPool;
out->descriptorSetCount = in->descriptorSetCount;
out->pSetLayouts = in->pSetLayouts;
}
static inline void convert_VkMemoryAllocateInfo_win_to_host(const VkMemoryAllocateInfo *in, VkMemoryAllocateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->allocationSize = in->allocationSize;
out->memoryTypeIndex = in->memoryTypeIndex;
}
static inline void convert_VkBufferCreateInfo_win_to_host(const VkBufferCreateInfo *in, VkBufferCreateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->size = in->size;
out->usage = in->usage;
out->sharingMode = in->sharingMode;
out->queueFamilyIndexCount = in->queueFamilyIndexCount;
out->pQueueFamilyIndices = in->pQueueFamilyIndices;
}
static inline void convert_VkBufferViewCreateInfo_win_to_host(const VkBufferViewCreateInfo *in, VkBufferViewCreateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->buffer = in->buffer;
out->format = in->format;
out->offset = in->offset;
out->range = in->range;
}
static inline void convert_VkPipelineShaderStageCreateInfo_win_to_host(const VkPipelineShaderStageCreateInfo *in, VkPipelineShaderStageCreateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->stage = in->stage;
out->module = in->module;
out->pName = in->pName;
out->pSpecializationInfo = in->pSpecializationInfo;
}
static inline VkComputePipelineCreateInfo_host *convert_VkComputePipelineCreateInfo_array_win_to_host(const VkComputePipelineCreateInfo *in, uint32_t count)
{
VkComputePipelineCreateInfo_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].flags = in[i].flags;
convert_VkPipelineShaderStageCreateInfo_win_to_host(&in[i].stage, &out[i].stage);
out[i].layout = in[i].layout;
out[i].basePipelineHandle = in[i].basePipelineHandle;
out[i].basePipelineIndex = in[i].basePipelineIndex;
}
return out;
}
static inline void free_VkComputePipelineCreateInfo_array(VkComputePipelineCreateInfo_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
static inline void convert_VkFramebufferCreateInfo_win_to_host(const VkFramebufferCreateInfo *in, VkFramebufferCreateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->renderPass = in->renderPass;
out->attachmentCount = in->attachmentCount;
out->pAttachments = in->pAttachments;
out->width = in->width;
out->height = in->height;
out->layers = in->layers;
}
static inline VkPipelineShaderStageCreateInfo_host *convert_VkPipelineShaderStageCreateInfo_array_win_to_host(const VkPipelineShaderStageCreateInfo *in, uint32_t count)
{
VkPipelineShaderStageCreateInfo_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].flags = in[i].flags;
out[i].stage = in[i].stage;
out[i].module = in[i].module;
out[i].pName = in[i].pName;
out[i].pSpecializationInfo = in[i].pSpecializationInfo;
}
return out;
}
static inline void free_VkPipelineShaderStageCreateInfo_array(VkPipelineShaderStageCreateInfo_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
static inline VkGraphicsPipelineCreateInfo_host *convert_VkGraphicsPipelineCreateInfo_array_win_to_host(const VkGraphicsPipelineCreateInfo *in, uint32_t count)
{
VkGraphicsPipelineCreateInfo_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].flags = in[i].flags;
out[i].stageCount = in[i].stageCount;
out[i].pStages = convert_VkPipelineShaderStageCreateInfo_array_win_to_host(in[i].pStages, in[i].stageCount);
out[i].pVertexInputState = in[i].pVertexInputState;
out[i].pInputAssemblyState = in[i].pInputAssemblyState;
out[i].pTessellationState = in[i].pTessellationState;
out[i].pViewportState = in[i].pViewportState;
out[i].pRasterizationState = in[i].pRasterizationState;
out[i].pMultisampleState = in[i].pMultisampleState;
out[i].pDepthStencilState = in[i].pDepthStencilState;
out[i].pColorBlendState = in[i].pColorBlendState;
out[i].pDynamicState = in[i].pDynamicState;
out[i].layout = in[i].layout;
out[i].renderPass = in[i].renderPass;
out[i].subpass = in[i].subpass;
out[i].basePipelineHandle = in[i].basePipelineHandle;
out[i].basePipelineIndex = in[i].basePipelineIndex;
}
return out;
}
static inline void free_VkGraphicsPipelineCreateInfo_array(VkGraphicsPipelineCreateInfo_host *in, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
free_VkPipelineShaderStageCreateInfo_array((VkPipelineShaderStageCreateInfo_host *)in[i].pStages, in[i].stageCount);
}
heap_free(in);
}
static inline void convert_VkImageViewCreateInfo_win_to_host(const VkImageViewCreateInfo *in, VkImageViewCreateInfo_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->image = in->image;
out->viewType = in->viewType;
out->format = in->format;
out->components = in->components;
out->subresourceRange = in->subresourceRange;
}
static inline VkMappedMemoryRange_host *convert_VkMappedMemoryRange_array_win_to_host(const VkMappedMemoryRange *in, uint32_t count)
{
VkMappedMemoryRange_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].memory = in[i].memory;
out[i].offset = in[i].offset;
out[i].size = in[i].size;
}
return out;
}
static inline void free_VkMappedMemoryRange_array(VkMappedMemoryRange_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
static inline void convert_VkMemoryRequirements_host_to_win(const VkMemoryRequirements_host *in, VkMemoryRequirements *out)
{
if (!in) return;
out->size = in->size;
out->alignment = in->alignment;
out->memoryTypeBits = in->memoryTypeBits;
}
static inline void convert_VkSubresourceLayout_host_to_win(const VkSubresourceLayout_host *in, VkSubresourceLayout *out)
{
if (!in) return;
out->offset = in->offset;
out->size = in->size;
out->rowPitch = in->rowPitch;
out->arrayPitch = in->arrayPitch;
out->depthPitch = in->depthPitch;
}
static inline void convert_VkImageFormatProperties_host_to_win(const VkImageFormatProperties_host *in, VkImageFormatProperties *out)
{
if (!in) return;
......@@ -173,6 +415,126 @@ static inline void convert_VkPhysicalDeviceProperties_host_to_win(const VkPhysic
out->sparseProperties = in->sparseProperties;
}
static inline VkDescriptorImageInfo_host *convert_VkDescriptorImageInfo_array_win_to_host(const VkDescriptorImageInfo *in, uint32_t count)
{
VkDescriptorImageInfo_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sampler = in[i].sampler;
out[i].imageView = in[i].imageView;
out[i].imageLayout = in[i].imageLayout;
}
return out;
}
static inline void free_VkDescriptorImageInfo_array(VkDescriptorImageInfo_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
static inline VkDescriptorBufferInfo_host *convert_VkDescriptorBufferInfo_array_win_to_host(const VkDescriptorBufferInfo *in, uint32_t count)
{
VkDescriptorBufferInfo_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].buffer = in[i].buffer;
out[i].offset = in[i].offset;
out[i].range = in[i].range;
}
return out;
}
static inline void free_VkDescriptorBufferInfo_array(VkDescriptorBufferInfo_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
static inline VkWriteDescriptorSet_host *convert_VkWriteDescriptorSet_array_win_to_host(const VkWriteDescriptorSet *in, uint32_t count)
{
VkWriteDescriptorSet_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].dstSet = in[i].dstSet;
out[i].dstBinding = in[i].dstBinding;
out[i].dstArrayElement = in[i].dstArrayElement;
out[i].descriptorCount = in[i].descriptorCount;
out[i].descriptorType = in[i].descriptorType;
out[i].pImageInfo = convert_VkDescriptorImageInfo_array_win_to_host(in[i].pImageInfo, in[i].descriptorCount);
out[i].pBufferInfo = convert_VkDescriptorBufferInfo_array_win_to_host(in[i].pBufferInfo, in[i].descriptorCount);
out[i].pTexelBufferView = in[i].pTexelBufferView;
}
return out;
}
static inline void free_VkWriteDescriptorSet_array(VkWriteDescriptorSet_host *in, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
free_VkDescriptorImageInfo_array((VkDescriptorImageInfo_host *)in[i].pImageInfo, in[i].descriptorCount);
free_VkDescriptorBufferInfo_array((VkDescriptorBufferInfo_host *)in[i].pBufferInfo, in[i].descriptorCount);
}
heap_free(in);
}
static inline VkCopyDescriptorSet_host *convert_VkCopyDescriptorSet_array_win_to_host(const VkCopyDescriptorSet *in, uint32_t count)
{
VkCopyDescriptorSet_host *out;
unsigned int i;
if (!in) return NULL;
out = heap_alloc(count * sizeof(*out));
for (i = 0; i < count; i++)
{
out[i].sType = in[i].sType;
out[i].pNext = in[i].pNext;
out[i].srcSet = in[i].srcSet;
out[i].srcBinding = in[i].srcBinding;
out[i].srcArrayElement = in[i].srcArrayElement;
out[i].dstSet = in[i].dstSet;
out[i].dstBinding = in[i].dstBinding;
out[i].dstArrayElement = in[i].dstArrayElement;
out[i].descriptorCount = in[i].descriptorCount;
}
return out;
}
static inline void free_VkCopyDescriptorSet_array(VkCopyDescriptorSet_host *in, uint32_t count)
{
if (!in) return;
heap_free(in);
}
#endif /* USE_STRUCT_CONVERSION */
static VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
......@@ -183,14 +545,36 @@ static VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCo
static VkResult WINAPI wine_vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets)
{
FIXME("stub: %p, %p, %p\n", device, pAllocateInfo, pDescriptorSets);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkDescriptorSetAllocateInfo_host pAllocateInfo_host;
TRACE("%p, %p, %p\n", device, pAllocateInfo, pDescriptorSets);
convert_VkDescriptorSetAllocateInfo_win_to_host(pAllocateInfo, &pAllocateInfo_host);
result = device->funcs.p_vkAllocateDescriptorSets(device->device, &pAllocateInfo_host, pDescriptorSets);
return result;
#else
TRACE("%p, %p, %p\n", device, pAllocateInfo, pDescriptorSets);
return device->funcs.p_vkAllocateDescriptorSets(device->device, pAllocateInfo, pDescriptorSets);
#endif
}
static VkResult WINAPI wine_vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
{
FIXME("stub: %p, %p, %p, %p\n", device, pAllocateInfo, pAllocator, pMemory);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkMemoryAllocateInfo_host pAllocateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pAllocateInfo, pAllocator, pMemory);
convert_VkMemoryAllocateInfo_win_to_host(pAllocateInfo, &pAllocateInfo_host);
result = device->funcs.p_vkAllocateMemory(device->device, &pAllocateInfo_host, NULL, pMemory);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pAllocateInfo, pAllocator, pMemory);
return device->funcs.p_vkAllocateMemory(device->device, pAllocateInfo, NULL, pMemory);
#endif
}
static VkResult WINAPI wine_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
......@@ -201,14 +585,14 @@ static VkResult WINAPI wine_vkBeginCommandBuffer(VkCommandBuffer commandBuffer,
static VkResult WINAPI wine_vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
{
FIXME("stub: %p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
return device->funcs.p_vkBindBufferMemory(device->device, buffer, memory, memoryOffset);
}
static VkResult WINAPI wine_vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
{
FIXME("stub: %p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(image), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(image), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
return device->funcs.p_vkBindImageMemory(device->device, image, memory, memoryOffset);
}
static void WINAPI wine_vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
......@@ -433,212 +817,298 @@ static void WINAPI wine_vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPip
static VkResult WINAPI wine_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pBuffer);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkBufferCreateInfo_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pBuffer);
convert_VkBufferCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateBuffer(device->device, &pCreateInfo_host, NULL, pBuffer);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pBuffer);
return device->funcs.p_vkCreateBuffer(device->device, pCreateInfo, NULL, pBuffer);
#endif
}
static VkResult WINAPI wine_vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkBufferViewCreateInfo_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
convert_VkBufferViewCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateBufferView(device->device, &pCreateInfo_host, NULL, pView);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
return device->funcs.p_vkCreateBufferView(device->device, pCreateInfo, NULL, pView);
#endif
}
static VkResult WINAPI wine_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pCommandPool);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pCommandPool);
return device->funcs.p_vkCreateCommandPool(device->device, pCreateInfo, NULL, pCommandPool);
}
static VkResult WINAPI wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
FIXME("stub: %p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkComputePipelineCreateInfo_host *pCreateInfos_host;
TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount);
result = device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkComputePipelineCreateInfo_array(pCreateInfos_host, createInfoCount);
return result;
#else
TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
return device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
#endif
}
static VkResult WINAPI wine_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorPool);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorPool);
return device->funcs.p_vkCreateDescriptorPool(device->device, pCreateInfo, NULL, pDescriptorPool);
}
static VkResult WINAPI wine_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSetLayout);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSetLayout);
return device->funcs.p_vkCreateDescriptorSetLayout(device->device, pCreateInfo, NULL, pSetLayout);
}
static VkResult WINAPI wine_vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pEvent);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pEvent);
return device->funcs.p_vkCreateEvent(device->device, pCreateInfo, NULL, pEvent);
}
static VkResult WINAPI wine_vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFence);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFence);
return device->funcs.p_vkCreateFence(device->device, pCreateInfo, NULL, pFence);
}
static VkResult WINAPI wine_vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFramebuffer);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkFramebufferCreateInfo_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFramebuffer);
convert_VkFramebufferCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateFramebuffer(device->device, &pCreateInfo_host, NULL, pFramebuffer);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFramebuffer);
return device->funcs.p_vkCreateFramebuffer(device->device, pCreateInfo, NULL, pFramebuffer);
#endif
}
static VkResult WINAPI wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
{
FIXME("stub: %p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkGraphicsPipelineCreateInfo_host *pCreateInfos_host;
TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount);
result = device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkGraphicsPipelineCreateInfo_array(pCreateInfos_host, createInfoCount);
return result;
#else
TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
return device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
#endif
}
static VkResult WINAPI wine_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pImage);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pImage);
return device->funcs.p_vkCreateImage(device->device, pCreateInfo, NULL, pImage);
}
static VkResult WINAPI wine_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkImageViewCreateInfo_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
convert_VkImageViewCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateImageView(device->device, &pCreateInfo_host, NULL, pView);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
return device->funcs.p_vkCreateImageView(device->device, pCreateInfo, NULL, pView);
#endif
}
static VkResult WINAPI wine_vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineCache);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineCache);
return device->funcs.p_vkCreatePipelineCache(device->device, pCreateInfo, NULL, pPipelineCache);
}
static VkResult WINAPI wine_vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineLayout);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineLayout);
return device->funcs.p_vkCreatePipelineLayout(device->device, pCreateInfo, NULL, pPipelineLayout);
}
static VkResult WINAPI wine_vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pQueryPool);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pQueryPool);
return device->funcs.p_vkCreateQueryPool(device->device, pCreateInfo, NULL, pQueryPool);
}
static VkResult WINAPI wine_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pRenderPass);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pRenderPass);
return device->funcs.p_vkCreateRenderPass(device->device, pCreateInfo, NULL, pRenderPass);
}
static VkResult WINAPI wine_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSampler);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSampler);
return device->funcs.p_vkCreateSampler(device->device, pCreateInfo, NULL, pSampler);
}
static VkResult WINAPI wine_vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSemaphore);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSemaphore);
return device->funcs.p_vkCreateSemaphore(device->device, pCreateInfo, NULL, pSemaphore);
}
static VkResult WINAPI wine_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule)
{
FIXME("stub: %p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pShaderModule);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pShaderModule);
return device->funcs.p_vkCreateShaderModule(device->device, pCreateInfo, NULL, pShaderModule);
}
static void WINAPI wine_vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pAllocator);
device->funcs.p_vkDestroyBuffer(device->device, buffer, NULL);
}
static void WINAPI wine_vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(bufferView), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(bufferView), pAllocator);
device->funcs.p_vkDestroyBufferView(device->device, bufferView, NULL);
}
static void WINAPI wine_vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(commandPool), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(commandPool), pAllocator);
device->funcs.p_vkDestroyCommandPool(device->device, commandPool, NULL);
}
static void WINAPI wine_vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorPool), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorPool), pAllocator);
device->funcs.p_vkDestroyDescriptorPool(device->device, descriptorPool, NULL);
}
static void WINAPI wine_vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorSetLayout), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorSetLayout), pAllocator);
device->funcs.p_vkDestroyDescriptorSetLayout(device->device, descriptorSetLayout, NULL);
}
static void WINAPI wine_vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(event), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(event), pAllocator);
device->funcs.p_vkDestroyEvent(device->device, event, NULL);
}
static void WINAPI wine_vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(fence), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(fence), pAllocator);
device->funcs.p_vkDestroyFence(device->device, fence, NULL);
}
static void WINAPI wine_vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(framebuffer), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(framebuffer), pAllocator);
device->funcs.p_vkDestroyFramebuffer(device->device, framebuffer, NULL);
}
static void WINAPI wine_vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pAllocator);
device->funcs.p_vkDestroyImage(device->device, image, NULL);
}
static void WINAPI wine_vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(imageView), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(imageView), pAllocator);
device->funcs.p_vkDestroyImageView(device->device, imageView, NULL);
}
static void WINAPI wine_vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipeline), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipeline), pAllocator);
device->funcs.p_vkDestroyPipeline(device->device, pipeline, NULL);
}
static void WINAPI wine_vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineCache), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineCache), pAllocator);
device->funcs.p_vkDestroyPipelineCache(device->device, pipelineCache, NULL);
}
static void WINAPI wine_vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineLayout), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineLayout), pAllocator);
device->funcs.p_vkDestroyPipelineLayout(device->device, pipelineLayout, NULL);
}
static void WINAPI wine_vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(queryPool), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(queryPool), pAllocator);
device->funcs.p_vkDestroyQueryPool(device->device, queryPool, NULL);
}
static void WINAPI wine_vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pAllocator);
device->funcs.p_vkDestroyRenderPass(device->device, renderPass, NULL);
}
static void WINAPI wine_vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(sampler), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(sampler), pAllocator);
device->funcs.p_vkDestroySampler(device->device, sampler, NULL);
}
static void WINAPI wine_vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(semaphore), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(semaphore), pAllocator);
device->funcs.p_vkDestroySemaphore(device->device, semaphore, NULL);
}
static void WINAPI wine_vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(shaderModule), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(shaderModule), pAllocator);
device->funcs.p_vkDestroyShaderModule(device->device, shaderModule, NULL);
}
static VkResult WINAPI wine_vkDeviceWaitIdle(VkDevice device)
{
FIXME("stub: %p\n", device);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p\n", device);
return device->funcs.p_vkDeviceWaitIdle(device->device);
}
static VkResult WINAPI wine_vkEndCommandBuffer(VkCommandBuffer commandBuffer)
......@@ -655,8 +1125,20 @@ static VkResult WINAPI wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice ph
static VkResult WINAPI wine_vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
{
FIXME("stub: %p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkMappedMemoryRange_host *pMemoryRanges_host;
TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(pMemoryRanges, memoryRangeCount);
result = device->funcs.p_vkFlushMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges_host);
free_VkMappedMemoryRange_array(pMemoryRanges_host, memoryRangeCount);
return result;
#else
TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
return device->funcs.p_vkFlushMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges);
#endif
}
static void WINAPI wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
......@@ -666,50 +1148,83 @@ static void WINAPI wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool comm
static VkResult WINAPI wine_vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets)
{
FIXME("stub: %p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(descriptorPool), descriptorSetCount, pDescriptorSets);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(descriptorPool), descriptorSetCount, pDescriptorSets);
return device->funcs.p_vkFreeDescriptorSets(device->device, descriptorPool, descriptorSetCount, pDescriptorSets);
}
static void WINAPI wine_vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pAllocator);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pAllocator);
device->funcs.p_vkFreeMemory(device->device, memory, NULL);
}
static void WINAPI wine_vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
#if defined(USE_STRUCT_CONVERSION)
VkMemoryRequirements_host pMemoryRequirements_host;
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
device->funcs.p_vkGetBufferMemoryRequirements(device->device, buffer, &pMemoryRequirements_host);
convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
#else
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
device->funcs.p_vkGetBufferMemoryRequirements(device->device, buffer, pMemoryRequirements);
#endif
}
static void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
device->funcs.p_vkGetDeviceMemoryCommitment(device->device, memory, pCommittedMemoryInBytes);
}
static VkResult WINAPI wine_vkGetEventStatus(VkDevice device, VkEvent event)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(event));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
return device->funcs.p_vkGetEventStatus(device->device, event);
}
static VkResult WINAPI wine_vkGetFenceStatus(VkDevice device, VkFence fence)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(fence));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(fence));
return device->funcs.p_vkGetFenceStatus(device->device, fence);
}
static void WINAPI wine_vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
#if defined(USE_STRUCT_CONVERSION)
VkMemoryRequirements_host pMemoryRequirements_host;
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
device->funcs.p_vkGetImageMemoryRequirements(device->device, image, &pMemoryRequirements_host);
convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
#else
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
device->funcs.p_vkGetImageMemoryRequirements(device->device, image, pMemoryRequirements);
#endif
}
static void WINAPI wine_vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
{
FIXME("stub: %p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSparseMemoryRequirementCount, pSparseMemoryRequirements);
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSparseMemoryRequirementCount, pSparseMemoryRequirements);
device->funcs.p_vkGetImageSparseMemoryRequirements(device->device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
}
static void WINAPI wine_vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout)
{
FIXME("stub: %p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSubresource, pLayout);
#if defined(USE_STRUCT_CONVERSION)
VkSubresourceLayout_host pLayout_host;
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSubresource, pLayout);
device->funcs.p_vkGetImageSubresourceLayout(device->device, image, pSubresource, &pLayout_host);
convert_VkSubresourceLayout_host_to_win(&pLayout_host, pLayout);
#else
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSubresource, pLayout);
device->funcs.p_vkGetImageSubresourceLayout(device->device, image, pSubresource, pLayout);
#endif
}
static void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
......@@ -785,37 +1300,50 @@ static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysica
static VkResult WINAPI wine_vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t *pDataSize, void *pData)
{
FIXME("stub: %p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), pDataSize, pData);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), pDataSize, pData);
return device->funcs.p_vkGetPipelineCacheData(device->device, pipelineCache, pDataSize, pData);
}
static VkResult WINAPI wine_vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags)
{
FIXME("stub: %p, 0x%s, %u, %u, 0x%s, %p, 0x%s, %#x\n", device, wine_dbgstr_longlong(queryPool), firstQuery, queryCount, wine_dbgstr_longlong(dataSize), pData, wine_dbgstr_longlong(stride), flags);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %u, %u, 0x%s, %p, 0x%s, %#x\n", device, wine_dbgstr_longlong(queryPool), firstQuery, queryCount, wine_dbgstr_longlong(dataSize), pData, wine_dbgstr_longlong(stride), flags);
return device->funcs.p_vkGetQueryPoolResults(device->device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags);
}
static void WINAPI wine_vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D *pGranularity)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pGranularity);
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pGranularity);
device->funcs.p_vkGetRenderAreaGranularity(device->device, renderPass, pGranularity);
}
static VkResult WINAPI wine_vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
{
FIXME("stub: %p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
return VK_ERROR_OUT_OF_HOST_MEMORY;
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkMappedMemoryRange_host *pMemoryRanges_host;
TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(pMemoryRanges, memoryRangeCount);
result = device->funcs.p_vkInvalidateMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges_host);
free_VkMappedMemoryRange_array(pMemoryRanges_host, memoryRangeCount);
return result;
#else
TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
return device->funcs.p_vkInvalidateMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges);
#endif
}
static VkResult WINAPI wine_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData)
{
FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %#x, %p\n", device, wine_dbgstr_longlong(memory), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(size), flags, ppData);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, 0x%s, 0x%s, %#x, %p\n", device, wine_dbgstr_longlong(memory), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(size), flags, ppData);
return device->funcs.p_vkMapMemory(device->device, memory, offset, size, flags, ppData);
}
static VkResult WINAPI wine_vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches)
{
FIXME("stub: %p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(dstCache), srcCacheCount, pSrcCaches);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(dstCache), srcCacheCount, pSrcCaches);
return device->funcs.p_vkMergePipelineCaches(device->device, dstCache, srcCacheCount, pSrcCaches);
}
static VkResult WINAPI wine_vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence)
......@@ -844,48 +1372,63 @@ static VkResult WINAPI wine_vkResetCommandBuffer(VkCommandBuffer commandBuffer,
static VkResult WINAPI wine_vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
{
FIXME("stub: %p, 0x%s, %#x\n", device, wine_dbgstr_longlong(commandPool), flags);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(commandPool), flags);
return device->funcs.p_vkResetCommandPool(device->device, commandPool, flags);
}
static VkResult WINAPI wine_vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags)
{
FIXME("stub: %p, 0x%s, %#x\n", device, wine_dbgstr_longlong(descriptorPool), flags);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(descriptorPool), flags);
return device->funcs.p_vkResetDescriptorPool(device->device, descriptorPool, flags);
}
static VkResult WINAPI wine_vkResetEvent(VkDevice device, VkEvent event)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(event));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
return device->funcs.p_vkResetEvent(device->device, event);
}
static VkResult WINAPI wine_vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
{
FIXME("stub: %p, %u, %p\n", device, fenceCount, pFences);
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %u, %p\n", device, fenceCount, pFences);
return device->funcs.p_vkResetFences(device->device, fenceCount, pFences);
}
static VkResult WINAPI wine_vkSetEvent(VkDevice device, VkEvent event)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(event));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
return device->funcs.p_vkSetEvent(device->device, event);
}
static void WINAPI wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(memory));
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(memory));
device->funcs.p_vkUnmapMemory(device->device, memory);
}
static void WINAPI wine_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies)
{
FIXME("stub: %p, %u, %p, %u, %p\n", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
#if defined(USE_STRUCT_CONVERSION)
VkWriteDescriptorSet_host *pDescriptorWrites_host;
VkCopyDescriptorSet_host *pDescriptorCopies_host;
TRACE("%p, %u, %p, %u, %p\n", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
pDescriptorWrites_host = convert_VkWriteDescriptorSet_array_win_to_host(pDescriptorWrites, descriptorWriteCount);
pDescriptorCopies_host = convert_VkCopyDescriptorSet_array_win_to_host(pDescriptorCopies, descriptorCopyCount);
device->funcs.p_vkUpdateDescriptorSets(device->device, descriptorWriteCount, pDescriptorWrites_host, descriptorCopyCount, pDescriptorCopies_host);
free_VkWriteDescriptorSet_array(pDescriptorWrites_host, descriptorWriteCount);
free_VkCopyDescriptorSet_array(pDescriptorCopies_host, descriptorCopyCount);
#else
TRACE("%p, %u, %p, %u, %p\n", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
device->funcs.p_vkUpdateDescriptorSets(device->device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
#endif
}
static VkResult WINAPI wine_vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
{
FIXME("stub: %p, %u, %p, %u, 0x%s\n", device, fenceCount, pFences, waitAll, wine_dbgstr_longlong(timeout));
return VK_ERROR_OUT_OF_HOST_MEMORY;
TRACE("%p, %u, %p, %u, 0x%s\n", device, fenceCount, pFences, waitAll, wine_dbgstr_longlong(timeout));
return device->funcs.p_vkWaitForFences(device->device, fenceCount, pFences, waitAll, timeout);
}
static const struct vulkan_func vk_device_dispatch_table[] =
......
......@@ -35,6 +35,116 @@ VkBool32 WINAPI wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDe
VkResult WINAPI wine_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) DECLSPEC_HIDDEN;
VkResult WINAPI wine_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) DECLSPEC_HIDDEN;
typedef struct VkDescriptorSetAllocateInfo_host
{
VkStructureType sType;
const void *pNext;
VkDescriptorPool descriptorPool;
uint32_t descriptorSetCount;
const VkDescriptorSetLayout *pSetLayouts;
} VkDescriptorSetAllocateInfo_host;
typedef struct VkMemoryAllocateInfo_host
{
VkStructureType sType;
const void *pNext;
VkDeviceSize allocationSize;
uint32_t memoryTypeIndex;
} VkMemoryAllocateInfo_host;
typedef struct VkBufferCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkBufferCreateFlags flags;
VkDeviceSize size;
VkBufferUsageFlags usage;
VkSharingMode sharingMode;
uint32_t queueFamilyIndexCount;
const uint32_t *pQueueFamilyIndices;
} VkBufferCreateInfo_host;
typedef struct VkBufferViewCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkBufferViewCreateFlags flags;
VkBuffer buffer;
VkFormat format;
VkDeviceSize offset;
VkDeviceSize range;
} VkBufferViewCreateInfo_host;
typedef struct VkPipelineShaderStageCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkPipelineShaderStageCreateFlags flags;
VkShaderStageFlagBits stage;
VkShaderModule module;
const char *pName;
const VkSpecializationInfo *pSpecializationInfo;
} VkPipelineShaderStageCreateInfo_host;
typedef struct VkComputePipelineCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkPipelineCreateFlags flags;
VkPipelineShaderStageCreateInfo_host stage;
VkPipelineLayout layout;
VkPipeline basePipelineHandle;
int32_t basePipelineIndex;
} VkComputePipelineCreateInfo_host;
typedef struct VkFramebufferCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkFramebufferCreateFlags flags;
VkRenderPass renderPass;
uint32_t attachmentCount;
const VkImageView *pAttachments;
uint32_t width;
uint32_t height;
uint32_t layers;
} VkFramebufferCreateInfo_host;
typedef struct VkGraphicsPipelineCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkPipelineCreateFlags flags;
uint32_t stageCount;
const VkPipelineShaderStageCreateInfo_host *pStages;
const VkPipelineVertexInputStateCreateInfo *pVertexInputState;
const VkPipelineInputAssemblyStateCreateInfo *pInputAssemblyState;
const VkPipelineTessellationStateCreateInfo *pTessellationState;
const VkPipelineViewportStateCreateInfo *pViewportState;
const VkPipelineRasterizationStateCreateInfo *pRasterizationState;
const VkPipelineMultisampleStateCreateInfo *pMultisampleState;
const VkPipelineDepthStencilStateCreateInfo *pDepthStencilState;
const VkPipelineColorBlendStateCreateInfo *pColorBlendState;
const VkPipelineDynamicStateCreateInfo *pDynamicState;
VkPipelineLayout layout;
VkRenderPass renderPass;
uint32_t subpass;
VkPipeline basePipelineHandle;
int32_t basePipelineIndex;
} VkGraphicsPipelineCreateInfo_host;
typedef struct VkImageViewCreateInfo_host
{
VkStructureType sType;
const void *pNext;
VkImageViewCreateFlags flags;
VkImage image;
VkImageViewType viewType;
VkFormat format;
VkComponentMapping components;
VkImageSubresourceRange subresourceRange;
} VkImageViewCreateInfo_host;
typedef struct VkSwapchainCreateInfoKHR_host
{
VkStructureType sType;
......@@ -57,6 +167,31 @@ typedef struct VkSwapchainCreateInfoKHR_host
VkSwapchainKHR oldSwapchain;
} VkSwapchainCreateInfoKHR_host;
typedef struct VkMappedMemoryRange_host
{
VkStructureType sType;
const void *pNext;
VkDeviceMemory memory;
VkDeviceSize offset;
VkDeviceSize size;
} VkMappedMemoryRange_host;
typedef struct VkMemoryRequirements_host
{
VkDeviceSize size;
VkDeviceSize alignment;
uint32_t memoryTypeBits;
} VkMemoryRequirements_host;
typedef struct VkSubresourceLayout_host
{
VkDeviceSize offset;
VkDeviceSize size;
VkDeviceSize rowPitch;
VkDeviceSize arrayPitch;
VkDeviceSize depthPitch;
} VkSubresourceLayout_host;
typedef struct VkImageFormatProperties_host
{
VkExtent3D maxExtent;
......@@ -203,13 +338,62 @@ typedef struct VkPhysicalDeviceProperties_host
VkPhysicalDeviceSparseProperties sparseProperties;
} VkPhysicalDeviceProperties_host;
typedef struct VkDescriptorImageInfo_host
{
VkSampler sampler;
VkImageView imageView;
VkImageLayout imageLayout;
} VkDescriptorImageInfo_host;
typedef struct VkDescriptorBufferInfo_host
{
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize range;
} VkDescriptorBufferInfo_host;
typedef struct VkWriteDescriptorSet_host
{
VkStructureType sType;
const void *pNext;
VkDescriptorSet dstSet;
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
VkDescriptorType descriptorType;
const VkDescriptorImageInfo_host *pImageInfo;
const VkDescriptorBufferInfo_host *pBufferInfo;
const VkBufferView *pTexelBufferView;
} VkWriteDescriptorSet_host;
typedef struct VkCopyDescriptorSet_host
{
VkStructureType sType;
const void *pNext;
VkDescriptorSet srcSet;
uint32_t srcBinding;
uint32_t srcArrayElement;
VkDescriptorSet dstSet;
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
} VkCopyDescriptorSet_host;
/* For use by vkDevice and children */
struct vulkan_device_funcs
{
VkResult (*p_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo *, VkCommandBuffer *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkAllocateDescriptorSets)(VkDevice, const VkDescriptorSetAllocateInfo_host *, VkDescriptorSet *);
#else
VkResult (*p_vkAllocateDescriptorSets)(VkDevice, const VkDescriptorSetAllocateInfo *, VkDescriptorSet *);
#endif
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkAllocateMemory)(VkDevice, const VkMemoryAllocateInfo_host *, const VkAllocationCallbacks *, VkDeviceMemory *);
#else
VkResult (*p_vkAllocateMemory)(VkDevice, const VkMemoryAllocateInfo *, const VkAllocationCallbacks *, VkDeviceMemory *);
#endif
VkResult (*p_vkBeginCommandBuffer)(VkCommandBuffer, const VkCommandBufferBeginInfo *);
VkResult (*p_vkBindBufferMemory)(VkDevice, VkBuffer, VkDeviceMemory, VkDeviceSize);
VkResult (*p_vkBindImageMemory)(VkDevice, VkImage, VkDeviceMemory, VkDeviceSize);
......@@ -257,18 +441,42 @@ struct vulkan_device_funcs
void (*p_vkCmdUpdateBuffer)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, const void *);
void (*p_vkCmdWaitEvents)(VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags, VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
void (*p_vkCmdWriteTimestamp)(VkCommandBuffer, VkPipelineStageFlagBits, VkQueryPool, uint32_t);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateBuffer)(VkDevice, const VkBufferCreateInfo_host *, const VkAllocationCallbacks *, VkBuffer *);
#else
VkResult (*p_vkCreateBuffer)(VkDevice, const VkBufferCreateInfo *, const VkAllocationCallbacks *, VkBuffer *);
#endif
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateBufferView)(VkDevice, const VkBufferViewCreateInfo_host *, const VkAllocationCallbacks *, VkBufferView *);
#else
VkResult (*p_vkCreateBufferView)(VkDevice, const VkBufferViewCreateInfo *, const VkAllocationCallbacks *, VkBufferView *);
#endif
VkResult (*p_vkCreateCommandPool)(VkDevice, const VkCommandPoolCreateInfo *, const VkAllocationCallbacks *, VkCommandPool *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateComputePipelines)(VkDevice, VkPipelineCache, uint32_t, const VkComputePipelineCreateInfo_host *, const VkAllocationCallbacks *, VkPipeline *);
#else
VkResult (*p_vkCreateComputePipelines)(VkDevice, VkPipelineCache, uint32_t, const VkComputePipelineCreateInfo *, const VkAllocationCallbacks *, VkPipeline *);
#endif
VkResult (*p_vkCreateDescriptorPool)(VkDevice, const VkDescriptorPoolCreateInfo *, const VkAllocationCallbacks *, VkDescriptorPool *);
VkResult (*p_vkCreateDescriptorSetLayout)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, const VkAllocationCallbacks *, VkDescriptorSetLayout *);
VkResult (*p_vkCreateEvent)(VkDevice, const VkEventCreateInfo *, const VkAllocationCallbacks *, VkEvent *);
VkResult (*p_vkCreateFence)(VkDevice, const VkFenceCreateInfo *, const VkAllocationCallbacks *, VkFence *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateFramebuffer)(VkDevice, const VkFramebufferCreateInfo_host *, const VkAllocationCallbacks *, VkFramebuffer *);
#else
VkResult (*p_vkCreateFramebuffer)(VkDevice, const VkFramebufferCreateInfo *, const VkAllocationCallbacks *, VkFramebuffer *);
#endif
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateGraphicsPipelines)(VkDevice, VkPipelineCache, uint32_t, const VkGraphicsPipelineCreateInfo_host *, const VkAllocationCallbacks *, VkPipeline *);
#else
VkResult (*p_vkCreateGraphicsPipelines)(VkDevice, VkPipelineCache, uint32_t, const VkGraphicsPipelineCreateInfo *, const VkAllocationCallbacks *, VkPipeline *);
#endif
VkResult (*p_vkCreateImage)(VkDevice, const VkImageCreateInfo *, const VkAllocationCallbacks *, VkImage *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateImageView)(VkDevice, const VkImageViewCreateInfo_host *, const VkAllocationCallbacks *, VkImageView *);
#else
VkResult (*p_vkCreateImageView)(VkDevice, const VkImageViewCreateInfo *, const VkAllocationCallbacks *, VkImageView *);
#endif
VkResult (*p_vkCreatePipelineCache)(VkDevice, const VkPipelineCacheCreateInfo *, const VkAllocationCallbacks *, VkPipelineCache *);
VkResult (*p_vkCreatePipelineLayout)(VkDevice, const VkPipelineLayoutCreateInfo *, const VkAllocationCallbacks *, VkPipelineLayout *);
VkResult (*p_vkCreateQueryPool)(VkDevice, const VkQueryPoolCreateInfo *, const VkAllocationCallbacks *, VkQueryPool *);
......@@ -297,22 +505,42 @@ struct vulkan_device_funcs
void (*p_vkDestroyShaderModule)(VkDevice, VkShaderModule, const VkAllocationCallbacks *);
VkResult (*p_vkDeviceWaitIdle)(VkDevice);
VkResult (*p_vkEndCommandBuffer)(VkCommandBuffer);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkFlushMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange_host *);
#else
VkResult (*p_vkFlushMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange *);
#endif
void (*p_vkFreeCommandBuffers)(VkDevice, VkCommandPool, uint32_t, const VkCommandBuffer *);
VkResult (*p_vkFreeDescriptorSets)(VkDevice, VkDescriptorPool, uint32_t, const VkDescriptorSet *);
void (*p_vkFreeMemory)(VkDevice, VkDeviceMemory, const VkAllocationCallbacks *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetBufferMemoryRequirements)(VkDevice, VkBuffer, VkMemoryRequirements_host *);
#else
void (*p_vkGetBufferMemoryRequirements)(VkDevice, VkBuffer, VkMemoryRequirements *);
#endif
void (*p_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
void (*p_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
VkResult (*p_vkGetEventStatus)(VkDevice, VkEvent);
VkResult (*p_vkGetFenceStatus)(VkDevice, VkFence);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements_host *);
#else
void (*p_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements *);
#endif
void (*p_vkGetImageSparseMemoryRequirements)(VkDevice, VkImage, uint32_t *, VkSparseImageMemoryRequirements *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout_host *);
#else
void (*p_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *);
#endif
VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *);
VkResult (*p_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags);
void (*p_vkGetRenderAreaGranularity)(VkDevice, VkRenderPass, VkExtent2D *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkInvalidateMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange_host *);
#else
VkResult (*p_vkInvalidateMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange *);
#endif
VkResult (*p_vkMapMemory)(VkDevice, VkDeviceMemory, VkDeviceSize, VkDeviceSize, VkMemoryMapFlags, void **);
VkResult (*p_vkMergePipelineCaches)(VkDevice, VkPipelineCache, uint32_t, const VkPipelineCache *);
VkResult (*p_vkQueueBindSparse)(VkQueue, uint32_t, const VkBindSparseInfo *, VkFence);
......@@ -325,7 +553,11 @@ struct vulkan_device_funcs
VkResult (*p_vkResetFences)(VkDevice, uint32_t, const VkFence *);
VkResult (*p_vkSetEvent)(VkDevice, VkEvent);
void (*p_vkUnmapMemory)(VkDevice, VkDeviceMemory);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkUpdateDescriptorSets)(VkDevice, uint32_t, const VkWriteDescriptorSet_host *, uint32_t, const VkCopyDescriptorSet_host *);
#else
void (*p_vkUpdateDescriptorSets)(VkDevice, uint32_t, const VkWriteDescriptorSet *, uint32_t, const VkCopyDescriptorSet *);
#endif
VkResult (*p_vkWaitForFences)(VkDevice, uint32_t, const VkFence *, VkBool32, uint64_t);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment