From 4cb9bdf9d4b1c2d78bcbdd9728e3a44a373b03fc Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Sat, 4 Sep 2021 14:29:39 +0200
Subject: [PATCH] [#71] Fixed compiler errors and reduced warnings

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 CMakeLists.txt                                |  2 ++
 .../src/vkcv/upscaling/FSRUpscaling.cpp       |  8 ++---
 projects/indirect_dispatch/src/App.cpp        | 15 ++++++++++
 projects/indirect_dispatch/src/App.hpp        |  4 +--
 projects/indirect_dispatch/src/AppSetup.cpp   |  6 ++--
 projects/indirect_dispatch/src/MotionBlur.hpp | 13 --------
 .../src/BloomAndFlares.cpp                    | 20 ++++++++-----
 projects/particle_simulation/src/main.cpp     | 10 ++++---
 projects/voxelization/src/BloomAndFlares.cpp  | 20 ++++++++-----
 projects/voxelization/src/ShadowMapping.cpp   | 12 ++++++--
 projects/voxelization/src/Voxelization.cpp    | 30 +++++++++----------
 projects/voxelization/src/main.cpp            | 24 +++++++--------
 src/vkcv/PassManager.cpp                      | 20 -------------
 13 files changed, 92 insertions(+), 92 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index da150fcb..33f4e791 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,8 @@ if (vkcv_build_debug)
 	else()
 		set(vkcv_flags ${vkcv_flags} " -W4")
 	endif()
+	
+	set(vkcv_flags ${vkcv_flags} " -Wno-unused-parameter")
 endif()
 
 # configure everything to use the required dependencies
diff --git a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp
index b1105127..5129cc1f 100644
--- a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp
+++ b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp
@@ -206,9 +206,9 @@ namespace vkcv::upscaling {
 				program.addShader(shaderStage, path);
 			});
 			
-			m_easuPipeline = m_core.createComputePipeline(program, {
+			m_easuPipeline = m_core.createComputePipeline({ program, {
 				m_core.getDescriptorSet(m_easuDescriptorSet).layout
-			});
+			}});
 			
 			DescriptorWrites writes;
 			writes.uniformBufferWrites.emplace_back(
@@ -227,9 +227,9 @@ namespace vkcv::upscaling {
 				program.addShader(shaderStage, path);
 			});
 			
