winevulkan: Support various device extensions.

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-14 23:39:40 -07:00 committed by Alexandre Julliard
parent 79c2ee529b
commit 3fcec7cf78
4 changed files with 419 additions and 122 deletions

View File

@ -79,11 +79,31 @@ EXT_BLOCK_SIZE = 1000
# In general instance extensions can't be automatically generated
# and need custom wrappers due to e.g. win32 / X11 specific code.
# List of supported instance extensions.
SUPPORTED_EXTENSIONS = [
SUPPORTED_INSTANCE_EXTENSIONS = [
"VK_KHR_get_physical_device_properties2",
"VK_KHR_surface",
"VK_KHR_win32_surface",
"VK_KHR_swapchain",
]
BLACKLISTED_EXTENSIONS = [
# Handling of VK_EXT_debug_report requires some consideration. The win32
# loader already provides it for us and it is somewhat usable. . If we add
# plumbing down to the native layer, we will get each message twice as we
# use 2 loaders (win32+native), but we may get output from the driver.
# In any case callback conversion is required.
"VK_EXT_debug_report",
"VK_EXT_display_control", # Requires VK_EXT_display_surface_counter
"VK_EXT_hdr_metadata", # Needs WSI work.
"VK_GOOGLE_display_timing",
"VK_KHR_display", # Needs WSI work.
"VK_KHR_external_fence_fd",
"VK_KHR_external_fence_win32",
"VK_KHR_external_memory",
"VK_KHR_external_semaphore",
# Relates to external_semaphore and needs type conversions in bitflags.
"VK_KHR_external_semaphore_capabilities",
"VK_KHR_shared_presentable_image", # Needs WSI work.
"VK_NV_external_memory_win32"
]
# Functions part of our winevulkan graphics driver interface.
@ -2185,10 +2205,30 @@ class VkRegistry(object):
LOGGER.debug("Skipping disabled extension: {0}".format(ext_name))
continue
# We only support a handful of extensions for now through a whitelist.
if ext_name not in SUPPORTED_EXTENSIONS:
# Disable highly experimental extensions as the APIs are unstable and can
# change between minor Vulkan revisions until API is final and becomes KHR
# or NV.
if "KHX" in ext_name or "NVX" in ext_name:
LOGGER.debug("Skipping experimental extension: {0}".format(ext_name))
continue
# Instance extensions often require a custom implementation, so filter.
ext_type = ext.attrib["type"]
if ext_type == "instance" and not ext_name in SUPPORTED_INSTANCE_EXTENSIONS:
LOGGER.debug("Skipping instance extension: {0}".format(ext_name))
continue
# We disable some extensions as either we haven't implemented
# support yet or because they are for platforms other than win32.
if ext_name in BLACKLISTED_EXTENSIONS:
LOGGER.debug("Skipping blacklisted extension: {0}".format(ext_name))
continue
elif "requires" in ext.attrib:
# Check if this extension builds on top of another blacklisted
# extension.
requires = ext.attrib["requires"].split(",")
if len(set(requires).intersection(BLACKLISTED_EXTENSIONS)) > 0:
continue
LOGGER.debug("Loading extension: {0}".format(ext_name))
@ -2223,7 +2263,6 @@ class VkRegistry(object):
continue
# Store a list with extensions.
ext_type = ext.attrib["type"]
ext_info = {"name" : ext_name, "type" : ext_type}
extensions.append(ext_info)

View File

@ -218,6 +218,95 @@ static inline void free_VkImageMemoryBarrier_array(VkImageMemoryBarrier_host *in
heap_free(in);
}
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 void convert_VkBufferCreateInfo_win_to_host(const VkBufferCreateInfo *in, VkBufferCreateInfo_host *out)
{
if (!in) return;
@ -287,6 +376,22 @@ static inline void free_VkComputePipelineCreateInfo_array(VkComputePipelineCreat
heap_free(in);
}
static inline void convert_VkDescriptorUpdateTemplateCreateInfoKHR_win_to_host(const VkDescriptorUpdateTemplateCreateInfoKHR *in, VkDescriptorUpdateTemplateCreateInfoKHR_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->flags = in->flags;
out->descriptorUpdateEntryCount = in->descriptorUpdateEntryCount;
out->pDescriptorUpdateEntries = in->pDescriptorUpdateEntries;
out->templateType = in->templateType;
out->descriptorSetLayout = in->descriptorSetLayout;
out->pipelineBindPoint = in->pipelineBindPoint;
out->pipelineLayout = in->pipelineLayout;
out->set = in->set;
}
static inline void convert_VkFramebufferCreateInfo_win_to_host(const VkFramebufferCreateInfo *in, VkFramebufferCreateInfo_host *out)
{
if (!in) return;
@ -841,95 +946,6 @@ static inline void free_VkBindSparseInfo_array(VkBindSparseInfo_host *in, uint32
heap_free(in);
}
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;
@ -1186,12 +1202,24 @@ static void WINAPI wine_vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer,
commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirect(commandBuffer->command_buffer, buffer, offset, drawCount, stride);
}
static void WINAPI wine_vkCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
{
TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride);
commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCountAMD(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
}
static void WINAPI wine_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
{
TRACE("%p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
commandBuffer->device->funcs.p_vkCmdDrawIndirect(commandBuffer->command_buffer, buffer, offset, drawCount, stride);
}
static void WINAPI wine_vkCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
{
TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride);
commandBuffer->device->funcs.p_vkCmdDrawIndirectCountAMD(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
}
static void WINAPI wine_vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
{
TRACE("%p, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), query);
@ -1241,6 +1269,28 @@ static void WINAPI wine_vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipe
commandBuffer->device->funcs.p_vkCmdPushConstants(commandBuffer->command_buffer, layout, stageFlags, offset, size, pValues);
}
static void WINAPI wine_vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites)
{
#if defined(USE_STRUCT_CONVERSION)
VkWriteDescriptorSet_host *pDescriptorWrites_host;
TRACE("%p, %d, 0x%s, %u, %u, %p\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(layout), set, descriptorWriteCount, pDescriptorWrites);
pDescriptorWrites_host = convert_VkWriteDescriptorSet_array_win_to_host(pDescriptorWrites, descriptorWriteCount);
commandBuffer->device->funcs.p_vkCmdPushDescriptorSetKHR(commandBuffer->command_buffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites_host);
free_VkWriteDescriptorSet_array(pDescriptorWrites_host, descriptorWriteCount);
#else
TRACE("%p, %d, 0x%s, %u, %u, %p\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(layout), set, descriptorWriteCount, pDescriptorWrites);
commandBuffer->device->funcs.p_vkCmdPushDescriptorSetKHR(commandBuffer->command_buffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites);
#endif
}
static void WINAPI wine_vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData)
{
TRACE("%p, 0x%s, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(descriptorUpdateTemplate), wine_dbgstr_longlong(layout), set, pData);
commandBuffer->device->funcs.p_vkCmdPushDescriptorSetWithTemplateKHR(commandBuffer->command_buffer, descriptorUpdateTemplate, layout, set, pData);
}
static void WINAPI wine_vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
{
TRACE("%p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
@ -1277,6 +1327,12 @@ static void WINAPI wine_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float
commandBuffer->device->funcs.p_vkCmdSetDepthBounds(commandBuffer->command_buffer, minDepthBounds, maxDepthBounds);
}
static void WINAPI wine_vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles)
{
TRACE("%p, %u, %u, %p\n", commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
commandBuffer->device->funcs.p_vkCmdSetDiscardRectangleEXT(commandBuffer->command_buffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
}
static void WINAPI wine_vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
{
TRACE("%p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
@ -1319,6 +1375,12 @@ static void WINAPI wine_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t
commandBuffer->device->funcs.p_vkCmdSetViewport(commandBuffer->command_buffer, firstViewport, viewportCount, pViewports);
}
static void WINAPI wine_vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV *pViewportWScalings)
{
TRACE("%p, %u, %u, %p\n", commandBuffer, firstViewport, viewportCount, pViewportWScalings);
commandBuffer->device->funcs.p_vkCmdSetViewportWScalingNV(commandBuffer->command_buffer, firstViewport, viewportCount, pViewportWScalings);
}
static void WINAPI wine_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData)
{
TRACE("%p, 0x%s, 0x%s, 0x%s, %p\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(dataSize), pData);
@ -1420,6 +1482,23 @@ static VkResult WINAPI wine_vkCreateDescriptorSetLayout(VkDevice device, const V
return device->funcs.p_vkCreateDescriptorSetLayout(device->device, pCreateInfo, NULL, pSetLayout);
}
static VkResult WINAPI wine_vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate)
{
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
VkDescriptorUpdateTemplateCreateInfoKHR_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
convert_VkDescriptorUpdateTemplateCreateInfoKHR_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateDescriptorUpdateTemplateKHR(device->device, &pCreateInfo_host, NULL, pDescriptorUpdateTemplate);
return result;
#else
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
return device->funcs.p_vkCreateDescriptorUpdateTemplateKHR(device->device, pCreateInfo, NULL, pDescriptorUpdateTemplate);
#endif
}
static VkResult WINAPI wine_vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent)
{
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pEvent);
@ -1562,6 +1641,12 @@ static void WINAPI wine_vkDestroyDescriptorSetLayout(VkDevice device, VkDescript
device->funcs.p_vkDestroyDescriptorSetLayout(device->device, descriptorSetLayout, NULL);
}
static void WINAPI wine_vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorUpdateTemplate), pAllocator);
device->funcs.p_vkDestroyDescriptorUpdateTemplateKHR(device->device, descriptorUpdateTemplate, NULL);
}
static void WINAPI wine_vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(event), pAllocator);
@ -2010,12 +2095,24 @@ static VkResult WINAPI wine_vkSetEvent(VkDevice device, VkEvent event)
return device->funcs.p_vkSetEvent(device->device, event);
}
static void WINAPI wine_vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags)
{
TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(commandPool), flags);
device->funcs.p_vkTrimCommandPoolKHR(device->device, commandPool, flags);
}
static void WINAPI wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
{
TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(memory));
device->funcs.p_vkUnmapMemory(device->device, memory);
}
static void WINAPI wine_vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void *pData)
{
TRACE("%p, 0x%s, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorSet), wine_dbgstr_longlong(descriptorUpdateTemplate), pData);
device->funcs.p_vkUpdateDescriptorSetWithTemplateKHR(device->device, descriptorSet, descriptorUpdateTemplate, pData);
}
static void WINAPI wine_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies)
{
#if defined(USE_STRUCT_CONVERSION)
@ -2070,7 +2167,9 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdDraw", &wine_vkCmdDraw},
{"vkCmdDrawIndexed", &wine_vkCmdDrawIndexed},
{"vkCmdDrawIndexedIndirect", &wine_vkCmdDrawIndexedIndirect},
{"vkCmdDrawIndexedIndirectCountAMD", &wine_vkCmdDrawIndexedIndirectCountAMD},
{"vkCmdDrawIndirect", &wine_vkCmdDrawIndirect},
{"vkCmdDrawIndirectCountAMD", &wine_vkCmdDrawIndirectCountAMD},
{"vkCmdEndQuery", &wine_vkCmdEndQuery},
{"vkCmdEndRenderPass", &wine_vkCmdEndRenderPass},
{"vkCmdExecuteCommands", &wine_vkCmdExecuteCommands},
@ -2078,12 +2177,15 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdNextSubpass", &wine_vkCmdNextSubpass},
{"vkCmdPipelineBarrier", &wine_vkCmdPipelineBarrier},
{"vkCmdPushConstants", &wine_vkCmdPushConstants},
{"vkCmdPushDescriptorSetKHR", &wine_vkCmdPushDescriptorSetKHR},
{"vkCmdPushDescriptorSetWithTemplateKHR", &wine_vkCmdPushDescriptorSetWithTemplateKHR},
{"vkCmdResetEvent", &wine_vkCmdResetEvent},
{"vkCmdResetQueryPool", &wine_vkCmdResetQueryPool},
{"vkCmdResolveImage", &wine_vkCmdResolveImage},
{"vkCmdSetBlendConstants", &wine_vkCmdSetBlendConstants},
{"vkCmdSetDepthBias", &wine_vkCmdSetDepthBias},
{"vkCmdSetDepthBounds", &wine_vkCmdSetDepthBounds},
{"vkCmdSetDiscardRectangleEXT", &wine_vkCmdSetDiscardRectangleEXT},
{"vkCmdSetEvent", &wine_vkCmdSetEvent},
{"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
{"vkCmdSetScissor", &wine_vkCmdSetScissor},
@ -2091,6 +2193,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdSetStencilReference", &wine_vkCmdSetStencilReference},
{"vkCmdSetStencilWriteMask", &wine_vkCmdSetStencilWriteMask},
{"vkCmdSetViewport", &wine_vkCmdSetViewport},
{"vkCmdSetViewportWScalingNV", &wine_vkCmdSetViewportWScalingNV},
{"vkCmdUpdateBuffer", &wine_vkCmdUpdateBuffer},
{"vkCmdWaitEvents", &wine_vkCmdWaitEvents},
{"vkCmdWriteTimestamp", &wine_vkCmdWriteTimestamp},
@ -2100,6 +2203,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCreateComputePipelines", &wine_vkCreateComputePipelines},
{"vkCreateDescriptorPool", &wine_vkCreateDescriptorPool},
{"vkCreateDescriptorSetLayout", &wine_vkCreateDescriptorSetLayout},
{"vkCreateDescriptorUpdateTemplateKHR", &wine_vkCreateDescriptorUpdateTemplateKHR},
{"vkCreateEvent", &wine_vkCreateEvent},
{"vkCreateFence", &wine_vkCreateFence},
{"vkCreateFramebuffer", &wine_vkCreateFramebuffer},
@ -2119,6 +2223,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkDestroyCommandPool", &wine_vkDestroyCommandPool},
{"vkDestroyDescriptorPool", &wine_vkDestroyDescriptorPool},
{"vkDestroyDescriptorSetLayout", &wine_vkDestroyDescriptorSetLayout},
{"vkDestroyDescriptorUpdateTemplateKHR", &wine_vkDestroyDescriptorUpdateTemplateKHR},
{"vkDestroyDevice", &wine_vkDestroyDevice},
{"vkDestroyEvent", &wine_vkDestroyEvent},
{"vkDestroyFence", &wine_vkDestroyFence},
@ -2166,7 +2271,9 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkResetEvent", &wine_vkResetEvent},
{"vkResetFences", &wine_vkResetFences},
{"vkSetEvent", &wine_vkSetEvent},
{"vkTrimCommandPoolKHR", &wine_vkTrimCommandPoolKHR},
{"vkUnmapMemory", &wine_vkUnmapMemory},
{"vkUpdateDescriptorSetWithTemplateKHR", &wine_vkUpdateDescriptorSetWithTemplateKHR},
{"vkUpdateDescriptorSets", &wine_vkUpdateDescriptorSets},
{"vkWaitForFences", &wine_vkWaitForFences},
};
@ -2231,7 +2338,35 @@ void *wine_vk_get_instance_proc_addr(const char *name)
static const char * const vk_device_extensions[] =
{
"VK_AMD_draw_indirect_count",
"VK_AMD_gcn_shader",
"VK_AMD_gpu_shader_half_float",
"VK_AMD_negative_viewport_height",
"VK_AMD_rasterization_order",
"VK_AMD_shader_ballot",
"VK_AMD_shader_explicit_vertex_parameter",
"VK_AMD_shader_trinary_minmax",
"VK_AMD_texture_gather_bias_lod",
"VK_EXT_discard_rectangles",
"VK_EXT_shader_subgroup_ballot",
"VK_EXT_shader_subgroup_vote",
"VK_IMG_filter_cubic",
"VK_IMG_format_pvrtc",
"VK_KHR_descriptor_update_template",
"VK_KHR_incremental_present",
"VK_KHR_maintenance1",
"VK_KHR_push_descriptor",
"VK_KHR_sampler_mirror_clamp_to_edge",
"VK_KHR_shader_draw_parameters",
"VK_KHR_swapchain",
"VK_NV_clip_space_w_scaling",
"VK_NV_dedicated_allocation",
"VK_NV_external_memory",
"VK_NV_geometry_shader_passthrough",
"VK_NV_glsl_shader",
"VK_NV_sample_mask_override_coverage",
"VK_NV_viewport_array2",
"VK_NV_viewport_swizzle",
};
static const char *vk_instance_extensions[] =

View File

@ -141,6 +141,34 @@ typedef struct VkImageMemoryBarrier_host
VkImageSubresourceRange subresourceRange;
} VkImageMemoryBarrier_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 VkBufferCreateInfo_host
{
VkStructureType sType;
@ -186,6 +214,20 @@ typedef struct VkComputePipelineCreateInfo_host
int32_t basePipelineIndex;
} VkComputePipelineCreateInfo_host;
typedef struct VkDescriptorUpdateTemplateCreateInfoKHR_host
{
VkStructureType sType;
void *pNext;
VkDescriptorUpdateTemplateCreateFlagsKHR flags;
uint32_t descriptorUpdateEntryCount;
const VkDescriptorUpdateTemplateEntryKHR *pDescriptorUpdateEntries;
VkDescriptorUpdateTemplateTypeKHR templateType;
VkDescriptorSetLayout descriptorSetLayout;
VkPipelineBindPoint pipelineBindPoint;
VkPipelineLayout pipelineLayout;
uint32_t set;
} VkDescriptorUpdateTemplateCreateInfoKHR_host;
typedef struct VkFramebufferCreateInfo_host
{
VkStructureType sType;
@ -504,34 +546,6 @@ typedef struct VkBindSparseInfo_host
const VkSemaphore *pSignalSemaphores;
} VkBindSparseInfo_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;
@ -607,7 +621,9 @@ struct vulkan_device_funcs
void (*p_vkCmdDraw)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t);
void (*p_vkCmdDrawIndexed)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
void (*p_vkCmdDrawIndexedIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdEndQuery)(VkCommandBuffer, VkQueryPool, uint32_t);
void (*p_vkCmdEndRenderPass)(VkCommandBuffer);
void (*p_vkCmdExecuteCommands)(VkCommandBuffer, uint32_t, const VkCommandBuffer *);
@ -619,12 +635,19 @@ struct vulkan_device_funcs
void (*p_vkCmdPipelineBarrier)(VkCommandBuffer, VkPipelineStageFlags, VkPipelineStageFlags, VkDependencyFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
#endif
void (*p_vkCmdPushConstants)(VkCommandBuffer, VkPipelineLayout, VkShaderStageFlags, uint32_t, uint32_t, const void *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkCmdPushDescriptorSetKHR)(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, const VkWriteDescriptorSet_host *);
#else
void (*p_vkCmdPushDescriptorSetKHR)(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, const VkWriteDescriptorSet *);
#endif
void (*p_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer, VkDescriptorUpdateTemplateKHR, VkPipelineLayout, uint32_t, const void *);
void (*p_vkCmdResetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
void (*p_vkCmdResetQueryPool)(VkCommandBuffer, VkQueryPool, uint32_t, uint32_t);
void (*p_vkCmdResolveImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageResolve *);
void (*p_vkCmdSetBlendConstants)(VkCommandBuffer, const float[4]);
void (*p_vkCmdSetDepthBias)(VkCommandBuffer, float, float, float);
void (*p_vkCmdSetDepthBounds)(VkCommandBuffer, float, float);
void (*p_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
void (*p_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
void (*p_vkCmdSetLineWidth)(VkCommandBuffer, float);
void (*p_vkCmdSetScissor)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
@ -632,6 +655,7 @@ struct vulkan_device_funcs
void (*p_vkCmdSetStencilReference)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
void (*p_vkCmdSetStencilWriteMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
void (*p_vkCmdSetViewport)(VkCommandBuffer, uint32_t, uint32_t, const VkViewport *);
void (*p_vkCmdSetViewportWScalingNV)(VkCommandBuffer, uint32_t, uint32_t, const VkViewportWScalingNV *);
void (*p_vkCmdUpdateBuffer)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, const void *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkCmdWaitEvents)(VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags, VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier_host *, uint32_t, const VkImageMemoryBarrier_host *);
@ -657,6 +681,11 @@ struct vulkan_device_funcs
#endif
VkResult (*p_vkCreateDescriptorPool)(VkDevice, const VkDescriptorPoolCreateInfo *, const VkAllocationCallbacks *, VkDescriptorPool *);
VkResult (*p_vkCreateDescriptorSetLayout)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, const VkAllocationCallbacks *, VkDescriptorSetLayout *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfoKHR_host *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplateKHR *);
#else
VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfoKHR *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplateKHR *);
#endif
VkResult (*p_vkCreateEvent)(VkDevice, const VkEventCreateInfo *, const VkAllocationCallbacks *, VkEvent *);
VkResult (*p_vkCreateFence)(VkDevice, const VkFenceCreateInfo *, const VkAllocationCallbacks *, VkFence *);
#if defined(USE_STRUCT_CONVERSION)
@ -687,6 +716,7 @@ struct vulkan_device_funcs
void (*p_vkDestroyCommandPool)(VkDevice, VkCommandPool, const VkAllocationCallbacks *);
void (*p_vkDestroyDescriptorPool)(VkDevice, VkDescriptorPool, const VkAllocationCallbacks *);
void (*p_vkDestroyDescriptorSetLayout)(VkDevice, VkDescriptorSetLayout, const VkAllocationCallbacks *);
void (*p_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice, VkDescriptorUpdateTemplateKHR, const VkAllocationCallbacks *);
void (*p_vkDestroyDevice)(VkDevice, const VkAllocationCallbacks *);
void (*p_vkDestroyEvent)(VkDevice, VkEvent, const VkAllocationCallbacks *);
void (*p_vkDestroyFence)(VkDevice, VkFence, const VkAllocationCallbacks *);
@ -754,7 +784,9 @@ struct vulkan_device_funcs
VkResult (*p_vkResetEvent)(VkDevice, VkEvent);
VkResult (*p_vkResetFences)(VkDevice, uint32_t, const VkFence *);
VkResult (*p_vkSetEvent)(VkDevice, VkEvent);
void (*p_vkTrimCommandPoolKHR)(VkDevice, VkCommandPool, VkCommandPoolTrimFlagsKHR);
void (*p_vkUnmapMemory)(VkDevice, VkDeviceMemory);
void (*p_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice, VkDescriptorSet, VkDescriptorUpdateTemplateKHR, const void *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkUpdateDescriptorSets)(VkDevice, uint32_t, const VkWriteDescriptorSet_host *, uint32_t, const VkCopyDescriptorSet_host *);
#else
@ -837,7 +869,9 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdDraw) \
USE_VK_FUNC(vkCmdDrawIndexed) \
USE_VK_FUNC(vkCmdDrawIndexedIndirect) \
USE_VK_FUNC(vkCmdDrawIndexedIndirectCountAMD) \
USE_VK_FUNC(vkCmdDrawIndirect) \
USE_VK_FUNC(vkCmdDrawIndirectCountAMD) \
USE_VK_FUNC(vkCmdEndQuery) \
USE_VK_FUNC(vkCmdEndRenderPass) \
USE_VK_FUNC(vkCmdExecuteCommands) \
@ -845,12 +879,15 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdNextSubpass) \
USE_VK_FUNC(vkCmdPipelineBarrier) \
USE_VK_FUNC(vkCmdPushConstants) \
USE_VK_FUNC(vkCmdPushDescriptorSetKHR) \
USE_VK_FUNC(vkCmdPushDescriptorSetWithTemplateKHR) \
USE_VK_FUNC(vkCmdResetEvent) \
USE_VK_FUNC(vkCmdResetQueryPool) \
USE_VK_FUNC(vkCmdResolveImage) \
USE_VK_FUNC(vkCmdSetBlendConstants) \
USE_VK_FUNC(vkCmdSetDepthBias) \
USE_VK_FUNC(vkCmdSetDepthBounds) \
USE_VK_FUNC(vkCmdSetDiscardRectangleEXT) \
USE_VK_FUNC(vkCmdSetEvent) \
USE_VK_FUNC(vkCmdSetLineWidth) \
USE_VK_FUNC(vkCmdSetScissor) \
@ -858,6 +895,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdSetStencilReference) \
USE_VK_FUNC(vkCmdSetStencilWriteMask) \
USE_VK_FUNC(vkCmdSetViewport) \
USE_VK_FUNC(vkCmdSetViewportWScalingNV) \
USE_VK_FUNC(vkCmdUpdateBuffer) \
USE_VK_FUNC(vkCmdWaitEvents) \
USE_VK_FUNC(vkCmdWriteTimestamp) \
@ -867,6 +905,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCreateComputePipelines) \
USE_VK_FUNC(vkCreateDescriptorPool) \
USE_VK_FUNC(vkCreateDescriptorSetLayout) \
USE_VK_FUNC(vkCreateDescriptorUpdateTemplateKHR) \
USE_VK_FUNC(vkCreateEvent) \
USE_VK_FUNC(vkCreateFence) \
USE_VK_FUNC(vkCreateFramebuffer) \
@ -885,6 +924,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkDestroyCommandPool) \
USE_VK_FUNC(vkDestroyDescriptorPool) \
USE_VK_FUNC(vkDestroyDescriptorSetLayout) \
USE_VK_FUNC(vkDestroyDescriptorUpdateTemplateKHR) \
USE_VK_FUNC(vkDestroyDevice) \
USE_VK_FUNC(vkDestroyEvent) \
USE_VK_FUNC(vkDestroyFence) \
@ -928,7 +968,9 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkResetEvent) \
USE_VK_FUNC(vkResetFences) \
USE_VK_FUNC(vkSetEvent) \
USE_VK_FUNC(vkTrimCommandPoolKHR) \
USE_VK_FUNC(vkUnmapMemory) \
USE_VK_FUNC(vkUpdateDescriptorSetWithTemplateKHR) \
USE_VK_FUNC(vkUpdateDescriptorSets) \
USE_VK_FUNC(vkWaitForFences)

