From 94cb62322a9e68fc096d9b58f66a1718845d82e8 Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Fri, 30 Sep 2022 20:31:33 +0200
Subject: [PATCH] Fix confusion from fsr2 dispatch wording

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 modules/upscaling/include/vkcv/upscaling/FSR2Upscaling.hpp | 6 +-----
 modules/upscaling/src/vkcv/upscaling/FSR2Upscaling.cpp     | 6 +++---
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/upscaling/include/vkcv/upscaling/FSR2Upscaling.hpp b/modules/upscaling/include/vkcv/upscaling/FSR2Upscaling.hpp
index d8402c03..d61eef8d 100644
--- a/modules/upscaling/include/vkcv/upscaling/FSR2Upscaling.hpp
+++ b/modules/upscaling/include/vkcv/upscaling/FSR2Upscaling.hpp
@@ -176,11 +176,7 @@ namespace vkcv::upscaling {
 		/**
 		 * Record the commands of the FSR2 upscaling instance to
 		 * scale the image of the input handle to the resolution of
-		 * the output image handle via FidelityFX Super Resolution
-		 * and dispatch them.
-		 *
-		 * Beware that this method will dispatch the commands
-		 * automatically!
+		 * the output image handle via FidelityFX Super Resolution.
 		 *
 		 * @param[in] cmdStream Command stream handle to record commands
 		 * @param[in] colorInput Color input image handle
diff --git a/modules/upscaling/src/vkcv/upscaling/FSR2Upscaling.cpp b/modules/upscaling/src/vkcv/upscaling/FSR2Upscaling.cpp
index d3b7b6c5..2737d5f7 100644
--- a/modules/upscaling/src/vkcv/upscaling/FSR2Upscaling.cpp
+++ b/modules/upscaling/src/vkcv/upscaling/FSR2Upscaling.cpp
@@ -264,9 +264,9 @@ namespace vkcv::upscaling {
 		dispatch.cameraFar = m_far;
 		dispatch.cameraFovAngleVertical = m_fov;
 		
-		m_core.recordCommandsToStream(cmdStream, [&dispatch](const vk::CommandBuffer& cmdBuffer) {
+		m_core.recordCommandsToStream(cmdStream, [&](const vk::CommandBuffer& cmdBuffer) {
 			dispatch.commandList = ffxGetCommandListVK(cmdBuffer);
-		}, [&]() {
+			
 			assert(ffxFsr2ContextDispatch(
 					&m_context,
 					&dispatch
@@ -274,7 +274,7 @@ namespace vkcv::upscaling {
 			
 			m_frameIndex++;
 			m_reset = false;
-		});
+		}, nullptr);
 	}
 	
 	void FSR2Upscaling::setCamera(float near, float far, float fov) {
-- 
GitLab