-			m_rcasPipeline = m_core.createComputePipeline(program, {
+			m_rcasPipeline = m_core.createComputePipeline({ program, {
 				m_core.getDescriptorSet(m_rcasDescriptorSet).layout
-			});
+			}});
 			
 			DescriptorWrites writes;
 			writes.uniformBufferWrites.emplace_back(
diff --git a/projects/indirect_dispatch/src/App.cpp b/projects/indirect_dispatch/src/App.cpp
index 59279703..c07d151c 100644
--- a/projects/indirect_dispatch/src/App.cpp
+++ b/projects/indirect_dispatch/src/App.cpp
@@ -4,6 +4,21 @@
 #include <vkcv/gui/GUI.hpp>
 #include <functional>
 
+const char* MotionVectorVisualisationModeLabels[6] = {
+		"None",
+		"Full resolution",
+		"Max tile",
+		"Tile neighbourhood max",
+		"Min Tile",
+		"Tile neighbourhood min"
+};
+
+const char* MotionBlurModeLabels[3] = {
+		"Default",
+		"Disabled",
+		"Tile visualisation"
+};
+
 App::App() : 
 	m_applicationName("Indirect Dispatch"),
 	m_windowWidth(AppConfig::defaultWindowWidth),
diff --git a/projects/indirect_dispatch/src/App.hpp b/projects/indirect_dispatch/src/App.hpp
index d580793b..4ce66e9b 100644
--- a/projects/indirect_dispatch/src/App.hpp
+++ b/projects/indirect_dispatch/src/App.hpp
@@ -12,8 +12,8 @@ public:
 private:
 	const char* m_applicationName;
 
-	int m_windowWidth;
-	int m_windowHeight;
+	uint32_t m_windowWidth;
+	uint32_t m_windowHeight;
 
 	vkcv::Window                m_window;
 	vkcv::Core                  m_core;
diff --git a/projects/indirect_dispatch/src/AppSetup.cpp b/projects/indirect_dispatch/src/AppSetup.cpp
index 267ac6bd..e117036d 100644
--- a/projects/indirect_dispatch/src/AppSetup.cpp
+++ b/projects/indirect_dispatch/src/AppSetup.cpp
@@ -256,9 +256,9 @@ bool loadComputePass(vkcv::Core& core, const std::filesystem::path& path, Comput
 
 	outComputePass->descriptorSet = core.createDescriptorSet(shaderProgram.getReflectedDescriptors()[0]);
 
-	outComputePass->pipeline = core.createComputePipeline(
-		shaderProgram,
-		{ core.getDescriptorSet(outComputePass->descriptorSet).layout });
+	outComputePass->pipeline = core.createComputePipeline({
+		shaderProgram, { core.getDescriptorSet(outComputePass->descriptorSet).layout }
+	});
 
 	if (!outComputePass->pipeline) {
 		vkcv_log(vkcv::LogLevel::ERROR, "Compute shader pipeline creation failed");
diff --git a/projects/indirect_dispatch/src/MotionBlur.hpp b/projects/indirect_dispatch/src/MotionBlur.hpp
index b50f0af6..4e600379 100644
--- a/projects/indirect_dispatch/src/MotionBlur.hpp
+++ b/projects/indirect_dispatch/src/MotionBlur.hpp
@@ -13,25 +13,12 @@ enum class eMotionVectorVisualisationMode : int {
 	MinTileNeighbourhood    = 5,
 	OptionCount             = 6 };
 
-static const char* MotionVectorVisualisationModeLabels[6] = {
-	"None",
-	"Full resolution",
-	"Max tile",
-	"Tile neighbourhood max",
-	"Min Tile",
-	"Tile neighbourhood min"};
-
 enum class eMotionBlurMode : int {
 	Default             = 0,
 	Disabled            = 1,
 	TileVisualisation   = 2,
 	OptionCount         = 3 };
 
-static const char* MotionBlurModeLabels[3] = {
-	"Default",
-	"Disabled",
-	"Tile visualisation" };
-
 class MotionBlur {
 public:
 
diff --git a/projects/particle_simulation/src/BloomAndFlares.cpp b/projects/particle_simulation/src/BloomAndFlares.cpp
index 5961aae6..057d5845 100644
--- a/projects/particle_simulation/src/BloomAndFlares.cpp
+++ b/projects/particle_simulation/src/BloomAndFlares.cpp
@@ -33,8 +33,9 @@ BloomAndFlares::BloomAndFlares(
 		m_DownsampleDescSets.push_back(
                 p_Core->createDescriptorSet(dsProg.getReflectedDescriptors()[0]));
     }
-    m_DownsamplePipe = p_Core->createComputePipeline(
-            dsProg, { p_Core->getDescriptorSet(m_DownsampleDescSets[0]).layout });
+    m_DownsamplePipe = p_Core->createComputePipeline({
+		dsProg, { p_Core->getDescriptorSet(m_DownsampleDescSets[0]).layout }
+	});
 
     // UPSAMPLE
     vkcv::ShaderProgram usProg;
@@ -49,8 +50,9 @@ BloomAndFlares::BloomAndFlares(
         m_UpsampleDescSets.push_back(
                 p_Core->createDescriptorSet(usProg.getReflectedDescriptors()[0]));
     }
-    m_UpsamplePipe = p_Core->createComputePipeline(
-            usProg, { p_Core->getDescriptorSet(m_UpsampleDescSets[0]).layout });
+    m_UpsamplePipe = p_Core->createComputePipeline({
+		usProg, { p_Core->getDescriptorSet(m_UpsampleDescSets[0]).layout }
+	});
 
     // LENS FEATURES
     vkcv::ShaderProgram lensProg;
@@ -61,8 +63,9 @@ BloomAndFlares::BloomAndFlares(
                          lensProg.addShader(shaderStage, path);
                      });
     m_LensFlareDescSet = p_Core->createDescriptorSet(lensProg.getReflectedDescriptors()[0]);
-    m_LensFlarePipe = p_Core->createComputePipeline(
-            lensProg, { p_Core->getDescriptorSet(m_LensFlareDescSet).layout });
+    m_LensFlarePipe = p_Core->createComputePipeline({
+		lensProg, { p_Core->getDescriptorSet(m_LensFlareDescSet).layout }
+	});
 
     // COMPOSITE
     vkcv::ShaderProgram compProg;
@@ -73,8 +76,9 @@ BloomAndFlares::BloomAndFlares(
                          compProg.addShader(shaderStage, path);
                      });
     m_CompositeDescSet = p_Core->createDescriptorSet(compProg.getReflectedDescriptors()[0]);
-    m_CompositePipe = p_Core->createComputePipeline(
-            compProg, { p_Core->getDescriptorSet(m_CompositeDescSet).layout });
+    m_CompositePipe = p_Core->createComputePipeline({
+		compProg, { p_Core->getDescriptorSet(m_CompositeDescSet).layout }
+	});
 }
 
 void BloomAndFlares::execDownsamplePipe(const vkcv::CommandStreamHandle &cmdStream,
diff --git a/projects/particle_simulation/src/main.cpp b/projects/particle_simulation/src/main.cpp
index a3e34e70..9e5284d4 100644
--- a/projects/particle_simulation/src/main.cpp
+++ b/projects/particle_simulation/src/main.cpp
@@ -137,7 +137,9 @@ int main(int argc, const char **argv) {
 
     vkcv::PipelineHandle particlePipeline = core.createGraphicsPipeline(particlePipelineDefinition);
 
-    vkcv::ComputePipelineHandle computePipeline = core.createComputePipeline(computeShaderProgram, {core.getDescriptorSet(computeDescriptorSet).layout} );
+    vkcv::ComputePipelineHandle computePipeline = core.createComputePipeline({
+		computeShaderProgram, { core.getDescriptorSet(computeDescriptorSet).layout }
+	});
 
     vkcv::Buffer<glm::vec4> color = core.createBuffer<glm::vec4>(
             vkcv::BufferType::UNIFORM,
@@ -228,9 +230,9 @@ int main(int argc, const char **argv) {
     });
 
     vkcv::DescriptorSetHandle tonemappingDescriptor = core.createDescriptorSet(tonemappingShader.getReflectedDescriptors()[0]);
-    vkcv::ComputePipelineHandle tonemappingPipe = core.createComputePipeline(
-        tonemappingShader, 
-        { core.getDescriptorSet(tonemappingDescriptor).layout });
+    vkcv::ComputePipelineHandle tonemappingPipe = core.createComputePipeline({
+		tonemappingShader, { core.getDescriptorSet(tonemappingDescriptor).layout }
+	});
 
     std::uniform_real_distribution<float> rdm = std::uniform_real_distribution<float>(0.95f, 1.05f);
     std::default_random_engine rdmEngine;
diff --git a/projects/voxelization/src/BloomAndFlares.cpp b/projects/voxelization/src/BloomAndFlares.cpp
index 6cb02e90..91b7e736 100644
--- a/projects/voxelization/src/BloomAndFlares.cpp
+++ b/projects/voxelization/src/BloomAndFlares.cpp
@@ -47,8 +47,9 @@ BloomAndFlares::BloomAndFlares(
 		m_DownsampleDescSets.push_back(
                 p_Core->createDescriptorSet(dsProg.getReflectedDescriptors()[0]));
     }
-    m_DownsamplePipe = p_Core->createComputePipeline(
-            dsProg, { p_Core->getDescriptorSet(m_DownsampleDescSets[0]).layout });
+    m_DownsamplePipe = p_Core->createComputePipeline({
+		dsProg, {p_Core->getDescriptorSet(m_DownsampleDescSets[0]).layout}
+	});
 
     // UPSAMPLE
     vkcv::ShaderProgram usProg;
@@ -68,8 +69,9 @@ BloomAndFlares::BloomAndFlares(
             p_Core->createDescriptorSet(usProg.getReflectedDescriptors()[0]));
     }
 
-    m_UpsamplePipe = p_Core->createComputePipeline(
-            usProg, { p_Core->getDescriptorSet(m_UpsampleDescSets[0]).layout });
+    m_UpsamplePipe = p_Core->createComputePipeline({
+		usProg, { p_Core->getDescriptorSet(m_UpsampleDescSets[0]).layout }
+	});
 
     // LENS FEATURES
     vkcv::ShaderProgram lensProg;
@@ -80,8 +82,9 @@ BloomAndFlares::BloomAndFlares(
                          lensProg.addShader(shaderStage, path);
                      });
     m_LensFlareDescSet = p_Core->createDescriptorSet(lensProg.getReflectedDescriptors()[0]);
-    m_LensFlarePipe = p_Core->createComputePipeline(
-            lensProg, { p_Core->getDescriptorSet(m_LensFlareDescSet).layout });
+    m_LensFlarePipe = p_Core->createComputePipeline({
+		lensProg, { p_Core->getDescriptorSet(m_LensFlareDescSet).layout }
+	});
 
     // COMPOSITE
     vkcv::ShaderProgram compProg;
@@ -92,8 +95,9 @@ BloomAndFlares::BloomAndFlares(
                          compProg.addShader(shaderStage, path);
                      });
     m_CompositeDescSet = p_Core->createDescriptorSet(compProg.getReflectedDescriptors()[0]);
