From 5a8ea64f4b64326621906ac8563592e7ce337cfd Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Mon, 10 Oct 2022 16:40:13 +0200 Subject: [PATCH] Fix binding locations in automatic vertex bindings from attachments Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- src/vkcv/VertexLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vkcv/VertexLayout.cpp b/src/vkcv/VertexLayout.cpp index 252973f5..dc20966b 100644 --- a/src/vkcv/VertexLayout.cpp +++ b/src/vkcv/VertexLayout.cpp @@ -49,8 +49,8 @@ namespace vkcv { VertexBindings bindings; bindings.reserve(attachments.size()); - for (uint32_t i = 0; i < attachments.size(); i++) { - bindings.push_back(createVertexBinding(i, { attachments [i] })); + for (const auto& attachment : attachments) { + bindings.push_back(createVertexBinding(attachment.inputLocation, { attachment })); } return bindings; -- GitLab