vulkan: Update from header 0.138.2 to 0.170.2
Change-Id: I011e1f27d025730d448ee5cfefc6701300b455c2
(cherry picked from commit 6761b6067555557599e8c30096614642a5223646)
diff --git a/vulkan/libvulkan/entry.cpp b/vulkan/libvulkan/entry.cpp
index cd5dd99..2f7583d 100644
--- a/vulkan/libvulkan/entry.cpp
+++ b/vulkan/libvulkan/entry.cpp
@@ -47,8 +47,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyInstance(VkInstance instance) {
- return GetVtbl(instance).DestroyInstance(instance);
+void vkDestroyInstance(VkInstance instance) {
+ GetVtbl(instance).DestroyInstance(instance);
}
__attribute__((visibility("default")))
@@ -72,13 +72,8 @@
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceQueueCount(physicalDevice, pCount);
-}
-
-__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceQueueProperties(physicalDevice, count, pQueueProperties);
+VkResult vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties) {
+ return GetVtbl(physicalDevice).GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pCount, pQueueFamilyProperties);
}
__attribute__((visibility("default")))
@@ -97,13 +92,8 @@
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, pImageFormatProperties);
-}
-
-__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceLimits(physicalDevice, pLimits);
+VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
+ return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
}
__attribute__((visibility("default")))
@@ -112,28 +102,28 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyDevice(VkDevice device) {
- return vulkan::DestroyDevice(device);
+void vkDestroyDevice(VkDevice device) {
+ vulkan::DestroyDevice(device);
}
__attribute__((visibility("default")))
-VkResult vkGetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
- return vulkan::GetGlobalLayerProperties(pCount, pProperties);
+VkResult vkEnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
+ return vulkan::EnumerateInstanceLayerProperties(pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetGlobalExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
- return vulkan::GetGlobalExtensionProperties(pLayerName, pCount, pProperties);
+VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
+ return vulkan::EnumerateInstanceExtensionProperties(pLayerName, pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceLayerProperties(physicalDevice, pCount, pProperties);
+VkResult vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) {
+ return GetVtbl(physicalDevice).EnumerateDeviceLayerProperties(physicalDevice, pCount, pProperties);
}
__attribute__((visibility("default")))
-VkResult vkGetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
- return GetVtbl(physicalDevice).GetPhysicalDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties);
+VkResult vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) {
+ return GetVtbl(physicalDevice).EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties);
}
__attribute__((visibility("default")))
@@ -162,8 +152,8 @@
}
__attribute__((visibility("default")))
-VkResult vkFreeMemory(VkDevice device, VkDeviceMemory mem) {
- return GetVtbl(device).FreeMemory(device, mem);
+void vkFreeMemory(VkDevice device, VkDeviceMemory mem) {
+ GetVtbl(device).FreeMemory(device, mem);
}
__attribute__((visibility("default")))
@@ -172,8 +162,8 @@
}
__attribute__((visibility("default")))
-VkResult vkUnmapMemory(VkDevice device, VkDeviceMemory mem) {
- return GetVtbl(device).UnmapMemory(device, mem);
+void vkUnmapMemory(VkDevice device, VkDeviceMemory mem) {
+ GetVtbl(device).UnmapMemory(device, mem);
}
__attribute__((visibility("default")))
@@ -242,8 +232,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyFence(VkDevice device, VkFence fence) {
- return GetVtbl(device).DestroyFence(device, fence);
+void vkDestroyFence(VkDevice device, VkFence fence) {
+ GetVtbl(device).DestroyFence(device, fence);
}
__attribute__((visibility("default")))
@@ -267,8 +257,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) {
- return GetVtbl(device).DestroySemaphore(device, semaphore);
+void vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) {
+ GetVtbl(device).DestroySemaphore(device, semaphore);
}
__attribute__((visibility("default")))
@@ -287,8 +277,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyEvent(VkDevice device, VkEvent event) {
- return GetVtbl(device).DestroyEvent(device, event);
+void vkDestroyEvent(VkDevice device, VkEvent event) {
+ GetVtbl(device).DestroyEvent(device, event);
}
__attribute__((visibility("default")))
@@ -312,8 +302,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) {
- return GetVtbl(device).DestroyQueryPool(device, queryPool);
+void vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) {
+ GetVtbl(device).DestroyQueryPool(device, queryPool);
}
__attribute__((visibility("default")))
@@ -327,8 +317,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyBuffer(VkDevice device, VkBuffer buffer) {
- return GetVtbl(device).DestroyBuffer(device, buffer);
+void vkDestroyBuffer(VkDevice device, VkBuffer buffer) {
+ GetVtbl(device).DestroyBuffer(device, buffer);
}
__attribute__((visibility("default")))
@@ -337,8 +327,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyBufferView(VkDevice device, VkBufferView bufferView) {
- return GetVtbl(device).DestroyBufferView(device, bufferView);
+void vkDestroyBufferView(VkDevice device, VkBufferView bufferView) {
+ GetVtbl(device).DestroyBufferView(device, bufferView);
}
__attribute__((visibility("default")))
@@ -347,8 +337,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyImage(VkDevice device, VkImage image) {
- return GetVtbl(device).DestroyImage(device, image);
+void vkDestroyImage(VkDevice device, VkImage image) {
+ GetVtbl(device).DestroyImage(device, image);
}
__attribute__((visibility("default")))
@@ -362,18 +352,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyImageView(VkDevice device, VkImageView imageView) {
- return GetVtbl(device).DestroyImageView(device, imageView);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView) {
- return GetVtbl(device).CreateAttachmentView(device, pCreateInfo, pView);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) {
- return GetVtbl(device).DestroyAttachmentView(device, attachmentView);
+void vkDestroyImageView(VkDevice device, VkImageView imageView) {
+ GetVtbl(device).DestroyImageView(device, imageView);
}
__attribute__((visibility("default")))
@@ -382,8 +362,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) {
- return GetVtbl(device).DestroyShaderModule(device, shaderModule);
+void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) {
+ GetVtbl(device).DestroyShaderModule(device, shaderModule);
}
__attribute__((visibility("default")))
@@ -392,8 +372,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyShader(VkDevice device, VkShader shader) {
- return GetVtbl(device).DestroyShader(device, shader);
+void vkDestroyShader(VkDevice device, VkShader shader) {
+ GetVtbl(device).DestroyShader(device, shader);
}
__attribute__((visibility("default")))
@@ -402,8 +382,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) {
- return GetVtbl(device).DestroyPipelineCache(device, pipelineCache);
+void vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) {
+ GetVtbl(device).DestroyPipelineCache(device, pipelineCache);
}
__attribute__((visibility("default")))
@@ -432,8 +412,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipeline(VkDevice device, VkPipeline pipeline) {
- return GetVtbl(device).DestroyPipeline(device, pipeline);
+void vkDestroyPipeline(VkDevice device, VkPipeline pipeline) {
+ GetVtbl(device).DestroyPipeline(device, pipeline);
}
__attribute__((visibility("default")))
@@ -442,8 +422,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) {
- return GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout);
+void vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) {
+ GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout);
}
__attribute__((visibility("default")))
@@ -452,8 +432,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroySampler(VkDevice device, VkSampler sampler) {
- return GetVtbl(device).DestroySampler(device, sampler);
+void vkDestroySampler(VkDevice device, VkSampler sampler) {
+ GetVtbl(device).DestroySampler(device, sampler);
}
__attribute__((visibility("default")))
@@ -462,18 +442,18 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) {
- return GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout);
+void vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) {
+ GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout);
}
__attribute__((visibility("default")))
-VkResult vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) {
- return GetVtbl(device).CreateDescriptorPool(device, poolUsage, maxSets, pCreateInfo, pDescriptorPool);
+VkResult vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) {
+ return GetVtbl(device).CreateDescriptorPool(device, pCreateInfo, pDescriptorPool);
}
__attribute__((visibility("default")))
-VkResult vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) {
- return GetVtbl(device).DestroyDescriptorPool(device, descriptorPool);
+void vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) {
+ GetVtbl(device).DestroyDescriptorPool(device, descriptorPool);
}
__attribute__((visibility("default")))
@@ -482,8 +462,8 @@
}
__attribute__((visibility("default")))
-VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount) {
- return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
+VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets) {
+ return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
}
__attribute__((visibility("default")))
@@ -492,48 +472,8 @@
}
__attribute__((visibility("default")))
-VkResult vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) {
- return GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState) {
- return GetVtbl(device).CreateDynamicViewportState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) {
- return GetVtbl(device).DestroyDynamicViewportState(device, dynamicViewportState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState) {
- return GetVtbl(device).CreateDynamicRasterState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) {
- return GetVtbl(device).DestroyDynamicRasterState(device, dynamicRasterState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState) {
- return GetVtbl(device).CreateDynamicColorBlendState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) {
- return GetVtbl(device).DestroyDynamicColorBlendState(device, dynamicColorBlendState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkCreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState) {
- return GetVtbl(device).CreateDynamicDepthStencilState(device, pCreateInfo, pState);
-}
-
-__attribute__((visibility("default")))
-VkResult vkDestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) {
- return GetVtbl(device).DestroyDynamicDepthStencilState(device, dynamicDepthStencilState);
+void vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) {
+ GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies);
}
__attribute__((visibility("default")))
@@ -542,8 +482,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) {
- return GetVtbl(device).DestroyFramebuffer(device, framebuffer);
+void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) {
+ GetVtbl(device).DestroyFramebuffer(device, framebuffer);
}
__attribute__((visibility("default")))
@@ -552,8 +492,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) {
- return GetVtbl(device).DestroyRenderPass(device, renderPass);
+void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) {
+ GetVtbl(device).DestroyRenderPass(device, renderPass);
}
__attribute__((visibility("default")))
@@ -567,8 +507,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) {
- return GetVtbl(device).DestroyCommandPool(device, cmdPool);
+void vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) {
+ GetVtbl(device).DestroyCommandPool(device, cmdPool);
}
__attribute__((visibility("default")))
@@ -582,8 +522,8 @@
}
__attribute__((visibility("default")))
-VkResult vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) {
- return GetVtbl(device).DestroyCommandBuffer(device, commandBuffer);
+void vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) {
+ GetVtbl(device).DestroyCommandBuffer(device, commandBuffer);
}
__attribute__((visibility("default")))
@@ -607,23 +547,48 @@
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) {
- GetVtbl(cmdBuffer).CmdBindDynamicViewportState(cmdBuffer, dynamicViewportState);
+void vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports) {
+ GetVtbl(cmdBuffer).CmdSetViewport(cmdBuffer, viewportCount, pViewports);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) {
- GetVtbl(cmdBuffer).CmdBindDynamicRasterState(cmdBuffer, dynamicRasterState);
+void vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors) {
+ GetVtbl(cmdBuffer).CmdSetScissor(cmdBuffer, scissorCount, pScissors);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) {
- GetVtbl(cmdBuffer).CmdBindDynamicColorBlendState(cmdBuffer, dynamicColorBlendState);
+void vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth) {
+ GetVtbl(cmdBuffer).CmdSetLineWidth(cmdBuffer, lineWidth);
}
__attribute__((visibility("default")))
-void vkCmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) {
- GetVtbl(cmdBuffer).CmdBindDynamicDepthStencilState(cmdBuffer, dynamicDepthStencilState);
+void vkCmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) {
+ GetVtbl(cmdBuffer).CmdSetDepthBias(cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]) {
+ GetVtbl(cmdBuffer).CmdSetBlendConstants(cmdBuffer, blendConst);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) {
+ GetVtbl(cmdBuffer).CmdSetDepthBounds(cmdBuffer, minDepthBounds, maxDepthBounds);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask) {
+ GetVtbl(cmdBuffer).CmdSetStencilCompareMask(cmdBuffer, faceMask, stencilCompareMask);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask) {
+ GetVtbl(cmdBuffer).CmdSetStencilWriteMask(cmdBuffer, faceMask, stencilWriteMask);
+}
+
+__attribute__((visibility("default")))
+void vkCmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference) {
+ GetVtbl(cmdBuffer).CmdSetStencilReference(cmdBuffer, faceMask, stencilReference);
}
__attribute__((visibility("default")))
@@ -642,13 +607,13 @@
}
__attribute__((visibility("default")))
-void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) {
- GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount);
+void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) {
+ GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
}
__attribute__((visibility("default")))
-void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) {
- GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount);
+void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) {
+ GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
}
__attribute__((visibility("default")))
@@ -712,8 +677,8 @@
}
__attribute__((visibility("default")))
-void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
- GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges);
+void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) {
+ GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges);
}
__attribute__((visibility("default")))
@@ -722,8 +687,8 @@
}
__attribute__((visibility("default")))
-void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) {
- GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, imageAspectMask, imageLayout, depth, stencil, rectCount, pRects);
+void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) {
+ GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, aspectMask, imageLayout, pDepthStencil, rectCount, pRects);
}
__attribute__((visibility("default")))
diff --git a/vulkan/libvulkan/get_proc_addr.cpp b/vulkan/libvulkan/get_proc_addr.cpp
index ceb76b9..5247950 100644
--- a/vulkan/libvulkan/get_proc_addr.cpp
+++ b/vulkan/libvulkan/get_proc_addr.cpp
@@ -51,18 +51,16 @@
// clang-format off
{"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDevice)},
{"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyInstance)},
+ {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceExtensionProperties)},
+ {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceLayerProperties)},
{"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(vkEnumeratePhysicalDevices)},
{"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetInstanceProcAddr)},
- {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceExtensionProperties)},
{"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFeatures)},
{"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFormatProperties)},
{"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceImageFormatProperties)},
- {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLayerProperties)},
- {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLimits)},
{"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceMemoryProperties)},
{"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceProperties)},
- {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueCount)},
- {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueProperties)},
+ {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueFamilyProperties)},
{"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSparseImageFormatProperties)},
// clang-format on
};
@@ -77,10 +75,6 @@
{"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginQuery)},
{"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginRenderPass)},
{"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDescriptorSets)},
- {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicColorBlendState)},
- {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicDepthStencilState)},
- {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicRasterState)},
- {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicViewportState)},
{"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindIndexBuffer)},
{"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindPipeline)},
{"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindVertexBuffers)},
@@ -110,11 +104,19 @@
{"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetEvent)},
{"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetQueryPool)},
{"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResolveImage)},
+ {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetBlendConstants)},
+ {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBias)},
+ {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBounds)},
{"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetEvent)},
+ {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetLineWidth)},
+ {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetScissor)},
+ {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilCompareMask)},
+ {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilReference)},
+ {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilWriteMask)},
+ {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetViewport)},
{"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdUpdateBuffer)},
{"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWaitEvents)},
{"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWriteTimestamp)},
- {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateAttachmentView)},
{"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBuffer)},
{"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBufferView)},
{"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandBuffer)},
@@ -122,10 +124,6 @@
{"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateComputePipelines)},
{"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorPool)},
{"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorSetLayout)},
- {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicColorBlendState)},
- {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicDepthStencilState)},
- {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicRasterState)},
- {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicViewportState)},
{"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCreateEvent)},
{"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFence)},
{"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFramebuffer)},
@@ -140,7 +138,6 @@
{"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSemaphore)},
{"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShader)},
{"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShaderModule)},
- {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyAttachmentView)},
{"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBuffer)},
{"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBufferView)},
{"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandBuffer)},
@@ -148,10 +145,6 @@
{"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorPool)},
{"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorSetLayout)},
{"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDevice)},
- {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicColorBlendState)},
- {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicDepthStencilState)},
- {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicRasterState)},
- {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicViewportState)},
{"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyEvent)},
{"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFence)},
{"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFramebuffer)},
@@ -210,18 +203,16 @@
// clang-format off
{"vkCreateDevice", offsetof(InstanceVtbl, CreateDevice)},
{"vkDestroyInstance", offsetof(InstanceVtbl, DestroyInstance)},
+ {"vkEnumerateDeviceExtensionProperties", offsetof(InstanceVtbl, EnumerateDeviceExtensionProperties)},
+ {"vkEnumerateDeviceLayerProperties", offsetof(InstanceVtbl, EnumerateDeviceLayerProperties)},
{"vkEnumeratePhysicalDevices", offsetof(InstanceVtbl, EnumeratePhysicalDevices)},
{"vkGetInstanceProcAddr", offsetof(InstanceVtbl, GetInstanceProcAddr)},
- {"vkGetPhysicalDeviceExtensionProperties", offsetof(InstanceVtbl, GetPhysicalDeviceExtensionProperties)},
{"vkGetPhysicalDeviceFeatures", offsetof(InstanceVtbl, GetPhysicalDeviceFeatures)},
{"vkGetPhysicalDeviceFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceFormatProperties)},
{"vkGetPhysicalDeviceImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceImageFormatProperties)},
- {"vkGetPhysicalDeviceLayerProperties", offsetof(InstanceVtbl, GetPhysicalDeviceLayerProperties)},
- {"vkGetPhysicalDeviceLimits", offsetof(InstanceVtbl, GetPhysicalDeviceLimits)},
{"vkGetPhysicalDeviceMemoryProperties", offsetof(InstanceVtbl, GetPhysicalDeviceMemoryProperties)},
{"vkGetPhysicalDeviceProperties", offsetof(InstanceVtbl, GetPhysicalDeviceProperties)},
- {"vkGetPhysicalDeviceQueueCount", offsetof(InstanceVtbl, GetPhysicalDeviceQueueCount)},
- {"vkGetPhysicalDeviceQueueProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueProperties)},
+ {"vkGetPhysicalDeviceQueueFamilyProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueFamilyProperties)},
{"vkGetPhysicalDeviceSparseImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceSparseImageFormatProperties)},
// clang-format on
};
@@ -236,10 +227,6 @@
{"vkCmdBeginQuery", offsetof(DeviceVtbl, CmdBeginQuery)},
{"vkCmdBeginRenderPass", offsetof(DeviceVtbl, CmdBeginRenderPass)},
{"vkCmdBindDescriptorSets", offsetof(DeviceVtbl, CmdBindDescriptorSets)},
- {"vkCmdBindDynamicColorBlendState", offsetof(DeviceVtbl, CmdBindDynamicColorBlendState)},
- {"vkCmdBindDynamicDepthStencilState", offsetof(DeviceVtbl, CmdBindDynamicDepthStencilState)},
- {"vkCmdBindDynamicRasterState", offsetof(DeviceVtbl, CmdBindDynamicRasterState)},
- {"vkCmdBindDynamicViewportState", offsetof(DeviceVtbl, CmdBindDynamicViewportState)},
{"vkCmdBindIndexBuffer", offsetof(DeviceVtbl, CmdBindIndexBuffer)},
{"vkCmdBindPipeline", offsetof(DeviceVtbl, CmdBindPipeline)},
{"vkCmdBindVertexBuffers", offsetof(DeviceVtbl, CmdBindVertexBuffers)},
@@ -269,11 +256,19 @@
{"vkCmdResetEvent", offsetof(DeviceVtbl, CmdResetEvent)},
{"vkCmdResetQueryPool", offsetof(DeviceVtbl, CmdResetQueryPool)},
{"vkCmdResolveImage", offsetof(DeviceVtbl, CmdResolveImage)},
+ {"vkCmdSetBlendConstants", offsetof(DeviceVtbl, CmdSetBlendConstants)},
+ {"vkCmdSetDepthBias", offsetof(DeviceVtbl, CmdSetDepthBias)},
+ {"vkCmdSetDepthBounds", offsetof(DeviceVtbl, CmdSetDepthBounds)},
{"vkCmdSetEvent", offsetof(DeviceVtbl, CmdSetEvent)},
+ {"vkCmdSetLineWidth", offsetof(DeviceVtbl, CmdSetLineWidth)},
+ {"vkCmdSetScissor", offsetof(DeviceVtbl, CmdSetScissor)},
+ {"vkCmdSetStencilCompareMask", offsetof(DeviceVtbl, CmdSetStencilCompareMask)},
+ {"vkCmdSetStencilReference", offsetof(DeviceVtbl, CmdSetStencilReference)},
+ {"vkCmdSetStencilWriteMask", offsetof(DeviceVtbl, CmdSetStencilWriteMask)},
+ {"vkCmdSetViewport", offsetof(DeviceVtbl, CmdSetViewport)},
{"vkCmdUpdateBuffer", offsetof(DeviceVtbl, CmdUpdateBuffer)},
{"vkCmdWaitEvents", offsetof(DeviceVtbl, CmdWaitEvents)},
{"vkCmdWriteTimestamp", offsetof(DeviceVtbl, CmdWriteTimestamp)},
- {"vkCreateAttachmentView", offsetof(DeviceVtbl, CreateAttachmentView)},
{"vkCreateBuffer", offsetof(DeviceVtbl, CreateBuffer)},
{"vkCreateBufferView", offsetof(DeviceVtbl, CreateBufferView)},
{"vkCreateCommandBuffer", offsetof(DeviceVtbl, CreateCommandBuffer)},
@@ -281,10 +276,6 @@
{"vkCreateComputePipelines", offsetof(DeviceVtbl, CreateComputePipelines)},
{"vkCreateDescriptorPool", offsetof(DeviceVtbl, CreateDescriptorPool)},
{"vkCreateDescriptorSetLayout", offsetof(DeviceVtbl, CreateDescriptorSetLayout)},
- {"vkCreateDynamicColorBlendState", offsetof(DeviceVtbl, CreateDynamicColorBlendState)},
- {"vkCreateDynamicDepthStencilState", offsetof(DeviceVtbl, CreateDynamicDepthStencilState)},
- {"vkCreateDynamicRasterState", offsetof(DeviceVtbl, CreateDynamicRasterState)},
- {"vkCreateDynamicViewportState", offsetof(DeviceVtbl, CreateDynamicViewportState)},
{"vkCreateEvent", offsetof(DeviceVtbl, CreateEvent)},
{"vkCreateFence", offsetof(DeviceVtbl, CreateFence)},
{"vkCreateFramebuffer", offsetof(DeviceVtbl, CreateFramebuffer)},
@@ -299,7 +290,6 @@
{"vkCreateSemaphore", offsetof(DeviceVtbl, CreateSemaphore)},
{"vkCreateShader", offsetof(DeviceVtbl, CreateShader)},
{"vkCreateShaderModule", offsetof(DeviceVtbl, CreateShaderModule)},
- {"vkDestroyAttachmentView", offsetof(DeviceVtbl, DestroyAttachmentView)},
{"vkDestroyBuffer", offsetof(DeviceVtbl, DestroyBuffer)},
{"vkDestroyBufferView", offsetof(DeviceVtbl, DestroyBufferView)},
{"vkDestroyCommandBuffer", offsetof(DeviceVtbl, DestroyCommandBuffer)},
@@ -307,10 +297,6 @@
{"vkDestroyDescriptorPool", offsetof(DeviceVtbl, DestroyDescriptorPool)},
{"vkDestroyDescriptorSetLayout", offsetof(DeviceVtbl, DestroyDescriptorSetLayout)},
{"vkDestroyDevice", offsetof(DeviceVtbl, DestroyDevice)},
- {"vkDestroyDynamicColorBlendState", offsetof(DeviceVtbl, DestroyDynamicColorBlendState)},
- {"vkDestroyDynamicDepthStencilState", offsetof(DeviceVtbl, DestroyDynamicDepthStencilState)},
- {"vkDestroyDynamicRasterState", offsetof(DeviceVtbl, DestroyDynamicRasterState)},
- {"vkDestroyDynamicViewportState", offsetof(DeviceVtbl, DestroyDynamicViewportState)},
{"vkDestroyEvent", offsetof(DeviceVtbl, DestroyEvent)},
{"vkDestroyFence", offsetof(DeviceVtbl, DestroyFence)},
{"vkDestroyFramebuffer", offsetof(DeviceVtbl, DestroyFramebuffer)},
@@ -453,7 +439,6 @@
const_cast<unsigned char*>(base) + entry->offset);
}
-// TODO: remove need for instance_next
bool LoadInstanceVtbl(VkInstance instance,
VkInstance instance_next,
PFN_vkGetInstanceProcAddr get_proc_addr,
@@ -484,14 +469,9 @@
ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceProperties");
success = false;
}
- vtbl.GetPhysicalDeviceQueueCount = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueCount>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueCount"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueCount)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueCount");
- success = false;
- }
- vtbl.GetPhysicalDeviceQueueProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueProperties");
+ vtbl.GetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueFamilyProperties"));
+ if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueFamilyProperties)) {
+ ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueFamilyProperties");
success = false;
}
vtbl.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties"));
@@ -514,24 +494,19 @@
ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceImageFormatProperties");
success = false;
}
- vtbl.GetPhysicalDeviceLimits = reinterpret_cast<PFN_vkGetPhysicalDeviceLimits>(get_proc_addr(instance, "vkGetPhysicalDeviceLimits"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceLimits)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLimits");
- success = false;
- }
vtbl.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice"));
if (UNLIKELY(!vtbl.CreateDevice)) {
ALOGE("missing instance proc: %s", "vkCreateDevice");
success = false;
}
- vtbl.GetPhysicalDeviceLayerProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceLayerProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceLayerProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceLayerProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLayerProperties");
+ vtbl.EnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(get_proc_addr(instance, "vkEnumerateDeviceLayerProperties"));
+ if (UNLIKELY(!vtbl.EnumerateDeviceLayerProperties)) {
+ ALOGE("missing instance proc: %s", "vkEnumerateDeviceLayerProperties");
success = false;
}
- vtbl.GetPhysicalDeviceExtensionProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExtensionProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceExtensionProperties"));
- if (UNLIKELY(!vtbl.GetPhysicalDeviceExtensionProperties)) {
- ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceExtensionProperties");
+ vtbl.EnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(get_proc_addr(instance, "vkEnumerateDeviceExtensionProperties"));
+ if (UNLIKELY(!vtbl.EnumerateDeviceExtensionProperties)) {
+ ALOGE("missing instance proc: %s", "vkEnumerateDeviceExtensionProperties");
success = false;
}
vtbl.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"));
@@ -784,16 +759,6 @@
ALOGE("missing device proc: %s", "vkDestroyImageView");
success = false;
}
- vtbl.CreateAttachmentView = reinterpret_cast<PFN_vkCreateAttachmentView>(get_proc_addr(device, "vkCreateAttachmentView"));
- if (UNLIKELY(!vtbl.CreateAttachmentView)) {
- ALOGE("missing device proc: %s", "vkCreateAttachmentView");
- success = false;
- }
- vtbl.DestroyAttachmentView = reinterpret_cast<PFN_vkDestroyAttachmentView>(get_proc_addr(device, "vkDestroyAttachmentView"));
- if (UNLIKELY(!vtbl.DestroyAttachmentView)) {
- ALOGE("missing device proc: %s", "vkDestroyAttachmentView");
- success = false;
- }
vtbl.CreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(get_proc_addr(device, "vkCreateShaderModule"));
if (UNLIKELY(!vtbl.CreateShaderModule)) {
ALOGE("missing device proc: %s", "vkCreateShaderModule");
@@ -914,46 +879,6 @@
ALOGE("missing device proc: %s", "vkUpdateDescriptorSets");
success = false;
}
- vtbl.CreateDynamicViewportState = reinterpret_cast<PFN_vkCreateDynamicViewportState>(get_proc_addr(device, "vkCreateDynamicViewportState"));
- if (UNLIKELY(!vtbl.CreateDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicViewportState");
- success = false;
- }
- vtbl.DestroyDynamicViewportState = reinterpret_cast<PFN_vkDestroyDynamicViewportState>(get_proc_addr(device, "vkDestroyDynamicViewportState"));
- if (UNLIKELY(!vtbl.DestroyDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicViewportState");
- success = false;
- }
- vtbl.CreateDynamicRasterState = reinterpret_cast<PFN_vkCreateDynamicRasterState>(get_proc_addr(device, "vkCreateDynamicRasterState"));
- if (UNLIKELY(!vtbl.CreateDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicRasterState");
- success = false;
- }
- vtbl.DestroyDynamicRasterState = reinterpret_cast<PFN_vkDestroyDynamicRasterState>(get_proc_addr(device, "vkDestroyDynamicRasterState"));
- if (UNLIKELY(!vtbl.DestroyDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicRasterState");
- success = false;
- }
- vtbl.CreateDynamicColorBlendState = reinterpret_cast<PFN_vkCreateDynamicColorBlendState>(get_proc_addr(device, "vkCreateDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.CreateDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicColorBlendState");
- success = false;
- }
- vtbl.DestroyDynamicColorBlendState = reinterpret_cast<PFN_vkDestroyDynamicColorBlendState>(get_proc_addr(device, "vkDestroyDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.DestroyDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicColorBlendState");
- success = false;
- }
- vtbl.CreateDynamicDepthStencilState = reinterpret_cast<PFN_vkCreateDynamicDepthStencilState>(get_proc_addr(device, "vkCreateDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.CreateDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkCreateDynamicDepthStencilState");
- success = false;
- }
- vtbl.DestroyDynamicDepthStencilState = reinterpret_cast<PFN_vkDestroyDynamicDepthStencilState>(get_proc_addr(device, "vkDestroyDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.DestroyDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkDestroyDynamicDepthStencilState");
- success = false;
- }
vtbl.CreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(get_proc_addr(device, "vkCreateFramebuffer"));
if (UNLIKELY(!vtbl.CreateFramebuffer)) {
ALOGE("missing device proc: %s", "vkCreateFramebuffer");
@@ -1024,24 +949,49 @@
ALOGE("missing device proc: %s", "vkCmdBindPipeline");
success = false;
}
- vtbl.CmdBindDynamicViewportState = reinterpret_cast<PFN_vkCmdBindDynamicViewportState>(get_proc_addr(device, "vkCmdBindDynamicViewportState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicViewportState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicViewportState");
+ vtbl.CmdSetViewport = reinterpret_cast<PFN_vkCmdSetViewport>(get_proc_addr(device, "vkCmdSetViewport"));
+ if (UNLIKELY(!vtbl.CmdSetViewport)) {
+ ALOGE("missing device proc: %s", "vkCmdSetViewport");
success = false;
}
- vtbl.CmdBindDynamicRasterState = reinterpret_cast<PFN_vkCmdBindDynamicRasterState>(get_proc_addr(device, "vkCmdBindDynamicRasterState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicRasterState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicRasterState");
+ vtbl.CmdSetScissor = reinterpret_cast<PFN_vkCmdSetScissor>(get_proc_addr(device, "vkCmdSetScissor"));
+ if (UNLIKELY(!vtbl.CmdSetScissor)) {
+ ALOGE("missing device proc: %s", "vkCmdSetScissor");
success = false;
}
- vtbl.CmdBindDynamicColorBlendState = reinterpret_cast<PFN_vkCmdBindDynamicColorBlendState>(get_proc_addr(device, "vkCmdBindDynamicColorBlendState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicColorBlendState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicColorBlendState");
+ vtbl.CmdSetLineWidth = reinterpret_cast<PFN_vkCmdSetLineWidth>(get_proc_addr(device, "vkCmdSetLineWidth"));
+ if (UNLIKELY(!vtbl.CmdSetLineWidth)) {
+ ALOGE("missing device proc: %s", "vkCmdSetLineWidth");
success = false;
}
- vtbl.CmdBindDynamicDepthStencilState = reinterpret_cast<PFN_vkCmdBindDynamicDepthStencilState>(get_proc_addr(device, "vkCmdBindDynamicDepthStencilState"));
- if (UNLIKELY(!vtbl.CmdBindDynamicDepthStencilState)) {
- ALOGE("missing device proc: %s", "vkCmdBindDynamicDepthStencilState");
+ vtbl.CmdSetDepthBias = reinterpret_cast<PFN_vkCmdSetDepthBias>(get_proc_addr(device, "vkCmdSetDepthBias"));
+ if (UNLIKELY(!vtbl.CmdSetDepthBias)) {
+ ALOGE("missing device proc: %s", "vkCmdSetDepthBias");
+ success = false;
+ }
+ vtbl.CmdSetBlendConstants = reinterpret_cast<PFN_vkCmdSetBlendConstants>(get_proc_addr(device, "vkCmdSetBlendConstants"));
+ if (UNLIKELY(!vtbl.CmdSetBlendConstants)) {
+ ALOGE("missing device proc: %s", "vkCmdSetBlendConstants");
+ success = false;
+ }
+ vtbl.CmdSetDepthBounds = reinterpret_cast<PFN_vkCmdSetDepthBounds>(get_proc_addr(device, "vkCmdSetDepthBounds"));
+ if (UNLIKELY(!vtbl.CmdSetDepthBounds)) {
+ ALOGE("missing device proc: %s", "vkCmdSetDepthBounds");
+ success = false;
+ }
+ vtbl.CmdSetStencilCompareMask = reinterpret_cast<PFN_vkCmdSetStencilCompareMask>(get_proc_addr(device, "vkCmdSetStencilCompareMask"));
+ if (UNLIKELY(!vtbl.CmdSetStencilCompareMask)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilCompareMask");
+ success = false;
+ }
+ vtbl.CmdSetStencilWriteMask = reinterpret_cast<PFN_vkCmdSetStencilWriteMask>(get_proc_addr(device, "vkCmdSetStencilWriteMask"));
+ if (UNLIKELY(!vtbl.CmdSetStencilWriteMask)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilWriteMask");
+ success = false;
+ }
+ vtbl.CmdSetStencilReference = reinterpret_cast<PFN_vkCmdSetStencilReference>(get_proc_addr(device, "vkCmdSetStencilReference"));
+ if (UNLIKELY(!vtbl.CmdSetStencilReference)) {
+ ALOGE("missing device proc: %s", "vkCmdSetStencilReference");
success = false;
}
vtbl.CmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(get_proc_addr(device, "vkCmdBindDescriptorSets"));
diff --git a/vulkan/libvulkan/loader.cpp b/vulkan/libvulkan/loader.cpp
index be39b24..16bc8b8 100644
--- a/vulkan/libvulkan/loader.cpp
+++ b/vulkan/libvulkan/loader.cpp
@@ -277,12 +277,12 @@
}
// Get Layers in so
- PFN_vkGetGlobalLayerProperties get_layer_properties =
- reinterpret_cast<PFN_vkGetGlobalLayerProperties>(
- dlsym(layer_handle, "vkGetGlobalLayerProperties"));
+ PFN_vkEnumerateInstanceLayerProperties get_layer_properties =
+ reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>(
+ dlsym(layer_handle, "vkEnumerateInstanceLayerProperties"));
if (!get_layer_properties) {
ALOGE(
- "%s failed to find vkGetGlobalLayerProperties with "
+ "%s failed to find vkEnumerateInstanceLayerProperties with "
"error %s; Skipping",
entry->d_name, dlerror());
dlclose(layer_handle);
@@ -507,7 +507,7 @@
// "Bottom" functions. These are called at the end of the instance dispatch
// chain.
-VkResult DestroyInstanceBottom(VkInstance instance) {
+void DestroyInstanceBottom(VkInstance instance) {
// These checks allow us to call DestroyInstanceBottom from any error path
// in CreateInstanceBottom, before the driver instance is fully initialized.
if (instance->drv.vtbl.instance != VK_NULL_HANDLE &&
@@ -528,7 +528,6 @@
const VkAllocCallbacks* alloc = instance->alloc;
instance->~VkInstance_T();
alloc->pfnFree(alloc->pUserData, instance);
- return VK_SUCCESS;
}
VkResult CreateInstanceBottom(const VkInstanceCreateInfo* create_info,
@@ -640,16 +639,11 @@
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
VkImageFormatProperties* properties) {
return GetVtbl(pdev)
->instance->drv.vtbl.GetPhysicalDeviceImageFormatProperties(
- pdev, format, type, tiling, usage, properties);
-}
-
-VkResult GetPhysicalDeviceLimitsBottom(VkPhysicalDevice pdev,
- VkPhysicalDeviceLimits* limits) {
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceLimits(pdev, limits);
+ pdev, format, type, tiling, usage, flags, properties);
}
VkResult GetPhysicalDevicePropertiesBottom(
@@ -659,18 +653,13 @@
->instance->drv.vtbl.GetPhysicalDeviceProperties(pdev, properties);
}
-VkResult GetPhysicalDeviceQueueCountBottom(VkPhysicalDevice pdev,
- uint32_t* count) {
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceQueueCount(pdev, count);
-}
-
-VkResult GetPhysicalDeviceQueuePropertiesBottom(
+VkResult GetPhysicalDeviceQueueFamilyPropertiesBottom(
VkPhysicalDevice pdev,
- uint32_t count,
- VkPhysicalDeviceQueueProperties* properties) {
- return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceQueueProperties(
- pdev, count, properties);
+ uint32_t* pCount,
+ VkQueueFamilyProperties* properties) {
+ return GetVtbl(pdev)
+ ->instance->drv.vtbl.GetPhysicalDeviceQueueFamilyProperties(
+ pdev, pCount, properties);
}
VkResult GetPhysicalDeviceMemoryPropertiesBottom(
@@ -775,21 +764,20 @@
return VK_SUCCESS;
}
-VkResult GetPhysicalDeviceExtensionPropertiesBottom(
+VkResult EnumerateDeviceExtensionPropertiesBottom(
VkPhysicalDevice pdev,
const char* layer_name,
uint32_t* properties_count,
VkExtensionProperties* properties) {
// TODO: what are we supposed to do with layer_name here?
- return GetVtbl(pdev)
- ->instance->drv.vtbl.GetPhysicalDeviceExtensionProperties(
- pdev, layer_name, properties_count, properties);
+ return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceExtensionProperties(
+ pdev, layer_name, properties_count, properties);
}
-VkResult GetPhysicalDeviceLayerPropertiesBottom(VkPhysicalDevice pdev,
- uint32_t* properties_count,
- VkLayerProperties* properties) {
- return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceLayerProperties(
+VkResult EnumerateDeviceLayerPropertiesBottom(VkPhysicalDevice pdev,
+ uint32_t* properties_count,
+ VkLayerProperties* properties) {
+ return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceLayerProperties(
pdev, properties_count, properties);
}
@@ -820,14 +808,12 @@
.GetPhysicalDeviceFeatures = GetPhysicalDeviceFeaturesBottom,
.GetPhysicalDeviceFormatProperties = GetPhysicalDeviceFormatPropertiesBottom,
.GetPhysicalDeviceImageFormatProperties = GetPhysicalDeviceImageFormatPropertiesBottom,
- .GetPhysicalDeviceLimits = GetPhysicalDeviceLimitsBottom,
.GetPhysicalDeviceProperties = GetPhysicalDevicePropertiesBottom,
- .GetPhysicalDeviceQueueCount = GetPhysicalDeviceQueueCountBottom,
- .GetPhysicalDeviceQueueProperties = GetPhysicalDeviceQueuePropertiesBottom,
+ .GetPhysicalDeviceQueueFamilyProperties = GetPhysicalDeviceQueueFamilyPropertiesBottom,
.GetPhysicalDeviceMemoryProperties = GetPhysicalDeviceMemoryPropertiesBottom,
.CreateDevice = CreateDeviceBottom,
- .GetPhysicalDeviceExtensionProperties = GetPhysicalDeviceExtensionPropertiesBottom,
- .GetPhysicalDeviceLayerProperties = GetPhysicalDeviceLayerPropertiesBottom,
+ .EnumerateDeviceExtensionProperties = EnumerateDeviceExtensionPropertiesBottom,
+ .EnumerateDeviceLayerProperties = EnumerateDeviceLayerPropertiesBottom,
.GetPhysicalDeviceSparseImageFormatProperties = GetPhysicalDeviceSparseImageFormatPropertiesBottom,
.GetPhysicalDeviceSurfaceSupportKHR = GetPhysicalDeviceSurfaceSupportKHR,
// clang-format on
@@ -858,30 +844,27 @@
namespace vulkan {
-VkResult GetGlobalExtensionProperties(const char* /*layer_name*/,
- uint32_t* count,
- VkExtensionProperties* /*properties*/) {
- if (!count)
- return VK_ERROR_INVALID_POINTER;
+VkResult EnumerateInstanceExtensionProperties(
+ const char* /*layer_name*/,
+ uint32_t* count,
+ VkExtensionProperties* /*properties*/) {
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
// TODO: not yet implemented
- ALOGW("vkGetGlobalExtensionProperties not implemented");
+ ALOGW("vkEnumerateInstanceExtensionProperties not implemented");
*count = 0;
return VK_SUCCESS;
}
-VkResult GetGlobalLayerProperties(uint32_t* count,
- VkLayerProperties* /*properties*/) {
- if (!count)
- return VK_ERROR_INVALID_POINTER;
+VkResult EnumerateInstanceLayerProperties(uint32_t* count,
+ VkLayerProperties* /*properties*/) {
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
// TODO: not yet implemented
- ALOGW("vkGetGlobalLayerProperties not implemented");
+ ALOGW("vkEnumerateInstanceLayerProperties not implemented");
*count = 0;
return VK_SUCCESS;
@@ -892,7 +875,7 @@
VkResult result;
if (!EnsureInitialized())
- return VK_ERROR_UNAVAILABLE;
+ return VK_ERROR_INITIALIZATION_FAILED;
VkInstanceCreateInfo local_create_info = *create_info;
if (!local_create_info.pAllocCb)
diff --git a/vulkan/libvulkan/loader.h b/vulkan/libvulkan/loader.h
index 5933eb2..ef3d1f1 100644
--- a/vulkan/libvulkan/loader.h
+++ b/vulkan/libvulkan/loader.h
@@ -43,14 +43,12 @@
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties;
- PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits;
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
- PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount;
- PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties;
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
PFN_vkCreateDevice CreateDevice;
- PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
- PFN_vkGetPhysicalDeviceLayerProperties GetPhysicalDeviceLayerProperties;
+ PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
+ PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties;
// Layers and loader only, not implemented by drivers
@@ -101,8 +99,6 @@
PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout;
PFN_vkCreateImageView CreateImageView;
PFN_vkDestroyImageView DestroyImageView;
- PFN_vkCreateAttachmentView CreateAttachmentView;
- PFN_vkDestroyAttachmentView DestroyAttachmentView;
PFN_vkCreateShaderModule CreateShaderModule;
PFN_vkDestroyShaderModule DestroyShaderModule;
PFN_vkCreateShader CreateShader;
@@ -127,14 +123,6 @@
PFN_vkAllocDescriptorSets AllocDescriptorSets;
PFN_vkFreeDescriptorSets FreeDescriptorSets;
PFN_vkUpdateDescriptorSets UpdateDescriptorSets;
- PFN_vkCreateDynamicViewportState CreateDynamicViewportState;
- PFN_vkDestroyDynamicViewportState DestroyDynamicViewportState;
- PFN_vkCreateDynamicRasterState CreateDynamicRasterState;
- PFN_vkDestroyDynamicRasterState DestroyDynamicRasterState;
- PFN_vkCreateDynamicColorBlendState CreateDynamicColorBlendState;
- PFN_vkDestroyDynamicColorBlendState DestroyDynamicColorBlendState;
- PFN_vkCreateDynamicDepthStencilState CreateDynamicDepthStencilState;
- PFN_vkDestroyDynamicDepthStencilState DestroyDynamicDepthStencilState;
PFN_vkCreateFramebuffer CreateFramebuffer;
PFN_vkDestroyFramebuffer DestroyFramebuffer;
PFN_vkCreateRenderPass CreateRenderPass;
@@ -158,10 +146,15 @@
PFN_vkEndCommandBuffer EndCommandBuffer;
PFN_vkResetCommandBuffer ResetCommandBuffer;
PFN_vkCmdBindPipeline CmdBindPipeline;
- PFN_vkCmdBindDynamicViewportState CmdBindDynamicViewportState;
- PFN_vkCmdBindDynamicRasterState CmdBindDynamicRasterState;
- PFN_vkCmdBindDynamicColorBlendState CmdBindDynamicColorBlendState;
- PFN_vkCmdBindDynamicDepthStencilState CmdBindDynamicDepthStencilState;
+ PFN_vkCmdSetViewport CmdSetViewport;
+ PFN_vkCmdSetScissor CmdSetScissor;
+ PFN_vkCmdSetLineWidth CmdSetLineWidth;
+ PFN_vkCmdSetDepthBias CmdSetDepthBias;
+ PFN_vkCmdSetBlendConstants CmdSetBlendConstants;
+ PFN_vkCmdSetDepthBounds CmdSetDepthBounds;
+ PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask;
+ PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask;
+ PFN_vkCmdSetStencilReference CmdSetStencilReference;
PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets;
PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
@@ -216,11 +209,12 @@
// -----------------------------------------------------------------------------
// loader.cpp
-VkResult GetGlobalExtensionProperties(const char* layer_name,
- uint32_t* count,
- VkExtensionProperties* properties);
-VkResult GetGlobalLayerProperties(uint32_t* count,
- VkLayerProperties* properties);
+VkResult EnumerateInstanceExtensionProperties(
+ const char* layer_name,
+ uint32_t* count,
+ VkExtensionProperties* properties);
+VkResult EnumerateInstanceLayerProperties(uint32_t* count,
+ VkLayerProperties* properties);
VkResult CreateInstance(const VkInstanceCreateInfo* create_info,
VkInstance* instance);
PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name);
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index af3d585..6320192 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -27,6 +27,11 @@
using namespace vulkan;
+// TODO(jessehall): Currently we don't have a good error code for when a native
+// window operation fails. Just returning INITIALIZATION_FAILED for now. Later
+// versions (post SDK 0.9) of the API/extension have a better error code.
+// When updating to that version, audit all error returns.
+
namespace {
// ----------------------------------------------------------------------------
@@ -118,8 +123,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wsign-conversion"
- if (surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR)
- return VK_ERROR_INVALID_VALUE;
+ ALOGE_IF(
+ surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR,
+ "vkGetPhysicalDeviceSurfaceSupportKHR: pSurfaceDescription->sType=%#x "
+ "not supported",
+ surface_desc->sType);
#pragma clang diagnostic pop
const VkSurfaceDescriptionWindowKHR* window_desc =
@@ -170,7 +178,7 @@
} else if (err != 0) {
// TODO(jessehall): Improve error reporting. Can we enumerate possible
// errors and translate them to valid Vulkan result codes?
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
int width, height;
@@ -180,7 +188,7 @@
strerror(-err), err);
if (disconnect)
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
err = window->query(window, NATIVE_WINDOW_DEFAULT_HEIGHT, &height);
if (err != 0) {
@@ -188,7 +196,7 @@
strerror(-err), err);
if (disconnect)
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
if (disconnect)
@@ -311,7 +319,7 @@
// errors and translate them to valid Vulkan result codes?
ALOGE("native_window_api_connect() failed: %s (%d)", strerror(-err),
err);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
err = native_window_set_buffers_dimensions(window.get(),
@@ -324,7 +332,7 @@
create_info->imageExtent.width, create_info->imageExtent.height,
strerror(-err), err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t min_undequeued_buffers;
@@ -335,7 +343,7 @@
// errors and translate them to valid Vulkan result codes?
ALOGE("window->query failed: %s (%d)", strerror(-err), err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t num_images =
(create_info->minImageCount - 1) + min_undequeued_buffers;
@@ -346,7 +354,7 @@
ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
err);
native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
// TODO(jessehall): Do we need to call modify native_window_set_usage()
@@ -401,7 +409,7 @@
// TODO(jessehall): Improve error reporting. Can we enumerate
// possible errors and translate them to valid Vulkan result codes?
ALOGE("dequeueBuffer[%u] failed: %s (%d)", i, strerror(-err), err);
- result = VK_ERROR_UNKNOWN;
+ result = VK_ERROR_INITIALIZATION_FAILED;
break;
}
img.buffer = InitSharedPtr(device, buffer);
@@ -517,7 +525,7 @@
// TODO(jessehall): Improve error reporting. Can we enumerate possible
// errors and translate them to valid Vulkan result codes?
ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), err);
- return VK_ERROR_UNKNOWN;
+ return VK_ERROR_INITIALIZATION_FAILED;
}
uint32_t idx;
@@ -582,20 +590,10 @@
Swapchain& swapchain =
*SwapchainFromHandle(present_info->swapchains[sc]);
uint32_t image_idx = present_info->imageIndices[sc];
+ Swapchain::Image& img = swapchain.images[image_idx];
VkResult result;
int err;
- if (image_idx >= swapchain.num_images ||
- !swapchain.images[image_idx].dequeued) {
- ALOGE(
- "invalid image index or image not acquired: swapchain=%u "
- "index=%u",
- sc, image_idx);
- final_result = VK_ERROR_INVALID_VALUE;
- continue;
- }
- Swapchain::Image& img = swapchain.images[image_idx];
-
int fence = -1;
result = driver_vtbl.QueueSignalNativeFenceANDROID(queue, &fence);
if (result != VK_SUCCESS) {
@@ -616,7 +614,7 @@
// I guess?
ALOGE("queueBuffer failed: %s (%d)", strerror(-err), err);
if (final_result == VK_SUCCESS)
- final_result = VK_ERROR_UNKNOWN;
+ final_result = VK_ERROR_INITIALIZATION_FAILED;
continue;
}