From 5ac90eebec6d4d6424e97081ca2d3946b3a31a73 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Mon, 26 Sep 2022 17:26:33 +0800 Subject: [PATCH] Fixed compilation errors --- SHADE_Engine/src/Graphics/Devices/SHVkLogicalDevice.h | 3 ++- SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp | 5 +++-- SHADE_Engine/src/Graphics/Images/SHVkSampler.h | 2 +- .../src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h | 1 + .../src/Graphics/MiddleEnd/Textures/SHVkSamplerCache.cpp | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SHADE_Engine/src/Graphics/Devices/SHVkLogicalDevice.h b/SHADE_Engine/src/Graphics/Devices/SHVkLogicalDevice.h index dbc63786..1272f68f 100644 --- a/SHADE_Engine/src/Graphics/Devices/SHVkLogicalDevice.h +++ b/SHADE_Engine/src/Graphics/Devices/SHVkLogicalDevice.h @@ -21,7 +21,6 @@ #include "Graphics/Descriptors/SHVkDescriptorSetLayout.h" #include "Graphics/Images/SHVkImage.h" - namespace SHADE { /*-----------------------------------------------------------------------*/ @@ -41,6 +40,8 @@ namespace SHADE class SHShaderBlockInterface; class SHVkDescriptorSetGroup; class SHSubpass; + class SHVkSampler; + struct SHVkSamplerParams; /***************************************************************************/ /*! diff --git a/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp b/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp index 7f29bf94..f12b834d 100644 --- a/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp +++ b/SHADE_Engine/src/Graphics/Images/SHVkSampler.cpp @@ -41,7 +41,7 @@ namespace SHADE SHVkSampler::SHVkSampler(SHVkSampler&& rhs) noexcept : vkSampler { rhs.vkSampler } { - rhs.vkSampler = nullptr; + rhs.vkSampler = nullptr; } SHVkSampler::~SHVkSampler() noexcept @@ -53,9 +53,10 @@ namespace SHADE /*-----------------------------------------------------------------------------------*/ /* Overloaded Operators */ /*-----------------------------------------------------------------------------------*/ - SHADE::SHVkSampler&& SHVkSampler::operator=(SHVkSampler&& rhs) noexcept + SHADE::SHVkSampler& SHVkSampler::operator=(SHVkSampler&& rhs) noexcept { vkSampler = rhs.vkSampler; rhs.vkSampler = nullptr; + return *this; } } \ No newline at end of file diff --git a/SHADE_Engine/src/Graphics/Images/SHVkSampler.h b/SHADE_Engine/src/Graphics/Images/SHVkSampler.h index 404ed36c..bb878a69 100644 --- a/SHADE_Engine/src/Graphics/Images/SHVkSampler.h +++ b/SHADE_Engine/src/Graphics/Images/SHVkSampler.h @@ -62,7 +62,7 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* Overloaded Operators */ /*---------------------------------------------------------------------------------*/ - SHVkSampler&& operator=(SHVkSampler&& rhs) noexcept; + SHVkSampler& operator=(SHVkSampler&& rhs) noexcept; /*---------------------------------------------------------------------------------*/ /* Getter Functions */ diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h index db82d7e2..da47723e 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h @@ -33,6 +33,7 @@ namespace SHADE class SHVkQueue; class SHVkDescriptorPool; class SHVkDescriptorSetLayout; + class SHVkDescriptorSetGroup; class SHVkSampler; /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHVkSamplerCache.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHVkSamplerCache.cpp index 01362087..8d0b6609 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHVkSamplerCache.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHVkSamplerCache.cpp @@ -9,6 +9,7 @@ Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited. *//*************************************************************************************/ +#include "SHpch.h" #include "SHVkSamplerCache.h" // Standard Library