From c13e13a5fe6848a462c9c05e5b4e1724eec62323 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 29 Nov 2019 10:22:52 -0800 Subject: Vulkan backend: fixed 32-bit build --- Graphics/GraphicsEngineVulkan/CMakeLists.txt | 7 +- .../GraphicsEngineVulkan/include/BufferVkImpl.h | 2 +- .../GraphicsEngineVulkan/include/TextureVkImpl.h | 2 +- .../include/VulkanUtilities/VulkanDebug.h | 24 ++----- .../include/VulkanUtilities/VulkanLogicalDevice.h | 75 +++++++++++++++------- .../include/VulkanUtilities/VulkanObjectWrappers.h | 6 +- .../src/DescriptorPoolManager.cpp | 6 +- .../src/RenderDeviceVkImpl.cpp | 2 +- .../src/VulkanUtilities/VulkanDebug.cpp | 63 +++++++++++------- .../src/VulkanUtilities/VulkanLogicalDevice.cpp | 45 +++++++------ 10 files changed, 139 insertions(+), 93 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt index 85c93332..afa73a10 100644 --- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt +++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt @@ -177,7 +177,12 @@ set(PRIVATE_DEPENDENCIES ) if(PLATFORM_WIN32) - find_library(Vulkan_LIBRARY NAMES vulkan-1 vulkan PATHS "../../ThirdParty/vulkan/libs/windows") + if(${ARCH} EQUAL 64) + set(VULKAN_LIB_FOLDER x64) + else() + set(VULKAN_LIB_FOLDER x86) + endif() + find_library(Vulkan_LIBRARY NAMES vulkan-1 vulkan PATHS "../../ThirdParty/vulkan/libs/windows/${VULKAN_LIB_FOLDER}") elseif(PLATFORM_MACOS) find_library(Vulkan_LIBRARY NAMES vulkan.1 vulkan PATHS "../../ThirdParty/vulkan/libs/macOS") elseif(PLATFORM_IOS) diff --git a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h index 9462b423..cf8923f3 100644 --- a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h +++ b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h @@ -94,7 +94,7 @@ public: virtual void* GetNativeHandle() override final { auto vkBuffer = GetVkBuffer(); - return vkBuffer; + return reinterpret_cast(vkBuffer); } /// Implementation of IBufferVk::SetAccessFlags(). diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h index 4a75bdc1..51f98427 100644 --- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h +++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h @@ -73,7 +73,7 @@ public: virtual void* GetNativeHandle() override final { auto vkImage = GetVkImage(); - return vkImage; + return reinterpret_cast(vkImage); } /// Implementation of ITextureVk::SetLayout(). diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDebug.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDebug.h index 60ba5410..35f8826b 100644 --- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDebug.h +++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDebug.h @@ -92,26 +92,10 @@ void SetSemaphoreName (VkDevice device, VkSemaphore semaphor void SetFenceName (VkDevice device, VkFence fence, const char * name); void SetEventName (VkDevice device, VkEvent _event, const char * name); -void SetVulkanObjectName(VkDevice device, VkCommandPool cmdPool, const char * name); -void SetVulkanObjectName(VkDevice device, VkCommandBuffer cmdBuffer, const char * name); -void SetVulkanObjectName(VkDevice device, VkQueue queue, const char * name); -void SetVulkanObjectName(VkDevice device, VkImage image, const char * name); -void SetVulkanObjectName(VkDevice device, VkImageView imageView, const char * name); -void SetVulkanObjectName(VkDevice device, VkSampler sampler, const char * name); -void SetVulkanObjectName(VkDevice device, VkBuffer buffer, const char * name); -void SetVulkanObjectName(VkDevice device, VkBufferView bufferView, const char * name); -void SetVulkanObjectName(VkDevice device, VkDeviceMemory memory, const char * name); -void SetVulkanObjectName(VkDevice device, VkShaderModule shaderModule, const char * name); -void SetVulkanObjectName(VkDevice device, VkPipeline pipeline, const char * name); -void SetVulkanObjectName(VkDevice device, VkPipelineLayout pipelineLayout, const char * name); -void SetVulkanObjectName(VkDevice device, VkRenderPass renderPass, const char * name); -void SetVulkanObjectName(VkDevice device, VkFramebuffer framebuffer, const char * name); -void SetVulkanObjectName(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const char * name); -void SetVulkanObjectName(VkDevice device, VkDescriptorSet descriptorSet, const char * name); -void SetVulkanObjectName(VkDevice device, VkDescriptorPool descriptorPool, const char * name); -void SetVulkanObjectName(VkDevice device, VkSemaphore semaphore, const char * name); -void SetVulkanObjectName(VkDevice device, VkFence fence, const char * name); -void SetVulkanObjectName(VkDevice device, VkEvent _event, const char * name); +enum class VulkanHandleTypeId : uint32_t; + +template +void SetVulkanObjectName(VkDevice device, VulkanObjectType vkObject, const char * name); const char* VkResultToString (VkResult errorCode); const char* VkAccessFlagBitToString(VkAccessFlagBits Bit); diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h index 11a8b951..6ff00801 100644 --- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h +++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h @@ -29,25 +29,53 @@ namespace VulkanUtilities { -template +// In 32-bit version, all Vulkan handles are typedefed as uint64_t, so we have to +// use VulkanHandleTypeId to distinguish objects. +enum class VulkanHandleTypeId : uint32_t +{ + CommandPool, + CommandBuffer, + Buffer, + BufferView, + Image, + ImageView, + DeviceMemory, + Fence, + RenderPass, + Pipeline, + ShaderModule, + PipelineLayout, + Sampler, + Framebuffer, + DescriptorPool, + DescriptorSetLayout, + DescriptorSet, + Semaphore, + Queue, + Event +}; + +template class VulkanObjectWrapper; -using CommandPoolWrapper = VulkanObjectWrapper; -using BufferWrapper = VulkanObjectWrapper; -using BufferViewWrapper = VulkanObjectWrapper; -using ImageWrapper = VulkanObjectWrapper; -using ImageViewWrapper = VulkanObjectWrapper; -using DeviceMemoryWrapper = VulkanObjectWrapper; -using FenceWrapper = VulkanObjectWrapper; -using RenderPassWrapper = VulkanObjectWrapper; -using PipelineWrapper = VulkanObjectWrapper; -using ShaderModuleWrapper = VulkanObjectWrapper; -using PipelineLayoutWrapper = VulkanObjectWrapper; -using SamplerWrapper = VulkanObjectWrapper; -using FramebufferWrapper = VulkanObjectWrapper; -using DescriptorPoolWrapper = VulkanObjectWrapper; -using DescriptorSetLayoutWrapper = VulkanObjectWrapper; -using SemaphoreWrapper = VulkanObjectWrapper; +#define DEFINE_VULKAN_OBJECT_WRAPPER(Type) VulkanObjectWrapper +using CommandPoolWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(CommandPool); +using BufferWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Buffer); +using BufferViewWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(BufferView); +using ImageWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Image); +using ImageViewWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(ImageView); +using DeviceMemoryWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(DeviceMemory); +using FenceWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Fence); +using RenderPassWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(RenderPass); +using PipelineWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Pipeline); +using ShaderModuleWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(ShaderModule); +using PipelineLayoutWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(PipelineLayout); +using SamplerWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Sampler); +using FramebufferWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Framebuffer); +using DescriptorPoolWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(DescriptorPool); +using DescriptorSetLayoutWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(DescriptorSetLayout); +using SemaphoreWrapper = DEFINE_VULKAN_OBJECT_WRAPPER(Semaphore); +#undef DEFINE_VULKAN_OBJECT_WRAPPER class VulkanLogicalDevice : public std::enable_shared_from_this { @@ -166,11 +194,14 @@ private: const VkDeviceCreateInfo& DeviceCI, const VkAllocationCallbacks* vkAllocator); - template - VulkanObjectWrapper CreateVulkanObject(VkCreateObjectFuncType VkCreateObject, - const VkObjectCreateInfoType& CreateInfo, - const char* DebugName, - const char* ObjectType) const; + template + VulkanObjectWrapper CreateVulkanObject(VkCreateObjectFuncType VkCreateObject, + const VkObjectCreateInfoType& CreateInfo, + const char* DebugName, + const char* ObjectType) const; VkDevice m_VkDevice = VK_NULL_HANDLE; const VkAllocationCallbacks* const m_VkAllocator; diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h index aac72c03..5e44a63d 100644 --- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h +++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h @@ -29,7 +29,11 @@ namespace VulkanUtilities { -template +// In 32-bit version, all Vulkan handles are typedefed as uint64_t, so we have to +// use another way to distinguish objects. +enum class VulkanHandleTypeId : uint32_t; + +template class VulkanObjectWrapper { public: diff --git a/Graphics/GraphicsEngineVulkan/src/DescriptorPoolManager.cpp b/Graphics/GraphicsEngineVulkan/src/DescriptorPoolManager.cpp index b2bf3680..9ef6cb9d 100644 --- a/Graphics/GraphicsEngineVulkan/src/DescriptorPoolManager.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DescriptorPoolManager.cpp @@ -32,7 +32,7 @@ void DescriptorSetAllocation::Release() { if (Set != VK_NULL_HANDLE) { - VERIFY_EXPR(DescrSetAllocator != nullptr && Pool != nullptr); + VERIFY_EXPR(DescrSetAllocator != nullptr && Pool != VK_NULL_HANDLE); DescrSetAllocator->FreeDescriptorSet(Set, Pool, CmdQueueMask); Reset(); @@ -219,8 +219,8 @@ void DescriptorSetAllocator::FreeDescriptorSet(VkDescriptorSet Set, VkDescriptor Pool {rhs.Pool } { rhs.Allocator = nullptr; - rhs.Set = nullptr; - rhs.Pool = nullptr; + rhs.Set = VK_NULL_HANDLE; + rhs.Pool = VK_NULL_HANDLE; } // clang-format on diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp index 665fa5d8..35f2b1ad 100644 --- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp @@ -146,7 +146,7 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters* m_DeviceCaps.MinorVersion = 0; m_DeviceCaps.bSeparableProgramSupported = True; m_DeviceCaps.bMultithreadedResourceCreationSupported = True; - for (int fmt = 1; fmt < m_TextureFormatsInfo.size(); ++fmt) + for (Uint32 fmt = 1; fmt < m_TextureFormatsInfo.size(); ++fmt) m_TextureFormatsInfo[fmt].Supported = true; // We will test every format on a specific hardware device m_DeviceCaps.bGeometryShadersSupported = EngineCI.EnabledFeatures.geometryShader; diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp index c4781196..776135d1 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDebug.cpp @@ -12,6 +12,7 @@ #include #include "VulkanUtilities/VulkanDebug.h" +#include "VulkanUtilities/VulkanLogicalDevice.h" #include "Errors.h" #include "DebugUtilities.h" @@ -395,104 +396,122 @@ void SetEventName(VkDevice device, VkEvent _event, const char* name) } - - -void SetVulkanObjectName(VkDevice device, VkCommandPool cmdPool, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkCommandPool cmdPool, const char* name) { SetCommandPoolName(device, cmdPool, name); } -void SetVulkanObjectName(VkDevice device, VkCommandBuffer cmdBuffer, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkCommandBuffer cmdBuffer, const char* name) { SetCommandBufferName(device, cmdBuffer, name); } -void SetVulkanObjectName(VkDevice device, VkQueue queue, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkQueue queue, const char* name) { SetQueueName(device, queue, name); } -void SetVulkanObjectName(VkDevice device, VkImage image, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkImage image, const char* name) { SetImageName(device, image, name); } -void SetVulkanObjectName(VkDevice device, VkImageView imageView, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkImageView imageView, const char* name) { SetImageViewName(device, imageView, name); } -void SetVulkanObjectName(VkDevice device, VkSampler sampler, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkSampler sampler, const char* name) { SetSamplerName(device, sampler, name); } -void SetVulkanObjectName(VkDevice device, VkBuffer buffer, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkBuffer buffer, const char* name) { SetBufferName(device, buffer, name); } -void SetVulkanObjectName(VkDevice device, VkBufferView bufferView, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkBufferView bufferView, const char* name) { SetBufferViewName(device, bufferView, name); } -void SetVulkanObjectName(VkDevice device, VkDeviceMemory memory, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkDeviceMemory memory, const char* name) { SetDeviceMemoryName(device, memory, name); } -void SetVulkanObjectName(VkDevice device, VkShaderModule shaderModule, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkShaderModule shaderModule, const char* name) { SetShaderModuleName(device, shaderModule, name); } -void SetVulkanObjectName(VkDevice device, VkPipeline pipeline, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkPipeline pipeline, const char* name) { SetPipelineName(device, pipeline, name); } -void SetVulkanObjectName(VkDevice device, VkPipelineLayout pipelineLayout, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkPipelineLayout pipelineLayout, const char* name) { SetPipelineLayoutName(device, pipelineLayout, name); } -void SetVulkanObjectName(VkDevice device, VkRenderPass renderPass, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkRenderPass renderPass, const char* name) { SetRenderPassName(device, renderPass, name); } -void SetVulkanObjectName(VkDevice device, VkFramebuffer framebuffer, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkFramebuffer framebuffer, const char* name) { SetFramebufferName(device, framebuffer, name); } -void SetVulkanObjectName(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const char* name) { SetDescriptorSetLayoutName(device, descriptorSetLayout, name); } -void SetVulkanObjectName(VkDevice device, VkDescriptorSet descriptorSet, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkDescriptorSet descriptorSet, const char* name) { SetDescriptorSetName(device, descriptorSet, name); } -void SetVulkanObjectName(VkDevice device, VkDescriptorPool descriptorPool, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkDescriptorPool descriptorPool, const char* name) { SetDescriptorPoolName(device, descriptorPool, name); } -void SetVulkanObjectName(VkDevice device, VkSemaphore semaphore, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkSemaphore semaphore, const char* name) { SetSemaphoreName(device, semaphore, name); } -void SetVulkanObjectName(VkDevice device, VkFence fence, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkFence fence, const char* name) { SetFenceName(device, fence, name); } -void SetVulkanObjectName(VkDevice device, VkEvent _event, const char* name) +template <> +void SetVulkanObjectName(VkDevice device, VkEvent _event, const char* name) { SetEventName(device, _event, name); } diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp index d43ac776..0b7a6e19 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp @@ -76,11 +76,14 @@ void VulkanLogicalDevice::WaitIdle() const (void)err; } -template -VulkanObjectWrapper VulkanLogicalDevice::CreateVulkanObject(VkCreateObjectFuncType VkCreateObject, - const VkObjectCreateInfoType& CreateInfo, - const char* DebugName, - const char* ObjectType) const +template +VulkanObjectWrapper VulkanLogicalDevice::CreateVulkanObject(VkCreateObjectFuncType VkCreateObject, + const VkObjectCreateInfoType& CreateInfo, + const char* DebugName, + const char* ObjectType) const { if (DebugName == nullptr) DebugName = ""; @@ -91,62 +94,62 @@ VulkanObjectWrapper VulkanLogicalDevice::CreateVulkanObject(VkCrea CHECK_VK_ERROR_AND_THROW(err, "Failed to create Vulkan ", ObjectType, " '", DebugName, '\''); if (DebugName != nullptr && *DebugName != 0) - SetVulkanObjectName(m_VkDevice, VkObject, DebugName); + SetVulkanObjectName(m_VkDevice, VkObject, DebugName); - return VulkanObjectWrapper{GetSharedPtr(), std::move(VkObject)}; + return VulkanObjectWrapper{GetSharedPtr(), std::move(VkObject)}; } CommandPoolWrapper VulkanLogicalDevice::CreateCommandPool(const VkCommandPoolCreateInfo& CmdPoolCI, const char* DebugName) const { VERIFY_EXPR(CmdPoolCI.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO); - return CreateVulkanObject(vkCreateCommandPool, CmdPoolCI, DebugName, "command pool"); + return CreateVulkanObject(vkCreateCommandPool, CmdPoolCI, DebugName, "command pool"); } BufferWrapper VulkanLogicalDevice::CreateBuffer(const VkBufferCreateInfo& BufferCI, const char* DebugName) const { VERIFY_EXPR(BufferCI.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO); - return CreateVulkanObject(vkCreateBuffer, BufferCI, DebugName, "buffer"); + return CreateVulkanObject(vkCreateBuffer, BufferCI, DebugName, "buffer"); } BufferViewWrapper VulkanLogicalDevice::CreateBufferView(const VkBufferViewCreateInfo& BuffViewCI, const char* DebugName) const { VERIFY_EXPR(BuffViewCI.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO); - return CreateVulkanObject(vkCreateBufferView, BuffViewCI, DebugName, "buffer view"); + return CreateVulkanObject(vkCreateBufferView, BuffViewCI, DebugName, "buffer view"); } ImageWrapper VulkanLogicalDevice::CreateImage(const VkImageCreateInfo& ImageCI, const char* DebugName) const { VERIFY_EXPR(ImageCI.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO); - return CreateVulkanObject(vkCreateImage, ImageCI, DebugName, "image"); + return CreateVulkanObject(vkCreateImage, ImageCI, DebugName, "image"); } ImageViewWrapper VulkanLogicalDevice::CreateImageView(const VkImageViewCreateInfo& ImageViewCI, const char* DebugName) const { VERIFY_EXPR(ImageViewCI.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO); - return CreateVulkanObject(vkCreateImageView, ImageViewCI, DebugName, "image view"); + return CreateVulkanObject(vkCreateImageView, ImageViewCI, DebugName, "image view"); } SamplerWrapper VulkanLogicalDevice::CreateSampler(const VkSamplerCreateInfo& SamplerCI, const char* DebugName) const { VERIFY_EXPR(SamplerCI.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO); - return CreateVulkanObject(vkCreateSampler, SamplerCI, DebugName, "sampler"); + return CreateVulkanObject(vkCreateSampler, SamplerCI, DebugName, "sampler"); } FenceWrapper VulkanLogicalDevice::CreateFence(const VkFenceCreateInfo& FenceCI, const char* DebugName) const { VERIFY_EXPR(FenceCI.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO); - return CreateVulkanObject(vkCreateFence, FenceCI, DebugName, "fence"); + return CreateVulkanObject(vkCreateFence, FenceCI, DebugName, "fence"); } RenderPassWrapper VulkanLogicalDevice::CreateRenderPass(const VkRenderPassCreateInfo& RenderPassCI, const char* DebugName) const { VERIFY_EXPR(RenderPassCI.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO); - return CreateVulkanObject(vkCreateRenderPass, RenderPassCI, DebugName, "render pass"); + return CreateVulkanObject(vkCreateRenderPass, RenderPassCI, DebugName, "render pass"); } DeviceMemoryWrapper VulkanLogicalDevice::AllocateDeviceMemory(const VkMemoryAllocateInfo& AllocInfo, @@ -211,37 +214,37 @@ PipelineWrapper VulkanLogicalDevice::CreateGraphicsPipeline(const VkGraphicsPipe ShaderModuleWrapper VulkanLogicalDevice::CreateShaderModule(const VkShaderModuleCreateInfo& ShaderModuleCI, const char* DebugName) const { VERIFY_EXPR(ShaderModuleCI.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO); - return CreateVulkanObject(vkCreateShaderModule, ShaderModuleCI, DebugName, "shader module"); + return CreateVulkanObject(vkCreateShaderModule, ShaderModuleCI, DebugName, "shader module"); } PipelineLayoutWrapper VulkanLogicalDevice::CreatePipelineLayout(const VkPipelineLayoutCreateInfo& PipelineLayoutCI, const char* DebugName) const { VERIFY_EXPR(PipelineLayoutCI.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO); - return CreateVulkanObject(vkCreatePipelineLayout, PipelineLayoutCI, DebugName, "pipeline layout"); + return CreateVulkanObject(vkCreatePipelineLayout, PipelineLayoutCI, DebugName, "pipeline layout"); } FramebufferWrapper VulkanLogicalDevice::CreateFramebuffer(const VkFramebufferCreateInfo& FramebufferCI, const char* DebugName) const { VERIFY_EXPR(FramebufferCI.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO); - return CreateVulkanObject(vkCreateFramebuffer, FramebufferCI, DebugName, "framebuffer"); + return CreateVulkanObject(vkCreateFramebuffer, FramebufferCI, DebugName, "framebuffer"); } DescriptorPoolWrapper VulkanLogicalDevice::CreateDescriptorPool(const VkDescriptorPoolCreateInfo& DescrPoolCI, const char* DebugName) const { VERIFY_EXPR(DescrPoolCI.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO); - return CreateVulkanObject(vkCreateDescriptorPool, DescrPoolCI, DebugName, "descriptor pool"); + return CreateVulkanObject(vkCreateDescriptorPool, DescrPoolCI, DebugName, "descriptor pool"); } DescriptorSetLayoutWrapper VulkanLogicalDevice::CreateDescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo& LayoutCI, const char* DebugName) const { VERIFY_EXPR(LayoutCI.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO); - return CreateVulkanObject(vkCreateDescriptorSetLayout, LayoutCI, DebugName, "descriptor set layout"); + return CreateVulkanObject(vkCreateDescriptorSetLayout, LayoutCI, DebugName, "descriptor set layout"); } SemaphoreWrapper VulkanLogicalDevice::CreateSemaphore(const VkSemaphoreCreateInfo& SemaphoreCI, const char* DebugName) const { VERIFY_EXPR(SemaphoreCI.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO); - return CreateVulkanObject(vkCreateSemaphore, SemaphoreCI, DebugName, "semaphore"); + return CreateVulkanObject(vkCreateSemaphore, SemaphoreCI, DebugName, "semaphore"); } VkCommandBuffer VulkanLogicalDevice::AllocateVkCommandBuffer(const VkCommandBufferAllocateInfo& AllocInfo, const char* DebugName) const -- cgit v1.2.3