-    m_CompositePipe = p_Core->createComputePipeline(
-            compProg, { p_Core->getDescriptorSet(m_CompositeDescSet).layout });
+    m_CompositePipe = p_Core->createComputePipeline({
+		compProg, { p_Core->getDescriptorSet(m_CompositeDescSet).layout }
+	});
 
     // radial LUT
     const auto texture = vkcv::asset::loadTexture("resources/RadialLUT.png");
diff --git a/projects/voxelization/src/ShadowMapping.cpp b/projects/voxelization/src/ShadowMapping.cpp
index 32dd5457..e04ea8ac 100644
--- a/projects/voxelization/src/ShadowMapping.cpp
+++ b/projects/voxelization/src/ShadowMapping.cpp
@@ -190,7 +190,9 @@ ShadowMapping::ShadowMapping(vkcv::Core* corePtr, const vkcv::VertexLayout& vert
 	// depth to moments
 	vkcv::ShaderProgram depthToMomentsShader    = loadDepthToMomentsShader();
 	m_depthToMomentsDescriptorSet               = corePtr->createDescriptorSet(depthToMomentsShader.getReflectedDescriptors()[0]);
-	m_depthToMomentsPipe                        = corePtr->createComputePipeline(depthToMomentsShader, { corePtr->getDescriptorSet(m_depthToMomentsDescriptorSet).layout });
+	m_depthToMomentsPipe                        = corePtr->createComputePipeline({
+		depthToMomentsShader, { corePtr->getDescriptorSet(m_depthToMomentsDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites depthToMomentDescriptorWrites;
 	depthToMomentDescriptorWrites.sampledImageWrites    = { vkcv::SampledImageDescriptorWrite(0, m_shadowMapDepth.getHandle()) };
@@ -201,7 +203,9 @@ ShadowMapping::ShadowMapping(vkcv::Core* corePtr, const vkcv::VertexLayout& vert
 	// shadow blur X
 	vkcv::ShaderProgram shadowBlurXShader    = loadShadowBlurXShader();
 	m_shadowBlurXDescriptorSet              = corePtr->createDescriptorSet(shadowBlurXShader.getReflectedDescriptors()[0]);
-	m_shadowBlurXPipe                       = corePtr->createComputePipeline(shadowBlurXShader, { corePtr->getDescriptorSet(m_shadowBlurXDescriptorSet).layout });
+	m_shadowBlurXPipe                       = corePtr->createComputePipeline({
+		shadowBlurXShader, { corePtr->getDescriptorSet(m_shadowBlurXDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites shadowBlurXDescriptorWrites;
 	shadowBlurXDescriptorWrites.sampledImageWrites   = { vkcv::SampledImageDescriptorWrite(0, m_shadowMap.getHandle()) };
@@ -212,7 +216,9 @@ ShadowMapping::ShadowMapping(vkcv::Core* corePtr, const vkcv::VertexLayout& vert
 	// shadow blur Y
 	vkcv::ShaderProgram shadowBlurYShader = loadShadowBlurYShader();
 	m_shadowBlurYDescriptorSet = corePtr->createDescriptorSet(shadowBlurYShader.getReflectedDescriptors()[0]);
-	m_shadowBlurYPipe = corePtr->createComputePipeline(shadowBlurYShader, { corePtr->getDescriptorSet(m_shadowBlurYDescriptorSet).layout });
+	m_shadowBlurYPipe = corePtr->createComputePipeline({
+		shadowBlurYShader, { corePtr->getDescriptorSet(m_shadowBlurYDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites shadowBlurYDescriptorWrites;
 	shadowBlurYDescriptorWrites.sampledImageWrites  = { vkcv::SampledImageDescriptorWrite(0, m_shadowMapIntermediate.getHandle()) };
diff --git a/projects/voxelization/src/Voxelization.cpp b/projects/voxelization/src/Voxelization.cpp
index f7e03709..178280f0 100644
--- a/projects/voxelization/src/Voxelization.cpp
+++ b/projects/voxelization/src/Voxelization.cpp
@@ -83,12 +83,12 @@ Voxelization::Voxelization(
 	vkcv::SamplerHandle voxelSampler,
 	vkcv::Multisampling msaa)
 	:
-	m_corePtr(corePtr), 
-	m_voxelImage(m_corePtr->createImage(vk::Format::eR16G16B16A16Sfloat, voxelResolution, voxelResolution, voxelResolution, true, true)),
+	m_corePtr(corePtr),
 	m_voxelImageIntermediate(m_corePtr->createImage(vk::Format::eR16G16B16A16Sfloat, voxelResolution, voxelResolution, voxelResolution, true, true)),
+	m_voxelImage(m_corePtr->createImage(vk::Format::eR16G16B16A16Sfloat, voxelResolution, voxelResolution, voxelResolution, true, true)),
+	m_voxelBuffer(m_corePtr->createBuffer<VoxelBufferContent>(vkcv::BufferType::STORAGE, voxelCount)),
 	m_dummyRenderTarget(m_corePtr->createImage(voxelizationDummyFormat, voxelResolution, voxelResolution, 1, false, false, true)),
-	m_voxelInfoBuffer(m_corePtr->createBuffer<VoxelizationInfo>(vkcv::BufferType::UNIFORM, 1)),
-	m_voxelBuffer(m_corePtr->createBuffer<VoxelBufferContent>(vkcv::BufferType::STORAGE, voxelCount)){
+	m_voxelInfoBuffer(m_corePtr->createBuffer<VoxelizationInfo>(vkcv::BufferType::UNIFORM, 1)) {
 
 	const vkcv::ShaderProgram voxelizationShader = loadVoxelizationShader();
 
@@ -166,8 +166,8 @@ Voxelization::Voxelization(
 	m_visualisationPipe = m_corePtr->createGraphicsPipeline(voxelVisualisationPipeConfig);
 
 	std::vector<uint16_t> voxelIndexData;
-	for (int i = 0; i < voxelCount; i++) {
-		voxelIndexData.push_back(i);
+	for (uint32_t i = 0; i < voxelCount; i++) {
+		voxelIndexData.push_back(static_cast<uint16_t>(i));
 	}
 
 	const vkcv::DescriptorSetUsage voxelizationDescriptorUsage(0, m_corePtr->getDescriptorSet(m_visualisationDescriptorSet).vulkanHandle);
@@ -175,9 +175,9 @@ Voxelization::Voxelization(
 	vkcv::ShaderProgram resetVoxelShader = loadVoxelResetShader();
 
 	m_voxelResetDescriptorSet = m_corePtr->createDescriptorSet(resetVoxelShader.getReflectedDescriptors()[0]);
-	m_voxelResetPipe = m_corePtr->createComputePipeline(
-		resetVoxelShader,
-		{ m_corePtr->getDescriptorSet(m_voxelResetDescriptorSet).layout });
+	m_voxelResetPipe = m_corePtr->createComputePipeline({
+		resetVoxelShader, { m_corePtr->getDescriptorSet(m_voxelResetDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites resetVoxelWrites;
 	resetVoxelWrites.storageBufferWrites = { vkcv::BufferDescriptorWrite(0, m_voxelBuffer.getHandle()) };
@@ -187,9 +187,9 @@ Voxelization::Voxelization(
 	vkcv::ShaderProgram bufferToImageShader = loadVoxelBufferToImageShader();
 
 	m_bufferToImageDescriptorSet = m_corePtr->createDescriptorSet(bufferToImageShader.getReflectedDescriptors()[0]);
-	m_bufferToImagePipe = m_corePtr->createComputePipeline(
-		bufferToImageShader,
-		{ m_corePtr->getDescriptorSet(m_bufferToImageDescriptorSet).layout });
+	m_bufferToImagePipe = m_corePtr->createComputePipeline({
+		bufferToImageShader, { m_corePtr->getDescriptorSet(m_bufferToImageDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites bufferToImageDescriptorWrites;
 	bufferToImageDescriptorWrites.storageBufferWrites = { vkcv::BufferDescriptorWrite(0, m_voxelBuffer.getHandle()) };
@@ -200,9 +200,9 @@ Voxelization::Voxelization(
 	vkcv::ShaderProgram secondaryBounceShader = loadSecondaryBounceShader();
 
 	m_secondaryBounceDescriptorSet = m_corePtr->createDescriptorSet(secondaryBounceShader.getReflectedDescriptors()[0]);
-	m_secondaryBouncePipe = m_corePtr->createComputePipeline(
-		secondaryBounceShader,
-		{ m_corePtr->getDescriptorSet(m_secondaryBounceDescriptorSet).layout });
+	m_secondaryBouncePipe = m_corePtr->createComputePipeline({
+		secondaryBounceShader, { m_corePtr->getDescriptorSet(m_secondaryBounceDescriptorSet).layout }
+	});
 
 	vkcv::DescriptorWrites secondaryBounceDescriptorWrites;
 	secondaryBounceDescriptorWrites.storageBufferWrites = { vkcv::BufferDescriptorWrite(0, m_voxelBuffer.getHandle()) };
diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp
index 8ef294dc..2c17eb4d 100644
--- a/projects/voxelization/src/main.cpp
+++ b/projects/voxelization/src/main.cpp
@@ -427,9 +427,9 @@ int main(int argc, const char** argv) {
 	});
 	vkcv::DescriptorSetHandle tonemappingDescriptorSet = core.createDescriptorSet(
 		tonemappingProgram.getReflectedDescriptors()[0]);
-	vkcv::ComputePipelineHandle tonemappingPipeline = core.createComputePipeline(
-		tonemappingProgram,
-		{ core.getDescriptorSet(tonemappingDescriptorSet).layout });
+	vkcv::ComputePipelineHandle tonemappingPipeline = core.createComputePipeline({
+		tonemappingProgram, { core.getDescriptorSet(tonemappingDescriptorSet).layout }
+	});
 	
 	// tonemapping compute shader
 	vkcv::ShaderProgram postEffectsProgram;
@@ -439,9 +439,9 @@ int main(int argc, const char** argv) {
 	});
 	vkcv::DescriptorSetHandle postEffectsDescriptorSet = core.createDescriptorSet(
 			postEffectsProgram.getReflectedDescriptors()[0]);
-	vkcv::ComputePipelineHandle postEffectsPipeline = core.createComputePipeline(
-			postEffectsProgram,
-			{ core.getDescriptorSet(postEffectsDescriptorSet).layout });
+	vkcv::ComputePipelineHandle postEffectsPipeline = core.createComputePipeline({
+		postEffectsProgram, { core.getDescriptorSet(postEffectsDescriptorSet).layout }
+	});
 
 	// resolve compute shader
 	vkcv::ShaderProgram resolveProgram;
@@ -451,9 +451,9 @@ int main(int argc, const char** argv) {
 	});
 	vkcv::DescriptorSetHandle resolveDescriptorSet = core.createDescriptorSet(
 		resolveProgram.getReflectedDescriptors()[0]);
-	vkcv::ComputePipelineHandle resolvePipeline = core.createComputePipeline(
-		resolveProgram,
-		{ core.getDescriptorSet(resolveDescriptorSet).layout });
+	vkcv::ComputePipelineHandle resolvePipeline = core.createComputePipeline({
+		resolveProgram, { core.getDescriptorSet(resolveDescriptorSet).layout }
+	});
 
 	vkcv::SamplerHandle resolveSampler = core.createSampler(
 		vkcv::SamplerFilterType::NEAREST,
@@ -939,9 +939,9 @@ int main(int argc, const char** argv) {
 					[&](vkcv::ShaderStage shaderStage, const std::filesystem::path& path) {
 					newProgram.addShader(shaderStage, path);
 				});
-				vkcv::ComputePipelineHandle newPipeline = core.createComputePipeline(
-					newProgram,
-					{ core.getDescriptorSet(tonemappingDescriptorSet).layout });
+				vkcv::ComputePipelineHandle newPipeline = core.createComputePipeline({
+					newProgram, { core.getDescriptorSet(tonemappingDescriptorSet).layout }
+				});
 
 				if (newPipeline) {
 					tonemappingPipeline = newPipeline;
diff --git a/src/vkcv/PassManager.cpp b/src/vkcv/PassManager.cpp
index e50f800a..5eb727c7 100644
--- a/src/vkcv/PassManager.cpp
+++ b/src/vkcv/PassManager.cpp
@@ -3,26 +3,6 @@
 
 namespace vkcv
 {
-    static vk::ImageLayout getVkLayoutFromAttachLayout(AttachmentLayout layout)
-    {
-        switch(layout)
-        {
-            case AttachmentLayout::GENERAL:
-                return vk::ImageLayout::eGeneral;
-            case AttachmentLayout::COLOR_ATTACHMENT:
-                return vk::ImageLayout::eColorAttachmentOptimal;
-            case AttachmentLayout::SHADER_READ_ONLY:
-                return vk::ImageLayout::eShaderReadOnlyOptimal;
-            case AttachmentLayout::DEPTH_STENCIL_ATTACHMENT:
-                return vk::ImageLayout::eDepthStencilAttachmentOptimal;
-            case AttachmentLayout::DEPTH_STENCIL_READ_ONLY:
-                return vk::ImageLayout::eDepthStencilReadOnlyOptimal;
-            case AttachmentLayout::PRESENTATION:
-                return vk::ImageLayout::ePresentSrcKHR;
-            default:
-                return vk::ImageLayout::eUndefined;
-        }
-    }
 
     static vk::AttachmentStoreOp getVkStoreOpFromAttachOp(AttachmentOperation op)
     {
-- 
GitLab