From 6a1f9a5e85b330a0f918420816818f347fd0bc54 Mon Sep 17 00:00:00 2001
From: Artur Wasmut <awasmut@uni-koblenz.de>
Date: Mon, 30 Aug 2021 21:33:08 +0200
Subject: [PATCH] [#71] 'fix' weird MSVC bugs.

---
 src/vkcv/Core.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/vkcv/Core.cpp b/src/vkcv/Core.cpp
index 095fdd2e..30ec1a1c 100644
--- a/src/vkcv/Core.cpp
+++ b/src/vkcv/Core.cpp
@@ -518,7 +518,7 @@ namespace vkcv
 					color
 			);
 			
-			beginDebugLabel(cmdBuffer, &(static_cast<const VkDebugUtilsLabelEXT&>(debug)));
+			beginDebugLabel((VkCommandBuffer) cmdBuffer, &(static_cast<const VkDebugUtilsLabelEXT&>(debug)));
 		};
 
 		recordCommandsToStream(cmdStream, submitFunction, nullptr);
@@ -536,7 +536,7 @@ namespace vkcv
 		}
 		
 		auto submitFunction = [&](const vk::CommandBuffer& cmdBuffer) {
-			endDebugLabel(cmdBuffer);
+			endDebugLabel((VkCommandBuffer) cmdBuffer);
 		};
 
 		recordCommandsToStream(cmdStream, submitFunction, nullptr);
@@ -878,7 +878,7 @@ namespace vkcv
 				label.c_str()
 		);
 		
-		setDebugLabel(device, &(static_cast<const VkDebugUtilsObjectNameInfoEXT&>(debug)));
+		setDebugLabel((VkDevice) device, &(static_cast<const VkDebugUtilsObjectNameInfoEXT&>(debug)));
 #endif
 	}
 	
@@ -891,7 +891,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::eBuffer,
-				reinterpret_cast<uint64_t>(static_cast<VkBuffer>(
+				static_cast<uint64_t>(static_cast<VkBuffer>(
 						m_BufferManager->getBuffer(handle)
 				)),
 				label
@@ -907,7 +907,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::eRenderPass,
-				reinterpret_cast<uint64_t>(static_cast<VkRenderPass>(
+				static_cast<uint64_t>(static_cast<VkRenderPass>(
 						m_PassManager->getVkPass(handle)
 				)),
 				label
@@ -923,7 +923,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::ePipeline,
-				reinterpret_cast<uint64_t>(static_cast<VkPipeline>(
+				static_cast<uint64_t>(static_cast<VkPipeline>(
 						m_PipelineManager->getVkPipeline(handle)
 				)),
 				label
@@ -939,7 +939,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::eDescriptorSet,
-				reinterpret_cast<uint64_t>(static_cast<VkDescriptorSet>(
+				static_cast<uint64_t>(static_cast<VkDescriptorSet>(
 						m_DescriptorManager->getDescriptorSet(handle).vulkanHandle
 				)),
 				label
@@ -955,7 +955,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::eSampler,
-				reinterpret_cast<uint64_t>(static_cast<VkSampler>(
+				static_cast<uint64_t>(static_cast<VkSampler>(
 						m_SamplerManager->getVulkanSampler(handle)
 				)),
 				label
@@ -975,7 +975,7 @@ namespace vkcv
 		setDebugObjectLabel(
 				m_Context.getDevice(),
 				vk::ObjectType::eImage,
-				reinterpret_cast<uint64_t>(static_cast<VkImage>(
+				static_cast<uint64_t>(static_cast<VkImage>(
 						m_ImageManager->getVulkanImage(handle)
 				)),
 				label
-- 
GitLab