From d2fabd549fc424b4244e29e259e7e7662a4549dd Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Fri, 9 Jul 2021 15:17:21 +0200
Subject: [PATCH] [#56] Added warning to append method of push constants

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 include/vkcv/PushConstants.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/vkcv/PushConstants.hpp b/include/vkcv/PushConstants.hpp
index b433d214..d974fbe6 100644
--- a/include/vkcv/PushConstants.hpp
+++ b/include/vkcv/PushConstants.hpp
@@ -3,6 +3,8 @@
 #include <vector>
 #include <vulkan/vulkan.hpp>
 
+#include "Logger.hpp"
+
 namespace vkcv {
 	
 	class PushConstants {
@@ -48,6 +50,8 @@ namespace vkcv {
 		template<typename T = uint8_t>
 		bool appendDrawcall(const T& value) {
 			if (sizeof(T) != m_sizePerDrawcall) {
+				vkcv_log(LogLevel::WARNING, "Size (%lu) of value does not match the specified size per drawcall (%lu)",
+						 sizeof(value), m_sizePerDrawcall);
 				return false;
 			}
 			
-- 
GitLab