From 2830dad8e3f9d810d71d4dbeaaf80f704857e5c0 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Sun, 16 Oct 2022 15:35:32 +0800 Subject: [PATCH] Fixed Kai Wei's issues (sampler move ctor never move device :D) --- SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp | 4 +++- .../src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp b/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp index f12b834d..30bcde79 100644 --- a/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp +++ b/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp @@ -39,7 +39,8 @@ namespace SHADE } SHVkSampler::SHVkSampler(SHVkSampler&& rhs) noexcept - : vkSampler { rhs.vkSampler } + : vkSampler{ rhs.vkSampler } + , device{ rhs.device } { rhs.vkSampler = nullptr; } @@ -56,6 +57,7 @@ namespace SHADE SHADE::SHVkSampler& SHVkSampler::operator=(SHVkSampler&& rhs) noexcept { vkSampler = rhs.vkSampler; + device = rhs.device; rhs.vkSampler = nullptr; return *this; } diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 14ddf7be..247c58fd 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -189,7 +189,6 @@ namespace SHADE worldRenderer = defaultViewport->AddRenderer(resourceManager, swapchain->GetNumImages(), renderContextCmdPools, descPool, SHGraphicsGlobalData::GetDescSetLayouts()[SHGraphicsConstants::DescriptorSetIndex::HIGH_FREQUENCY_GLOBALS], worldRenderGraph); worldRenderer->SetCamera(worldCamera); - // TODO: This is VERY temporarily here until a more solid resource management system is implemented shaderSourceLibrary.Init("../../TempShaderFolder/");