winevulkan: Load device functions from vkGetInstanceProcAddr.

vkGetInstanceProcAddr can load both instance and device functions.
A later to get introduced vkGetDeviceProcAddr only supports device
functions, which is why there are 2 different function tables.

Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Roderick Colenbrander 2018-03-09 08:48:47 -08:00 committed by Alexandre Julliard
parent 7b72f62ac7
commit 6dca06d4cf
4 changed files with 831 additions and 8 deletions

View File

@ -357,6 +357,9 @@ class VkFunction(object):
if self.params[0].type != "VkPhysicalDevice": if self.params[0].type != "VkPhysicalDevice":
return True return True
if self.is_device_func():
return True
return False return False
def needs_thunk(self): def needs_thunk(self):
@ -498,6 +501,8 @@ class VkFunction(object):
stub += " return VK_ERROR_OUT_OF_HOST_MEMORY;\n" stub += " return VK_ERROR_OUT_OF_HOST_MEMORY;\n"
elif self.type == "VkBool32": elif self.type == "VkBool32":
stub += " return VK_FALSE;\n" stub += " return VK_FALSE;\n"
elif self.type == "PFN_vkVoidFunction":
stub += " return NULL;\n"
stub += "}\n\n" stub += "}\n\n"
return stub return stub
@ -1688,7 +1693,7 @@ class VkGenerator(object):
f.write(conv.definition()) f.write(conv.definition())
f.write("#endif /* USE_STRUCT_CONVERSION */\n\n") f.write("#endif /* USE_STRUCT_CONVERSION */\n\n")
# Create thunks for instance functions. # Create thunks for instance and device functions.
# Global functions don't go through the thunks. # Global functions don't go through the thunks.
for vk_func in self.registry.funcs.values(): for vk_func in self.registry.funcs.values():
if not vk_func.is_required(): if not vk_func.is_required():
@ -1697,11 +1702,6 @@ class VkGenerator(object):
if vk_func.is_global_func(): if vk_func.is_global_func():
continue continue
# We don't support device functions yet as other plumbing
# is needed first.
if vk_func.is_device_func():
continue
if not vk_func.needs_thunk(): if not vk_func.needs_thunk():
continue continue
@ -1711,6 +1711,18 @@ class VkGenerator(object):
else: else:
f.write("static " + vk_func.thunk(prefix=prefix, call_conv="WINAPI")) f.write("static " + vk_func.thunk(prefix=prefix, call_conv="WINAPI"))
f.write("static const struct vulkan_func vk_device_dispatch_table[] =\n{\n")
for vk_func in self.registry.device_funcs:
if not vk_func.is_required():
continue
if not vk_func.needs_dispatch():
LOGGER.debug("skipping {0} in device dispatch table".format(vk_func.name))
continue
f.write(" {{\"{0}\", &{1}{0}}},\n".format(vk_func.name, prefix))
f.write("};\n\n")
f.write("static const struct vulkan_func vk_instance_dispatch_table[] =\n{\n") f.write("static const struct vulkan_func vk_instance_dispatch_table[] =\n{\n")
for vk_func in self.registry.instance_funcs: for vk_func in self.registry.instance_funcs:
if not vk_func.is_required(): if not vk_func.is_required():
@ -1723,6 +1735,20 @@ class VkGenerator(object):
f.write(" {{\"{0}\", &{1}{0}}},\n".format(vk_func.name, prefix)) f.write(" {{\"{0}\", &{1}{0}}},\n".format(vk_func.name, prefix))
f.write("};\n\n") f.write("};\n\n")
f.write("void *wine_vk_get_device_proc_addr(const char *name)\n")
f.write("{\n")
f.write(" unsigned int i;\n")
f.write(" for (i = 0; i < ARRAY_SIZE(vk_device_dispatch_table); i++)\n")
f.write(" {\n")
f.write(" if (strcmp(vk_device_dispatch_table[i].name, name) == 0)\n")
f.write(" {\n")
f.write(" TRACE(\"Found name=%s in device table\\n\", name);\n")
f.write(" return vk_device_dispatch_table[i].func;\n")
f.write(" }\n")
f.write(" }\n")
f.write(" return NULL;\n")
f.write("}\n\n")
f.write("void *wine_vk_get_instance_proc_addr(const char *name)\n") f.write("void *wine_vk_get_instance_proc_addr(const char *name)\n")
f.write("{\n") f.write("{\n")
f.write(" unsigned int i;\n") f.write(" unsigned int i;\n")
@ -1730,7 +1756,7 @@ class VkGenerator(object):
f.write(" {\n") f.write(" {\n")
f.write(" if (strcmp(vk_instance_dispatch_table[i].name, name) == 0)\n") f.write(" if (strcmp(vk_instance_dispatch_table[i].name, name) == 0)\n")
f.write(" {\n") f.write(" {\n")
f.write(" TRACE(\"Found pName=%s in instance table\\n\", name);\n") f.write(" TRACE(\"Found name=%s in instance table\\n\", name);\n")
f.write(" return vk_instance_dispatch_table[i].func;\n") f.write(" return vk_instance_dispatch_table[i].func;\n")
f.write(" }\n") f.write(" }\n")
f.write(" }\n") f.write(" }\n")
@ -1749,6 +1775,7 @@ class VkGenerator(object):
f.write("#endif\n\n") f.write("#endif\n\n")
f.write("/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */\n") f.write("/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */\n")
f.write("void *wine_vk_get_device_proc_addr(const char *name) DECLSPEC_HIDDEN;\n")
f.write("void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;\n\n") f.write("void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;\n\n")
# Generate prototypes for device and instance functions requiring a custom implementation. # Generate prototypes for device and instance functions requiring a custom implementation.

View File

@ -310,6 +310,10 @@ static PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance,
func = wine_vk_get_instance_proc_addr(name); func = wine_vk_get_instance_proc_addr(name);
if (func) return func; if (func) return func;
/* vkGetInstanceProcAddr also loads any children of instance, so device functions as well. */
func = wine_vk_get_device_proc_addr(name);
if (func) return func;
FIXME("Unsupported device or instance function: '%s'\n", debugstr_a(name)); FIXME("Unsupported device or instance function: '%s'\n", debugstr_a(name));
return NULL; return NULL;
} }

View File

@ -175,18 +175,565 @@ static inline void convert_VkPhysicalDeviceProperties_host_to_win(const VkPhysic
#endif /* USE_STRUCT_CONVERSION */ #endif /* USE_STRUCT_CONVERSION */
static VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
{
FIXME("stub: %p, %p, %p\n", device, pAllocateInfo, pCommandBuffers);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
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;
}
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;
}
static VkResult WINAPI wine_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
{
FIXME("stub: %p, %p\n", commandBuffer, pBeginInfo);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
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;
}
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;
}
static void WINAPI wine_vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
{
FIXME("stub: %p, 0x%s, %u, %#x\n", commandBuffer, wine_dbgstr_longlong(queryPool), query, flags);
}
static void WINAPI wine_vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents)
{
FIXME("stub: %p, %p, %d\n", commandBuffer, pRenderPassBegin, contents);
}
static void WINAPI wine_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets)
{
FIXME("stub: %p, %d, 0x%s, %u, %u, %p, %u, %p\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(layout), firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
}
static void WINAPI wine_vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType)
{
FIXME("stub: %p, 0x%s, 0x%s, %d\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), indexType);
}
static void WINAPI wine_vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
{
FIXME("stub: %p, %d, 0x%s\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(pipeline));
}
static void WINAPI wine_vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets)
{
FIXME("stub: %p, %u, %u, %p, %p\n", commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets);
}
static void WINAPI wine_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter)
{
FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p, %d\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions, filter);
}
static void WINAPI wine_vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment *pAttachments, uint32_t rectCount, const VkClearRect *pRects)
{
FIXME("stub: %p, %u, %p, %u, %p\n", commandBuffer, attachmentCount, pAttachments, rectCount, pRects);
}
static void WINAPI wine_vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
{
FIXME("stub: %p, 0x%s, %d, %p, %u, %p\n", commandBuffer, wine_dbgstr_longlong(image), imageLayout, pColor, rangeCount, pRanges);
}
static void WINAPI wine_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue *pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
{
FIXME("stub: %p, 0x%s, %d, %p, %u, %p\n", commandBuffer, wine_dbgstr_longlong(image), imageLayout, pDepthStencil, rangeCount, pRanges);
}
static void WINAPI wine_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions)
{
FIXME("stub: %p, 0x%s, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcBuffer), wine_dbgstr_longlong(dstBuffer), regionCount, pRegions);
}
static void WINAPI wine_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions)
{
FIXME("stub: %p, 0x%s, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcBuffer), wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
}
static void WINAPI wine_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions)
{
FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
}
static void WINAPI wine_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions)
{
FIXME("stub: %p, 0x%s, %d, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstBuffer), regionCount, pRegions);
}
static void WINAPI wine_vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags)
{
FIXME("stub: %p, 0x%s, %u, %u, 0x%s, 0x%s, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(queryPool), firstQuery, queryCount, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(stride), flags);
}
static void WINAPI wine_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
{
FIXME("stub: %p, %u, %u, %u\n", commandBuffer, groupCountX, groupCountY, groupCountZ);
}
static void WINAPI wine_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset)
{
FIXME("stub: %p, 0x%s, 0x%s\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset));
}
static void WINAPI wine_vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
{
FIXME("stub: %p, %u, %u, %u, %u\n", commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
}
static void WINAPI wine_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
{
FIXME("stub: %p, %u, %u, %u, %d, %u\n", commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
}
static void WINAPI wine_vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
{
FIXME("stub: %p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
}
static void WINAPI wine_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
{
FIXME("stub: %p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
}
static void WINAPI wine_vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
{
FIXME("stub: %p, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), query);
}
static void WINAPI wine_vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
{
FIXME("stub: %p\n", commandBuffer);
}
static void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
{
FIXME("stub: %p, %u, %p\n", commandBuffer, commandBufferCount, pCommandBuffers);
}
static void WINAPI wine_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
{
FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(size), data);
}
static void WINAPI wine_vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents)
{
FIXME("stub: %p, %d\n", commandBuffer, contents);
}
static void WINAPI wine_vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
{
FIXME("stub: %p, %#x, %#x, %#x, %u, %p, %u, %p, %u, %p\n", commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
}
static void WINAPI wine_vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues)
{
FIXME("stub: %p, 0x%s, %#x, %u, %u, %p\n", commandBuffer, wine_dbgstr_longlong(layout), stageFlags, offset, size, pValues);
}
static void WINAPI wine_vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
{
FIXME("stub: %p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
}
static void WINAPI wine_vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount)
{
FIXME("stub: %p, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), firstQuery, queryCount);
}
static void WINAPI wine_vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions)
{
FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
}
static void WINAPI wine_vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4])
{
FIXME("stub: %p, %p\n", commandBuffer, blendConstants);
}
static void WINAPI wine_vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
{
FIXME("stub: %p, %f, %f, %f\n", commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
}
static void WINAPI wine_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
{
FIXME("stub: %p, %f, %f\n", commandBuffer, minDepthBounds, maxDepthBounds);
}
static void WINAPI wine_vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
{
FIXME("stub: %p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
}
static void WINAPI wine_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth)
{
FIXME("stub: %p, %f\n", commandBuffer, lineWidth);
}
static void WINAPI wine_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors)
{
FIXME("stub: %p, %u, %u, %p\n", commandBuffer, firstScissor, scissorCount, pScissors);
}
static void WINAPI wine_vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask)
{
FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, compareMask);
}
static void WINAPI wine_vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
{
FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, reference);
}
static void WINAPI wine_vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask)
{
FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, writeMask);
}
static void WINAPI wine_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports)
{
FIXME("stub: %p, %u, %u, %p\n", commandBuffer, firstViewport, viewportCount, pViewports);
}
static void WINAPI wine_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData)
{
FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %p\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(dataSize), pData);
}
static void WINAPI wine_vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent *pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
{
FIXME("stub: %p, %u, %p, %#x, %#x, %u, %p, %u, %p, %u, %p\n", commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
}
static void WINAPI wine_vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query)
{
FIXME("stub: %p, %d, 0x%s, %u\n", commandBuffer, pipelineStage, wine_dbgstr_longlong(queryPool), query);
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
static VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) static VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice)
{ {
FIXME("stub: %p, %p, %p, %p\n", physicalDevice, pCreateInfo, pAllocator, pDevice); FIXME("stub: %p, %p, %p, %p\n", physicalDevice, pCreateInfo, pAllocator, pDevice);
return VK_ERROR_OUT_OF_HOST_MEMORY; return VK_ERROR_OUT_OF_HOST_MEMORY;
} }
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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);
}
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);
}
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);
}
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);
}
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);
}
static void WINAPI wine_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator)
{
FIXME("stub: %p, %p\n", device, pAllocator);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
static VkResult WINAPI wine_vkDeviceWaitIdle(VkDevice device)
{
FIXME("stub: %p\n", device);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult WINAPI wine_vkEndCommandBuffer(VkCommandBuffer commandBuffer)
{
FIXME("stub: %p\n", commandBuffer);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult WINAPI wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties) static VkResult WINAPI wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties)
{ {
TRACE("%p, %p, %p\n", physicalDevice, pPropertyCount, pProperties); TRACE("%p, %p, %p\n", physicalDevice, pPropertyCount, pProperties);
return physicalDevice->instance->funcs.p_vkEnumerateDeviceLayerProperties(physicalDevice->phys_dev, pPropertyCount, pProperties); return physicalDevice->instance->funcs.p_vkEnumerateDeviceLayerProperties(physicalDevice->phys_dev, pPropertyCount, pProperties);
} }
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;
}
static void WINAPI wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
{
FIXME("stub: %p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(commandPool), commandBufferCount, pCommandBuffers);
}
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;
}
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);
}
static void WINAPI wine_vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
}
static void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
}
static PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char *pName)
{
FIXME("stub: %p, %p\n", device, pName);
return NULL;
}
static void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue)
{
FIXME("stub: %p, %u, %u, %p\n", device, queueFamilyIndex, queueIndex, pQueue);
}
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;
}
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;
}
static void WINAPI wine_vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
}
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);
}
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);
}
static void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures) static void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
{ {
TRACE("%p, %p\n", physicalDevice, pFeatures); TRACE("%p, %p\n", physicalDevice, pFeatures);
@ -258,6 +805,236 @@ static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysica
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice->phys_dev, format, type, samples, usage, tiling, pPropertyCount, pProperties); physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice->phys_dev, format, type, samples, usage, tiling, pPropertyCount, pProperties);
} }
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;
}
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;
}
static void WINAPI wine_vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D *pGranularity)
{
FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(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;
}
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;
}
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;
}
static VkResult WINAPI wine_vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence)
{
FIXME("stub: %p, %u, %p, 0x%s\n", queue, bindInfoCount, pBindInfo, wine_dbgstr_longlong(fence));
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult WINAPI wine_vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
{
FIXME("stub: %p, %u, %p, 0x%s\n", queue, submitCount, pSubmits, wine_dbgstr_longlong(fence));
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult WINAPI wine_vkQueueWaitIdle(VkQueue queue)
{
FIXME("stub: %p\n", queue);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult WINAPI wine_vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
{
FIXME("stub: %p, %#x\n", commandBuffer, flags);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
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;
}
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;
}
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;
}
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;
}
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;
}
static void WINAPI wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
{
FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(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);
}
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;
}
static const struct vulkan_func vk_device_dispatch_table[] =
{
{"vkAllocateCommandBuffers", &wine_vkAllocateCommandBuffers},
{"vkAllocateDescriptorSets", &wine_vkAllocateDescriptorSets},
{"vkAllocateMemory", &wine_vkAllocateMemory},
{"vkBeginCommandBuffer", &wine_vkBeginCommandBuffer},
{"vkBindBufferMemory", &wine_vkBindBufferMemory},
{"vkBindImageMemory", &wine_vkBindImageMemory},
{"vkCmdBeginQuery", &wine_vkCmdBeginQuery},
{"vkCmdBeginRenderPass", &wine_vkCmdBeginRenderPass},
{"vkCmdBindDescriptorSets", &wine_vkCmdBindDescriptorSets},
{"vkCmdBindIndexBuffer", &wine_vkCmdBindIndexBuffer},
{"vkCmdBindPipeline", &wine_vkCmdBindPipeline},
{"vkCmdBindVertexBuffers", &wine_vkCmdBindVertexBuffers},
{"vkCmdBlitImage", &wine_vkCmdBlitImage},
{"vkCmdClearAttachments", &wine_vkCmdClearAttachments},
{"vkCmdClearColorImage", &wine_vkCmdClearColorImage},
{"vkCmdClearDepthStencilImage", &wine_vkCmdClearDepthStencilImage},
{"vkCmdCopyBuffer", &wine_vkCmdCopyBuffer},
{"vkCmdCopyBufferToImage", &wine_vkCmdCopyBufferToImage},
{"vkCmdCopyImage", &wine_vkCmdCopyImage},
{"vkCmdCopyImageToBuffer", &wine_vkCmdCopyImageToBuffer},
{"vkCmdCopyQueryPoolResults", &wine_vkCmdCopyQueryPoolResults},
{"vkCmdDispatch", &wine_vkCmdDispatch},
{"vkCmdDispatchIndirect", &wine_vkCmdDispatchIndirect},
{"vkCmdDraw", &wine_vkCmdDraw},
{"vkCmdDrawIndexed", &wine_vkCmdDrawIndexed},
{"vkCmdDrawIndexedIndirect", &wine_vkCmdDrawIndexedIndirect},
{"vkCmdDrawIndirect", &wine_vkCmdDrawIndirect},
{"vkCmdEndQuery", &wine_vkCmdEndQuery},
{"vkCmdEndRenderPass", &wine_vkCmdEndRenderPass},
{"vkCmdExecuteCommands", &wine_vkCmdExecuteCommands},
{"vkCmdFillBuffer", &wine_vkCmdFillBuffer},
{"vkCmdNextSubpass", &wine_vkCmdNextSubpass},
{"vkCmdPipelineBarrier", &wine_vkCmdPipelineBarrier},
{"vkCmdPushConstants", &wine_vkCmdPushConstants},
{"vkCmdResetEvent", &wine_vkCmdResetEvent},
{"vkCmdResetQueryPool", &wine_vkCmdResetQueryPool},
{"vkCmdResolveImage", &wine_vkCmdResolveImage},
{"vkCmdSetBlendConstants", &wine_vkCmdSetBlendConstants},
{"vkCmdSetDepthBias", &wine_vkCmdSetDepthBias},
{"vkCmdSetDepthBounds", &wine_vkCmdSetDepthBounds},
{"vkCmdSetEvent", &wine_vkCmdSetEvent},
{"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
{"vkCmdSetScissor", &wine_vkCmdSetScissor},
{"vkCmdSetStencilCompareMask", &wine_vkCmdSetStencilCompareMask},
{"vkCmdSetStencilReference", &wine_vkCmdSetStencilReference},
{"vkCmdSetStencilWriteMask", &wine_vkCmdSetStencilWriteMask},
{"vkCmdSetViewport", &wine_vkCmdSetViewport},
{"vkCmdUpdateBuffer", &wine_vkCmdUpdateBuffer},
{"vkCmdWaitEvents", &wine_vkCmdWaitEvents},
{"vkCmdWriteTimestamp", &wine_vkCmdWriteTimestamp},
{"vkCreateBuffer", &wine_vkCreateBuffer},
{"vkCreateBufferView", &wine_vkCreateBufferView},
{"vkCreateCommandPool", &wine_vkCreateCommandPool},
{"vkCreateComputePipelines", &wine_vkCreateComputePipelines},
{"vkCreateDescriptorPool", &wine_vkCreateDescriptorPool},
{"vkCreateDescriptorSetLayout", &wine_vkCreateDescriptorSetLayout},
{"vkCreateEvent", &wine_vkCreateEvent},
{"vkCreateFence", &wine_vkCreateFence},
{"vkCreateFramebuffer", &wine_vkCreateFramebuffer},
{"vkCreateGraphicsPipelines", &wine_vkCreateGraphicsPipelines},
{"vkCreateImage", &wine_vkCreateImage},
{"vkCreateImageView", &wine_vkCreateImageView},
{"vkCreatePipelineCache", &wine_vkCreatePipelineCache},
{"vkCreatePipelineLayout", &wine_vkCreatePipelineLayout},
{"vkCreateQueryPool", &wine_vkCreateQueryPool},
{"vkCreateRenderPass", &wine_vkCreateRenderPass},
{"vkCreateSampler", &wine_vkCreateSampler},
{"vkCreateSemaphore", &wine_vkCreateSemaphore},
{"vkCreateShaderModule", &wine_vkCreateShaderModule},
{"vkDestroyBuffer", &wine_vkDestroyBuffer},
{"vkDestroyBufferView", &wine_vkDestroyBufferView},
{"vkDestroyCommandPool", &wine_vkDestroyCommandPool},
{"vkDestroyDescriptorPool", &wine_vkDestroyDescriptorPool},
{"vkDestroyDescriptorSetLayout", &wine_vkDestroyDescriptorSetLayout},
{"vkDestroyDevice", &wine_vkDestroyDevice},
{"vkDestroyEvent", &wine_vkDestroyEvent},
{"vkDestroyFence", &wine_vkDestroyFence},
{"vkDestroyFramebuffer", &wine_vkDestroyFramebuffer},
{"vkDestroyImage", &wine_vkDestroyImage},
{"vkDestroyImageView", &wine_vkDestroyImageView},
{"vkDestroyPipeline", &wine_vkDestroyPipeline},
{"vkDestroyPipelineCache", &wine_vkDestroyPipelineCache},
{"vkDestroyPipelineLayout", &wine_vkDestroyPipelineLayout},
{"vkDestroyQueryPool", &wine_vkDestroyQueryPool},
{"vkDestroyRenderPass", &wine_vkDestroyRenderPass},
{"vkDestroySampler", &wine_vkDestroySampler},
{"vkDestroySemaphore", &wine_vkDestroySemaphore},
{"vkDestroyShaderModule", &wine_vkDestroyShaderModule},
{"vkDeviceWaitIdle", &wine_vkDeviceWaitIdle},
{"vkEndCommandBuffer", &wine_vkEndCommandBuffer},
{"vkFlushMappedMemoryRanges", &wine_vkFlushMappedMemoryRanges},
{"vkFreeCommandBuffers", &wine_vkFreeCommandBuffers},
{"vkFreeDescriptorSets", &wine_vkFreeDescriptorSets},
{"vkFreeMemory", &wine_vkFreeMemory},
{"vkGetBufferMemoryRequirements", &wine_vkGetBufferMemoryRequirements},
{"vkGetDeviceMemoryCommitment", &wine_vkGetDeviceMemoryCommitment},
{"vkGetDeviceProcAddr", &wine_vkGetDeviceProcAddr},
{"vkGetDeviceQueue", &wine_vkGetDeviceQueue},
{"vkGetEventStatus", &wine_vkGetEventStatus},
{"vkGetFenceStatus", &wine_vkGetFenceStatus},
{"vkGetImageMemoryRequirements", &wine_vkGetImageMemoryRequirements},
{"vkGetImageSparseMemoryRequirements", &wine_vkGetImageSparseMemoryRequirements},
{"vkGetImageSubresourceLayout", &wine_vkGetImageSubresourceLayout},
{"vkGetPipelineCacheData", &wine_vkGetPipelineCacheData},
{"vkGetQueryPoolResults", &wine_vkGetQueryPoolResults},
{"vkGetRenderAreaGranularity", &wine_vkGetRenderAreaGranularity},
{"vkInvalidateMappedMemoryRanges", &wine_vkInvalidateMappedMemoryRanges},
{"vkMapMemory", &wine_vkMapMemory},
{"vkMergePipelineCaches", &wine_vkMergePipelineCaches},
{"vkQueueBindSparse", &wine_vkQueueBindSparse},
{"vkQueueSubmit", &wine_vkQueueSubmit},
{"vkQueueWaitIdle", &wine_vkQueueWaitIdle},
{"vkResetCommandBuffer", &wine_vkResetCommandBuffer},
{"vkResetCommandPool", &wine_vkResetCommandPool},
{"vkResetDescriptorPool", &wine_vkResetDescriptorPool},
{"vkResetEvent", &wine_vkResetEvent},
{"vkResetFences", &wine_vkResetFences},
{"vkSetEvent", &wine_vkSetEvent},
{"vkUnmapMemory", &wine_vkUnmapMemory},
{"vkUpdateDescriptorSets", &wine_vkUpdateDescriptorSets},
{"vkWaitForFences", &wine_vkWaitForFences},
};
static const struct vulkan_func vk_instance_dispatch_table[] = static const struct vulkan_func vk_instance_dispatch_table[] =
{ {
{"vkCreateDevice", &wine_vkCreateDevice}, {"vkCreateDevice", &wine_vkCreateDevice},
@ -274,6 +1051,20 @@ static const struct vulkan_func vk_instance_dispatch_table[] =
{"vkGetPhysicalDeviceSparseImageFormatProperties", &wine_vkGetPhysicalDeviceSparseImageFormatProperties}, {"vkGetPhysicalDeviceSparseImageFormatProperties", &wine_vkGetPhysicalDeviceSparseImageFormatProperties},
}; };
void *wine_vk_get_device_proc_addr(const char *name)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(vk_device_dispatch_table); i++)
{
if (strcmp(vk_device_dispatch_table[i].name, name) == 0)
{
TRACE("Found name=%s in device table\n", name);
return vk_device_dispatch_table[i].func;
}
}
return NULL;
}
void *wine_vk_get_instance_proc_addr(const char *name) void *wine_vk_get_instance_proc_addr(const char *name)
{ {
unsigned int i; unsigned int i;
@ -281,7 +1072,7 @@ void *wine_vk_get_instance_proc_addr(const char *name)
{ {
if (strcmp(vk_instance_dispatch_table[i].name, name) == 0) if (strcmp(vk_instance_dispatch_table[i].name, name) == 0)
{ {
TRACE("Found pName=%s in instance table\n", name); TRACE("Found name=%s in instance table\n", name);
return vk_instance_dispatch_table[i].func; return vk_instance_dispatch_table[i].func;
} }
} }

View File

@ -9,6 +9,7 @@
#endif #endif
/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */ /* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */
void *wine_vk_get_device_proc_addr(const char *name) DECLSPEC_HIDDEN;
void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN; void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;
/* Functions for which we have custom implementations outside of the thunks. */ /* Functions for which we have custom implementations outside of the thunks. */