mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-02 15:56:48 +00:00
Vulkan: Make a more general purpose symbol loader.
Avoids painful manual loading and wrapping function pointers everywhere ... Reusable for cores, so move to libretro-common. Also update built-in Vulkan headers.
This commit is contained in:
parent
1da2e2dbab
commit
54c1759f45
@ -835,6 +835,7 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
|
||||
OBJ += gfx/drivers/vulkan.o \
|
||||
gfx/common/vulkan_common.o \
|
||||
libretro-common/vulkan/vulkan_symbol_wrapper.o \
|
||||
gfx/drivers_font/vulkan_raster_font.o \
|
||||
gfx/drivers_shader/shader_vulkan.o \
|
||||
gfx/drivers_shader/glslang_util.o \
|
||||
|
@ -44,7 +44,7 @@ else
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99
|
||||
OBJECTS := libretro-test.o
|
||||
OBJECTS := libretro-test.o ../../libretro-common/vulkan/vulkan_symbol_wrapper.o
|
||||
CFLAGS += -Wall -pedantic $(fpic)
|
||||
|
||||
all: $(TARGET)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "vulkan/vulkan_symbol_wrapper.h"
|
||||
#include <libretro_vulkan.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
@ -14,294 +15,6 @@ static const struct retro_hw_render_interface_vulkan *vulkan;
|
||||
#define BASE_HEIGHT 240
|
||||
#define MAX_SYNC 8
|
||||
|
||||
/* We'll probably want a libretro common solution for this, but this will do for now. */
|
||||
#define VK_GET_DEVICE_PROC_ADDR(entrypoint) do { \
|
||||
vkcfp.vk##entrypoint = (PFN_vk##entrypoint) vulkan->get_device_proc_addr(vulkan->device, \
|
||||
"vk" #entrypoint); \
|
||||
} while(0)
|
||||
|
||||
#define VK_GET_INSTANCE_PROC_ADDR(entrypoint) do { \
|
||||
vkcfp.vk##entrypoint = (PFN_vk##entrypoint) vulkan->get_instance_proc_addr(vulkan->instance, \
|
||||
"vk" #entrypoint); \
|
||||
} while(0)
|
||||
|
||||
typedef struct vulkan_context_fp
|
||||
{
|
||||
/* Device */
|
||||
PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
|
||||
|
||||
/* Device Memory */
|
||||
PFN_vkAllocateMemory vkAllocateMemory;
|
||||
PFN_vkFreeMemory vkFreeMemory;
|
||||
|
||||
/* Command Function Pointers */
|
||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr;
|
||||
|
||||
/* Buffers */
|
||||
PFN_vkCreateBuffer vkCreateBuffer;
|
||||
PFN_vkDestroyBuffer vkDestroyBuffer;
|
||||
|
||||
/* Fences */
|
||||
PFN_vkCreateFence vkCreateFence;
|
||||
PFN_vkDestroyFence vkDestroyFence;
|
||||
PFN_vkResetFences vkResetFences;
|
||||
PFN_vkWaitForFences vkWaitForFences;
|
||||
|
||||
/* Semaphores */
|
||||
PFN_vkCreateSemaphore vkCreateSemaphore;
|
||||
PFN_vkDestroySemaphore vkDestroySemaphore;
|
||||
|
||||
/* Images */
|
||||
PFN_vkCreateImage vkCreateImage;
|
||||
PFN_vkDestroyImage vkDestroyImage;
|
||||
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
|
||||
|
||||
/* Images (Resource Memory Association) */
|
||||
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
|
||||
PFN_vkBindBufferMemory vkBindBufferMemory;
|
||||
PFN_vkBindImageMemory vkBindImageMemory;
|
||||
|
||||
/* Image Views */
|
||||
PFN_vkCreateImageView vkCreateImageView;
|
||||
PFN_vkDestroyImageView vkDestroyImageView;
|
||||
|
||||
/* Image Views (Resource Memory Association) */
|
||||
PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
|
||||
|
||||
/* Queues */
|
||||
PFN_vkGetDeviceQueue vkGetDeviceQueue;
|
||||
PFN_vkQueueWaitIdle vkQueueWaitIdle;
|
||||
|
||||
/* Pipelines */
|
||||
PFN_vkDestroyPipeline vkDestroyPipeline;
|
||||
PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
|
||||
|
||||
/* Pipeline Layouts */
|
||||
PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
|
||||
PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
|
||||
|
||||
/* Pipeline Cache */
|
||||
PFN_vkCreatePipelineCache vkCreatePipelineCache;
|
||||
PFN_vkDestroyPipelineCache vkDestroyPipelineCache;
|
||||
|
||||
/* Pipeline Barriers */
|
||||
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
|
||||
|
||||
/* Descriptor pools */
|
||||
PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
|
||||
PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
|
||||
|
||||
/* Descriptor sets */
|
||||
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
|
||||
PFN_vkFreeDescriptorSets vkFreeDescriptorSets;
|
||||
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
|
||||
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
|
||||
|
||||
/* Descriptor Set Layout */
|
||||
PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
|
||||
PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
|
||||
|
||||
/* Command Buffers */
|
||||
PFN_vkCreateCommandPool vkCreateCommandPool;
|
||||
PFN_vkDestroyCommandPool vkDestroyCommandPool;
|
||||
PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
|
||||
PFN_vkEndCommandBuffer vkEndCommandBuffer;
|
||||
PFN_vkResetCommandBuffer vkResetCommandBuffer;
|
||||
PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
|
||||
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
|
||||
|
||||
/* Command Buffer Submission */
|
||||
PFN_vkQueueSubmit vkQueueSubmit;
|
||||
|
||||
/* Framebuffers */
|
||||
PFN_vkCreateFramebuffer vkCreateFramebuffer;
|
||||
PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
|
||||
|
||||
/* Memory allocation */
|
||||
PFN_vkMapMemory vkMapMemory;
|
||||
PFN_vkUnmapMemory vkUnmapMemory;
|
||||
|
||||
/* Samplers */
|
||||
PFN_vkCreateSampler vkCreateSampler;
|
||||
PFN_vkDestroySampler vkDestroySampler;
|
||||
|
||||
/* Render Passes */
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||
PFN_vkDestroyRenderPass vkDestroyRenderPass;
|
||||
|
||||
/* Image commands */
|
||||
PFN_vkCmdCopyImage vkCmdCopyImage;
|
||||
PFN_vkCmdClearColorImage vkCmdClearColorImage;
|
||||
|
||||
/* Pipeline commands */
|
||||
PFN_vkCmdBindPipeline vkCmdBindPipeline;
|
||||
|
||||
/* Vertex input descriptions */
|
||||
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
|
||||
|
||||
/* Render Pass commands */
|
||||
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
|
||||
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
|
||||
|
||||
/* Clear commands */
|
||||
PFN_vkCmdClearAttachments vkCmdClearAttachments;
|
||||
|
||||
/* Drawing commands */
|
||||
PFN_vkCmdDraw vkCmdDraw;
|
||||
|
||||
/* Fragment operations */
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor;
|
||||
|
||||
/* Fixed-function vertex postprocessing */
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport;
|
||||
|
||||
/* Shaders */
|
||||
PFN_vkCreateShaderModule vkCreateShaderModule;
|
||||
PFN_vkDestroyShaderModule vkDestroyShaderModule;
|
||||
|
||||
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
|
||||
} vulkan_context_fp_t;
|
||||
|
||||
static vulkan_context_fp_t vkcfp;
|
||||
#define VKFUNC(sym) (vkcfp.sym)
|
||||
|
||||
static void load_device_symbols(void)
|
||||
{
|
||||
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceProperties);
|
||||
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceMemoryProperties);
|
||||
|
||||
/* Memory */
|
||||
VK_GET_DEVICE_PROC_ADDR(AllocateMemory);
|
||||
VK_GET_DEVICE_PROC_ADDR(FreeMemory);
|
||||
|
||||
/* Waiting */
|
||||
VK_GET_DEVICE_PROC_ADDR(DeviceWaitIdle);
|
||||
|
||||
/* Queues */
|
||||
VK_GET_DEVICE_PROC_ADDR(GetDeviceQueue);
|
||||
VK_GET_DEVICE_PROC_ADDR(QueueWaitIdle);
|
||||
VK_GET_DEVICE_PROC_ADDR(QueueSubmit);
|
||||
|
||||
/* Semaphores */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateSemaphore);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroySemaphore);
|
||||
|
||||
/* Buffers */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateBuffer);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyBuffer);
|
||||
|
||||
/* Fences */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateFence);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyFence);
|
||||
VK_GET_DEVICE_PROC_ADDR(ResetFences);
|
||||
VK_GET_DEVICE_PROC_ADDR(WaitForFences);
|
||||
|
||||
/* Images */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateImage);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyImage);
|
||||
VK_GET_DEVICE_PROC_ADDR(GetImageSubresourceLayout);
|
||||
|
||||
/* Images (Resource Memory Association) */
|
||||
VK_GET_DEVICE_PROC_ADDR(GetBufferMemoryRequirements);
|
||||
VK_GET_DEVICE_PROC_ADDR(BindBufferMemory);
|
||||
VK_GET_DEVICE_PROC_ADDR(BindImageMemory);
|
||||
|
||||
/* Image Views */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateImageView);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyImageView);
|
||||
|
||||
/* Resource Memory Associations */
|
||||
VK_GET_DEVICE_PROC_ADDR(GetImageMemoryRequirements);
|
||||
|
||||
/* Descriptor pools */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateDescriptorPool);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyDescriptorPool);
|
||||
|
||||
/* Descriptor sets */
|
||||
VK_GET_DEVICE_PROC_ADDR(AllocateDescriptorSets);
|
||||
VK_GET_DEVICE_PROC_ADDR(FreeDescriptorSets);
|
||||
VK_GET_DEVICE_PROC_ADDR(UpdateDescriptorSets);
|
||||
|
||||
/* Descriptor Set Layout */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateDescriptorSetLayout);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyDescriptorSetLayout);
|
||||
|
||||
/* Framebuffers */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateFramebuffer);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyFramebuffer);
|
||||
VK_GET_DEVICE_PROC_ADDR(AllocateCommandBuffers);
|
||||
VK_GET_DEVICE_PROC_ADDR(FreeCommandBuffers);
|
||||
|
||||
/* Memory allocation */
|
||||
VK_GET_DEVICE_PROC_ADDR(MapMemory);
|
||||
VK_GET_DEVICE_PROC_ADDR(UnmapMemory);
|
||||
|
||||
/* Render Passes */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateRenderPass);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyRenderPass);
|
||||
|
||||
/* Pipelines */
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyPipeline);
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateGraphicsPipelines);
|
||||
|
||||
/* Shaders */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateShaderModule);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyShaderModule);
|
||||
|
||||
/* Pipeline Layouts */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreatePipelineLayout);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyPipelineLayout);
|
||||
|
||||
/* Pipeline Cache */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreatePipelineCache);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyPipelineCache);
|
||||
|
||||
/* Command buffers */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateCommandPool);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroyCommandPool);
|
||||
VK_GET_DEVICE_PROC_ADDR(BeginCommandBuffer);
|
||||
VK_GET_DEVICE_PROC_ADDR(ResetCommandBuffer);
|
||||
VK_GET_DEVICE_PROC_ADDR(EndCommandBuffer);
|
||||
|
||||
/* Image commands */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdCopyImage);
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdClearColorImage);
|
||||
|
||||
/* Vertex input descriptions */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdBindVertexBuffers);
|
||||
|
||||
/* Descriptor Set commands */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdBindDescriptorSets);
|
||||
|
||||
/* Fragment operations */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdSetScissor);
|
||||
|
||||
/* Render Pass commands */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdBeginRenderPass);
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdEndRenderPass);
|
||||
|
||||
/* Samplers */
|
||||
VK_GET_DEVICE_PROC_ADDR(CreateSampler);
|
||||
VK_GET_DEVICE_PROC_ADDR(DestroySampler);
|
||||
|
||||
/* Fixed-function vertex postprocessing */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdSetViewport);
|
||||
|
||||
/* Clear commands */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdClearAttachments);
|
||||
|
||||
/* Pipeline */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdBindPipeline);
|
||||
|
||||
/* Pipeline Barriers */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdPipelineBarrier);
|
||||
|
||||
/* Drawing commands */
|
||||
VK_GET_DEVICE_PROC_ADDR(CmdDraw);
|
||||
}
|
||||
|
||||
struct buffer
|
||||
{
|
||||
VkBuffer buffer;
|
||||
@ -452,10 +165,10 @@ static void update_ubo(void)
|
||||
tmp[15] = 1.0f;
|
||||
|
||||
float *mvp = NULL;
|
||||
VKFUNC(vkMapMemory)(vulkan->device, vk.ubo[vk.index].memory,
|
||||
vkMapMemory(vulkan->device, vk.ubo[vk.index].memory,
|
||||
0, 16 * sizeof(float), 0, (void**)&mvp);
|
||||
memcpy(mvp, tmp, sizeof(tmp));
|
||||
VKFUNC(vkUnmapMemory)(vulkan->device, vk.ubo[vk.index].memory);
|
||||
vkUnmapMemory(vulkan->device, vk.ubo[vk.index].memory);
|
||||
}
|
||||
|
||||
static void vulkan_test_render(void)
|
||||
@ -466,8 +179,8 @@ static void vulkan_test_render(void)
|
||||
|
||||
VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO };
|
||||
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
|
||||
VKFUNC(vkResetCommandBuffer)(cmd, 0);
|
||||
VKFUNC(vkBeginCommandBuffer)(cmd, &begin_info);
|
||||
vkResetCommandBuffer(cmd, 0);
|
||||
vkBeginCommandBuffer(cmd, &begin_info);
|
||||
|
||||
VkImageMemoryBarrier prepare_rendering = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
|
||||
prepare_rendering.srcAccessMask = 0;
|
||||
@ -480,7 +193,7 @@ static void vulkan_test_render(void)
|
||||
prepare_rendering.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
prepare_rendering.subresourceRange.levelCount = 1;
|
||||
prepare_rendering.subresourceRange.layerCount = 1;
|
||||
VKFUNC(vkCmdPipelineBarrier)(cmd,
|
||||
vkCmdPipelineBarrier(cmd,
|
||||
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
false,
|
||||
0, NULL,
|
||||
@ -500,10 +213,10 @@ static void vulkan_test_render(void)
|
||||
rp_begin.renderArea.extent.height = BASE_HEIGHT;
|
||||
rp_begin.clearValueCount = 1;
|
||||
rp_begin.pClearValues = &clear_value;
|
||||
VKFUNC(vkCmdBeginRenderPass)(cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);
|
||||
vkCmdBeginRenderPass(cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);
|
||||
|
||||
VKFUNC(vkCmdBindPipeline)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, vk.pipeline);
|
||||
VKFUNC(vkCmdBindDescriptorSets)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, vk.pipeline);
|
||||
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
vk.pipeline_layout, 0,
|
||||
1, &vk.desc_set[vk.index], 0, NULL);
|
||||
|
||||
@ -514,20 +227,20 @@ static void vulkan_test_render(void)
|
||||
vp.height = BASE_HEIGHT;
|
||||
vp.minDepth = 0.0f;
|
||||
vp.maxDepth = 1.0f;
|
||||
VKFUNC(vkCmdSetViewport)(cmd, 0, 1, &vp);
|
||||
vkCmdSetViewport(cmd, 0, 1, &vp);
|
||||
|
||||
VkRect2D scissor;
|
||||
memset(&scissor, 0, sizeof(scissor));
|
||||
scissor.extent.width = BASE_WIDTH;
|
||||
scissor.extent.height = BASE_HEIGHT;
|
||||
VKFUNC(vkCmdSetScissor)(cmd, 0, 1, &scissor);
|
||||
vkCmdSetScissor(cmd, 0, 1, &scissor);
|
||||
|
||||
VkDeviceSize offset = 0;
|
||||
VKFUNC(vkCmdBindVertexBuffers)(cmd, 0, 1, &vk.vbo.buffer, &offset);
|
||||
vkCmdBindVertexBuffers(cmd, 0, 1, &vk.vbo.buffer, &offset);
|
||||
|
||||
VKFUNC(vkCmdDraw)(cmd, 3, 1, 0, 0);
|
||||
vkCmdDraw(cmd, 3, 1, 0, 0);
|
||||
|
||||
VKFUNC(vkCmdEndRenderPass)(cmd);
|
||||
vkCmdEndRenderPass(cmd);
|
||||
|
||||
VkImageMemoryBarrier prepare_presentation = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
|
||||
prepare_presentation.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
||||
@ -541,14 +254,14 @@ static void vulkan_test_render(void)
|
||||
prepare_presentation.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
prepare_presentation.subresourceRange.levelCount = 1;
|
||||
prepare_presentation.subresourceRange.layerCount = 1;
|
||||
VKFUNC(vkCmdPipelineBarrier)(cmd, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
|
||||
vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
|
||||
false,
|
||||
0, NULL,
|
||||
0, NULL,
|
||||
1, &prepare_presentation);
|
||||
|
||||
VKFUNC(vkEndCommandBuffer)(cmd);
|
||||
vkEndCommandBuffer(cmd);
|
||||
}
|
||||
|
||||
static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsageFlags usage)
|
||||
@ -560,10 +273,10 @@ static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsa
|
||||
info.usage = usage;
|
||||
info.size = size;
|
||||
|
||||
VKFUNC(vkCreateBuffer)(device, &info, NULL, &buffer.buffer);
|
||||
vkCreateBuffer(device, &info, NULL, &buffer.buffer);
|
||||
|
||||
VkMemoryRequirements mem_reqs;
|
||||
VKFUNC(vkGetBufferMemoryRequirements)(device, buffer.buffer, &mem_reqs);
|
||||
vkGetBufferMemoryRequirements(device, buffer.buffer, &mem_reqs);
|
||||
|
||||
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
|
||||
alloc.allocationSize = mem_reqs.size;
|
||||
@ -571,15 +284,15 @@ static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsa
|
||||
alloc.memoryTypeIndex = find_memory_type_from_requirements(mem_reqs.memoryTypeBits,
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
||||
|
||||
VKFUNC(vkAllocateMemory)(device, &alloc, NULL, &buffer.memory);
|
||||
VKFUNC(vkBindBufferMemory)(device, buffer.buffer, buffer.memory, 0);
|
||||
vkAllocateMemory(device, &alloc, NULL, &buffer.memory);
|
||||
vkBindBufferMemory(device, buffer.buffer, buffer.memory, 0);
|
||||
|
||||
if (initial)
|
||||
{
|
||||
void *ptr;
|
||||
VKFUNC(vkMapMemory)(device, buffer.memory, 0, size, 0, &ptr);
|
||||
vkMapMemory(device, buffer.memory, 0, size, 0, &ptr);
|
||||
memcpy(ptr, initial, size);
|
||||
VKFUNC(vkUnmapMemory)(device, buffer.memory);
|
||||
vkUnmapMemory(device, buffer.memory);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
@ -611,7 +324,7 @@ static VkShaderModule create_shader_module(const uint32_t *data, size_t size)
|
||||
VkShaderModule module;
|
||||
module_info.codeSize = size;
|
||||
module_info.pCode = data;
|
||||
VKFUNC(vkCreateShaderModule)(vulkan->device, &module_info, NULL, &module);
|
||||
vkCreateShaderModule(vulkan->device, &module_info, NULL, &module);
|
||||
return module;
|
||||
}
|
||||
|
||||
@ -633,19 +346,19 @@ static void init_descriptor(void)
|
||||
VkDescriptorSetLayoutCreateInfo set_layout_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
|
||||
set_layout_info.bindingCount = 1;
|
||||
set_layout_info.pBindings = &binding;
|
||||
VKFUNC(vkCreateDescriptorSetLayout)(device, &set_layout_info, NULL, &vk.set_layout);
|
||||
vkCreateDescriptorSetLayout(device, &set_layout_info, NULL, &vk.set_layout);
|
||||
|
||||
VkPipelineLayoutCreateInfo layout_info = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
|
||||
layout_info.setLayoutCount = 1;
|
||||
layout_info.pSetLayouts = &vk.set_layout;
|
||||
VKFUNC(vkCreatePipelineLayout)(device, &layout_info, NULL, &vk.pipeline_layout);
|
||||
vkCreatePipelineLayout(device, &layout_info, NULL, &vk.pipeline_layout);
|
||||
|
||||
VkDescriptorPoolCreateInfo pool_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
|
||||
pool_info.maxSets = vk.num_swapchain_images;
|
||||
pool_info.poolSizeCount = 1;
|
||||
pool_info.pPoolSizes = pool_sizes;
|
||||
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
|
||||
VKFUNC(vkCreateDescriptorPool)(device, &pool_info, NULL, &vk.desc_pool);
|
||||
vkCreateDescriptorPool(device, &pool_info, NULL, &vk.desc_pool);
|
||||
|
||||
VkDescriptorSetAllocateInfo alloc_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
|
||||
alloc_info.descriptorPool = vk.desc_pool;
|
||||
@ -653,7 +366,7 @@ static void init_descriptor(void)
|
||||
alloc_info.pSetLayouts = &vk.set_layout;
|
||||
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
|
||||
{
|
||||
VKFUNC(vkAllocateDescriptorSets)(device, &alloc_info, &vk.desc_set[i]);
|
||||
vkAllocateDescriptorSets(device, &alloc_info, &vk.desc_set[i]);
|
||||
|
||||
VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
|
||||
VkDescriptorBufferInfo buffer_info;
|
||||
@ -668,7 +381,7 @@ static void init_descriptor(void)
|
||||
buffer_info.offset = 0;
|
||||
buffer_info.range = 16 * sizeof(float);
|
||||
|
||||
VKFUNC(vkUpdateDescriptorSets)(device, 1, &write, 0, NULL);
|
||||
vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -772,10 +485,10 @@ static void init_pipeline(void)
|
||||
pipe.renderPass = vk.render_pass;
|
||||
pipe.layout = vk.pipeline_layout;
|
||||
|
||||
VKFUNC(vkCreateGraphicsPipelines)(vulkan->device, vk.pipeline_cache, 1, &pipe, NULL, &vk.pipeline);
|
||||
vkCreateGraphicsPipelines(vulkan->device, vk.pipeline_cache, 1, &pipe, NULL, &vk.pipeline);
|
||||
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[0].module, NULL);
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[0].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[1].module, NULL);
|
||||
}
|
||||
|
||||
static void init_render_pass(VkFormat format)
|
||||
@ -802,7 +515,7 @@ static void init_render_pass(VkFormat format)
|
||||
rp_info.pAttachments = &attachment;
|
||||
rp_info.subpassCount = 1;
|
||||
rp_info.pSubpasses = &subpass;
|
||||
VKFUNC(vkCreateRenderPass)(vulkan->device, &rp_info, NULL, &vk.render_pass);
|
||||
vkCreateRenderPass(vulkan->device, &rp_info, NULL, &vk.render_pass);
|
||||
}
|
||||
|
||||
static void init_swapchain(void)
|
||||
@ -829,17 +542,17 @@ static void init_swapchain(void)
|
||||
image.mipLevels = 1;
|
||||
image.arrayLayers = 1;
|
||||
|
||||
VKFUNC(vkCreateImage)(device, &image, NULL, &vk.images[i].create_info.image);
|
||||
vkCreateImage(device, &image, NULL, &vk.images[i].create_info.image);
|
||||
|
||||
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
|
||||
VkMemoryRequirements mem_reqs;
|
||||
|
||||
VKFUNC(vkGetImageMemoryRequirements)(device, vk.images[i].create_info.image, &mem_reqs);
|
||||
vkGetImageMemoryRequirements(device, vk.images[i].create_info.image, &mem_reqs);
|
||||
alloc.allocationSize = mem_reqs.size;
|
||||
alloc.memoryTypeIndex = find_memory_type_from_requirements(
|
||||
mem_reqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
||||
VKFUNC(vkAllocateMemory)(device, &alloc, NULL, &vk.image_memory[i]);
|
||||
VKFUNC(vkBindImageMemory)(device, vk.images[i].create_info.image, vk.image_memory[i], 0);
|
||||
vkAllocateMemory(device, &alloc, NULL, &vk.image_memory[i]);
|
||||
vkBindImageMemory(device, vk.images[i].create_info.image, vk.image_memory[i], 0);
|
||||
|
||||
vk.images[i].create_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
|
||||
vk.images[i].create_info.viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
@ -854,7 +567,7 @@ static void init_swapchain(void)
|
||||
vk.images[i].create_info.components.b = VK_COMPONENT_SWIZZLE_B;
|
||||
vk.images[i].create_info.components.a = VK_COMPONENT_SWIZZLE_A;
|
||||
|
||||
VKFUNC(vkCreateImageView)(device, &vk.images[i].create_info,
|
||||
vkCreateImageView(device, &vk.images[i].create_info,
|
||||
NULL, &vk.images[i].image_view);
|
||||
vk.images[i].image_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
|
||||
@ -866,7 +579,7 @@ static void init_swapchain(void)
|
||||
fb_info.height = BASE_HEIGHT;
|
||||
fb_info.layers = 1;
|
||||
|
||||
VKFUNC(vkCreateFramebuffer)(device, &fb_info, NULL, &vk.framebuffers[i]);
|
||||
vkCreateFramebuffer(device, &fb_info, NULL, &vk.framebuffers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -880,18 +593,18 @@ static void init_command(void)
|
||||
|
||||
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
|
||||
{
|
||||
VKFUNC(vkCreateCommandPool)(vulkan->device, &pool_info, NULL, &vk.cmd_pool[i]);
|
||||
vkCreateCommandPool(vulkan->device, &pool_info, NULL, &vk.cmd_pool[i]);
|
||||
info.commandPool = vk.cmd_pool[i];
|
||||
info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
||||
info.commandBufferCount = 1;
|
||||
VKFUNC(vkAllocateCommandBuffers)(vulkan->device, &info, &vk.cmd[i]);
|
||||
vkAllocateCommandBuffers(vulkan->device, &info, &vk.cmd[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void vulkan_test_init(void)
|
||||
{
|
||||
VKFUNC(vkGetPhysicalDeviceProperties)(vulkan->gpu, &vk.gpu_properties);
|
||||
VKFUNC(vkGetPhysicalDeviceMemoryProperties)(vulkan->gpu, &vk.memory_properties);
|
||||
vkGetPhysicalDeviceProperties(vulkan->gpu, &vk.gpu_properties);
|
||||
vkGetPhysicalDeviceMemoryProperties(vulkan->gpu, &vk.memory_properties);
|
||||
|
||||
unsigned num_images = 0;
|
||||
uint32_t mask = vulkan->get_sync_index_mask(vulkan->handle);
|
||||
@ -907,7 +620,7 @@ static void vulkan_test_init(void)
|
||||
init_descriptor();
|
||||
|
||||
VkPipelineCacheCreateInfo pipeline_cache_info = { VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
|
||||
VKFUNC(vkCreatePipelineCache)(vulkan->device, &pipeline_cache_info,
|
||||
vkCreatePipelineCache(vulkan->device, &pipeline_cache_info,
|
||||
NULL, &vk.pipeline_cache);
|
||||
|
||||
init_render_pass(VK_FORMAT_R8G8B8A8_UNORM);
|
||||
@ -921,35 +634,35 @@ static void vulkan_test_deinit(void)
|
||||
return;
|
||||
|
||||
VkDevice device = vulkan->device;
|
||||
VKFUNC(vkDeviceWaitIdle)(device);
|
||||
vkDeviceWaitIdle(device);
|
||||
|
||||
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
|
||||
{
|
||||
VKFUNC(vkDestroyFramebuffer)(device, vk.framebuffers[i], NULL);
|
||||
VKFUNC(vkDestroyImageView)(device, vk.images[i].image_view, NULL);
|
||||
VKFUNC(vkFreeMemory)(device, vk.image_memory[i], NULL);
|
||||
VKFUNC(vkDestroyImage)(device, vk.images[i].create_info.image, NULL);
|
||||
vkDestroyFramebuffer(device, vk.framebuffers[i], NULL);
|
||||
vkDestroyImageView(device, vk.images[i].image_view, NULL);
|
||||
vkFreeMemory(device, vk.image_memory[i], NULL);
|
||||
vkDestroyImage(device, vk.images[i].create_info.image, NULL);
|
||||
|
||||
VKFUNC(vkFreeMemory)(device, vk.ubo[i].memory, NULL);
|
||||
VKFUNC(vkDestroyBuffer)(device, vk.ubo[i].buffer, NULL);
|
||||
vkFreeMemory(device, vk.ubo[i].memory, NULL);
|
||||
vkDestroyBuffer(device, vk.ubo[i].buffer, NULL);
|
||||
}
|
||||
|
||||
VKFUNC(vkFreeDescriptorSets)(device, vk.desc_pool, vk.num_swapchain_images, vk.desc_set);
|
||||
VKFUNC(vkDestroyDescriptorPool)(device, vk.desc_pool, NULL);
|
||||
vkFreeDescriptorSets(device, vk.desc_pool, vk.num_swapchain_images, vk.desc_set);
|
||||
vkDestroyDescriptorPool(device, vk.desc_pool, NULL);
|
||||
|
||||
VKFUNC(vkDestroyRenderPass)(device, vk.render_pass, NULL);
|
||||
VKFUNC(vkDestroyPipeline)(device, vk.pipeline, NULL);
|
||||
VKFUNC(vkDestroyDescriptorSetLayout)(device, vk.set_layout, NULL);
|
||||
VKFUNC(vkDestroyPipelineLayout)(device, vk.pipeline_layout, NULL);
|
||||
vkDestroyRenderPass(device, vk.render_pass, NULL);
|
||||
vkDestroyPipeline(device, vk.pipeline, NULL);
|
||||
vkDestroyDescriptorSetLayout(device, vk.set_layout, NULL);
|
||||
vkDestroyPipelineLayout(device, vk.pipeline_layout, NULL);
|
||||
|
||||
VKFUNC(vkFreeMemory)(device, vk.vbo.memory, NULL);
|
||||
VKFUNC(vkDestroyBuffer)(device, vk.vbo.buffer, NULL);
|
||||
VKFUNC(vkDestroyPipelineCache)(device, vk.pipeline_cache, NULL);
|
||||
vkFreeMemory(device, vk.vbo.memory, NULL);
|
||||
vkDestroyBuffer(device, vk.vbo.buffer, NULL);
|
||||
vkDestroyPipelineCache(device, vk.pipeline_cache, NULL);
|
||||
|
||||
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
|
||||
{
|
||||
VKFUNC(vkFreeCommandBuffers)(device, vk.cmd_pool[i], 1, &vk.cmd[i]);
|
||||
VKFUNC(vkDestroyCommandPool)(device, vk.cmd_pool[i], NULL);
|
||||
vkFreeCommandBuffers(device, vk.cmd_pool[i], 1, &vk.cmd[i]);
|
||||
vkDestroyCommandPool(device, vk.cmd_pool[i], NULL);
|
||||
}
|
||||
|
||||
memset(&vk, 0, sizeof(vk));
|
||||
@ -996,7 +709,9 @@ static void context_reset(void)
|
||||
return;
|
||||
}
|
||||
|
||||
load_device_symbols();
|
||||
vulkan_symbol_wrapper_init(vulkan->get_instance_proc_addr);
|
||||
vulkan_symbol_wrapper_load_core_instance_symbols(vulkan->instance);
|
||||
vulkan_symbol_wrapper_load_core_device_symbols(vulkan->device);
|
||||
vulkan_test_init();
|
||||
}
|
||||
|
||||
|
@ -23,12 +23,6 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifndef VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL
|
||||
#define VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL 1024
|
||||
#endif
|
||||
|
||||
#define VKFUNC(sym) (vkcfp.sym)
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#define VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#endif
|
||||
@ -53,221 +47,6 @@
|
||||
#define VK_USE_PLATFORM_XLIB_KHR
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct VkDmaBufImageCreateInfo_
|
||||
{
|
||||
VkStructureType sType; /* Must be VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL */
|
||||
const void* pNext; /* Pointer to next structure. */
|
||||
int fd;
|
||||
VkFormat format;
|
||||
VkExtent3D extent; /* Depth must be 1 */
|
||||
uint32_t strideInBytes;
|
||||
} VkDmaBufImageCreateInfo;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDmaBufImageINTEL)(VkDevice device,
|
||||
const VkDmaBufImageCreateInfo* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMem, VkImage* pImage);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDmaBufImageINTEL(
|
||||
VkDevice _device,
|
||||
const VkDmaBufImageCreateInfo* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDeviceMemory* pMem,
|
||||
VkImage* pImage);
|
||||
|
||||
typedef struct vulkan_context_fp
|
||||
{
|
||||
/* Instance */
|
||||
PFN_vkCreateInstance vkCreateInstance;
|
||||
PFN_vkDestroyInstance vkDestroyInstance;
|
||||
|
||||
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties;
|
||||
PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties;
|
||||
|
||||
/* Device */
|
||||
PFN_vkCreateDevice vkCreateDevice;
|
||||
PFN_vkDestroyDevice vkDestroyDevice;
|
||||
PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
|
||||
|
||||
/* Device Memory */
|
||||
PFN_vkAllocateMemory vkAllocateMemory;
|
||||
PFN_vkFreeMemory vkFreeMemory;
|
||||
|
||||
/* Command Function Pointers */
|
||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr;
|
||||
|
||||
/* Buffers */
|
||||
PFN_vkCreateBuffer vkCreateBuffer;
|
||||
PFN_vkDestroyBuffer vkDestroyBuffer;
|
||||
|
||||
/* Fences */
|
||||
PFN_vkCreateFence vkCreateFence;
|
||||
PFN_vkDestroyFence vkDestroyFence;
|
||||
PFN_vkResetFences vkResetFences;
|
||||
PFN_vkWaitForFences vkWaitForFences;
|
||||
|
||||
/* Semaphores */
|
||||
PFN_vkCreateSemaphore vkCreateSemaphore;
|
||||
PFN_vkDestroySemaphore vkDestroySemaphore;
|
||||
|
||||
/* Images */
|
||||
PFN_vkCreateImage vkCreateImage;
|
||||
PFN_vkDestroyImage vkDestroyImage;
|
||||
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
|
||||
|
||||
/* Images (Resource Memory Association) */
|
||||
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
|
||||
PFN_vkBindBufferMemory vkBindBufferMemory;
|
||||
PFN_vkBindImageMemory vkBindImageMemory;
|
||||
|
||||
/* Image Views */
|
||||
PFN_vkCreateImageView vkCreateImageView;
|
||||
PFN_vkDestroyImageView vkDestroyImageView;
|
||||
|
||||
/* Image Views (Resource Memory Association) */
|
||||
PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
|
||||
|
||||
/* Queues */
|
||||
PFN_vkGetDeviceQueue vkGetDeviceQueue;
|
||||
PFN_vkQueueWaitIdle vkQueueWaitIdle;
|
||||
|
||||
/* Pipelines */
|
||||
PFN_vkDestroyPipeline vkDestroyPipeline;
|
||||
PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
|
||||
|
||||
/* Pipeline Layouts */
|
||||
PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
|
||||
PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
|
||||
|
||||
/* Pipeline Cache */
|
||||
PFN_vkCreatePipelineCache vkCreatePipelineCache;
|
||||
PFN_vkDestroyPipelineCache vkDestroyPipelineCache;
|
||||
|
||||
/* Pipeline Barriers */
|
||||
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
|
||||
|
||||
/* Descriptor pools */
|
||||
PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
|
||||
PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
|
||||
|
||||
/* Descriptor sets */
|
||||
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
|
||||
PFN_vkFreeDescriptorSets vkFreeDescriptorSets;
|
||||
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
|
||||
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
|
||||
|
||||
/* Descriptor Set Layout */
|
||||
PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
|
||||
PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
|
||||
|
||||
/* Command Buffers */
|
||||
PFN_vkCreateCommandPool vkCreateCommandPool;
|
||||
PFN_vkDestroyCommandPool vkDestroyCommandPool;
|
||||
PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
|
||||
PFN_vkEndCommandBuffer vkEndCommandBuffer;
|
||||
PFN_vkResetCommandBuffer vkResetCommandBuffer;
|
||||
PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
|
||||
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
|
||||
|
||||
/* Command Buffer Submission */
|
||||
PFN_vkQueueSubmit vkQueueSubmit;
|
||||
|
||||
/* Framebuffers */
|
||||
PFN_vkCreateFramebuffer vkCreateFramebuffer;
|
||||
PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
|
||||
|
||||
/* Memory allocation */
|
||||
PFN_vkMapMemory vkMapMemory;
|
||||
PFN_vkUnmapMemory vkUnmapMemory;
|
||||
|
||||
/* Samplers */
|
||||
PFN_vkCreateSampler vkCreateSampler;
|
||||
PFN_vkDestroySampler vkDestroySampler;
|
||||
|
||||
/* Render Passes */
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||
PFN_vkDestroyRenderPass vkDestroyRenderPass;
|
||||
|
||||
/* Image commands */
|
||||
PFN_vkCmdCopyImage vkCmdCopyImage;
|
||||
PFN_vkCmdClearColorImage vkCmdClearColorImage;
|
||||
|
||||
/* Pipeline commands */
|
||||
PFN_vkCmdBindPipeline vkCmdBindPipeline;
|
||||
|
||||
/* Vertex input descriptions */
|
||||
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
|
||||
|
||||
/* Render Pass commands */
|
||||
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
|
||||
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
|
||||
|
||||
/* Clear commands */
|
||||
PFN_vkCmdClearAttachments vkCmdClearAttachments;
|
||||
|
||||
/* Drawing commands */
|
||||
PFN_vkCmdDraw vkCmdDraw;
|
||||
|
||||
/* Fragment operations */
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor;
|
||||
|
||||
/* Fixed-function vertex postprocessing */
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport;
|
||||
|
||||
/* Shaders */
|
||||
PFN_vkCreateShaderModule vkCreateShaderModule;
|
||||
PFN_vkDestroyShaderModule vkDestroyShaderModule;
|
||||
|
||||
PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties;
|
||||
PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
|
||||
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
|
||||
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetSurfacePresentModesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR;
|
||||
|
||||
/* Swapchains */
|
||||
PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR;
|
||||
PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR;
|
||||
PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR;
|
||||
|
||||
PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR;
|
||||
PFN_vkQueuePresentKHR vkQueuePresentKHR;
|
||||
PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR;
|
||||
|
||||
/* Platform-specific surface functions */
|
||||
#ifdef _WIN32
|
||||
PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR;
|
||||
#endif
|
||||
#ifdef HAVE_XCB
|
||||
PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
|
||||
#endif
|
||||
#ifdef HAVE_XLIB
|
||||
PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR;
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR;
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
|
||||
#endif
|
||||
#ifdef HAVE_MIR
|
||||
PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR;
|
||||
#endif
|
||||
|
||||
#ifdef VULKAN_DEBUG
|
||||
PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT;
|
||||
PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT;
|
||||
PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT;
|
||||
#endif
|
||||
} vulkan_context_fp_t;
|
||||
|
||||
extern vulkan_context_fp_t vkcfp;
|
||||
#include "../../libretro-common/include/vulkan/vulkan_symbol_wrapper.h"
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,7 @@ static void vulkan_init_render_pass(
|
||||
rp_info.subpassCount = 1;
|
||||
rp_info.pSubpasses = &subpass;
|
||||
|
||||
VKFUNC(vkCreateRenderPass)(vk->context->device,
|
||||
vkCreateRenderPass(vk->context->device,
|
||||
&rp_info, NULL, &vk->render_pass);
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ static void vulkan_init_framebuffers(
|
||||
view.components.b = VK_COMPONENT_SWIZZLE_B;
|
||||
view.components.a = VK_COMPONENT_SWIZZLE_A;
|
||||
|
||||
VKFUNC(vkCreateImageView)(vk->context->device,
|
||||
vkCreateImageView(vk->context->device,
|
||||
&view, NULL, &vk->swapchain[i].backbuffer.view);
|
||||
|
||||
/* Create the framebuffer */
|
||||
@ -153,7 +153,7 @@ static void vulkan_init_framebuffers(
|
||||
info.height = vk->context->swapchain_height;
|
||||
info.layers = 1;
|
||||
|
||||
VKFUNC(vkCreateFramebuffer)(vk->context->device,
|
||||
vkCreateFramebuffer(vk->context->device,
|
||||
&info, NULL, &vk->swapchain[i].backbuffer.framebuffer);
|
||||
}
|
||||
}
|
||||
@ -182,13 +182,13 @@ static void vulkan_init_pipeline_layout(
|
||||
set_layout_info.bindingCount = 2;
|
||||
set_layout_info.pBindings = bindings;
|
||||
|
||||
VKFUNC(vkCreateDescriptorSetLayout)(vk->context->device,
|
||||
vkCreateDescriptorSetLayout(vk->context->device,
|
||||
&set_layout_info, NULL, &vk->pipelines.set_layout);
|
||||
|
||||
layout_info.setLayoutCount = 1;
|
||||
layout_info.pSetLayouts = &vk->pipelines.set_layout;
|
||||
|
||||
VKFUNC(vkCreatePipelineLayout)(vk->context->device,
|
||||
vkCreatePipelineLayout(vk->context->device,
|
||||
&layout_info, NULL, &vk->pipelines.layout);
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ static void vulkan_init_pipelines(
|
||||
module_info.pCode = alpha_blend_vert;
|
||||
shader_stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
|
||||
shader_stages[0].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(vk->context->device,
|
||||
vkCreateShaderModule(vk->context->device,
|
||||
&module_info, NULL, &shader_stages[0].module);
|
||||
|
||||
blend_attachment.blendEnable = true;
|
||||
@ -355,22 +355,22 @@ static void vulkan_init_pipelines(
|
||||
module_info.pCode = font_frag;
|
||||
shader_stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
shader_stages[1].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(vk->context->device,
|
||||
vkCreateShaderModule(vk->context->device,
|
||||
&module_info, NULL, &shader_stages[1].module);
|
||||
|
||||
VKFUNC(vkCreateGraphicsPipelines)(vk->context->device, vk->pipelines.cache,
|
||||
vkCreateGraphicsPipelines(vk->context->device, vk->pipelines.cache,
|
||||
1, &pipe, NULL, &vk->pipelines.font);
|
||||
VKFUNC(vkDestroyShaderModule)(vk->context->device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(vk->context->device, shader_stages[1].module, NULL);
|
||||
|
||||
/* Alpha-blended pipeline. */
|
||||
module_info.codeSize = sizeof(alpha_blend_frag);
|
||||
module_info.pCode = alpha_blend_frag;
|
||||
shader_stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
shader_stages[1].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(vk->context->device,
|
||||
vkCreateShaderModule(vk->context->device,
|
||||
&module_info, NULL, &shader_stages[1].module);
|
||||
|
||||
VKFUNC(vkCreateGraphicsPipelines)(vk->context->device, vk->pipelines.cache,
|
||||
vkCreateGraphicsPipelines(vk->context->device, vk->pipelines.cache,
|
||||
1, &pipe, NULL, &vk->pipelines.alpha_blend);
|
||||
|
||||
/* Build display pipelines. */
|
||||
@ -380,12 +380,12 @@ static void vulkan_init_pipelines(
|
||||
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP :
|
||||
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
blend_attachment.blendEnable = i & 1;
|
||||
VKFUNC(vkCreateGraphicsPipelines)(vk->context->device, vk->pipelines.cache,
|
||||
vkCreateGraphicsPipelines(vk->context->device, vk->pipelines.cache,
|
||||
1, &pipe, NULL, &vk->display.pipelines[i]);
|
||||
}
|
||||
|
||||
VKFUNC(vkDestroyShaderModule)(vk->context->device, shader_stages[0].module, NULL);
|
||||
VKFUNC(vkDestroyShaderModule)(vk->context->device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(vk->context->device, shader_stages[0].module, NULL);
|
||||
vkDestroyShaderModule(vk->context->device, shader_stages[1].module, NULL);
|
||||
|
||||
/* Other menu pipelines. */
|
||||
for (i = 0; i < 4; i++)
|
||||
@ -403,7 +403,7 @@ static void vulkan_init_pipelines(
|
||||
|
||||
shader_stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
|
||||
shader_stages[0].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(vk->context->device,
|
||||
vkCreateShaderModule(vk->context->device,
|
||||
&module_info, NULL, &shader_stages[0].module);
|
||||
|
||||
if (i & 2)
|
||||
@ -419,18 +419,18 @@ static void vulkan_init_pipelines(
|
||||
|
||||
shader_stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
shader_stages[1].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(vk->context->device,
|
||||
vkCreateShaderModule(vk->context->device,
|
||||
&module_info, NULL, &shader_stages[1].module);
|
||||
|
||||
input_assembly.topology = i & 1 ?
|
||||
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP :
|
||||
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
|
||||
VKFUNC(vkCreateGraphicsPipelines)(vk->context->device, vk->pipelines.cache,
|
||||
vkCreateGraphicsPipelines(vk->context->device, vk->pipelines.cache,
|
||||
1, &pipe, NULL, &vk->display.pipelines[4 + i]);
|
||||
|
||||
VKFUNC(vkDestroyShaderModule)(vk->context->device, shader_stages[0].module, NULL);
|
||||
VKFUNC(vkDestroyShaderModule)(vk->context->device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(vk->context->device, shader_stages[0].module, NULL);
|
||||
vkDestroyShaderModule(vk->context->device, shader_stages[1].module, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -450,14 +450,14 @@ static void vulkan_init_command_buffers(vk_t *vk)
|
||||
pool_info.flags =
|
||||
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
|
||||
|
||||
VKFUNC(vkCreateCommandPool)(vk->context->device,
|
||||
vkCreateCommandPool(vk->context->device,
|
||||
&pool_info, NULL, &vk->swapchain[i].cmd_pool);
|
||||
|
||||
info.commandPool = vk->swapchain[i].cmd_pool;
|
||||
info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
||||
info.commandBufferCount = 1;
|
||||
|
||||
VKFUNC(vkAllocateCommandBuffers)(vk->context->device,
|
||||
vkAllocateCommandBuffers(vk->context->device,
|
||||
&info, &vk->swapchain[i].cmd);
|
||||
}
|
||||
}
|
||||
@ -480,19 +480,19 @@ static void vulkan_init_samplers(vk_t *vk)
|
||||
info.maxLod = 0.0f;
|
||||
info.unnormalizedCoordinates = false;
|
||||
info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||
VKFUNC(vkCreateSampler)(vk->context->device,
|
||||
vkCreateSampler(vk->context->device,
|
||||
&info, NULL, &vk->samplers.nearest);
|
||||
|
||||
info.magFilter = VK_FILTER_LINEAR;
|
||||
info.minFilter = VK_FILTER_LINEAR;
|
||||
VKFUNC(vkCreateSampler)(vk->context->device,
|
||||
vkCreateSampler(vk->context->device,
|
||||
&info, NULL, &vk->samplers.linear);
|
||||
}
|
||||
|
||||
static void vulkan_deinit_samplers(vk_t *vk)
|
||||
{
|
||||
VKFUNC(vkDestroySampler)(vk->context->device, vk->samplers.nearest, NULL);
|
||||
VKFUNC(vkDestroySampler)(vk->context->device, vk->samplers.linear, NULL);
|
||||
vkDestroySampler(vk->context->device, vk->samplers.nearest, NULL);
|
||||
vkDestroySampler(vk->context->device, vk->samplers.linear, NULL);
|
||||
}
|
||||
|
||||
static void vulkan_init_buffers(vk_t *vk)
|
||||
@ -596,19 +596,19 @@ static void vulkan_deinit_command_buffers(vk_t *vk)
|
||||
for (i = 0; i < vk->num_swapchain_images; i++)
|
||||
{
|
||||
if (vk->swapchain[i].cmd)
|
||||
VKFUNC(vkFreeCommandBuffers)(vk->context->device,
|
||||
vkFreeCommandBuffers(vk->context->device,
|
||||
vk->swapchain[i].cmd_pool, 1, &vk->swapchain[i].cmd);
|
||||
|
||||
VKFUNC(vkDestroyCommandPool)(vk->context->device,
|
||||
vkDestroyCommandPool(vk->context->device,
|
||||
vk->swapchain[i].cmd_pool, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void vulkan_deinit_pipeline_layout(vk_t *vk)
|
||||
{
|
||||
VKFUNC(vkDestroyPipelineLayout)(vk->context->device,
|
||||
vkDestroyPipelineLayout(vk->context->device,
|
||||
vk->pipelines.layout, NULL);
|
||||
VKFUNC(vkDestroyDescriptorSetLayout)(vk->context->device,
|
||||
vkDestroyDescriptorSetLayout(vk->context->device,
|
||||
vk->pipelines.set_layout, NULL);
|
||||
}
|
||||
|
||||
@ -617,13 +617,13 @@ static void vulkan_deinit_pipelines(vk_t *vk)
|
||||
unsigned i;
|
||||
|
||||
vulkan_deinit_pipeline_layout(vk);
|
||||
VKFUNC(vkDestroyPipeline)(vk->context->device,
|
||||
vkDestroyPipeline(vk->context->device,
|
||||
vk->pipelines.alpha_blend, NULL);
|
||||
VKFUNC(vkDestroyPipeline)(vk->context->device,
|
||||
vkDestroyPipeline(vk->context->device,
|
||||
vk->pipelines.font, NULL);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
VKFUNC(vkDestroyPipeline)(vk->context->device,
|
||||
vkDestroyPipeline(vk->context->device,
|
||||
vk->display.pipelines[i], NULL);
|
||||
}
|
||||
|
||||
@ -632,13 +632,13 @@ static void vulkan_deinit_framebuffers(vk_t *vk)
|
||||
unsigned i;
|
||||
for (i = 0; i < vk->num_swapchain_images; i++)
|
||||
{
|
||||
VKFUNC(vkDestroyFramebuffer)(vk->context->device,
|
||||
vkDestroyFramebuffer(vk->context->device,
|
||||
vk->swapchain[i].backbuffer.framebuffer, NULL);
|
||||
VKFUNC(vkDestroyImageView)(vk->context->device,
|
||||
vkDestroyImageView(vk->context->device,
|
||||
vk->swapchain[i].backbuffer.view, NULL);
|
||||
}
|
||||
|
||||
VKFUNC(vkDestroyRenderPass)(vk->context->device, vk->render_pass, NULL);
|
||||
vkDestroyRenderPass(vk->context->device, vk->render_pass, NULL);
|
||||
}
|
||||
|
||||
static bool vulkan_init_default_filter_chain(vk_t *vk)
|
||||
@ -752,12 +752,12 @@ static void vulkan_init_static_resources(vk_t *vk)
|
||||
VkPipelineCacheCreateInfo cache = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
|
||||
|
||||
VKFUNC(vkCreatePipelineCache)(vk->context->device,
|
||||
vkCreatePipelineCache(vk->context->device,
|
||||
&cache, NULL, &vk->pipelines.cache);
|
||||
|
||||
pool_info.queueFamilyIndex = vk->context->graphics_queue_index;
|
||||
|
||||
VKFUNC(vkCreateCommandPool)(vk->context->device,
|
||||
vkCreateCommandPool(vk->context->device,
|
||||
&pool_info, NULL, &vk->staging_pool);
|
||||
|
||||
for (i = 0; i < 4 * 4; i++)
|
||||
@ -771,13 +771,13 @@ static void vulkan_init_static_resources(vk_t *vk)
|
||||
static void vulkan_deinit_static_resources(vk_t *vk)
|
||||
{
|
||||
unsigned i;
|
||||
VKFUNC(vkDestroyPipelineCache)(vk->context->device,
|
||||
vkDestroyPipelineCache(vk->context->device,
|
||||
vk->pipelines.cache, NULL);
|
||||
vulkan_destroy_texture(
|
||||
vk->context->device,
|
||||
&vk->display.blank_texture);
|
||||
|
||||
VKFUNC(vkDestroyCommandPool)(vk->context->device,
|
||||
vkDestroyCommandPool(vk->context->device,
|
||||
vk->staging_pool, NULL);
|
||||
free(vk->hw.cmd);
|
||||
free(vk->hw.wait_dst_stages);
|
||||
@ -821,7 +821,7 @@ static void vulkan_free(void *data)
|
||||
|
||||
if (vk->context && vk->context->device)
|
||||
{
|
||||
VKFUNC(vkQueueWaitIdle)(vk->context->queue);
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
vulkan_deinit_resources(vk);
|
||||
|
||||
/* No need to init this since textures are create on-demand. */
|
||||
@ -955,8 +955,8 @@ static void vulkan_init_hw_render(vk_t *vk)
|
||||
iface->lock_queue = vulkan_lock_queue;
|
||||
iface->unlock_queue = vulkan_unlock_queue;
|
||||
|
||||
iface->get_device_proc_addr = VKFUNC(vkGetDeviceProcAddr);
|
||||
iface->get_instance_proc_addr = VKFUNC(vkGetInstanceProcAddr);
|
||||
iface->get_device_proc_addr = vkGetDeviceProcAddr;
|
||||
iface->get_instance_proc_addr = vulkan_symbol_wrapper_instance_proc_addr();
|
||||
}
|
||||
|
||||
static void vulkan_init_readback(vk_t *vk)
|
||||
@ -1118,7 +1118,7 @@ static void vulkan_check_swapchain(vk_t *vk)
|
||||
{
|
||||
if (vk->context->invalid_swapchain)
|
||||
{
|
||||
VKFUNC(vkQueueWaitIdle)(vk->context->queue);
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
|
||||
vulkan_deinit_resources(vk);
|
||||
vulkan_init_resources(vk);
|
||||
@ -1427,7 +1427,7 @@ static void vulkan_readback(vk_t *vk)
|
||||
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT);
|
||||
|
||||
VKFUNC(vkCmdCopyImage)(vk->cmd, vk->chain->backbuffer.image,
|
||||
vkCmdCopyImage(vk->cmd, vk->chain->backbuffer.image,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
|
||||
staging->image,
|
||||
VK_IMAGE_LAYOUT_GENERAL,
|
||||
@ -1447,7 +1447,7 @@ static void vulkan_flush_caches(vk_t *vk)
|
||||
barrier.srcAccessMask = 0;
|
||||
barrier.dstAccessMask = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_UNIFORM_READ_BIT;
|
||||
|
||||
VKFUNC(vkCmdPipelineBarrier)(vk->cmd,
|
||||
vkCmdPipelineBarrier(vk->cmd,
|
||||
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
|
||||
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
|
||||
VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
|
||||
@ -1507,9 +1507,9 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
/* Start recording the command buffer. */
|
||||
vk->cmd = chain->cmd;
|
||||
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
|
||||
VKFUNC(vkResetCommandBuffer)(vk->cmd, 0);
|
||||
vkResetCommandBuffer(vk->cmd, 0);
|
||||
|
||||
VKFUNC(vkBeginCommandBuffer)(vk->cmd, &begin_info);
|
||||
vkBeginCommandBuffer(vk->cmd, &begin_info);
|
||||
performance_counter_stop(&begin_cmd);
|
||||
|
||||
memset(&vk->tracker, 0, sizeof(vk->tracker));
|
||||
@ -1667,7 +1667,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
|
||||
|
||||
/* Begin render pass and set up viewport */
|
||||
VKFUNC(vkCmdBeginRenderPass)(vk->cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
|
||||
vkCmdBeginRenderPass(vk->cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
|
||||
|
||||
vulkan_filter_chain_build_viewport_pass(vk->filter_chain, vk->cmd,
|
||||
&vk->vk_vp, vk->mvp.data);
|
||||
@ -1719,7 +1719,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
performance_counter_stop(&build_cmd);
|
||||
|
||||
/* End the render pass. We're done rendering to backbuffer now. */
|
||||
VKFUNC(vkCmdEndRenderPass)(vk->cmd);
|
||||
vkCmdEndRenderPass(vk->cmd);
|
||||
|
||||
if (vk->readback.pending || vk->readback.streamed)
|
||||
{
|
||||
@ -1781,7 +1781,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
performance_counter_start(&end_cmd);
|
||||
VKFUNC(vkEndCommandBuffer)(vk->cmd);
|
||||
vkEndCommandBuffer(vk->cmd);
|
||||
performance_counter_stop(&end_cmd);
|
||||
|
||||
/* Submit command buffers to GPU. */
|
||||
@ -1824,7 +1824,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
#ifdef HAVE_THREADS
|
||||
slock_lock(vk->context->queue_lock);
|
||||
#endif
|
||||
VKFUNC(vkQueueSubmit)(vk->context->queue, 1,
|
||||
vkQueueSubmit(vk->context->queue, 1,
|
||||
&submit_info, vk->context->swapchain_fences[frame_index]);
|
||||
#ifdef HAVE_THREADS
|
||||
slock_unlock(vk->context->queue_lock);
|
||||
@ -1991,7 +1991,7 @@ static void vulkan_set_texture_frame(void *data,
|
||||
NULL, rgb32 ? NULL : &br_swizzle,
|
||||
texture_optimal->memory ? VULKAN_TEXTURE_STAGING : VULKAN_TEXTURE_STREAMED);
|
||||
|
||||
VKFUNC(vkMapMemory)(vk->context->device, texture->memory,
|
||||
vkMapMemory(vk->context->device, texture->memory,
|
||||
texture->offset, texture->size, 0, (void**)&ptr);
|
||||
|
||||
dst = ptr;
|
||||
@ -2001,7 +2001,7 @@ static void vulkan_set_texture_frame(void *data,
|
||||
for (y = 0; y < height; y++, dst += texture->stride, src += stride)
|
||||
memcpy(dst, src, stride);
|
||||
|
||||
VKFUNC(vkUnmapMemory)(vk->context->device, texture->memory);
|
||||
vkUnmapMemory(vk->context->device, texture->memory);
|
||||
|
||||
vk->menu.alpha = alpha;
|
||||
vk->menu.last_index = index;
|
||||
@ -2067,7 +2067,7 @@ static void vulkan_unload_texture(void *data, uintptr_t handle)
|
||||
|
||||
/* TODO: We really want to defer this deletion instead,
|
||||
* but this will do for now. */
|
||||
VKFUNC(vkQueueWaitIdle)(vk->context->queue);
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
vulkan_destroy_texture(
|
||||
vk->context->device, texture);
|
||||
free(texture);
|
||||
@ -2146,14 +2146,14 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer)
|
||||
performance_counter_start(&stream_readback);
|
||||
|
||||
buffer += 3 * (vk->vp.height - 1) * vk->vp.width;
|
||||
VKFUNC(vkMapMemory)(vk->context->device, staging->memory,
|
||||
vkMapMemory(vk->context->device, staging->memory,
|
||||
staging->offset, staging->size, 0, (void**)&src);
|
||||
|
||||
vk->readback.scaler.in_stride = staging->stride;
|
||||
vk->readback.scaler.out_stride = -(int)vk->vp.width * 3;
|
||||
scaler_ctx_scale(&vk->readback.scaler, buffer, src);
|
||||
|
||||
VKFUNC(vkUnmapMemory)(vk->context->device, staging->memory);
|
||||
vkUnmapMemory(vk->context->device, staging->memory);
|
||||
|
||||
performance_counter_stop(&stream_readback);
|
||||
}
|
||||
@ -2166,7 +2166,7 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer)
|
||||
|
||||
vk->readback.pending = true;
|
||||
video_driver_cached_frame_render();
|
||||
VKFUNC(vkQueueWaitIdle)(vk->context->queue);
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
|
||||
if (!staging->mapped)
|
||||
vulkan_map_persistent_texture(
|
||||
@ -2350,7 +2350,7 @@ static bool vulkan_overlay_load(void *data,
|
||||
#ifdef HAVE_THREADS
|
||||
slock_lock(vk->context->queue_lock);
|
||||
#endif
|
||||
VKFUNC(vkQueueWaitIdle)(vk->context->queue);
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
#ifdef HAVE_THREADS
|
||||
slock_unlock(vk->context->queue_lock);
|
||||
#endif
|
||||
|
@ -75,7 +75,7 @@ static void vulkan_raster_font_free_font(void *data)
|
||||
if (font->font_driver && font->font_data)
|
||||
font->font_driver->free(font->font_data);
|
||||
|
||||
VKFUNC(vkQueueWaitIdle)(font->vk->context->queue);
|
||||
vkQueueWaitIdle(font->vk->context->queue);
|
||||
vulkan_destroy_texture(
|
||||
font->vk->context->device, &font->texture);
|
||||
|
||||
|
@ -54,7 +54,7 @@ static void image_layout_transition(
|
||||
barrier.subresourceRange.levelCount = 1;
|
||||
barrier.subresourceRange.layerCount = 1;
|
||||
|
||||
VKFUNC(vkCmdPipelineBarrier)(cmd,
|
||||
vkCmdPipelineBarrier(cmd,
|
||||
src_stages,
|
||||
dst_stages,
|
||||
false,
|
||||
@ -596,7 +596,7 @@ void vulkan_filter_chain::execute_deferred()
|
||||
|
||||
void vulkan_filter_chain::flush()
|
||||
{
|
||||
VKFUNC(vkDeviceWaitIdle)(device);
|
||||
vkDeviceWaitIdle(device);
|
||||
execute_deferred();
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ bool vulkan_filter_chain::init_ubo()
|
||||
common.ubo_offset = 0;
|
||||
|
||||
VkPhysicalDeviceProperties props;
|
||||
VKFUNC(vkGetPhysicalDeviceProperties)(gpu, &props);
|
||||
vkGetPhysicalDeviceProperties(gpu, &props);
|
||||
common.ubo_alignment = props.limits.minUniformBufferOffsetAlignment;
|
||||
|
||||
// Who knows. :)
|
||||
@ -974,9 +974,9 @@ Buffer::Buffer(VkDevice device,
|
||||
info.size = size;
|
||||
info.usage = usage;
|
||||
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
VKFUNC(vkCreateBuffer)(device, &info, nullptr, &buffer);
|
||||
vkCreateBuffer(device, &info, nullptr, &buffer);
|
||||
|
||||
VKFUNC(vkGetBufferMemoryRequirements)(device, buffer, &mem_reqs);
|
||||
vkGetBufferMemoryRequirements(device, buffer, &mem_reqs);
|
||||
|
||||
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
|
||||
alloc.allocationSize = mem_reqs.size;
|
||||
@ -986,29 +986,29 @@ Buffer::Buffer(VkDevice device,
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
|
||||
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
||||
|
||||
VKFUNC(vkAllocateMemory)(device, &alloc, NULL, &memory);
|
||||
VKFUNC(vkBindBufferMemory)(device, buffer, memory, 0);
|
||||
vkAllocateMemory(device, &alloc, NULL, &memory);
|
||||
vkBindBufferMemory(device, buffer, memory, 0);
|
||||
}
|
||||
|
||||
void *Buffer::map()
|
||||
{
|
||||
void *ptr = nullptr;
|
||||
if (VKFUNC(vkMapMemory)(device, memory, 0, size, 0, &ptr) == VK_SUCCESS)
|
||||
if (vkMapMemory(device, memory, 0, size, 0, &ptr) == VK_SUCCESS)
|
||||
return ptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Buffer::unmap()
|
||||
{
|
||||
VKFUNC(vkUnmapMemory)(device, memory);
|
||||
vkUnmapMemory(device, memory);
|
||||
}
|
||||
|
||||
Buffer::~Buffer()
|
||||
{
|
||||
if (memory != VK_NULL_HANDLE)
|
||||
VKFUNC(vkFreeMemory)(device, memory, nullptr);
|
||||
vkFreeMemory(device, memory, nullptr);
|
||||
if (buffer != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyBuffer)(device, buffer, nullptr);
|
||||
vkDestroyBuffer(device, buffer, nullptr);
|
||||
}
|
||||
|
||||
Pass::~Pass()
|
||||
@ -1107,13 +1107,13 @@ Size2D Pass::set_pass_info(
|
||||
void Pass::clear_vk()
|
||||
{
|
||||
if (pool != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyDescriptorPool)(device, pool, nullptr);
|
||||
vkDestroyDescriptorPool(device, pool, nullptr);
|
||||
if (pipeline != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyPipeline)(device, pipeline, nullptr);
|
||||
vkDestroyPipeline(device, pipeline, nullptr);
|
||||
if (set_layout != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyDescriptorSetLayout)(device, set_layout, nullptr);
|
||||
vkDestroyDescriptorSetLayout(device, set_layout, nullptr);
|
||||
if (pipeline_layout != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyPipelineLayout)(device, pipeline_layout, nullptr);
|
||||
vkDestroyPipelineLayout(device, pipeline_layout, nullptr);
|
||||
|
||||
pool = VK_NULL_HANDLE;
|
||||
pipeline = VK_NULL_HANDLE;
|
||||
@ -1166,7 +1166,7 @@ bool Pass::init_pipeline_layout()
|
||||
set_layout_info.bindingCount = bindings.size();
|
||||
set_layout_info.pBindings = bindings.data();
|
||||
|
||||
if (VKFUNC(vkCreateDescriptorSetLayout)(device,
|
||||
if (vkCreateDescriptorSetLayout(device,
|
||||
&set_layout_info, NULL, &set_layout) != VK_SUCCESS)
|
||||
return false;
|
||||
|
||||
@ -1175,7 +1175,7 @@ bool Pass::init_pipeline_layout()
|
||||
layout_info.setLayoutCount = 1;
|
||||
layout_info.pSetLayouts = &set_layout;
|
||||
|
||||
if (VKFUNC(vkCreatePipelineLayout)(device,
|
||||
if (vkCreatePipelineLayout(device,
|
||||
&layout_info, NULL, &pipeline_layout) != VK_SUCCESS)
|
||||
return false;
|
||||
|
||||
@ -1184,7 +1184,7 @@ bool Pass::init_pipeline_layout()
|
||||
pool_info.maxSets = num_sync_indices;
|
||||
pool_info.poolSizeCount = desc_counts.size();
|
||||
pool_info.pPoolSizes = desc_counts.data();
|
||||
if (VKFUNC(vkCreateDescriptorPool)(device, &pool_info, nullptr, &pool) != VK_SUCCESS)
|
||||
if (vkCreateDescriptorPool(device, &pool_info, nullptr, &pool) != VK_SUCCESS)
|
||||
return false;
|
||||
|
||||
VkDescriptorSetAllocateInfo alloc_info = {
|
||||
@ -1196,7 +1196,7 @@ bool Pass::init_pipeline_layout()
|
||||
sets.resize(num_sync_indices);
|
||||
|
||||
for (unsigned i = 0; i < num_sync_indices; i++)
|
||||
VKFUNC(vkAllocateDescriptorSets)(device, &alloc_info, &sets[i]);
|
||||
vkAllocateDescriptorSets(device, &alloc_info, &sets[i]);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1296,13 +1296,13 @@ bool Pass::init_pipeline()
|
||||
module_info.pCode = vertex_shader.data();
|
||||
shader_stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
|
||||
shader_stages[0].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(device, &module_info, NULL, &shader_stages[0].module);
|
||||
vkCreateShaderModule(device, &module_info, NULL, &shader_stages[0].module);
|
||||
|
||||
module_info.codeSize = fragment_shader.size() * sizeof(uint32_t);
|
||||
module_info.pCode = fragment_shader.data();
|
||||
shader_stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
shader_stages[1].pName = "main";
|
||||
VKFUNC(vkCreateShaderModule)(device, &module_info, NULL, &shader_stages[1].module);
|
||||
vkCreateShaderModule(device, &module_info, NULL, &shader_stages[1].module);
|
||||
|
||||
VkGraphicsPipelineCreateInfo pipe = {
|
||||
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO };
|
||||
@ -1320,16 +1320,16 @@ bool Pass::init_pipeline()
|
||||
framebuffer->get_render_pass();
|
||||
pipe.layout = pipeline_layout;
|
||||
|
||||
if (VKFUNC(vkCreateGraphicsPipelines)(device,
|
||||
if (vkCreateGraphicsPipelines(device,
|
||||
cache, 1, &pipe, NULL, &pipeline) != VK_SUCCESS)
|
||||
{
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[0].module, NULL);
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[0].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[1].module, NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[0].module, NULL);
|
||||
VKFUNC(vkDestroyShaderModule)(device, shader_stages[1].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[0].module, NULL);
|
||||
vkDestroyShaderModule(device, shader_stages[1].module, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1375,13 +1375,13 @@ CommonResources::CommonResources(VkDevice device,
|
||||
info.unnormalizedCoordinates = false;
|
||||
info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||
|
||||
VKFUNC(vkCreateSampler)(device,
|
||||
vkCreateSampler(device,
|
||||
&info, nullptr, &samplers[VULKAN_FILTER_CHAIN_NEAREST]);
|
||||
|
||||
info.magFilter = VK_FILTER_LINEAR;
|
||||
info.minFilter = VK_FILTER_LINEAR;
|
||||
|
||||
VKFUNC(vkCreateSampler)(device,
|
||||
vkCreateSampler(device,
|
||||
&info, nullptr, &samplers[VULKAN_FILTER_CHAIN_LINEAR]);
|
||||
}
|
||||
|
||||
@ -1389,7 +1389,7 @@ CommonResources::~CommonResources()
|
||||
{
|
||||
for (auto &samp : samplers)
|
||||
if (samp != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroySampler)(device, samp, nullptr);
|
||||
vkDestroySampler(device, samp, nullptr);
|
||||
}
|
||||
|
||||
void Pass::allocate_buffers()
|
||||
@ -1469,7 +1469,7 @@ void Pass::set_uniform_buffer(VkDescriptorSet set, unsigned binding,
|
||||
write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
|
||||
write.pBufferInfo = &buffer_info;
|
||||
|
||||
VKFUNC(vkUpdateDescriptorSets)(device, 1, &write, 0, NULL);
|
||||
vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
|
||||
}
|
||||
|
||||
void Pass::set_texture(VkDescriptorSet set, unsigned binding,
|
||||
@ -1487,7 +1487,7 @@ void Pass::set_texture(VkDescriptorSet set, unsigned binding,
|
||||
write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
write.pImageInfo = &image_info;
|
||||
|
||||
VKFUNC(vkUpdateDescriptorSets)(device, 1, &write, 0, nullptr);
|
||||
vkUpdateDescriptorSets(device, 1, &write, 0, nullptr);
|
||||
}
|
||||
|
||||
void Pass::set_semantic_texture(VkDescriptorSet set,
|
||||
@ -1684,15 +1684,15 @@ void Pass::build_commands(
|
||||
rp_info.clearValueCount = 1;
|
||||
rp_info.pClearValues = &clear_value;
|
||||
|
||||
VKFUNC(vkCmdBeginRenderPass)(cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
|
||||
vkCmdBeginRenderPass(cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
|
||||
}
|
||||
|
||||
VKFUNC(vkCmdBindPipeline)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
|
||||
VKFUNC(vkCmdBindDescriptorSets)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout,
|
||||
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
|
||||
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout,
|
||||
0, 1, &sets[sync_index], 0, nullptr);
|
||||
|
||||
VkDeviceSize offset = final_pass ? 16 * sizeof(float) : 0;
|
||||
VKFUNC(vkCmdBindVertexBuffers)(cmd, 0, 1,
|
||||
vkCmdBindVertexBuffers(cmd, 0, 1,
|
||||
&common->vbo->get_buffer(),
|
||||
&offset);
|
||||
|
||||
@ -1708,8 +1708,8 @@ void Pass::build_commands(
|
||||
uint32_t(current_viewport.height)
|
||||
},
|
||||
};
|
||||
VKFUNC(vkCmdSetViewport)(cmd, 0, 1, ¤t_viewport);
|
||||
VKFUNC(vkCmdSetScissor)(cmd, 0, 1, &sci);
|
||||
vkCmdSetViewport(cmd, 0, 1, ¤t_viewport);
|
||||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1727,15 +1727,15 @@ void Pass::build_commands(
|
||||
},
|
||||
};
|
||||
|
||||
VKFUNC(vkCmdSetViewport)(cmd, 0, 1, &vp);
|
||||
VKFUNC(vkCmdSetScissor)(cmd, 0, 1, &sci);
|
||||
vkCmdSetViewport(cmd, 0, 1, &vp);
|
||||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
|
||||
VKFUNC(vkCmdDraw)(cmd, 4, 1, 0, 0);
|
||||
vkCmdDraw(cmd, 4, 1, 0, 0);
|
||||
|
||||
if (!final_pass)
|
||||
{
|
||||
VKFUNC(vkCmdEndRenderPass)(cmd);
|
||||
vkCmdEndRenderPass(cmd);
|
||||
|
||||
// Barrier to sync with next pass.
|
||||
image_layout_transition(
|
||||
@ -1782,7 +1782,7 @@ void Framebuffer::clear(VkCommandBuffer cmd)
|
||||
range.levelCount = 1;
|
||||
range.layerCount = 1;
|
||||
|
||||
VKFUNC(vkCmdClearColorImage)(cmd, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
vkCmdClearColorImage(cmd, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
&color, 1, &range);
|
||||
|
||||
image_layout_transition(cmd, image,
|
||||
@ -1810,7 +1810,7 @@ void Framebuffer::copy(VkCommandBuffer cmd,
|
||||
region.extent.height = size.height;
|
||||
region.extent.depth = 1;
|
||||
|
||||
VKFUNC(vkCmdCopyImage)(cmd,
|
||||
vkCmdCopyImage(cmd,
|
||||
src_image, src_layout,
|
||||
image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
1, ®ion);
|
||||
@ -1841,9 +1841,9 @@ void Framebuffer::init(DeferredDisposer *disposer)
|
||||
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
|
||||
VKFUNC(vkCreateImage)(device, &info, nullptr, &image);
|
||||
vkCreateImage(device, &info, nullptr, &image);
|
||||
|
||||
VKFUNC(vkGetImageMemoryRequirements)(device, image, &mem_reqs);
|
||||
vkGetImageMemoryRequirements(device, image, &mem_reqs);
|
||||
|
||||
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
|
||||
alloc.allocationSize = mem_reqs.size;
|
||||
@ -1860,16 +1860,16 @@ void Framebuffer::init(DeferredDisposer *disposer)
|
||||
{
|
||||
auto d = device;
|
||||
auto m = memory.memory;
|
||||
disposer->defer([=] { VKFUNC(vkFreeMemory)(d, m, nullptr); });
|
||||
disposer->defer([=] { vkFreeMemory(d, m, nullptr); });
|
||||
}
|
||||
|
||||
memory.type = alloc.memoryTypeIndex;
|
||||
memory.size = mem_reqs.size;
|
||||
|
||||
VKFUNC(vkAllocateMemory)(device, &alloc, nullptr, &memory.memory);
|
||||
vkAllocateMemory(device, &alloc, nullptr, &memory.memory);
|
||||
}
|
||||
|
||||
VKFUNC(vkBindImageMemory)(device, image, memory.memory, 0);
|
||||
vkBindImageMemory(device, image, memory.memory, 0);
|
||||
|
||||
VkImageViewCreateInfo view_info = {
|
||||
VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO };
|
||||
@ -1886,7 +1886,7 @@ void Framebuffer::init(DeferredDisposer *disposer)
|
||||
view_info.components.b = VK_COMPONENT_SWIZZLE_B;
|
||||
view_info.components.a = VK_COMPONENT_SWIZZLE_A;
|
||||
|
||||
VKFUNC(vkCreateImageView)(device, &view_info, nullptr, &view);
|
||||
vkCreateImageView(device, &view_info, nullptr, &view);
|
||||
|
||||
init_framebuffer();
|
||||
}
|
||||
@ -1921,7 +1921,7 @@ void Framebuffer::init_render_pass()
|
||||
rp_info.subpassCount = 1;
|
||||
rp_info.pSubpasses = &subpass;
|
||||
|
||||
VKFUNC(vkCreateRenderPass)(device, &rp_info, nullptr, &render_pass);
|
||||
vkCreateRenderPass(device, &rp_info, nullptr, &render_pass);
|
||||
}
|
||||
|
||||
void Framebuffer::init_framebuffer()
|
||||
@ -1935,7 +1935,7 @@ void Framebuffer::init_framebuffer()
|
||||
info.height = size.height;
|
||||
info.layers = 1;
|
||||
|
||||
VKFUNC(vkCreateFramebuffer)(device, &info, nullptr, &framebuffer);
|
||||
vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
|
||||
}
|
||||
|
||||
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size)
|
||||
@ -1960,11 +1960,11 @@ void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size)
|
||||
disposer.defer([=]
|
||||
{
|
||||
if (fb != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyFramebuffer)(d, fb, nullptr);
|
||||
vkDestroyFramebuffer(d, fb, nullptr);
|
||||
if (v != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyImageView)(d, v, nullptr);
|
||||
vkDestroyImageView(d, v, nullptr);
|
||||
if (i != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyImage)(d, i, nullptr);
|
||||
vkDestroyImage(d, i, nullptr);
|
||||
});
|
||||
}
|
||||
|
||||
@ -1974,15 +1974,15 @@ void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size)
|
||||
Framebuffer::~Framebuffer()
|
||||
{
|
||||
if (framebuffer != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyFramebuffer)(device, framebuffer, nullptr);
|
||||
vkDestroyFramebuffer(device, framebuffer, nullptr);
|
||||
if (render_pass != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyRenderPass)(device, render_pass, nullptr);
|
||||
vkDestroyRenderPass(device, render_pass, nullptr);
|
||||
if (view != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyImageView)(device, view, nullptr);
|
||||
vkDestroyImageView(device, view, nullptr);
|
||||
if (image != VK_NULL_HANDLE)
|
||||
VKFUNC(vkDestroyImage)(device, image, nullptr);
|
||||
vkDestroyImage(device, image, nullptr);
|
||||
if (memory.memory != VK_NULL_HANDLE)
|
||||
VKFUNC(vkFreeMemory)(device, memory.memory, nullptr);
|
||||
vkFreeMemory(device, memory.memory, nullptr);
|
||||
}
|
||||
|
||||
// C glue
|
||||
|
@ -6,32 +6,31 @@
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and/or associated documentation files (the "Materials"), to
|
||||
* deal in the Materials without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* The above copyright notice(s) and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Materials.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
*
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
|
||||
* USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VKICD_H
|
||||
#define VKICD_H
|
||||
|
||||
#include "vk_platform.h"
|
||||
#include "vulkan.h"
|
||||
|
||||
/*
|
||||
* Loader-ICD version negotiation API
|
||||
*/
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 2
|
||||
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
|
||||
/*
|
||||
* The ICD must reserve space for a pointer for the loader's dispatch
|
||||
* table, at the start of <each object>.
|
||||
@ -65,6 +64,7 @@ typedef enum _VkIcdWsiPlatform {
|
||||
VK_ICD_WSI_PLATFORM_WIN32,
|
||||
VK_ICD_WSI_PLATFORM_XCB,
|
||||
VK_ICD_WSI_PLATFORM_XLIB,
|
||||
VK_ICD_WSI_PLATFORM_DISPLAY
|
||||
} VkIcdWsiPlatform;
|
||||
|
||||
typedef struct _VkIcdSurfaceBase {
|
||||
@ -111,4 +111,14 @@ typedef struct _VkIcdSurfaceXlib {
|
||||
} VkIcdSurfaceXlib;
|
||||
#endif // VK_USE_PLATFORM_XLIB_KHR
|
||||
|
||||
typedef struct _VkIcdSurfaceDisplay {
|
||||
VkIcdSurfaceBase base;
|
||||
VkDisplayModeKHR displayMode;
|
||||
uint32_t planeIndex;
|
||||
uint32_t planeStackIndex;
|
||||
VkSurfaceTransformFlagBitsKHR transform;
|
||||
float globalAlpha;
|
||||
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
|
||||
VkExtent2D imageExtent;
|
||||
} VkIcdSurfaceDisplay;
|
||||
#endif // VKICD_H
|
||||
|
314
gfx/include/vulkan/vk_layer.h
Normal file
314
gfx/include/vulkan/vk_layer.h
Normal file
@ -0,0 +1,314 @@
|
||||
//
|
||||
// File: vk_layer.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Need to define dispatch table
|
||||
* Core struct can then have ptr to dispatch table at the top
|
||||
* Along with object ptrs for current and next OBJ
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VK_LAYER_EXPORT
|
||||
#endif
|
||||
|
||||
typedef struct VkLayerDispatchTable_ {
|
||||
PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
|
||||
PFN_vkDestroyDevice DestroyDevice;
|
||||
PFN_vkGetDeviceQueue GetDeviceQueue;
|
||||
PFN_vkQueueSubmit QueueSubmit;
|
||||
PFN_vkQueueWaitIdle QueueWaitIdle;
|
||||
PFN_vkDeviceWaitIdle DeviceWaitIdle;
|
||||
PFN_vkAllocateMemory AllocateMemory;
|
||||
PFN_vkFreeMemory FreeMemory;
|
||||
PFN_vkMapMemory MapMemory;
|
||||
PFN_vkUnmapMemory UnmapMemory;
|
||||
PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges;
|
||||
PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges;
|
||||
PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment;
|
||||
PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements;
|
||||
PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements;
|
||||
PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements;
|
||||
PFN_vkBindImageMemory BindImageMemory;
|
||||
PFN_vkBindBufferMemory BindBufferMemory;
|
||||
PFN_vkQueueBindSparse QueueBindSparse;
|
||||
PFN_vkCreateFence CreateFence;
|
||||
PFN_vkDestroyFence DestroyFence;
|
||||
PFN_vkGetFenceStatus GetFenceStatus;
|
||||
PFN_vkResetFences ResetFences;
|
||||
PFN_vkWaitForFences WaitForFences;
|
||||
PFN_vkCreateSemaphore CreateSemaphore;
|
||||
PFN_vkDestroySemaphore DestroySemaphore;
|
||||
PFN_vkCreateEvent CreateEvent;
|
||||
PFN_vkDestroyEvent DestroyEvent;
|
||||
PFN_vkGetEventStatus GetEventStatus;
|
||||
PFN_vkSetEvent SetEvent;
|
||||
PFN_vkResetEvent ResetEvent;
|
||||
PFN_vkCreateQueryPool CreateQueryPool;
|
||||
PFN_vkDestroyQueryPool DestroyQueryPool;
|
||||
PFN_vkGetQueryPoolResults GetQueryPoolResults;
|
||||
PFN_vkCreateBuffer CreateBuffer;
|
||||
PFN_vkDestroyBuffer DestroyBuffer;
|
||||
PFN_vkCreateBufferView CreateBufferView;
|
||||
PFN_vkDestroyBufferView DestroyBufferView;
|
||||
PFN_vkCreateImage CreateImage;
|
||||
PFN_vkDestroyImage DestroyImage;
|
||||
PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout;
|
||||
PFN_vkCreateImageView CreateImageView;
|
||||
PFN_vkDestroyImageView DestroyImageView;
|
||||
PFN_vkCreateShaderModule CreateShaderModule;
|
||||
PFN_vkDestroyShaderModule DestroyShaderModule;
|
||||
PFN_vkCreatePipelineCache CreatePipelineCache;
|
||||
PFN_vkDestroyPipelineCache DestroyPipelineCache;
|
||||
PFN_vkGetPipelineCacheData GetPipelineCacheData;
|
||||
PFN_vkMergePipelineCaches MergePipelineCaches;
|
||||
PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines;
|
||||
PFN_vkCreateComputePipelines CreateComputePipelines;
|
||||
PFN_vkDestroyPipeline DestroyPipeline;
|
||||
PFN_vkCreatePipelineLayout CreatePipelineLayout;
|
||||
PFN_vkDestroyPipelineLayout DestroyPipelineLayout;
|
||||
PFN_vkCreateSampler CreateSampler;
|
||||
PFN_vkDestroySampler DestroySampler;
|
||||
PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout;
|
||||
PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout;
|
||||
PFN_vkCreateDescriptorPool CreateDescriptorPool;
|
||||
PFN_vkDestroyDescriptorPool DestroyDescriptorPool;
|
||||
PFN_vkResetDescriptorPool ResetDescriptorPool;
|
||||
PFN_vkAllocateDescriptorSets AllocateDescriptorSets;
|
||||
PFN_vkFreeDescriptorSets FreeDescriptorSets;
|
||||
PFN_vkUpdateDescriptorSets UpdateDescriptorSets;
|
||||
PFN_vkCreateFramebuffer CreateFramebuffer;
|
||||
PFN_vkDestroyFramebuffer DestroyFramebuffer;
|
||||
PFN_vkCreateRenderPass CreateRenderPass;
|
||||
PFN_vkDestroyRenderPass DestroyRenderPass;
|
||||
PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity;
|
||||
PFN_vkCreateCommandPool CreateCommandPool;
|
||||
PFN_vkDestroyCommandPool DestroyCommandPool;
|
||||
PFN_vkResetCommandPool ResetCommandPool;
|
||||
PFN_vkAllocateCommandBuffers AllocateCommandBuffers;
|
||||
PFN_vkFreeCommandBuffers FreeCommandBuffers;
|
||||
PFN_vkBeginCommandBuffer BeginCommandBuffer;
|
||||
PFN_vkEndCommandBuffer EndCommandBuffer;
|
||||
PFN_vkResetCommandBuffer ResetCommandBuffer;
|
||||
PFN_vkCmdBindPipeline CmdBindPipeline;
|
||||
PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets;
|
||||
PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
|
||||
PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
|
||||
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_vkCmdDraw CmdDraw;
|
||||
PFN_vkCmdDrawIndexed CmdDrawIndexed;
|
||||
PFN_vkCmdDrawIndirect CmdDrawIndirect;
|
||||
PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect;
|
||||
PFN_vkCmdDispatch CmdDispatch;
|
||||
PFN_vkCmdDispatchIndirect CmdDispatchIndirect;
|
||||
PFN_vkCmdCopyBuffer CmdCopyBuffer;
|
||||
PFN_vkCmdCopyImage CmdCopyImage;
|
||||
PFN_vkCmdBlitImage CmdBlitImage;
|
||||
PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage;
|
||||
PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer;
|
||||
PFN_vkCmdUpdateBuffer CmdUpdateBuffer;
|
||||
PFN_vkCmdFillBuffer CmdFillBuffer;
|
||||
PFN_vkCmdClearColorImage CmdClearColorImage;
|
||||
PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage;
|
||||
PFN_vkCmdClearAttachments CmdClearAttachments;
|
||||
PFN_vkCmdResolveImage CmdResolveImage;
|
||||
PFN_vkCmdSetEvent CmdSetEvent;
|
||||
PFN_vkCmdResetEvent CmdResetEvent;
|
||||
PFN_vkCmdWaitEvents CmdWaitEvents;
|
||||
PFN_vkCmdPipelineBarrier CmdPipelineBarrier;
|
||||
PFN_vkCmdBeginQuery CmdBeginQuery;
|
||||
PFN_vkCmdEndQuery CmdEndQuery;
|
||||
PFN_vkCmdResetQueryPool CmdResetQueryPool;
|
||||
PFN_vkCmdWriteTimestamp CmdWriteTimestamp;
|
||||
PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults;
|
||||
PFN_vkCmdPushConstants CmdPushConstants;
|
||||
PFN_vkCmdBeginRenderPass CmdBeginRenderPass;
|
||||
PFN_vkCmdNextSubpass CmdNextSubpass;
|
||||
PFN_vkCmdEndRenderPass CmdEndRenderPass;
|
||||
PFN_vkCmdExecuteCommands CmdExecuteCommands;
|
||||
PFN_vkCreateSwapchainKHR CreateSwapchainKHR;
|
||||
PFN_vkDestroySwapchainKHR DestroySwapchainKHR;
|
||||
PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR;
|
||||
PFN_vkAcquireNextImageKHR AcquireNextImageKHR;
|
||||
PFN_vkQueuePresentKHR QueuePresentKHR;
|
||||
} VkLayerDispatchTable;
|
||||
|
||||
typedef struct VkLayerInstanceDispatchTable_ {
|
||||
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||
PFN_vkDestroyInstance DestroyInstance;
|
||||
PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
|
||||
PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
|
||||
PFN_vkGetPhysicalDeviceImageFormatProperties
|
||||
GetPhysicalDeviceImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceSparseImageFormatProperties
|
||||
GetPhysicalDeviceSparseImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties
|
||||
GetPhysicalDeviceQueueFamilyProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
|
||||
PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties;
|
||||
PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties;
|
||||
PFN_vkDestroySurfaceKHR DestroySurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
|
||||
GetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR
|
||||
GetPhysicalDeviceSurfacePresentModesKHR;
|
||||
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
|
||||
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
|
||||
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
PFN_vkCreateMirSurfaceKHR CreateMirSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR
|
||||
GetPhysicalDeviceMirPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
|
||||
GetPhysicalDeviceWaylandPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
|
||||
GetPhysicalDeviceWin32PresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR
|
||||
GetPhysicalDeviceXcbPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR
|
||||
GetPhysicalDeviceXlibPresentationSupportKHR;
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
|
||||
#endif
|
||||
PFN_vkGetPhysicalDeviceDisplayPropertiesKHR
|
||||
GetPhysicalDeviceDisplayPropertiesKHR;
|
||||
PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR
|
||||
GetPhysicalDeviceDisplayPlanePropertiesKHR;
|
||||
PFN_vkGetDisplayPlaneSupportedDisplaysKHR
|
||||
GetDisplayPlaneSupportedDisplaysKHR;
|
||||
PFN_vkGetDisplayModePropertiesKHR
|
||||
GetDisplayModePropertiesKHR;
|
||||
PFN_vkCreateDisplayModeKHR
|
||||
CreateDisplayModeKHR;
|
||||
PFN_vkGetDisplayPlaneCapabilitiesKHR
|
||||
GetDisplayPlaneCapabilitiesKHR;
|
||||
PFN_vkCreateDisplayPlaneSurfaceKHR
|
||||
CreateDisplayPlaneSurfaceKHR;
|
||||
} VkLayerInstanceDispatchTable;
|
||||
|
||||
// LL node for tree of dbg callback functions
|
||||
typedef struct VkLayerDbgFunctionNode_ {
|
||||
VkDebugReportCallbackEXT msgCallback;
|
||||
PFN_vkDebugReportCallbackEXT pfnMsgCallback;
|
||||
VkFlags msgFlags;
|
||||
void *pUserData;
|
||||
struct VkLayerDbgFunctionNode_ *pNext;
|
||||
} VkLayerDbgFunctionNode;
|
||||
|
||||
typedef enum VkLayerDbgAction_ {
|
||||
VK_DBG_LAYER_ACTION_IGNORE = 0x0,
|
||||
VK_DBG_LAYER_ACTION_CALLBACK = 0x1,
|
||||
VK_DBG_LAYER_ACTION_LOG_MSG = 0x2,
|
||||
VK_DBG_LAYER_ACTION_BREAK = 0x4,
|
||||
VK_DBG_LAYER_ACTION_DEBUG_OUTPUT = 0x8,
|
||||
} VkLayerDbgAction;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// CreateInstance and CreateDevice support structures
|
||||
|
||||
/* Sub type of structure for instance and device loader ext of CreateInfo.
|
||||
* When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
* or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
* then VkLayerFunction indicates struct type pointed to by pNext
|
||||
*/
|
||||
typedef enum VkLayerFunction_ {
|
||||
VK_LAYER_LINK_INFO = 0,
|
||||
VK_LOADER_DATA_CALLBACK = 1
|
||||
} VkLayerFunction;
|
||||
|
||||
typedef struct VkLayerInstanceLink_ {
|
||||
struct VkLayerInstanceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
} VkLayerInstanceLink;
|
||||
|
||||
/*
|
||||
* When creating the device chain the loader needs to pass
|
||||
* down information about it's device structure needed at
|
||||
* the end of the chain. Passing the data via the
|
||||
* VkLayerDeviceInfo avoids issues with finding the
|
||||
* exact instance being used.
|
||||
*/
|
||||
typedef struct VkLayerDeviceInfo_ {
|
||||
void *device_info;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
} VkLayerDeviceInfo;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
|
||||
void *object);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
|
||||
void *object);
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerInstanceLink *pLayerInfo;
|
||||
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
|
||||
} u;
|
||||
} VkLayerInstanceCreateInfo;
|
||||
|
||||
typedef struct VkLayerDeviceLink_ {
|
||||
struct VkLayerDeviceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
|
||||
} VkLayerDeviceLink;
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerDeviceLink *pLayerInfo;
|
||||
PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
|
||||
} u;
|
||||
} VkLayerDeviceCreateInfo;
|
||||
|
@ -4,24 +4,17 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
46
gfx/include/vulkan/vk_sdk_platform.h
Normal file
46
gfx/include/vulkan/vk_sdk_platform.h
Normal file
@ -0,0 +1,46 @@
|
||||
//
|
||||
// File: vk_sdk_platform.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef VK_SDK_PLATFORM_H
|
||||
#define VK_SDK_PLATFORM_H
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define NOMINMAX
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
#endif // __cplusplus
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||
// C99:
|
||||
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
|
||||
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
|
||||
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
|
||||
// "CMakeLists.txt" file).
|
||||
// NOTE: This is fixed in Visual Studio 2015.
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define strdup _strdup
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // VK_SDK_PLATFORM_H
|
@ -8,24 +8,17 @@ extern "C" {
|
||||
/*
|
||||
** Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -40,12 +33,18 @@ extern "C" {
|
||||
#define VK_MAKE_VERSION(major, minor, patch) \
|
||||
(((major) << 22) | ((minor) << 12) | (patch))
|
||||
|
||||
// Vulkan API version supported by this file
|
||||
#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 4)
|
||||
// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
|
||||
//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0)
|
||||
|
||||
// Vulkan 1.0 version number
|
||||
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)
|
||||
|
||||
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
// Version of this file
|
||||
#define VK_HEADER_VERSION 17
|
||||
|
||||
|
||||
#define VK_NULL_HANDLE 0
|
||||
|
||||
@ -142,6 +141,7 @@ typedef enum VkResult {
|
||||
VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
|
||||
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
|
||||
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
|
||||
VK_ERROR_INVALID_SHADER_NV = -1000012000,
|
||||
VK_RESULT_BEGIN_RANGE = VK_ERROR_FORMAT_NOT_SUPPORTED,
|
||||
VK_RESULT_END_RANGE = VK_INCOMPLETE,
|
||||
VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FORMAT_NOT_SUPPORTED + 1),
|
||||
@ -210,6 +210,10 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
|
||||
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
@ -679,6 +683,7 @@ typedef enum VkDynamicState {
|
||||
typedef enum VkFilter {
|
||||
VK_FILTER_NEAREST = 0,
|
||||
VK_FILTER_LINEAR = 1,
|
||||
VK_FILTER_CUBIC_IMG = 1000015000,
|
||||
VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST,
|
||||
VK_FILTER_END_RANGE = VK_FILTER_LINEAR,
|
||||
VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1),
|
||||
@ -808,6 +813,8 @@ 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_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkFormatFeatureFlagBits;
|
||||
typedef VkFlags VkFormatFeatureFlags;
|
||||
|
||||
@ -820,6 +827,7 @@ typedef enum VkImageUsageFlagBits {
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
|
||||
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
|
||||
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
|
||||
VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkImageUsageFlagBits;
|
||||
typedef VkFlags VkImageUsageFlags;
|
||||
|
||||
@ -829,6 +837,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_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkImageCreateFlagBits;
|
||||
typedef VkFlags VkImageCreateFlags;
|
||||
|
||||
@ -840,6 +849,7 @@ typedef enum VkSampleCountFlagBits {
|
||||
VK_SAMPLE_COUNT_16_BIT = 0x00000010,
|
||||
VK_SAMPLE_COUNT_32_BIT = 0x00000020,
|
||||
VK_SAMPLE_COUNT_64_BIT = 0x00000040,
|
||||
VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkSampleCountFlagBits;
|
||||
typedef VkFlags VkSampleCountFlags;
|
||||
|
||||
@ -848,6 +858,7 @@ typedef enum VkQueueFlagBits {
|
||||
VK_QUEUE_COMPUTE_BIT = 0x00000002,
|
||||
VK_QUEUE_TRANSFER_BIT = 0x00000004,
|
||||
VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
|
||||
VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkQueueFlagBits;
|
||||
typedef VkFlags VkQueueFlags;
|
||||
|
||||
@ -857,11 +868,13 @@ typedef enum VkMemoryPropertyFlagBits {
|
||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
|
||||
VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
|
||||
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
|
||||
VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkMemoryPropertyFlagBits;
|
||||
typedef VkFlags VkMemoryPropertyFlags;
|
||||
|
||||
typedef enum VkMemoryHeapFlagBits {
|
||||
VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
|
||||
VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkMemoryHeapFlagBits;
|
||||
typedef VkFlags VkMemoryHeapFlags;
|
||||
typedef VkFlags VkDeviceCreateFlags;
|
||||
@ -885,6 +898,7 @@ typedef enum VkPipelineStageFlagBits {
|
||||
VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
|
||||
VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000,
|
||||
VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkPipelineStageFlagBits;
|
||||
typedef VkFlags VkPipelineStageFlags;
|
||||
typedef VkFlags VkMemoryMapFlags;
|
||||
@ -894,6 +908,7 @@ typedef enum VkImageAspectFlagBits {
|
||||
VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
|
||||
VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
|
||||
VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
|
||||
VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkImageAspectFlagBits;
|
||||
typedef VkFlags VkImageAspectFlags;
|
||||
|
||||
@ -901,16 +916,19 @@ typedef enum VkSparseImageFormatFlagBits {
|
||||
VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
|
||||
VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
|
||||
VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
|
||||
VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkSparseImageFormatFlagBits;
|
||||
typedef VkFlags VkSparseImageFormatFlags;
|
||||
|
||||
typedef enum VkSparseMemoryBindFlagBits {
|
||||
VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
|
||||
VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkSparseMemoryBindFlagBits;
|
||||
typedef VkFlags VkSparseMemoryBindFlags;
|
||||
|
||||
typedef enum VkFenceCreateFlagBits {
|
||||
VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
|
||||
VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkFenceCreateFlagBits;
|
||||
typedef VkFlags VkFenceCreateFlags;
|
||||
typedef VkFlags VkSemaphoreCreateFlags;
|
||||
@ -929,6 +947,7 @@ typedef enum VkQueryPipelineStatisticFlagBits {
|
||||
VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100,
|
||||
VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200,
|
||||
VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400,
|
||||
VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkQueryPipelineStatisticFlagBits;
|
||||
typedef VkFlags VkQueryPipelineStatisticFlags;
|
||||
|
||||
@ -937,6 +956,7 @@ typedef enum VkQueryResultFlagBits {
|
||||
VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
|
||||
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
|
||||
VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,
|
||||
VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkQueryResultFlagBits;
|
||||
typedef VkFlags VkQueryResultFlags;
|
||||
|
||||
@ -944,6 +964,7 @@ typedef enum VkBufferCreateFlagBits {
|
||||
VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
|
||||
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
|
||||
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
|
||||
VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkBufferCreateFlagBits;
|
||||
typedef VkFlags VkBufferCreateFlags;
|
||||
|
||||
@ -957,6 +978,7 @@ typedef enum VkBufferUsageFlagBits {
|
||||
VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
|
||||
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
|
||||
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
|
||||
VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkBufferUsageFlagBits;
|
||||
typedef VkFlags VkBufferUsageFlags;
|
||||
typedef VkFlags VkBufferViewCreateFlags;
|
||||
@ -968,6 +990,7 @@ typedef enum VkPipelineCreateFlagBits {
|
||||
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
|
||||
VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
|
||||
VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
|
||||
VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkPipelineCreateFlagBits;
|
||||
typedef VkFlags VkPipelineCreateFlags;
|
||||
typedef VkFlags VkPipelineShaderStageCreateFlags;
|
||||
@ -979,8 +1002,9 @@ typedef enum VkShaderStageFlagBits {
|
||||
VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
|
||||
VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
|
||||
VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
|
||||
VK_SHADER_STAGE_ALL_GRAPHICS = 0x1F,
|
||||
VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
|
||||
VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
|
||||
VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkShaderStageFlagBits;
|
||||
typedef VkFlags VkPipelineVertexInputStateCreateFlags;
|
||||
typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
|
||||
@ -992,7 +1016,8 @@ typedef enum VkCullModeFlagBits {
|
||||
VK_CULL_MODE_NONE = 0,
|
||||
VK_CULL_MODE_FRONT_BIT = 0x00000001,
|
||||
VK_CULL_MODE_BACK_BIT = 0x00000002,
|
||||
VK_CULL_MODE_FRONT_AND_BACK = 0x3,
|
||||
VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
|
||||
VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkCullModeFlagBits;
|
||||
typedef VkFlags VkCullModeFlags;
|
||||
typedef VkFlags VkPipelineMultisampleStateCreateFlags;
|
||||
@ -1004,6 +1029,7 @@ typedef enum VkColorComponentFlagBits {
|
||||
VK_COLOR_COMPONENT_G_BIT = 0x00000002,
|
||||
VK_COLOR_COMPONENT_B_BIT = 0x00000004,
|
||||
VK_COLOR_COMPONENT_A_BIT = 0x00000008,
|
||||
VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkColorComponentFlagBits;
|
||||
typedef VkFlags VkColorComponentFlags;
|
||||
typedef VkFlags VkPipelineDynamicStateCreateFlags;
|
||||
@ -1014,6 +1040,7 @@ typedef VkFlags VkDescriptorSetLayoutCreateFlags;
|
||||
|
||||
typedef enum VkDescriptorPoolCreateFlagBits {
|
||||
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
|
||||
VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkDescriptorPoolCreateFlagBits;
|
||||
typedef VkFlags VkDescriptorPoolCreateFlags;
|
||||
typedef VkFlags VkDescriptorPoolResetFlags;
|
||||
@ -1022,6 +1049,7 @@ typedef VkFlags VkRenderPassCreateFlags;
|
||||
|
||||
typedef enum VkAttachmentDescriptionFlagBits {
|
||||
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
|
||||
VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkAttachmentDescriptionFlagBits;
|
||||
typedef VkFlags VkAttachmentDescriptionFlags;
|
||||
typedef VkFlags VkSubpassDescriptionFlags;
|
||||
@ -1044,22 +1072,26 @@ typedef enum VkAccessFlagBits {
|
||||
VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
|
||||
VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
|
||||
VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
|
||||
VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkAccessFlagBits;
|
||||
typedef VkFlags VkAccessFlags;
|
||||
|
||||
typedef enum VkDependencyFlagBits {
|
||||
VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
|
||||
VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkDependencyFlagBits;
|
||||
typedef VkFlags VkDependencyFlags;
|
||||
|
||||
typedef enum VkCommandPoolCreateFlagBits {
|
||||
VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
|
||||
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
|
||||
VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkCommandPoolCreateFlagBits;
|
||||
typedef VkFlags VkCommandPoolCreateFlags;
|
||||
|
||||
typedef enum VkCommandPoolResetFlagBits {
|
||||
VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
|
||||
VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkCommandPoolResetFlagBits;
|
||||
typedef VkFlags VkCommandPoolResetFlags;
|
||||
|
||||
@ -1067,23 +1099,27 @@ typedef enum VkCommandBufferUsageFlagBits {
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
|
||||
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
|
||||
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
|
||||
VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkCommandBufferUsageFlagBits;
|
||||
typedef VkFlags VkCommandBufferUsageFlags;
|
||||
|
||||
typedef enum VkQueryControlFlagBits {
|
||||
VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
|
||||
VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkQueryControlFlagBits;
|
||||
typedef VkFlags VkQueryControlFlags;
|
||||
|
||||
typedef enum VkCommandBufferResetFlagBits {
|
||||
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
|
||||
VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkCommandBufferResetFlagBits;
|
||||
typedef VkFlags VkCommandBufferResetFlags;
|
||||
|
||||
typedef enum VkStencilFaceFlagBits {
|
||||
VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
|
||||
VK_STENCIL_FACE_BACK_BIT = 0x00000002,
|
||||
VK_STENCIL_FRONT_AND_BACK = 0x3,
|
||||
VK_STENCIL_FRONT_AND_BACK = 0x00000003,
|
||||
VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkStencilFaceFlagBits;
|
||||
typedef VkFlags VkStencilFaceFlags;
|
||||
|
||||
@ -3136,14 +3172,15 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
|
||||
|
||||
#define VK_KHR_SURFACE_SPEC_VERSION 25
|
||||
#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
|
||||
#define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
|
||||
|
||||
|
||||
typedef enum VkColorSpaceKHR {
|
||||
VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0,
|
||||
VK_COLORSPACE_BEGIN_RANGE = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLORSPACE_END_RANGE = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLORSPACE_RANGE_SIZE = (VK_COLORSPACE_SRGB_NONLINEAR_KHR - VK_COLORSPACE_SRGB_NONLINEAR_KHR + 1),
|
||||
VK_COLORSPACE_MAX_ENUM = 0x7FFFFFFF
|
||||
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
|
||||
VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
|
||||
VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkColorSpaceKHR;
|
||||
|
||||
typedef enum VkPresentModeKHR {
|
||||
@ -3151,10 +3188,10 @@ typedef enum VkPresentModeKHR {
|
||||
VK_PRESENT_MODE_MAILBOX_KHR = 1,
|
||||
VK_PRESENT_MODE_FIFO_KHR = 2,
|
||||
VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3,
|
||||
VK_PRESENT_MODE_BEGIN_RANGE = VK_PRESENT_MODE_IMMEDIATE_KHR,
|
||||
VK_PRESENT_MODE_END_RANGE = VK_PRESENT_MODE_FIFO_RELAXED_KHR,
|
||||
VK_PRESENT_MODE_RANGE_SIZE = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
|
||||
VK_PRESENT_MODE_MAX_ENUM = 0x7FFFFFFF
|
||||
VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR,
|
||||
VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_RELAXED_KHR,
|
||||
VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
|
||||
VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkPresentModeKHR;
|
||||
|
||||
|
||||
@ -3168,6 +3205,7 @@ typedef enum VkSurfaceTransformFlagBitsKHR {
|
||||
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
|
||||
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
|
||||
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
|
||||
VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkSurfaceTransformFlagBitsKHR;
|
||||
typedef VkFlags VkSurfaceTransformFlagsKHR;
|
||||
|
||||
@ -3176,6 +3214,7 @@ typedef enum VkCompositeAlphaFlagBitsKHR {
|
||||
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
|
||||
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
|
||||
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
|
||||
VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkCompositeAlphaFlagBitsKHR;
|
||||
typedef VkFlags VkCompositeAlphaFlagsKHR;
|
||||
|
||||
@ -3237,7 +3276,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
|
||||
#define VK_KHR_swapchain 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
|
||||
|
||||
#define VK_KHR_SWAPCHAIN_SPEC_VERSION 67
|
||||
#define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
|
||||
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
|
||||
|
||||
typedef VkFlags VkSwapchainCreateFlagsKHR;
|
||||
@ -3325,6 +3364,7 @@ typedef enum VkDisplayPlaneAlphaFlagBitsKHR {
|
||||
VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
|
||||
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
|
||||
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
|
||||
VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkDisplayPlaneAlphaFlagBitsKHR;
|
||||
typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;
|
||||
typedef VkFlags VkDisplayModeCreateFlagsKHR;
|
||||
@ -3392,7 +3432,7 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhys
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR*pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
@ -3675,7 +3715,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
#define VK_EXT_debug_report 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
|
||||
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 2
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 3
|
||||
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
|
||||
#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
|
||||
|
||||
@ -3710,11 +3750,19 @@ typedef enum VkDebugReportObjectTypeEXT {
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT,
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDebugReportObjectTypeEXT;
|
||||
|
||||
typedef enum VkDebugReportErrorEXT {
|
||||
VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
|
||||
VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1,
|
||||
VK_DEBUG_REPORT_ERROR_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_ERROR_NONE_EXT,
|
||||
VK_DEBUG_REPORT_ERROR_END_RANGE_EXT = VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT,
|
||||
VK_DEBUG_REPORT_ERROR_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT - VK_DEBUG_REPORT_ERROR_NONE_EXT + 1),
|
||||
VK_DEBUG_REPORT_ERROR_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDebugReportErrorEXT;
|
||||
|
||||
|
||||
@ -3724,6 +3772,7 @@ typedef enum VkDebugReportFlagBitsEXT {
|
||||
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
|
||||
VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
|
||||
VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
|
||||
VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkDebugReportFlagBitsEXT;
|
||||
typedef VkFlags VkDebugReportFlagsEXT;
|
||||
|
||||
@ -3774,6 +3823,110 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
|
||||
const char* pMessage);
|
||||
#endif
|
||||
|
||||
#define VK_NV_glsl_shader 1
|
||||
#define VK_NV_GLSL_SHADER_SPEC_VERSION 1
|
||||
#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader"
|
||||
|
||||
|
||||
#define VK_IMG_filter_cubic 1
|
||||
#define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
|
||||
#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic"
|
||||
|
||||
|
||||
#define VK_AMD_rasterization_order 1
|
||||
#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
|
||||
#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order"
|
||||
|
||||
|
||||
typedef enum VkRasterizationOrderAMD {
|
||||
VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
|
||||
VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
|
||||
VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD = VK_RASTERIZATION_ORDER_STRICT_AMD,
|
||||
VK_RASTERIZATION_ORDER_END_RANGE_AMD = VK_RASTERIZATION_ORDER_RELAXED_AMD,
|
||||
VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1),
|
||||
VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF
|
||||
} VkRasterizationOrderAMD;
|
||||
|
||||
typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkRasterizationOrderAMD rasterizationOrder;
|
||||
} VkPipelineRasterizationStateRasterizationOrderAMD;
|
||||
|
||||
|
||||
|
||||
#define VK_AMD_shader_trinary_minmax 1
|
||||
#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
|
||||
#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
|
||||
|
||||
|
||||
#define VK_AMD_shader_explicit_vertex_parameter 1
|
||||
#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
|
||||
#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
|
||||
|
||||
|
||||
#define VK_EXT_debug_marker 1
|
||||
#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3
|
||||
#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker"
|
||||
|
||||
typedef struct VkDebugMarkerObjectNameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportObjectTypeEXT objectType;
|
||||
uint64_t object;
|
||||
const char* pObjectName;
|
||||
} VkDebugMarkerObjectNameInfoEXT;
|
||||
|
||||
typedef struct VkDebugMarkerObjectTagInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportObjectTypeEXT objectType;
|
||||
uint64_t object;
|
||||
uint64_t tagName;
|
||||
size_t tagSize;
|
||||
const void* pTag;
|
||||
} VkDebugMarkerObjectTagInfoEXT;
|
||||
|
||||
typedef struct VkDebugMarkerMarkerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const char* pMarkerName;
|
||||
float color[4];
|
||||
} VkDebugMarkerMarkerInfoEXT;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, VkDebugMarkerObjectTagInfoEXT* pTagInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, VkDebugMarkerObjectNameInfoEXT* pNameInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT(
|
||||
VkDevice device,
|
||||
VkDebugMarkerObjectTagInfoEXT* pTagInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(
|
||||
VkDevice device,
|
||||
VkDebugMarkerObjectNameInfoEXT* pNameInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT(
|
||||
VkCommandBuffer commandBuffer);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
#endif
|
||||
|
||||
#define VK_AMD_gcn_shader 1
|
||||
#define VK_AMD_GCN_SHADER_SPEC_VERSION 1
|
||||
#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -167,6 +167,7 @@ VIDEO CONTEXT
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
#include "../gfx/common/vulkan_common.c"
|
||||
#include "../libretro-common/vulkan/vulkan_symbol_wrapper.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_KMS)
|
||||
|
356
libretro-common/include/vulkan/vulkan_symbol_wrapper.h
Normal file
356
libretro-common/include/vulkan/vulkan_symbol_wrapper.h
Normal file
@ -0,0 +1,356 @@
|
||||
|
||||
/* This header is autogenerated by vulkan_loader_generator.py */
|
||||
#ifndef VULKAN_SYMBOL_WRAPPER_H
|
||||
#define VULKAN_SYMBOL_WRAPPER_H
|
||||
#define VK_NO_PROTOTYPES
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern PFN_vkCreateInstance vulkan_symbol_wrapper_vkCreateInstance;
|
||||
#define vkCreateInstance vulkan_symbol_wrapper_vkCreateInstance
|
||||
extern PFN_vkEnumerateInstanceExtensionProperties vulkan_symbol_wrapper_vkEnumerateInstanceExtensionProperties;
|
||||
#define vkEnumerateInstanceExtensionProperties vulkan_symbol_wrapper_vkEnumerateInstanceExtensionProperties
|
||||
extern PFN_vkEnumerateInstanceLayerProperties vulkan_symbol_wrapper_vkEnumerateInstanceLayerProperties;
|
||||
#define vkEnumerateInstanceLayerProperties vulkan_symbol_wrapper_vkEnumerateInstanceLayerProperties
|
||||
extern PFN_vkDestroyInstance vulkan_symbol_wrapper_vkDestroyInstance;
|
||||
#define vkDestroyInstance vulkan_symbol_wrapper_vkDestroyInstance
|
||||
extern PFN_vkEnumeratePhysicalDevices vulkan_symbol_wrapper_vkEnumeratePhysicalDevices;
|
||||
#define vkEnumeratePhysicalDevices vulkan_symbol_wrapper_vkEnumeratePhysicalDevices
|
||||
extern PFN_vkGetPhysicalDeviceFeatures vulkan_symbol_wrapper_vkGetPhysicalDeviceFeatures;
|
||||
#define vkGetPhysicalDeviceFeatures vulkan_symbol_wrapper_vkGetPhysicalDeviceFeatures
|
||||
extern PFN_vkGetPhysicalDeviceFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceFormatProperties;
|
||||
#define vkGetPhysicalDeviceFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceFormatProperties
|
||||
extern PFN_vkGetPhysicalDeviceImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceImageFormatProperties;
|
||||
#define vkGetPhysicalDeviceImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceImageFormatProperties
|
||||
extern PFN_vkGetPhysicalDeviceProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceProperties;
|
||||
#define vkGetPhysicalDeviceProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceProperties
|
||||
extern PFN_vkGetPhysicalDeviceQueueFamilyProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceQueueFamilyProperties;
|
||||
#define vkGetPhysicalDeviceQueueFamilyProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceQueueFamilyProperties
|
||||
extern PFN_vkGetPhysicalDeviceMemoryProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceMemoryProperties;
|
||||
#define vkGetPhysicalDeviceMemoryProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceMemoryProperties
|
||||
extern PFN_vkGetDeviceProcAddr vulkan_symbol_wrapper_vkGetDeviceProcAddr;
|
||||
#define vkGetDeviceProcAddr vulkan_symbol_wrapper_vkGetDeviceProcAddr
|
||||
extern PFN_vkCreateDevice vulkan_symbol_wrapper_vkCreateDevice;
|
||||
#define vkCreateDevice vulkan_symbol_wrapper_vkCreateDevice
|
||||
extern PFN_vkDestroyDevice vulkan_symbol_wrapper_vkDestroyDevice;
|
||||
#define vkDestroyDevice vulkan_symbol_wrapper_vkDestroyDevice
|
||||
extern PFN_vkEnumerateDeviceExtensionProperties vulkan_symbol_wrapper_vkEnumerateDeviceExtensionProperties;
|
||||
#define vkEnumerateDeviceExtensionProperties vulkan_symbol_wrapper_vkEnumerateDeviceExtensionProperties
|
||||
extern PFN_vkEnumerateDeviceLayerProperties vulkan_symbol_wrapper_vkEnumerateDeviceLayerProperties;
|
||||
#define vkEnumerateDeviceLayerProperties vulkan_symbol_wrapper_vkEnumerateDeviceLayerProperties
|
||||
extern PFN_vkGetDeviceQueue vulkan_symbol_wrapper_vkGetDeviceQueue;
|
||||
#define vkGetDeviceQueue vulkan_symbol_wrapper_vkGetDeviceQueue
|
||||
extern PFN_vkQueueSubmit vulkan_symbol_wrapper_vkQueueSubmit;
|
||||
#define vkQueueSubmit vulkan_symbol_wrapper_vkQueueSubmit
|
||||
extern PFN_vkQueueWaitIdle vulkan_symbol_wrapper_vkQueueWaitIdle;
|
||||
#define vkQueueWaitIdle vulkan_symbol_wrapper_vkQueueWaitIdle
|
||||
extern PFN_vkDeviceWaitIdle vulkan_symbol_wrapper_vkDeviceWaitIdle;
|
||||
#define vkDeviceWaitIdle vulkan_symbol_wrapper_vkDeviceWaitIdle
|
||||
extern PFN_vkAllocateMemory vulkan_symbol_wrapper_vkAllocateMemory;
|
||||
#define vkAllocateMemory vulkan_symbol_wrapper_vkAllocateMemory
|
||||
extern PFN_vkFreeMemory vulkan_symbol_wrapper_vkFreeMemory;
|
||||
#define vkFreeMemory vulkan_symbol_wrapper_vkFreeMemory
|
||||
extern PFN_vkMapMemory vulkan_symbol_wrapper_vkMapMemory;
|
||||
#define vkMapMemory vulkan_symbol_wrapper_vkMapMemory
|
||||
extern PFN_vkUnmapMemory vulkan_symbol_wrapper_vkUnmapMemory;
|
||||
#define vkUnmapMemory vulkan_symbol_wrapper_vkUnmapMemory
|
||||
extern PFN_vkFlushMappedMemoryRanges vulkan_symbol_wrapper_vkFlushMappedMemoryRanges;
|
||||
#define vkFlushMappedMemoryRanges vulkan_symbol_wrapper_vkFlushMappedMemoryRanges
|
||||
extern PFN_vkInvalidateMappedMemoryRanges vulkan_symbol_wrapper_vkInvalidateMappedMemoryRanges;
|
||||
#define vkInvalidateMappedMemoryRanges vulkan_symbol_wrapper_vkInvalidateMappedMemoryRanges
|
||||
extern PFN_vkGetDeviceMemoryCommitment vulkan_symbol_wrapper_vkGetDeviceMemoryCommitment;
|
||||
#define vkGetDeviceMemoryCommitment vulkan_symbol_wrapper_vkGetDeviceMemoryCommitment
|
||||
extern PFN_vkBindBufferMemory vulkan_symbol_wrapper_vkBindBufferMemory;
|
||||
#define vkBindBufferMemory vulkan_symbol_wrapper_vkBindBufferMemory
|
||||
extern PFN_vkBindImageMemory vulkan_symbol_wrapper_vkBindImageMemory;
|
||||
#define vkBindImageMemory vulkan_symbol_wrapper_vkBindImageMemory
|
||||
extern PFN_vkGetBufferMemoryRequirements vulkan_symbol_wrapper_vkGetBufferMemoryRequirements;
|
||||
#define vkGetBufferMemoryRequirements vulkan_symbol_wrapper_vkGetBufferMemoryRequirements
|
||||
extern PFN_vkGetImageMemoryRequirements vulkan_symbol_wrapper_vkGetImageMemoryRequirements;
|
||||
#define vkGetImageMemoryRequirements vulkan_symbol_wrapper_vkGetImageMemoryRequirements
|
||||
extern PFN_vkGetImageSparseMemoryRequirements vulkan_symbol_wrapper_vkGetImageSparseMemoryRequirements;
|
||||
#define vkGetImageSparseMemoryRequirements vulkan_symbol_wrapper_vkGetImageSparseMemoryRequirements
|
||||
extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceSparseImageFormatProperties;
|
||||
#define vkGetPhysicalDeviceSparseImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceSparseImageFormatProperties
|
||||
extern PFN_vkQueueBindSparse vulkan_symbol_wrapper_vkQueueBindSparse;
|
||||
#define vkQueueBindSparse vulkan_symbol_wrapper_vkQueueBindSparse
|
||||
extern PFN_vkCreateFence vulkan_symbol_wrapper_vkCreateFence;
|
||||
#define vkCreateFence vulkan_symbol_wrapper_vkCreateFence
|
||||
extern PFN_vkDestroyFence vulkan_symbol_wrapper_vkDestroyFence;
|
||||
#define vkDestroyFence vulkan_symbol_wrapper_vkDestroyFence
|
||||
extern PFN_vkResetFences vulkan_symbol_wrapper_vkResetFences;
|
||||
#define vkResetFences vulkan_symbol_wrapper_vkResetFences
|
||||
extern PFN_vkGetFenceStatus vulkan_symbol_wrapper_vkGetFenceStatus;
|
||||
#define vkGetFenceStatus vulkan_symbol_wrapper_vkGetFenceStatus
|
||||
extern PFN_vkWaitForFences vulkan_symbol_wrapper_vkWaitForFences;
|
||||
#define vkWaitForFences vulkan_symbol_wrapper_vkWaitForFences
|
||||
extern PFN_vkCreateSemaphore vulkan_symbol_wrapper_vkCreateSemaphore;
|
||||
#define vkCreateSemaphore vulkan_symbol_wrapper_vkCreateSemaphore
|
||||
extern PFN_vkDestroySemaphore vulkan_symbol_wrapper_vkDestroySemaphore;
|
||||
#define vkDestroySemaphore vulkan_symbol_wrapper_vkDestroySemaphore
|
||||
extern PFN_vkCreateEvent vulkan_symbol_wrapper_vkCreateEvent;
|
||||
#define vkCreateEvent vulkan_symbol_wrapper_vkCreateEvent
|
||||
extern PFN_vkDestroyEvent vulkan_symbol_wrapper_vkDestroyEvent;
|
||||
#define vkDestroyEvent vulkan_symbol_wrapper_vkDestroyEvent
|
||||
extern PFN_vkGetEventStatus vulkan_symbol_wrapper_vkGetEventStatus;
|
||||
#define vkGetEventStatus vulkan_symbol_wrapper_vkGetEventStatus
|
||||
extern PFN_vkSetEvent vulkan_symbol_wrapper_vkSetEvent;
|
||||
#define vkSetEvent vulkan_symbol_wrapper_vkSetEvent
|
||||
extern PFN_vkResetEvent vulkan_symbol_wrapper_vkResetEvent;
|
||||
#define vkResetEvent vulkan_symbol_wrapper_vkResetEvent
|
||||
extern PFN_vkCreateQueryPool vulkan_symbol_wrapper_vkCreateQueryPool;
|
||||
#define vkCreateQueryPool vulkan_symbol_wrapper_vkCreateQueryPool
|
||||
extern PFN_vkDestroyQueryPool vulkan_symbol_wrapper_vkDestroyQueryPool;
|
||||
#define vkDestroyQueryPool vulkan_symbol_wrapper_vkDestroyQueryPool
|
||||
extern PFN_vkGetQueryPoolResults vulkan_symbol_wrapper_vkGetQueryPoolResults;
|
||||
#define vkGetQueryPoolResults vulkan_symbol_wrapper_vkGetQueryPoolResults
|
||||
extern PFN_vkCreateBuffer vulkan_symbol_wrapper_vkCreateBuffer;
|
||||
#define vkCreateBuffer vulkan_symbol_wrapper_vkCreateBuffer
|
||||
extern PFN_vkDestroyBuffer vulkan_symbol_wrapper_vkDestroyBuffer;
|
||||
#define vkDestroyBuffer vulkan_symbol_wrapper_vkDestroyBuffer
|
||||
extern PFN_vkCreateBufferView vulkan_symbol_wrapper_vkCreateBufferView;
|
||||
#define vkCreateBufferView vulkan_symbol_wrapper_vkCreateBufferView
|
||||
extern PFN_vkDestroyBufferView vulkan_symbol_wrapper_vkDestroyBufferView;
|
||||
#define vkDestroyBufferView vulkan_symbol_wrapper_vkDestroyBufferView
|
||||
extern PFN_vkCreateImage vulkan_symbol_wrapper_vkCreateImage;
|
||||
#define vkCreateImage vulkan_symbol_wrapper_vkCreateImage
|
||||
extern PFN_vkDestroyImage vulkan_symbol_wrapper_vkDestroyImage;
|
||||
#define vkDestroyImage vulkan_symbol_wrapper_vkDestroyImage
|
||||
extern PFN_vkGetImageSubresourceLayout vulkan_symbol_wrapper_vkGetImageSubresourceLayout;
|
||||
#define vkGetImageSubresourceLayout vulkan_symbol_wrapper_vkGetImageSubresourceLayout
|
||||
extern PFN_vkCreateImageView vulkan_symbol_wrapper_vkCreateImageView;
|
||||
#define vkCreateImageView vulkan_symbol_wrapper_vkCreateImageView
|
||||
extern PFN_vkDestroyImageView vulkan_symbol_wrapper_vkDestroyImageView;
|
||||
#define vkDestroyImageView vulkan_symbol_wrapper_vkDestroyImageView
|
||||
extern PFN_vkCreateShaderModule vulkan_symbol_wrapper_vkCreateShaderModule;
|
||||
#define vkCreateShaderModule vulkan_symbol_wrapper_vkCreateShaderModule
|
||||
extern PFN_vkDestroyShaderModule vulkan_symbol_wrapper_vkDestroyShaderModule;
|
||||
#define vkDestroyShaderModule vulkan_symbol_wrapper_vkDestroyShaderModule
|
||||
extern PFN_vkCreatePipelineCache vulkan_symbol_wrapper_vkCreatePipelineCache;
|
||||
#define vkCreatePipelineCache vulkan_symbol_wrapper_vkCreatePipelineCache
|
||||
extern PFN_vkDestroyPipelineCache vulkan_symbol_wrapper_vkDestroyPipelineCache;
|
||||
#define vkDestroyPipelineCache vulkan_symbol_wrapper_vkDestroyPipelineCache
|
||||
extern PFN_vkGetPipelineCacheData vulkan_symbol_wrapper_vkGetPipelineCacheData;
|
||||
#define vkGetPipelineCacheData vulkan_symbol_wrapper_vkGetPipelineCacheData
|
||||
extern PFN_vkMergePipelineCaches vulkan_symbol_wrapper_vkMergePipelineCaches;
|
||||
#define vkMergePipelineCaches vulkan_symbol_wrapper_vkMergePipelineCaches
|
||||
extern PFN_vkCreateGraphicsPipelines vulkan_symbol_wrapper_vkCreateGraphicsPipelines;
|
||||
#define vkCreateGraphicsPipelines vulkan_symbol_wrapper_vkCreateGraphicsPipelines
|
||||
extern PFN_vkCreateComputePipelines vulkan_symbol_wrapper_vkCreateComputePipelines;
|
||||
#define vkCreateComputePipelines vulkan_symbol_wrapper_vkCreateComputePipelines
|
||||
extern PFN_vkDestroyPipeline vulkan_symbol_wrapper_vkDestroyPipeline;
|
||||
#define vkDestroyPipeline vulkan_symbol_wrapper_vkDestroyPipeline
|
||||
extern PFN_vkCreatePipelineLayout vulkan_symbol_wrapper_vkCreatePipelineLayout;
|
||||
#define vkCreatePipelineLayout vulkan_symbol_wrapper_vkCreatePipelineLayout
|
||||
extern PFN_vkDestroyPipelineLayout vulkan_symbol_wrapper_vkDestroyPipelineLayout;
|
||||
#define vkDestroyPipelineLayout vulkan_symbol_wrapper_vkDestroyPipelineLayout
|
||||
extern PFN_vkCreateSampler vulkan_symbol_wrapper_vkCreateSampler;
|
||||
#define vkCreateSampler vulkan_symbol_wrapper_vkCreateSampler
|
||||
extern PFN_vkDestroySampler vulkan_symbol_wrapper_vkDestroySampler;
|
||||
#define vkDestroySampler vulkan_symbol_wrapper_vkDestroySampler
|
||||
extern PFN_vkCreateDescriptorSetLayout vulkan_symbol_wrapper_vkCreateDescriptorSetLayout;
|
||||
#define vkCreateDescriptorSetLayout vulkan_symbol_wrapper_vkCreateDescriptorSetLayout
|
||||
extern PFN_vkDestroyDescriptorSetLayout vulkan_symbol_wrapper_vkDestroyDescriptorSetLayout;
|
||||
#define vkDestroyDescriptorSetLayout vulkan_symbol_wrapper_vkDestroyDescriptorSetLayout
|
||||
extern PFN_vkCreateDescriptorPool vulkan_symbol_wrapper_vkCreateDescriptorPool;
|
||||
#define vkCreateDescriptorPool vulkan_symbol_wrapper_vkCreateDescriptorPool
|
||||
extern PFN_vkDestroyDescriptorPool vulkan_symbol_wrapper_vkDestroyDescriptorPool;
|
||||
#define vkDestroyDescriptorPool vulkan_symbol_wrapper_vkDestroyDescriptorPool
|
||||
extern PFN_vkResetDescriptorPool vulkan_symbol_wrapper_vkResetDescriptorPool;
|
||||
#define vkResetDescriptorPool vulkan_symbol_wrapper_vkResetDescriptorPool
|
||||
extern PFN_vkAllocateDescriptorSets vulkan_symbol_wrapper_vkAllocateDescriptorSets;
|
||||
#define vkAllocateDescriptorSets vulkan_symbol_wrapper_vkAllocateDescriptorSets
|
||||
extern PFN_vkFreeDescriptorSets vulkan_symbol_wrapper_vkFreeDescriptorSets;
|
||||
#define vkFreeDescriptorSets vulkan_symbol_wrapper_vkFreeDescriptorSets
|
||||
extern PFN_vkUpdateDescriptorSets vulkan_symbol_wrapper_vkUpdateDescriptorSets;
|
||||
#define vkUpdateDescriptorSets vulkan_symbol_wrapper_vkUpdateDescriptorSets
|
||||
extern PFN_vkCreateFramebuffer vulkan_symbol_wrapper_vkCreateFramebuffer;
|
||||
#define vkCreateFramebuffer vulkan_symbol_wrapper_vkCreateFramebuffer
|
||||
extern PFN_vkDestroyFramebuffer vulkan_symbol_wrapper_vkDestroyFramebuffer;
|
||||
#define vkDestroyFramebuffer vulkan_symbol_wrapper_vkDestroyFramebuffer
|
||||
extern PFN_vkCreateRenderPass vulkan_symbol_wrapper_vkCreateRenderPass;
|
||||
#define vkCreateRenderPass vulkan_symbol_wrapper_vkCreateRenderPass
|
||||
extern PFN_vkDestroyRenderPass vulkan_symbol_wrapper_vkDestroyRenderPass;
|
||||
#define vkDestroyRenderPass vulkan_symbol_wrapper_vkDestroyRenderPass
|
||||
extern PFN_vkGetRenderAreaGranularity vulkan_symbol_wrapper_vkGetRenderAreaGranularity;
|
||||
#define vkGetRenderAreaGranularity vulkan_symbol_wrapper_vkGetRenderAreaGranularity
|
||||
extern PFN_vkCreateCommandPool vulkan_symbol_wrapper_vkCreateCommandPool;
|
||||
#define vkCreateCommandPool vulkan_symbol_wrapper_vkCreateCommandPool
|
||||
extern PFN_vkDestroyCommandPool vulkan_symbol_wrapper_vkDestroyCommandPool;
|
||||
#define vkDestroyCommandPool vulkan_symbol_wrapper_vkDestroyCommandPool
|
||||
extern PFN_vkResetCommandPool vulkan_symbol_wrapper_vkResetCommandPool;
|
||||
#define vkResetCommandPool vulkan_symbol_wrapper_vkResetCommandPool
|
||||
extern PFN_vkAllocateCommandBuffers vulkan_symbol_wrapper_vkAllocateCommandBuffers;
|
||||
#define vkAllocateCommandBuffers vulkan_symbol_wrapper_vkAllocateCommandBuffers
|
||||
extern PFN_vkFreeCommandBuffers vulkan_symbol_wrapper_vkFreeCommandBuffers;
|
||||
#define vkFreeCommandBuffers vulkan_symbol_wrapper_vkFreeCommandBuffers
|
||||
extern PFN_vkBeginCommandBuffer vulkan_symbol_wrapper_vkBeginCommandBuffer;
|
||||
#define vkBeginCommandBuffer vulkan_symbol_wrapper_vkBeginCommandBuffer
|
||||
extern PFN_vkEndCommandBuffer vulkan_symbol_wrapper_vkEndCommandBuffer;
|
||||
#define vkEndCommandBuffer vulkan_symbol_wrapper_vkEndCommandBuffer
|
||||
extern PFN_vkResetCommandBuffer vulkan_symbol_wrapper_vkResetCommandBuffer;
|
||||
#define vkResetCommandBuffer vulkan_symbol_wrapper_vkResetCommandBuffer
|
||||
extern PFN_vkCmdBindPipeline vulkan_symbol_wrapper_vkCmdBindPipeline;
|
||||
#define vkCmdBindPipeline vulkan_symbol_wrapper_vkCmdBindPipeline
|
||||
extern PFN_vkCmdSetViewport vulkan_symbol_wrapper_vkCmdSetViewport;
|
||||
#define vkCmdSetViewport vulkan_symbol_wrapper_vkCmdSetViewport
|
||||
extern PFN_vkCmdSetScissor vulkan_symbol_wrapper_vkCmdSetScissor;
|
||||
#define vkCmdSetScissor vulkan_symbol_wrapper_vkCmdSetScissor
|
||||
extern PFN_vkCmdSetLineWidth vulkan_symbol_wrapper_vkCmdSetLineWidth;
|
||||
#define vkCmdSetLineWidth vulkan_symbol_wrapper_vkCmdSetLineWidth
|
||||
extern PFN_vkCmdSetDepthBias vulkan_symbol_wrapper_vkCmdSetDepthBias;
|
||||
#define vkCmdSetDepthBias vulkan_symbol_wrapper_vkCmdSetDepthBias
|
||||
extern PFN_vkCmdSetBlendConstants vulkan_symbol_wrapper_vkCmdSetBlendConstants;
|
||||
#define vkCmdSetBlendConstants vulkan_symbol_wrapper_vkCmdSetBlendConstants
|
||||
extern PFN_vkCmdSetDepthBounds vulkan_symbol_wrapper_vkCmdSetDepthBounds;
|
||||
#define vkCmdSetDepthBounds vulkan_symbol_wrapper_vkCmdSetDepthBounds
|
||||
extern PFN_vkCmdSetStencilCompareMask vulkan_symbol_wrapper_vkCmdSetStencilCompareMask;
|
||||
#define vkCmdSetStencilCompareMask vulkan_symbol_wrapper_vkCmdSetStencilCompareMask
|
||||
extern PFN_vkCmdSetStencilWriteMask vulkan_symbol_wrapper_vkCmdSetStencilWriteMask;
|
||||
#define vkCmdSetStencilWriteMask vulkan_symbol_wrapper_vkCmdSetStencilWriteMask
|
||||
extern PFN_vkCmdSetStencilReference vulkan_symbol_wrapper_vkCmdSetStencilReference;
|
||||
#define vkCmdSetStencilReference vulkan_symbol_wrapper_vkCmdSetStencilReference
|
||||
extern PFN_vkCmdBindDescriptorSets vulkan_symbol_wrapper_vkCmdBindDescriptorSets;
|
||||
#define vkCmdBindDescriptorSets vulkan_symbol_wrapper_vkCmdBindDescriptorSets
|
||||
extern PFN_vkCmdBindIndexBuffer vulkan_symbol_wrapper_vkCmdBindIndexBuffer;
|
||||
#define vkCmdBindIndexBuffer vulkan_symbol_wrapper_vkCmdBindIndexBuffer
|
||||
extern PFN_vkCmdBindVertexBuffers vulkan_symbol_wrapper_vkCmdBindVertexBuffers;
|
||||
#define vkCmdBindVertexBuffers vulkan_symbol_wrapper_vkCmdBindVertexBuffers
|
||||
extern PFN_vkCmdDraw vulkan_symbol_wrapper_vkCmdDraw;
|
||||
#define vkCmdDraw vulkan_symbol_wrapper_vkCmdDraw
|
||||
extern PFN_vkCmdDrawIndexed vulkan_symbol_wrapper_vkCmdDrawIndexed;
|
||||
#define vkCmdDrawIndexed vulkan_symbol_wrapper_vkCmdDrawIndexed
|
||||
extern PFN_vkCmdDrawIndirect vulkan_symbol_wrapper_vkCmdDrawIndirect;
|
||||
#define vkCmdDrawIndirect vulkan_symbol_wrapper_vkCmdDrawIndirect
|
||||
extern PFN_vkCmdDrawIndexedIndirect vulkan_symbol_wrapper_vkCmdDrawIndexedIndirect;
|
||||
#define vkCmdDrawIndexedIndirect vulkan_symbol_wrapper_vkCmdDrawIndexedIndirect
|
||||
extern PFN_vkCmdDispatch vulkan_symbol_wrapper_vkCmdDispatch;
|
||||
#define vkCmdDispatch vulkan_symbol_wrapper_vkCmdDispatch
|
||||
extern PFN_vkCmdDispatchIndirect vulkan_symbol_wrapper_vkCmdDispatchIndirect;
|
||||
#define vkCmdDispatchIndirect vulkan_symbol_wrapper_vkCmdDispatchIndirect
|
||||
extern PFN_vkCmdCopyBuffer vulkan_symbol_wrapper_vkCmdCopyBuffer;
|
||||
#define vkCmdCopyBuffer vulkan_symbol_wrapper_vkCmdCopyBuffer
|
||||
extern PFN_vkCmdCopyImage vulkan_symbol_wrapper_vkCmdCopyImage;
|
||||
#define vkCmdCopyImage vulkan_symbol_wrapper_vkCmdCopyImage
|
||||
extern PFN_vkCmdBlitImage vulkan_symbol_wrapper_vkCmdBlitImage;
|
||||
#define vkCmdBlitImage vulkan_symbol_wrapper_vkCmdBlitImage
|
||||
extern PFN_vkCmdCopyBufferToImage vulkan_symbol_wrapper_vkCmdCopyBufferToImage;
|
||||
#define vkCmdCopyBufferToImage vulkan_symbol_wrapper_vkCmdCopyBufferToImage
|
||||
extern PFN_vkCmdCopyImageToBuffer vulkan_symbol_wrapper_vkCmdCopyImageToBuffer;
|
||||
#define vkCmdCopyImageToBuffer vulkan_symbol_wrapper_vkCmdCopyImageToBuffer
|
||||
extern PFN_vkCmdUpdateBuffer vulkan_symbol_wrapper_vkCmdUpdateBuffer;
|
||||
#define vkCmdUpdateBuffer vulkan_symbol_wrapper_vkCmdUpdateBuffer
|
||||
extern PFN_vkCmdFillBuffer vulkan_symbol_wrapper_vkCmdFillBuffer;
|
||||
#define vkCmdFillBuffer vulkan_symbol_wrapper_vkCmdFillBuffer
|
||||
extern PFN_vkCmdClearColorImage vulkan_symbol_wrapper_vkCmdClearColorImage;
|
||||
#define vkCmdClearColorImage vulkan_symbol_wrapper_vkCmdClearColorImage
|
||||
extern PFN_vkCmdClearDepthStencilImage vulkan_symbol_wrapper_vkCmdClearDepthStencilImage;
|
||||
#define vkCmdClearDepthStencilImage vulkan_symbol_wrapper_vkCmdClearDepthStencilImage
|
||||
extern PFN_vkCmdClearAttachments vulkan_symbol_wrapper_vkCmdClearAttachments;
|
||||
#define vkCmdClearAttachments vulkan_symbol_wrapper_vkCmdClearAttachments
|
||||
extern PFN_vkCmdResolveImage vulkan_symbol_wrapper_vkCmdResolveImage;
|
||||
#define vkCmdResolveImage vulkan_symbol_wrapper_vkCmdResolveImage
|
||||
extern PFN_vkCmdSetEvent vulkan_symbol_wrapper_vkCmdSetEvent;
|
||||
#define vkCmdSetEvent vulkan_symbol_wrapper_vkCmdSetEvent
|
||||
extern PFN_vkCmdResetEvent vulkan_symbol_wrapper_vkCmdResetEvent;
|
||||
#define vkCmdResetEvent vulkan_symbol_wrapper_vkCmdResetEvent
|
||||
extern PFN_vkCmdWaitEvents vulkan_symbol_wrapper_vkCmdWaitEvents;
|
||||
#define vkCmdWaitEvents vulkan_symbol_wrapper_vkCmdWaitEvents
|
||||
extern PFN_vkCmdPipelineBarrier vulkan_symbol_wrapper_vkCmdPipelineBarrier;
|
||||
#define vkCmdPipelineBarrier vulkan_symbol_wrapper_vkCmdPipelineBarrier
|
||||
extern PFN_vkCmdBeginQuery vulkan_symbol_wrapper_vkCmdBeginQuery;
|
||||
#define vkCmdBeginQuery vulkan_symbol_wrapper_vkCmdBeginQuery
|
||||
extern PFN_vkCmdEndQuery vulkan_symbol_wrapper_vkCmdEndQuery;
|
||||
#define vkCmdEndQuery vulkan_symbol_wrapper_vkCmdEndQuery
|
||||
extern PFN_vkCmdResetQueryPool vulkan_symbol_wrapper_vkCmdResetQueryPool;
|
||||
#define vkCmdResetQueryPool vulkan_symbol_wrapper_vkCmdResetQueryPool
|
||||
extern PFN_vkCmdWriteTimestamp vulkan_symbol_wrapper_vkCmdWriteTimestamp;
|
||||
#define vkCmdWriteTimestamp vulkan_symbol_wrapper_vkCmdWriteTimestamp
|
||||
extern PFN_vkCmdCopyQueryPoolResults vulkan_symbol_wrapper_vkCmdCopyQueryPoolResults;
|
||||
#define vkCmdCopyQueryPoolResults vulkan_symbol_wrapper_vkCmdCopyQueryPoolResults
|
||||
extern PFN_vkCmdPushConstants vulkan_symbol_wrapper_vkCmdPushConstants;
|
||||
#define vkCmdPushConstants vulkan_symbol_wrapper_vkCmdPushConstants
|
||||
extern PFN_vkCmdBeginRenderPass vulkan_symbol_wrapper_vkCmdBeginRenderPass;
|
||||
#define vkCmdBeginRenderPass vulkan_symbol_wrapper_vkCmdBeginRenderPass
|
||||
extern PFN_vkCmdNextSubpass vulkan_symbol_wrapper_vkCmdNextSubpass;
|
||||
#define vkCmdNextSubpass vulkan_symbol_wrapper_vkCmdNextSubpass
|
||||
extern PFN_vkCmdEndRenderPass vulkan_symbol_wrapper_vkCmdEndRenderPass;
|
||||
#define vkCmdEndRenderPass vulkan_symbol_wrapper_vkCmdEndRenderPass
|
||||
extern PFN_vkCmdExecuteCommands vulkan_symbol_wrapper_vkCmdExecuteCommands;
|
||||
#define vkCmdExecuteCommands vulkan_symbol_wrapper_vkCmdExecuteCommands
|
||||
extern PFN_vkDestroySurfaceKHR vulkan_symbol_wrapper_vkDestroySurfaceKHR;
|
||||
#define vkDestroySurfaceKHR vulkan_symbol_wrapper_vkDestroySurfaceKHR
|
||||
extern PFN_vkGetPhysicalDeviceSurfaceSupportKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceSupportKHR;
|
||||
#define vkGetPhysicalDeviceSurfaceSupportKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceSupportKHR
|
||||
extern PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
#define vkGetPhysicalDeviceSurfaceCapabilitiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
|
||||
extern PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceFormatsKHR;
|
||||
#define vkGetPhysicalDeviceSurfaceFormatsKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceFormatsKHR
|
||||
extern PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfacePresentModesKHR;
|
||||
#define vkGetPhysicalDeviceSurfacePresentModesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfacePresentModesKHR
|
||||
extern PFN_vkCreateSwapchainKHR vulkan_symbol_wrapper_vkCreateSwapchainKHR;
|
||||
#define vkCreateSwapchainKHR vulkan_symbol_wrapper_vkCreateSwapchainKHR
|
||||
extern PFN_vkDestroySwapchainKHR vulkan_symbol_wrapper_vkDestroySwapchainKHR;
|
||||
#define vkDestroySwapchainKHR vulkan_symbol_wrapper_vkDestroySwapchainKHR
|
||||
extern PFN_vkGetSwapchainImagesKHR vulkan_symbol_wrapper_vkGetSwapchainImagesKHR;
|
||||
#define vkGetSwapchainImagesKHR vulkan_symbol_wrapper_vkGetSwapchainImagesKHR
|
||||
extern PFN_vkAcquireNextImageKHR vulkan_symbol_wrapper_vkAcquireNextImageKHR;
|
||||
#define vkAcquireNextImageKHR vulkan_symbol_wrapper_vkAcquireNextImageKHR
|
||||
extern PFN_vkQueuePresentKHR vulkan_symbol_wrapper_vkQueuePresentKHR;
|
||||
#define vkQueuePresentKHR vulkan_symbol_wrapper_vkQueuePresentKHR
|
||||
extern PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPropertiesKHR;
|
||||
#define vkGetPhysicalDeviceDisplayPropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPropertiesKHR
|
||||
extern PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPlanePropertiesKHR;
|
||||
#define vkGetPhysicalDeviceDisplayPlanePropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPlanePropertiesKHR
|
||||
extern PFN_vkGetDisplayPlaneSupportedDisplaysKHR vulkan_symbol_wrapper_vkGetDisplayPlaneSupportedDisplaysKHR;
|
||||
#define vkGetDisplayPlaneSupportedDisplaysKHR vulkan_symbol_wrapper_vkGetDisplayPlaneSupportedDisplaysKHR
|
||||
extern PFN_vkGetDisplayModePropertiesKHR vulkan_symbol_wrapper_vkGetDisplayModePropertiesKHR;
|
||||
#define vkGetDisplayModePropertiesKHR vulkan_symbol_wrapper_vkGetDisplayModePropertiesKHR
|
||||
extern PFN_vkCreateDisplayModeKHR vulkan_symbol_wrapper_vkCreateDisplayModeKHR;
|
||||
#define vkCreateDisplayModeKHR vulkan_symbol_wrapper_vkCreateDisplayModeKHR
|
||||
extern PFN_vkGetDisplayPlaneCapabilitiesKHR vulkan_symbol_wrapper_vkGetDisplayPlaneCapabilitiesKHR;
|
||||
#define vkGetDisplayPlaneCapabilitiesKHR vulkan_symbol_wrapper_vkGetDisplayPlaneCapabilitiesKHR
|
||||
extern PFN_vkCreateDisplayPlaneSurfaceKHR vulkan_symbol_wrapper_vkCreateDisplayPlaneSurfaceKHR;
|
||||
#define vkCreateDisplayPlaneSurfaceKHR vulkan_symbol_wrapper_vkCreateDisplayPlaneSurfaceKHR
|
||||
extern PFN_vkCreateSharedSwapchainsKHR vulkan_symbol_wrapper_vkCreateSharedSwapchainsKHR;
|
||||
#define vkCreateSharedSwapchainsKHR vulkan_symbol_wrapper_vkCreateSharedSwapchainsKHR
|
||||
extern PFN_vkCreateDebugReportCallbackEXT vulkan_symbol_wrapper_vkCreateDebugReportCallbackEXT;
|
||||
#define vkCreateDebugReportCallbackEXT vulkan_symbol_wrapper_vkCreateDebugReportCallbackEXT
|
||||
extern PFN_vkDestroyDebugReportCallbackEXT vulkan_symbol_wrapper_vkDestroyDebugReportCallbackEXT;
|
||||
#define vkDestroyDebugReportCallbackEXT vulkan_symbol_wrapper_vkDestroyDebugReportCallbackEXT
|
||||
extern PFN_vkDebugReportMessageEXT vulkan_symbol_wrapper_vkDebugReportMessageEXT;
|
||||
#define vkDebugReportMessageEXT vulkan_symbol_wrapper_vkDebugReportMessageEXT
|
||||
extern PFN_vkDebugMarkerSetObjectTagEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectTagEXT;
|
||||
#define vkDebugMarkerSetObjectTagEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectTagEXT
|
||||
extern PFN_vkDebugMarkerSetObjectNameEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectNameEXT;
|
||||
#define vkDebugMarkerSetObjectNameEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectNameEXT
|
||||
extern PFN_vkCmdDebugMarkerBeginEXT vulkan_symbol_wrapper_vkCmdDebugMarkerBeginEXT;
|
||||
#define vkCmdDebugMarkerBeginEXT vulkan_symbol_wrapper_vkCmdDebugMarkerBeginEXT
|
||||
extern PFN_vkCmdDebugMarkerEndEXT vulkan_symbol_wrapper_vkCmdDebugMarkerEndEXT;
|
||||
#define vkCmdDebugMarkerEndEXT vulkan_symbol_wrapper_vkCmdDebugMarkerEndEXT
|
||||
extern PFN_vkCmdDebugMarkerInsertEXT vulkan_symbol_wrapper_vkCmdDebugMarkerInsertEXT;
|
||||
#define vkCmdDebugMarkerInsertEXT vulkan_symbol_wrapper_vkCmdDebugMarkerInsertEXT
|
||||
|
||||
void vulkan_symbol_wrapper_init(PFN_vkGetInstanceProcAddr get_instance_proc_addr);
|
||||
PFN_vkGetInstanceProcAddr vulkan_symbol_wrapper_instance_proc_addr(void);
|
||||
VkBool32 vulkan_symbol_wrapper_load_global_symbols(void);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_instance_symbols(VkInstance instance);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_symbols(VkInstance instance);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_device_symbols(VkDevice device);
|
||||
VkBool32 vulkan_symbol_wrapper_load_instance_symbol(VkInstance instance, const char *name, PFN_vkVoidFunction *ppSymbol);
|
||||
VkBool32 vulkan_symbol_wrapper_load_device_symbol(VkDevice device, const char *name, PFN_vkVoidFunction *ppSymbol);
|
||||
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, name, pfn) vulkan_symbol_wrapper_load_instance_symbol(instance, name, (PFN_vkVoidFunction*) &(pfn))
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_EXTENSION_SYMBOL(instance, name) vulkan_symbol_wrapper_load_instance_symbol(instance, #name, (PFN_vkVoidFunction*) & name)
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, name, pfn) vulkan_symbol_wrapper_load_device_symbol(device, name, (PFN_vkVoidFunction*) &(pfn))
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_EXTENSION_SYMBOL(device, name) vulkan_symbol_wrapper_load_device_symbol(device, #name, (PFN_vkVoidFunction*) & name)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
479
libretro-common/vulkan/vulkan_symbol_wrapper.c
Normal file
479
libretro-common/vulkan/vulkan_symbol_wrapper.c
Normal file
@ -0,0 +1,479 @@
|
||||
|
||||
/* This header is autogenerated by vulkan_loader_generator.py */
|
||||
#include "../include/vulkan/vulkan_symbol_wrapper.h"
|
||||
|
||||
PFN_vkCreateInstance vulkan_symbol_wrapper_vkCreateInstance;
|
||||
PFN_vkEnumerateInstanceExtensionProperties vulkan_symbol_wrapper_vkEnumerateInstanceExtensionProperties;
|
||||
PFN_vkEnumerateInstanceLayerProperties vulkan_symbol_wrapper_vkEnumerateInstanceLayerProperties;
|
||||
PFN_vkDestroyInstance vulkan_symbol_wrapper_vkDestroyInstance;
|
||||
PFN_vkEnumeratePhysicalDevices vulkan_symbol_wrapper_vkEnumeratePhysicalDevices;
|
||||
PFN_vkGetPhysicalDeviceFeatures vulkan_symbol_wrapper_vkGetPhysicalDeviceFeatures;
|
||||
PFN_vkGetPhysicalDeviceFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceImageFormatProperties;
|
||||
PFN_vkGetPhysicalDeviceProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceQueueFamilyProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceMemoryProperties;
|
||||
PFN_vkGetDeviceProcAddr vulkan_symbol_wrapper_vkGetDeviceProcAddr;
|
||||
PFN_vkCreateDevice vulkan_symbol_wrapper_vkCreateDevice;
|
||||
PFN_vkDestroyDevice vulkan_symbol_wrapper_vkDestroyDevice;
|
||||
PFN_vkEnumerateDeviceExtensionProperties vulkan_symbol_wrapper_vkEnumerateDeviceExtensionProperties;
|
||||
PFN_vkEnumerateDeviceLayerProperties vulkan_symbol_wrapper_vkEnumerateDeviceLayerProperties;
|
||||
PFN_vkGetDeviceQueue vulkan_symbol_wrapper_vkGetDeviceQueue;
|
||||
PFN_vkQueueSubmit vulkan_symbol_wrapper_vkQueueSubmit;
|
||||
PFN_vkQueueWaitIdle vulkan_symbol_wrapper_vkQueueWaitIdle;
|
||||
PFN_vkDeviceWaitIdle vulkan_symbol_wrapper_vkDeviceWaitIdle;
|
||||
PFN_vkAllocateMemory vulkan_symbol_wrapper_vkAllocateMemory;
|
||||
PFN_vkFreeMemory vulkan_symbol_wrapper_vkFreeMemory;
|
||||
PFN_vkMapMemory vulkan_symbol_wrapper_vkMapMemory;
|
||||
PFN_vkUnmapMemory vulkan_symbol_wrapper_vkUnmapMemory;
|
||||
PFN_vkFlushMappedMemoryRanges vulkan_symbol_wrapper_vkFlushMappedMemoryRanges;
|
||||
PFN_vkInvalidateMappedMemoryRanges vulkan_symbol_wrapper_vkInvalidateMappedMemoryRanges;
|
||||
PFN_vkGetDeviceMemoryCommitment vulkan_symbol_wrapper_vkGetDeviceMemoryCommitment;
|
||||
PFN_vkBindBufferMemory vulkan_symbol_wrapper_vkBindBufferMemory;
|
||||
PFN_vkBindImageMemory vulkan_symbol_wrapper_vkBindImageMemory;
|
||||
PFN_vkGetBufferMemoryRequirements vulkan_symbol_wrapper_vkGetBufferMemoryRequirements;
|
||||
PFN_vkGetImageMemoryRequirements vulkan_symbol_wrapper_vkGetImageMemoryRequirements;
|
||||
PFN_vkGetImageSparseMemoryRequirements vulkan_symbol_wrapper_vkGetImageSparseMemoryRequirements;
|
||||
PFN_vkGetPhysicalDeviceSparseImageFormatProperties vulkan_symbol_wrapper_vkGetPhysicalDeviceSparseImageFormatProperties;
|
||||
PFN_vkQueueBindSparse vulkan_symbol_wrapper_vkQueueBindSparse;
|
||||
PFN_vkCreateFence vulkan_symbol_wrapper_vkCreateFence;
|
||||
PFN_vkDestroyFence vulkan_symbol_wrapper_vkDestroyFence;
|
||||
PFN_vkResetFences vulkan_symbol_wrapper_vkResetFences;
|
||||
PFN_vkGetFenceStatus vulkan_symbol_wrapper_vkGetFenceStatus;
|
||||
PFN_vkWaitForFences vulkan_symbol_wrapper_vkWaitForFences;
|
||||
PFN_vkCreateSemaphore vulkan_symbol_wrapper_vkCreateSemaphore;
|
||||
PFN_vkDestroySemaphore vulkan_symbol_wrapper_vkDestroySemaphore;
|
||||
PFN_vkCreateEvent vulkan_symbol_wrapper_vkCreateEvent;
|
||||
PFN_vkDestroyEvent vulkan_symbol_wrapper_vkDestroyEvent;
|
||||
PFN_vkGetEventStatus vulkan_symbol_wrapper_vkGetEventStatus;
|
||||
PFN_vkSetEvent vulkan_symbol_wrapper_vkSetEvent;
|
||||
PFN_vkResetEvent vulkan_symbol_wrapper_vkResetEvent;
|
||||
PFN_vkCreateQueryPool vulkan_symbol_wrapper_vkCreateQueryPool;
|
||||
PFN_vkDestroyQueryPool vulkan_symbol_wrapper_vkDestroyQueryPool;
|
||||
PFN_vkGetQueryPoolResults vulkan_symbol_wrapper_vkGetQueryPoolResults;
|
||||
PFN_vkCreateBuffer vulkan_symbol_wrapper_vkCreateBuffer;
|
||||
PFN_vkDestroyBuffer vulkan_symbol_wrapper_vkDestroyBuffer;
|
||||
PFN_vkCreateBufferView vulkan_symbol_wrapper_vkCreateBufferView;
|
||||
PFN_vkDestroyBufferView vulkan_symbol_wrapper_vkDestroyBufferView;
|
||||
PFN_vkCreateImage vulkan_symbol_wrapper_vkCreateImage;
|
||||
PFN_vkDestroyImage vulkan_symbol_wrapper_vkDestroyImage;
|
||||
PFN_vkGetImageSubresourceLayout vulkan_symbol_wrapper_vkGetImageSubresourceLayout;
|
||||
PFN_vkCreateImageView vulkan_symbol_wrapper_vkCreateImageView;
|
||||
PFN_vkDestroyImageView vulkan_symbol_wrapper_vkDestroyImageView;
|
||||
PFN_vkCreateShaderModule vulkan_symbol_wrapper_vkCreateShaderModule;
|
||||
PFN_vkDestroyShaderModule vulkan_symbol_wrapper_vkDestroyShaderModule;
|
||||
PFN_vkCreatePipelineCache vulkan_symbol_wrapper_vkCreatePipelineCache;
|
||||
PFN_vkDestroyPipelineCache vulkan_symbol_wrapper_vkDestroyPipelineCache;
|
||||
PFN_vkGetPipelineCacheData vulkan_symbol_wrapper_vkGetPipelineCacheData;
|
||||
PFN_vkMergePipelineCaches vulkan_symbol_wrapper_vkMergePipelineCaches;
|
||||
PFN_vkCreateGraphicsPipelines vulkan_symbol_wrapper_vkCreateGraphicsPipelines;
|
||||
PFN_vkCreateComputePipelines vulkan_symbol_wrapper_vkCreateComputePipelines;
|
||||
PFN_vkDestroyPipeline vulkan_symbol_wrapper_vkDestroyPipeline;
|
||||
PFN_vkCreatePipelineLayout vulkan_symbol_wrapper_vkCreatePipelineLayout;
|
||||
PFN_vkDestroyPipelineLayout vulkan_symbol_wrapper_vkDestroyPipelineLayout;
|
||||
PFN_vkCreateSampler vulkan_symbol_wrapper_vkCreateSampler;
|
||||
PFN_vkDestroySampler vulkan_symbol_wrapper_vkDestroySampler;
|
||||
PFN_vkCreateDescriptorSetLayout vulkan_symbol_wrapper_vkCreateDescriptorSetLayout;
|
||||
PFN_vkDestroyDescriptorSetLayout vulkan_symbol_wrapper_vkDestroyDescriptorSetLayout;
|
||||
PFN_vkCreateDescriptorPool vulkan_symbol_wrapper_vkCreateDescriptorPool;
|
||||
PFN_vkDestroyDescriptorPool vulkan_symbol_wrapper_vkDestroyDescriptorPool;
|
||||
PFN_vkResetDescriptorPool vulkan_symbol_wrapper_vkResetDescriptorPool;
|
||||
PFN_vkAllocateDescriptorSets vulkan_symbol_wrapper_vkAllocateDescriptorSets;
|
||||
PFN_vkFreeDescriptorSets vulkan_symbol_wrapper_vkFreeDescriptorSets;
|
||||
PFN_vkUpdateDescriptorSets vulkan_symbol_wrapper_vkUpdateDescriptorSets;
|
||||
PFN_vkCreateFramebuffer vulkan_symbol_wrapper_vkCreateFramebuffer;
|
||||
PFN_vkDestroyFramebuffer vulkan_symbol_wrapper_vkDestroyFramebuffer;
|
||||
PFN_vkCreateRenderPass vulkan_symbol_wrapper_vkCreateRenderPass;
|
||||
PFN_vkDestroyRenderPass vulkan_symbol_wrapper_vkDestroyRenderPass;
|
||||
PFN_vkGetRenderAreaGranularity vulkan_symbol_wrapper_vkGetRenderAreaGranularity;
|
||||
PFN_vkCreateCommandPool vulkan_symbol_wrapper_vkCreateCommandPool;
|
||||
PFN_vkDestroyCommandPool vulkan_symbol_wrapper_vkDestroyCommandPool;
|
||||
PFN_vkResetCommandPool vulkan_symbol_wrapper_vkResetCommandPool;
|
||||
PFN_vkAllocateCommandBuffers vulkan_symbol_wrapper_vkAllocateCommandBuffers;
|
||||
PFN_vkFreeCommandBuffers vulkan_symbol_wrapper_vkFreeCommandBuffers;
|
||||
PFN_vkBeginCommandBuffer vulkan_symbol_wrapper_vkBeginCommandBuffer;
|
||||
PFN_vkEndCommandBuffer vulkan_symbol_wrapper_vkEndCommandBuffer;
|
||||
PFN_vkResetCommandBuffer vulkan_symbol_wrapper_vkResetCommandBuffer;
|
||||
PFN_vkCmdBindPipeline vulkan_symbol_wrapper_vkCmdBindPipeline;
|
||||
PFN_vkCmdSetViewport vulkan_symbol_wrapper_vkCmdSetViewport;
|
||||
PFN_vkCmdSetScissor vulkan_symbol_wrapper_vkCmdSetScissor;
|
||||
PFN_vkCmdSetLineWidth vulkan_symbol_wrapper_vkCmdSetLineWidth;
|
||||
PFN_vkCmdSetDepthBias vulkan_symbol_wrapper_vkCmdSetDepthBias;
|
||||
PFN_vkCmdSetBlendConstants vulkan_symbol_wrapper_vkCmdSetBlendConstants;
|
||||
PFN_vkCmdSetDepthBounds vulkan_symbol_wrapper_vkCmdSetDepthBounds;
|
||||
PFN_vkCmdSetStencilCompareMask vulkan_symbol_wrapper_vkCmdSetStencilCompareMask;
|
||||
PFN_vkCmdSetStencilWriteMask vulkan_symbol_wrapper_vkCmdSetStencilWriteMask;
|
||||
PFN_vkCmdSetStencilReference vulkan_symbol_wrapper_vkCmdSetStencilReference;
|
||||
PFN_vkCmdBindDescriptorSets vulkan_symbol_wrapper_vkCmdBindDescriptorSets;
|
||||
PFN_vkCmdBindIndexBuffer vulkan_symbol_wrapper_vkCmdBindIndexBuffer;
|
||||
PFN_vkCmdBindVertexBuffers vulkan_symbol_wrapper_vkCmdBindVertexBuffers;
|
||||
PFN_vkCmdDraw vulkan_symbol_wrapper_vkCmdDraw;
|
||||
PFN_vkCmdDrawIndexed vulkan_symbol_wrapper_vkCmdDrawIndexed;
|
||||
PFN_vkCmdDrawIndirect vulkan_symbol_wrapper_vkCmdDrawIndirect;
|
||||
PFN_vkCmdDrawIndexedIndirect vulkan_symbol_wrapper_vkCmdDrawIndexedIndirect;
|
||||
PFN_vkCmdDispatch vulkan_symbol_wrapper_vkCmdDispatch;
|
||||
PFN_vkCmdDispatchIndirect vulkan_symbol_wrapper_vkCmdDispatchIndirect;
|
||||
PFN_vkCmdCopyBuffer vulkan_symbol_wrapper_vkCmdCopyBuffer;
|
||||
PFN_vkCmdCopyImage vulkan_symbol_wrapper_vkCmdCopyImage;
|
||||
PFN_vkCmdBlitImage vulkan_symbol_wrapper_vkCmdBlitImage;
|
||||
PFN_vkCmdCopyBufferToImage vulkan_symbol_wrapper_vkCmdCopyBufferToImage;
|
||||
PFN_vkCmdCopyImageToBuffer vulkan_symbol_wrapper_vkCmdCopyImageToBuffer;
|
||||
PFN_vkCmdUpdateBuffer vulkan_symbol_wrapper_vkCmdUpdateBuffer;
|
||||
PFN_vkCmdFillBuffer vulkan_symbol_wrapper_vkCmdFillBuffer;
|
||||
PFN_vkCmdClearColorImage vulkan_symbol_wrapper_vkCmdClearColorImage;
|
||||
PFN_vkCmdClearDepthStencilImage vulkan_symbol_wrapper_vkCmdClearDepthStencilImage;
|
||||
PFN_vkCmdClearAttachments vulkan_symbol_wrapper_vkCmdClearAttachments;
|
||||
PFN_vkCmdResolveImage vulkan_symbol_wrapper_vkCmdResolveImage;
|
||||
PFN_vkCmdSetEvent vulkan_symbol_wrapper_vkCmdSetEvent;
|
||||
PFN_vkCmdResetEvent vulkan_symbol_wrapper_vkCmdResetEvent;
|
||||
PFN_vkCmdWaitEvents vulkan_symbol_wrapper_vkCmdWaitEvents;
|
||||
PFN_vkCmdPipelineBarrier vulkan_symbol_wrapper_vkCmdPipelineBarrier;
|
||||
PFN_vkCmdBeginQuery vulkan_symbol_wrapper_vkCmdBeginQuery;
|
||||
PFN_vkCmdEndQuery vulkan_symbol_wrapper_vkCmdEndQuery;
|
||||
PFN_vkCmdResetQueryPool vulkan_symbol_wrapper_vkCmdResetQueryPool;
|
||||
PFN_vkCmdWriteTimestamp vulkan_symbol_wrapper_vkCmdWriteTimestamp;
|
||||
PFN_vkCmdCopyQueryPoolResults vulkan_symbol_wrapper_vkCmdCopyQueryPoolResults;
|
||||
PFN_vkCmdPushConstants vulkan_symbol_wrapper_vkCmdPushConstants;
|
||||
PFN_vkCmdBeginRenderPass vulkan_symbol_wrapper_vkCmdBeginRenderPass;
|
||||
PFN_vkCmdNextSubpass vulkan_symbol_wrapper_vkCmdNextSubpass;
|
||||
PFN_vkCmdEndRenderPass vulkan_symbol_wrapper_vkCmdEndRenderPass;
|
||||
PFN_vkCmdExecuteCommands vulkan_symbol_wrapper_vkCmdExecuteCommands;
|
||||
PFN_vkDestroySurfaceKHR vulkan_symbol_wrapper_vkDestroySurfaceKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceSupportKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfaceFormatsKHR;
|
||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceSurfacePresentModesKHR;
|
||||
PFN_vkCreateSwapchainKHR vulkan_symbol_wrapper_vkCreateSwapchainKHR;
|
||||
PFN_vkDestroySwapchainKHR vulkan_symbol_wrapper_vkDestroySwapchainKHR;
|
||||
PFN_vkGetSwapchainImagesKHR vulkan_symbol_wrapper_vkGetSwapchainImagesKHR;
|
||||
PFN_vkAcquireNextImageKHR vulkan_symbol_wrapper_vkAcquireNextImageKHR;
|
||||
PFN_vkQueuePresentKHR vulkan_symbol_wrapper_vkQueuePresentKHR;
|
||||
PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPropertiesKHR;
|
||||
PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vulkan_symbol_wrapper_vkGetPhysicalDeviceDisplayPlanePropertiesKHR;
|
||||
PFN_vkGetDisplayPlaneSupportedDisplaysKHR vulkan_symbol_wrapper_vkGetDisplayPlaneSupportedDisplaysKHR;
|
||||
PFN_vkGetDisplayModePropertiesKHR vulkan_symbol_wrapper_vkGetDisplayModePropertiesKHR;
|
||||
PFN_vkCreateDisplayModeKHR vulkan_symbol_wrapper_vkCreateDisplayModeKHR;
|
||||
PFN_vkGetDisplayPlaneCapabilitiesKHR vulkan_symbol_wrapper_vkGetDisplayPlaneCapabilitiesKHR;
|
||||
PFN_vkCreateDisplayPlaneSurfaceKHR vulkan_symbol_wrapper_vkCreateDisplayPlaneSurfaceKHR;
|
||||
PFN_vkCreateSharedSwapchainsKHR vulkan_symbol_wrapper_vkCreateSharedSwapchainsKHR;
|
||||
PFN_vkCreateDebugReportCallbackEXT vulkan_symbol_wrapper_vkCreateDebugReportCallbackEXT;
|
||||
PFN_vkDestroyDebugReportCallbackEXT vulkan_symbol_wrapper_vkDestroyDebugReportCallbackEXT;
|
||||
PFN_vkDebugReportMessageEXT vulkan_symbol_wrapper_vkDebugReportMessageEXT;
|
||||
PFN_vkDebugMarkerSetObjectTagEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectTagEXT;
|
||||
PFN_vkDebugMarkerSetObjectNameEXT vulkan_symbol_wrapper_vkDebugMarkerSetObjectNameEXT;
|
||||
PFN_vkCmdDebugMarkerBeginEXT vulkan_symbol_wrapper_vkCmdDebugMarkerBeginEXT;
|
||||
PFN_vkCmdDebugMarkerEndEXT vulkan_symbol_wrapper_vkCmdDebugMarkerEndEXT;
|
||||
PFN_vkCmdDebugMarkerInsertEXT vulkan_symbol_wrapper_vkCmdDebugMarkerInsertEXT;
|
||||
|
||||
static PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||
void vulkan_symbol_wrapper_init(PFN_vkGetInstanceProcAddr get_instance_proc_addr)
|
||||
{
|
||||
GetInstanceProcAddr = get_instance_proc_addr;
|
||||
}
|
||||
|
||||
PFN_vkGetInstanceProcAddr vulkan_symbol_wrapper_instance_proc_addr(void)
|
||||
{
|
||||
return GetInstanceProcAddr;
|
||||
}
|
||||
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_instance_symbol(VkInstance instance, const char *name, PFN_vkVoidFunction *ppSymbol)
|
||||
{
|
||||
*ppSymbol = GetInstanceProcAddr(instance, name);
|
||||
return *ppSymbol != NULL;
|
||||
}
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_device_symbol(VkDevice device, const char *name, PFN_vkVoidFunction *ppSymbol)
|
||||
{
|
||||
*ppSymbol = vkGetDeviceProcAddr(device, name);
|
||||
return *ppSymbol != NULL;
|
||||
}
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_global_symbols(void)
|
||||
{
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(NULL, "vkCreateInstance", vkCreateInstance)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(NULL, "vkEnumerateInstanceExtensionProperties", vkEnumerateInstanceExtensionProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(NULL, "vkEnumerateInstanceLayerProperties", vkEnumerateInstanceLayerProperties)) return VK_FALSE;
|
||||
return VK_TRUE;
|
||||
}
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_symbols(VkInstance instance)
|
||||
{
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyInstance", vkDestroyInstance)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumeratePhysicalDevices", vkEnumeratePhysicalDevices)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceFeatures", vkGetPhysicalDeviceFeatures)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceFormatProperties", vkGetPhysicalDeviceFormatProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceImageFormatProperties", vkGetPhysicalDeviceImageFormatProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceProperties", vkGetPhysicalDeviceProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceQueueFamilyProperties", vkGetPhysicalDeviceQueueFamilyProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceMemoryProperties", vkGetPhysicalDeviceMemoryProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetDeviceProcAddr", vkGetDeviceProcAddr)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateDevice", vkCreateDevice)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyDevice", vkDestroyDevice)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumerateDeviceExtensionProperties", vkEnumerateDeviceExtensionProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumerateDeviceLayerProperties", vkEnumerateDeviceLayerProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetDeviceQueue", vkGetDeviceQueue)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkQueueSubmit", vkQueueSubmit)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkQueueWaitIdle", vkQueueWaitIdle)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDeviceWaitIdle", vkDeviceWaitIdle)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkAllocateMemory", vkAllocateMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkFreeMemory", vkFreeMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkMapMemory", vkMapMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkUnmapMemory", vkUnmapMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkFlushMappedMemoryRanges", vkFlushMappedMemoryRanges)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkInvalidateMappedMemoryRanges", vkInvalidateMappedMemoryRanges)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetDeviceMemoryCommitment", vkGetDeviceMemoryCommitment)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkBindBufferMemory", vkBindBufferMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkBindImageMemory", vkBindImageMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetBufferMemoryRequirements", vkGetBufferMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetImageMemoryRequirements", vkGetImageMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetImageSparseMemoryRequirements", vkGetImageSparseMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceSparseImageFormatProperties", vkGetPhysicalDeviceSparseImageFormatProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkQueueBindSparse", vkQueueBindSparse)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateFence", vkCreateFence)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyFence", vkDestroyFence)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkResetFences", vkResetFences)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetFenceStatus", vkGetFenceStatus)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkWaitForFences", vkWaitForFences)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateSemaphore", vkCreateSemaphore)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroySemaphore", vkDestroySemaphore)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateEvent", vkCreateEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyEvent", vkDestroyEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetEventStatus", vkGetEventStatus)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkSetEvent", vkSetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkResetEvent", vkResetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateQueryPool", vkCreateQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyQueryPool", vkDestroyQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetQueryPoolResults", vkGetQueryPoolResults)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateBuffer", vkCreateBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyBuffer", vkDestroyBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateBufferView", vkCreateBufferView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyBufferView", vkDestroyBufferView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateImage", vkCreateImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyImage", vkDestroyImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetImageSubresourceLayout", vkGetImageSubresourceLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateImageView", vkCreateImageView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyImageView", vkDestroyImageView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateShaderModule", vkCreateShaderModule)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyShaderModule", vkDestroyShaderModule)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreatePipelineCache", vkCreatePipelineCache)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyPipelineCache", vkDestroyPipelineCache)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPipelineCacheData", vkGetPipelineCacheData)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkMergePipelineCaches", vkMergePipelineCaches)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateGraphicsPipelines", vkCreateGraphicsPipelines)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateComputePipelines", vkCreateComputePipelines)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyPipeline", vkDestroyPipeline)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreatePipelineLayout", vkCreatePipelineLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyPipelineLayout", vkDestroyPipelineLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateSampler", vkCreateSampler)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroySampler", vkDestroySampler)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateDescriptorSetLayout", vkCreateDescriptorSetLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyDescriptorSetLayout", vkDestroyDescriptorSetLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateDescriptorPool", vkCreateDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyDescriptorPool", vkDestroyDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkResetDescriptorPool", vkResetDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkAllocateDescriptorSets", vkAllocateDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkFreeDescriptorSets", vkFreeDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkUpdateDescriptorSets", vkUpdateDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateFramebuffer", vkCreateFramebuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyFramebuffer", vkDestroyFramebuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateRenderPass", vkCreateRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyRenderPass", vkDestroyRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetRenderAreaGranularity", vkGetRenderAreaGranularity)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateCommandPool", vkCreateCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyCommandPool", vkDestroyCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkResetCommandPool", vkResetCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkAllocateCommandBuffers", vkAllocateCommandBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkFreeCommandBuffers", vkFreeCommandBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkBeginCommandBuffer", vkBeginCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEndCommandBuffer", vkEndCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkResetCommandBuffer", vkResetCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBindPipeline", vkCmdBindPipeline)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetViewport", vkCmdSetViewport)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetScissor", vkCmdSetScissor)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetLineWidth", vkCmdSetLineWidth)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetDepthBias", vkCmdSetDepthBias)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetBlendConstants", vkCmdSetBlendConstants)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetDepthBounds", vkCmdSetDepthBounds)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetStencilCompareMask", vkCmdSetStencilCompareMask)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetStencilWriteMask", vkCmdSetStencilWriteMask)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetStencilReference", vkCmdSetStencilReference)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBindDescriptorSets", vkCmdBindDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBindIndexBuffer", vkCmdBindIndexBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBindVertexBuffers", vkCmdBindVertexBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDraw", vkCmdDraw)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDrawIndexed", vkCmdDrawIndexed)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDrawIndirect", vkCmdDrawIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDrawIndexedIndirect", vkCmdDrawIndexedIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDispatch", vkCmdDispatch)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdDispatchIndirect", vkCmdDispatchIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdCopyBuffer", vkCmdCopyBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdCopyImage", vkCmdCopyImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBlitImage", vkCmdBlitImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdCopyBufferToImage", vkCmdCopyBufferToImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdCopyImageToBuffer", vkCmdCopyImageToBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdUpdateBuffer", vkCmdUpdateBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdFillBuffer", vkCmdFillBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdClearColorImage", vkCmdClearColorImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdClearDepthStencilImage", vkCmdClearDepthStencilImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdClearAttachments", vkCmdClearAttachments)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdResolveImage", vkCmdResolveImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdSetEvent", vkCmdSetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdResetEvent", vkCmdResetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdWaitEvents", vkCmdWaitEvents)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdPipelineBarrier", vkCmdPipelineBarrier)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBeginQuery", vkCmdBeginQuery)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdEndQuery", vkCmdEndQuery)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdResetQueryPool", vkCmdResetQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdWriteTimestamp", vkCmdWriteTimestamp)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdCopyQueryPoolResults", vkCmdCopyQueryPoolResults)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdPushConstants", vkCmdPushConstants)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdBeginRenderPass", vkCmdBeginRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdNextSubpass", vkCmdNextSubpass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdEndRenderPass", vkCmdEndRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCmdExecuteCommands", vkCmdExecuteCommands)) return VK_FALSE;
|
||||
return VK_TRUE;
|
||||
}
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_instance_symbols(VkInstance instance)
|
||||
{
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkDestroyInstance", vkDestroyInstance)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumeratePhysicalDevices", vkEnumeratePhysicalDevices)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceFeatures", vkGetPhysicalDeviceFeatures)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceFormatProperties", vkGetPhysicalDeviceFormatProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceImageFormatProperties", vkGetPhysicalDeviceImageFormatProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceProperties", vkGetPhysicalDeviceProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceQueueFamilyProperties", vkGetPhysicalDeviceQueueFamilyProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceMemoryProperties", vkGetPhysicalDeviceMemoryProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetDeviceProcAddr", vkGetDeviceProcAddr)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkCreateDevice", vkCreateDevice)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumerateDeviceExtensionProperties", vkEnumerateDeviceExtensionProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkEnumerateDeviceLayerProperties", vkEnumerateDeviceLayerProperties)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "vkGetPhysicalDeviceSparseImageFormatProperties", vkGetPhysicalDeviceSparseImageFormatProperties)) return VK_FALSE;
|
||||
return VK_TRUE;
|
||||
}
|
||||
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_device_symbols(VkDevice device)
|
||||
{
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyDevice", vkDestroyDevice)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetDeviceQueue", vkGetDeviceQueue)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkQueueSubmit", vkQueueSubmit)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkQueueWaitIdle", vkQueueWaitIdle)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDeviceWaitIdle", vkDeviceWaitIdle)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkAllocateMemory", vkAllocateMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkFreeMemory", vkFreeMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkMapMemory", vkMapMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkUnmapMemory", vkUnmapMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkFlushMappedMemoryRanges", vkFlushMappedMemoryRanges)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkInvalidateMappedMemoryRanges", vkInvalidateMappedMemoryRanges)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetDeviceMemoryCommitment", vkGetDeviceMemoryCommitment)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkBindBufferMemory", vkBindBufferMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkBindImageMemory", vkBindImageMemory)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetBufferMemoryRequirements", vkGetBufferMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetImageMemoryRequirements", vkGetImageMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetImageSparseMemoryRequirements", vkGetImageSparseMemoryRequirements)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkQueueBindSparse", vkQueueBindSparse)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateFence", vkCreateFence)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyFence", vkDestroyFence)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkResetFences", vkResetFences)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetFenceStatus", vkGetFenceStatus)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkWaitForFences", vkWaitForFences)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateSemaphore", vkCreateSemaphore)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroySemaphore", vkDestroySemaphore)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateEvent", vkCreateEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyEvent", vkDestroyEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetEventStatus", vkGetEventStatus)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkSetEvent", vkSetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkResetEvent", vkResetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateQueryPool", vkCreateQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyQueryPool", vkDestroyQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetQueryPoolResults", vkGetQueryPoolResults)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateBuffer", vkCreateBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyBuffer", vkDestroyBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateBufferView", vkCreateBufferView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyBufferView", vkDestroyBufferView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateImage", vkCreateImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyImage", vkDestroyImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetImageSubresourceLayout", vkGetImageSubresourceLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateImageView", vkCreateImageView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyImageView", vkDestroyImageView)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateShaderModule", vkCreateShaderModule)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyShaderModule", vkDestroyShaderModule)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreatePipelineCache", vkCreatePipelineCache)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyPipelineCache", vkDestroyPipelineCache)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetPipelineCacheData", vkGetPipelineCacheData)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkMergePipelineCaches", vkMergePipelineCaches)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateGraphicsPipelines", vkCreateGraphicsPipelines)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateComputePipelines", vkCreateComputePipelines)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyPipeline", vkDestroyPipeline)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreatePipelineLayout", vkCreatePipelineLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyPipelineLayout", vkDestroyPipelineLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateSampler", vkCreateSampler)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroySampler", vkDestroySampler)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateDescriptorSetLayout", vkCreateDescriptorSetLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyDescriptorSetLayout", vkDestroyDescriptorSetLayout)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateDescriptorPool", vkCreateDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyDescriptorPool", vkDestroyDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkResetDescriptorPool", vkResetDescriptorPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkAllocateDescriptorSets", vkAllocateDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkFreeDescriptorSets", vkFreeDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkUpdateDescriptorSets", vkUpdateDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateFramebuffer", vkCreateFramebuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyFramebuffer", vkDestroyFramebuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateRenderPass", vkCreateRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyRenderPass", vkDestroyRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkGetRenderAreaGranularity", vkGetRenderAreaGranularity)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCreateCommandPool", vkCreateCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkDestroyCommandPool", vkDestroyCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkResetCommandPool", vkResetCommandPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkAllocateCommandBuffers", vkAllocateCommandBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkFreeCommandBuffers", vkFreeCommandBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkBeginCommandBuffer", vkBeginCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkEndCommandBuffer", vkEndCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkResetCommandBuffer", vkResetCommandBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBindPipeline", vkCmdBindPipeline)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetViewport", vkCmdSetViewport)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetScissor", vkCmdSetScissor)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetLineWidth", vkCmdSetLineWidth)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetDepthBias", vkCmdSetDepthBias)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetBlendConstants", vkCmdSetBlendConstants)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetDepthBounds", vkCmdSetDepthBounds)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetStencilCompareMask", vkCmdSetStencilCompareMask)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetStencilWriteMask", vkCmdSetStencilWriteMask)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetStencilReference", vkCmdSetStencilReference)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBindDescriptorSets", vkCmdBindDescriptorSets)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBindIndexBuffer", vkCmdBindIndexBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBindVertexBuffers", vkCmdBindVertexBuffers)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDraw", vkCmdDraw)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDrawIndexed", vkCmdDrawIndexed)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDrawIndirect", vkCmdDrawIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDrawIndexedIndirect", vkCmdDrawIndexedIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDispatch", vkCmdDispatch)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdDispatchIndirect", vkCmdDispatchIndirect)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdCopyBuffer", vkCmdCopyBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdCopyImage", vkCmdCopyImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBlitImage", vkCmdBlitImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdCopyBufferToImage", vkCmdCopyBufferToImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdCopyImageToBuffer", vkCmdCopyImageToBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdUpdateBuffer", vkCmdUpdateBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdFillBuffer", vkCmdFillBuffer)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdClearColorImage", vkCmdClearColorImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdClearDepthStencilImage", vkCmdClearDepthStencilImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdClearAttachments", vkCmdClearAttachments)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdResolveImage", vkCmdResolveImage)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdSetEvent", vkCmdSetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdResetEvent", vkCmdResetEvent)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdWaitEvents", vkCmdWaitEvents)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdPipelineBarrier", vkCmdPipelineBarrier)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBeginQuery", vkCmdBeginQuery)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdEndQuery", vkCmdEndQuery)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdResetQueryPool", vkCmdResetQueryPool)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdWriteTimestamp", vkCmdWriteTimestamp)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdCopyQueryPoolResults", vkCmdCopyQueryPoolResults)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdPushConstants", vkCmdPushConstants)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdBeginRenderPass", vkCmdBeginRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdNextSubpass", vkCmdNextSubpass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdEndRenderPass", vkCmdEndRenderPass)) return VK_FALSE;
|
||||
if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "vkCmdExecuteCommands", vkCmdExecuteCommands)) return VK_FALSE;
|
||||
return VK_TRUE;
|
||||
}
|
@ -207,7 +207,6 @@ static void menu_display_vk_draw(void *data)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void menu_display_vk_restore_clear_color(void)
|
||||
{
|
||||
}
|
||||
@ -232,7 +231,7 @@ static void menu_display_vk_clear_color(menu_display_ctx_clearcolor_t *clearcolo
|
||||
rect.rect.extent.height = vk->context->swapchain_height;
|
||||
rect.layerCount = 1;
|
||||
|
||||
VKFUNC(vkCmdClearAttachments)(vk->cmd, 1, &attachment, 1, &rect);
|
||||
vkCmdClearAttachments(vk->cmd, 1, &attachment, 1, &rect);
|
||||
}
|
||||
|
||||
static void menu_display_vk_blend_begin(void)
|
||||
|
174
tools/vulkan_loader_generator.py
Executable file
174
tools/vulkan_loader_generator.py
Executable file
@ -0,0 +1,174 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
def entry_is_device(entry):
|
||||
first_arg_type = entry[1][1:].split(' ')[0]
|
||||
device_types = ['VkDevice', 'VkCommandBuffer', 'VkQueue']
|
||||
return (first_arg_type in device_types) and (entry[0] != 'vkGetDeviceProcAddr')
|
||||
|
||||
def main():
|
||||
pure_entrypoints = []
|
||||
entrypoints = []
|
||||
extensions = []
|
||||
pure_list = ['vkCreateInstance', 'vkEnumerateInstanceExtensionProperties', 'vkEnumerateInstanceLayerProperties']
|
||||
with open(sys.argv[1], 'r') as f:
|
||||
header = f.readlines()
|
||||
|
||||
for line in header:
|
||||
m = re.search('typedef \S+.*PFN_([^\)]+)\)(.*);$', line)
|
||||
if m and m.group(1)[-3:] != 'KHR' and m.group(1)[-3:] != 'EXT' and m.group(2) != '(void)':
|
||||
entry = m.group(1)
|
||||
if entry == 'vkGetInstanceProcAddr':
|
||||
continue
|
||||
|
||||
if entry in pure_list:
|
||||
pure_entrypoints.append((m.group(1), m.group(2)))
|
||||
else:
|
||||
entrypoints.append((m.group(1), m.group(2)))
|
||||
elif m and (m.group(1)[-3:] == 'KHR' or m.group(1)[-3:] == 'EXT') and m.group(2) != '(void)':
|
||||
entry = m.group(1)
|
||||
if 'Android' in entry:
|
||||
continue
|
||||
if 'Xlib' in entry:
|
||||
continue
|
||||
if 'Xcb' in entry:
|
||||
continue
|
||||
if 'Win32' in entry:
|
||||
continue
|
||||
if 'Wayland' in entry:
|
||||
continue
|
||||
if 'Mir' in entry:
|
||||
continue
|
||||
extensions.append((m.group(1), m.group(2)))
|
||||
|
||||
|
||||
with open(sys.argv[2], 'w') as f:
|
||||
print('''
|
||||
/* This header is autogenerated by vulkan_loader_generator.py */
|
||||
#ifndef VULKAN_SYMBOL_WRAPPER_H
|
||||
#define VULKAN_SYMBOL_WRAPPER_H
|
||||
#define VK_NO_PROTOTYPES
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
''', file = f)
|
||||
|
||||
for entry in pure_entrypoints:
|
||||
s = entry[0]
|
||||
print('extern PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
print('#define {} vulkan_symbol_wrapper_{}'.format(s, s), file = f)
|
||||
for entry in entrypoints:
|
||||
s = entry[0]
|
||||
print('extern PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
print('#define {} vulkan_symbol_wrapper_{}'.format(s, s), file = f)
|
||||
for entry in extensions:
|
||||
s = entry[0]
|
||||
print('extern PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
print('#define {} vulkan_symbol_wrapper_{}'.format(s, s), file = f)
|
||||
|
||||
print('''
|
||||
void vulkan_symbol_wrapper_init(PFN_vkGetInstanceProcAddr get_instance_proc_addr);
|
||||
PFN_vkGetInstanceProcAddr vulkan_symbol_wrapper_instance_proc_addr(void);
|
||||
VkBool32 vulkan_symbol_wrapper_load_global_symbols(void);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_instance_symbols(VkInstance instance);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_symbols(VkInstance instance);
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_device_symbols(VkDevice device);
|
||||
VkBool32 vulkan_symbol_wrapper_load_instance_symbol(VkInstance instance, const char *name, PFN_vkVoidFunction *ppSymbol);
|
||||
VkBool32 vulkan_symbol_wrapper_load_device_symbol(VkDevice device, const char *name, PFN_vkVoidFunction *ppSymbol);
|
||||
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, name, pfn) vulkan_symbol_wrapper_load_instance_symbol(instance, name, (PFN_vkVoidFunction*) &(pfn))
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_EXTENSION_SYMBOL(instance, name) vulkan_symbol_wrapper_load_instance_symbol(instance, #name, (PFN_vkVoidFunction*) & name)
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, name, pfn) vulkan_symbol_wrapper_load_device_symbol(device, name, (PFN_vkVoidFunction*) &(pfn))
|
||||
#define VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_EXTENSION_SYMBOL(device, name) vulkan_symbol_wrapper_load_device_symbol(device, #name, (PFN_vkVoidFunction*) & name)
|
||||
''', file = f)
|
||||
|
||||
print('''
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
''', file = f)
|
||||
|
||||
with open(sys.argv[3], 'w') as f:
|
||||
print('''
|
||||
/* This header is autogenerated by vulkan_loader_generator.py */
|
||||
#include "vulkan_symbol_wrapper.h"
|
||||
''', file = f)
|
||||
|
||||
for entry in pure_entrypoints:
|
||||
s = entry[0]
|
||||
print('PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
for entry in entrypoints:
|
||||
s = entry[0]
|
||||
print('PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
for entry in extensions:
|
||||
s = entry[0]
|
||||
print('PFN_{} vulkan_symbol_wrapper_{};'.format(s, s), file = f)
|
||||
|
||||
print('''
|
||||
static PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||
void vulkan_symbol_wrapper_init(PFN_vkGetInstanceProcAddr get_instance_proc_addr)
|
||||
{
|
||||
GetInstanceProcAddr = get_instance_proc_addr;
|
||||
}
|
||||
|
||||
PFN_vkGetInstanceProcAddr vulkan_symbol_wrapper_instance_proc_addr(void)
|
||||
{
|
||||
return GetInstanceProcAddr;
|
||||
}
|
||||
''', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_instance_symbol(VkInstance instance, const char *name, PFN_vkVoidFunction *ppSymbol)
|
||||
{
|
||||
*ppSymbol = GetInstanceProcAddr(instance, name);
|
||||
return *ppSymbol != NULL;
|
||||
}''', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_device_symbol(VkDevice device, const char *name, PFN_vkVoidFunction *ppSymbol)
|
||||
{
|
||||
*ppSymbol = vkGetDeviceProcAddr(device, name);
|
||||
return *ppSymbol != NULL;
|
||||
}''', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_global_symbols(void)
|
||||
{''', file = f)
|
||||
for pure in pure_entrypoints:
|
||||
print(' if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(NULL, "{}", {})) return VK_FALSE;'.format(pure[0], pure[0]), file = f)
|
||||
print(' return VK_TRUE;', file = f)
|
||||
print('}', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_symbols(VkInstance instance)
|
||||
{''', file = f)
|
||||
for entry in entrypoints:
|
||||
print(' if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "{}", {})) return VK_FALSE;'.format(entry[0], entry[0]), file = f)
|
||||
print(' return VK_TRUE;', file = f)
|
||||
print('}', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_instance_symbols(VkInstance instance)
|
||||
{''', file = f)
|
||||
for entry in entrypoints:
|
||||
if not entry_is_device(entry):
|
||||
print(' if (!VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_SYMBOL(instance, "{}", {})) return VK_FALSE;'.format(entry[0], entry[0]), file = f)
|
||||
print(' return VK_TRUE;', file = f)
|
||||
print('}', file = f)
|
||||
|
||||
print('''
|
||||
VkBool32 vulkan_symbol_wrapper_load_core_device_symbols(VkDevice device)
|
||||
{''', file = f)
|
||||
for entry in entrypoints:
|
||||
if entry_is_device(entry):
|
||||
print(' if (!VULKAN_SYMBOL_WRAPPER_LOAD_DEVICE_SYMBOL(device, "{}", {})) return VK_FALSE;'.format(entry[0], entry[0]), file = f)
|
||||
print(' return VK_TRUE;', file = f)
|
||||
print('}', file = f)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue
Block a user