View File

@ -57,6 +57,7 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplateKHR)
VK_DEFINE_HANDLE(VkDevice)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
@ -378,6 +379,7 @@ typedef enum VkDescriptorPoolCreateFlagBits
typedef enum VkDescriptorSetLayoutCreateFlagBits
{
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkDescriptorSetLayoutCreateFlagBits;
@ -397,6 +399,13 @@ typedef enum VkDescriptorType
VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7fffffff,
} VkDescriptorType;
typedef enum VkDescriptorUpdateTemplateTypeKHR
{
VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_KHR_MAX_ENUM = 0x7fffffff,
} VkDescriptorUpdateTemplateTypeKHR;
typedef enum VkDynamicState
{
VK_DYNAMIC_STATE_VIEWPORT = 0,
@ -408,6 +417,8 @@ typedef enum VkDynamicState
VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
VK_DYNAMIC_STATE_MAX_ENUM = 0x7fffffff,
} VkDynamicState;
@ -421,6 +432,7 @@ typedef enum VkFilter
{
VK_FILTER_NEAREST = 0,
VK_FILTER_LINEAR = 1,
VK_FILTER_CUBIC_IMG = 1000015000,
VK_FILTER_MAX_ENUM = 0x7fffffff,
} VkFilter;
@ -611,6 +623,14 @@ typedef enum VkFormat
VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
VK_FORMAT_MAX_ENUM = 0x7fffffff,
} VkFormat;
@ -629,6 +649,9 @@ typedef enum VkFormatFeatureFlagBits
VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkFormatFeatureFlagBits;
@ -655,6 +678,7 @@ typedef enum VkImageCreateFlagBits
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkImageCreateFlagBits;
@ -793,6 +817,7 @@ typedef enum VkObjectType
VK_OBJECT_TYPE_COMMAND_POOL = 25,
VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
VK_OBJECT_TYPE_MAX_ENUM = 0x7fffffff,
} VkObjectType;
@ -923,6 +948,8 @@ typedef enum VkQueueFlagBits
typedef enum VkResult
{
VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
VK_ERROR_INVALID_SHADER_NV = -1000012000,
VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
VK_ERROR_SURFACE_LOST_KHR = -1000000000,
@ -1077,6 +1104,13 @@ typedef enum VkStructureType
VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
@ -1086,6 +1120,13 @@ typedef enum VkStructureType
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7fffffff,
} VkStructureType;
@ -1268,6 +1309,16 @@ typedef struct VkDescriptorSetLayoutBinding
const VkSampler *pImmutableSamplers;
} VkDescriptorSetLayoutBinding;
typedef struct VkDescriptorUpdateTemplateEntryKHR
{
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
VkDescriptorType descriptorType;
size_t offset;
size_t stride;
} VkDescriptorUpdateTemplateEntryKHR;
typedef struct VkDispatchIndirectCommand
{
uint32_t x;
@ -1696,6 +1747,20 @@ typedef struct VkDescriptorSetAllocateInfo
const VkDescriptorSetLayout *pSetLayouts;
} VkDescriptorSetAllocateInfo;
typedef struct VkDescriptorUpdateTemplateCreateInfoKHR
{
VkStructureType sType;
void *pNext;
VkDescriptorUpdateTemplateCreateFlagsKHR flags;
uint32_t descriptorUpdateEntryCount;
const VkDescriptorUpdateTemplateEntryKHR *pDescriptorUpdateEntries;
VkDescriptorUpdateTemplateTypeKHR templateType;
VkDescriptorSetLayout WINE_VK_ALIGN(8) descriptorSetLayout;
VkPipelineBindPoint pipelineBindPoint;
VkPipelineLayout WINE_VK_ALIGN(8) pipelineLayout;
uint32_t set;
} VkDescriptorUpdateTemplateCreateInfoKHR;
typedef struct VkEventCreateInfo
{
VkStructureType sType;
@ -2049,6 +2114,12 @@ typedef struct VkSwapchainCreateInfoKHR
VkSwapchainKHR WINE_VK_ALIGN(8) oldSwapchain;
} VkSwapchainCreateInfoKHR;
typedef struct VkViewportWScalingNV
{
float xcoeff;
float ycoeff;
} VkViewportWScalingNV;
typedef struct VkClearAttachment
{
VkImageAspectFlags aspectMask;
@ -2507,7 +2578,9 @@ void VKAPI_CALL vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer bu
void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
void VKAPI_CALL vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer);
void VKAPI_CALL vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers);
@ -2515,12 +2588,15 @@ void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffe
void VKAPI_CALL vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents);
void VKAPI_CALL 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);
void VKAPI_CALL vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues);
void VKAPI_CALL vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites);
void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData);
void VKAPI_CALL vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void VKAPI_CALL vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions);
void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]);
void VKAPI_CALL vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
void VKAPI_CALL vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles);
void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors);
@ -2528,6 +2604,7 @@ void VKAPI_CALL vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkSten
void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
void VKAPI_CALL vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports);
void VKAPI_CALL vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV *pViewportWScalings);
void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData);
void VKAPI_CALL 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);
void VKAPI_CALL vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
@ -2537,6 +2614,7 @@ VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCrea
VkResult VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines);
VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool);
VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout);
VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate);
VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice);
VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent);
VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence);
@ -2559,6 +2637,7 @@ void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, co
void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator);
@ -2633,7 +2712,9 @@ VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool desc
VkResult VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event);
VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences);
VkResult VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event);
void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags);
void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory);
void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void *pData);
void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies);
VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout);