From df3a27db0271c32229707acb00e1a5190a5b29a2 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Fri, 27 Apr 2018 10:26:33 +0200 Subject: [PATCH 1/3] Update VulkanTexture.hpp --- base/VulkanTexture.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/VulkanTexture.hpp b/base/VulkanTexture.hpp index e294c7cf..3f00b2ca 100644 --- a/base/VulkanTexture.hpp +++ b/base/VulkanTexture.hpp @@ -320,7 +320,7 @@ namespace vks // and can be directly used as textures image = mappableImage; deviceMemory = mappableMemory; - imageLayout = imageLayout; + this.imageLayout = imageLayout; // Setup image memory barrier vks::tools::setImageLayout(copyCmd, image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_UNDEFINED, imageLayout); @@ -973,4 +973,4 @@ namespace vks } }; -} \ No newline at end of file +} From 51fe3eee02107d06b36741b5661e1d607c06ed75 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Wed, 2 May 2018 14:22:54 +0200 Subject: [PATCH 2/3] Update triangle.cpp --- examples/triangle/triangle.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/triangle/triangle.cpp b/examples/triangle/triangle.cpp index 095a472d..8fea1aba 100644 --- a/examples/triangle/triangle.cpp +++ b/examples/triangle/triangle.cpp @@ -463,10 +463,6 @@ public: VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &indices.memory)); VK_CHECK_RESULT(vkBindBufferMemory(device, indices.buffer, indices.memory, 0)); - VkCommandBufferBeginInfo cmdBufferBeginInfo = {}; - cmdBufferBeginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - cmdBufferBeginInfo.pNext = nullptr; - // Buffer copies have to be submitted to a queue, so we need a command buffer for them // Note: Some devices offer a dedicated transfer queue (with only the transfer bit set) that may be faster when doing lots of copies VkCommandBuffer copyCmd = getCommandBuffer(true); From 22b18a770820f7d1692ea63e011326b21c65bdbf Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Wed, 2 May 2018 14:24:24 +0200 Subject: [PATCH 3/3] Update VulkanTexture.hpp --- base/VulkanTexture.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/VulkanTexture.hpp b/base/VulkanTexture.hpp index 3f00b2ca..fdff7517 100644 --- a/base/VulkanTexture.hpp +++ b/base/VulkanTexture.hpp @@ -320,7 +320,7 @@ namespace vks // and can be directly used as textures image = mappableImage; deviceMemory = mappableMemory; - this.imageLayout = imageLayout; + this->imageLayout = imageLayout; // Setup image memory barrier vks::tools::setImageLayout(copyCmd, image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_UNDEFINED, imageLayout);