Merge branch 'SP3-1-Rendering' into SP3-4-editor
This commit is contained in:
commit
8208e14fed
|
@ -24,12 +24,32 @@ namespace SHADE
|
|||
pool = device->GetVkLogicalDevice().createDescriptorPool(POOL_CREATE_INFO);
|
||||
}
|
||||
|
||||
SHVkDescriptorPool::SHVkDescriptorPool(SHVkDescriptorPool&& rhs) noexcept
|
||||
: device{ rhs.device }
|
||||
, pool{ rhs.pool }
|
||||
{
|
||||
rhs.pool = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
SHVkDescriptorPool::~SHVkDescriptorPool() noexcept
|
||||
{
|
||||
if (pool)
|
||||
device->GetVkLogicalDevice().destroyDescriptorPool(pool);
|
||||
}
|
||||
|
||||
SHVkDescriptorPool& SHVkDescriptorPool::operator=(SHVkDescriptorPool&& rhs) noexcept
|
||||
{
|
||||
if (&rhs == this)
|
||||
return *this;
|
||||
|
||||
device = rhs.device;
|
||||
pool = rhs.pool;
|
||||
|
||||
rhs.pool = VK_NULL_HANDLE;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::vector<Handle<SHVkDescriptorSetGroup>> SHVkDescriptorPool::Allocate(const std::vector<Handle<SHVkDescriptorSetLayout>>& layouts, std::vector<uint32_t> const& variableDescCounts)
|
||||
{
|
||||
SHVkInstance::GetResourceManager().Create<SHVkDescriptorSetGroup>(device, GetHandle(), layouts, variableDescCounts);
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace SHADE
|
|||
/// </param>
|
||||
SHVkDescriptorPool(Handle<SHVkLogicalDevice> device, const Config& config = {});
|
||||
SHVkDescriptorPool(const SHVkDescriptorPool&) = delete;
|
||||
SHVkDescriptorPool(SHVkDescriptorPool&& rhs) noexcept = default;
|
||||
SHVkDescriptorPool(SHVkDescriptorPool&& rhs) noexcept;
|
||||
/// <summary>
|
||||
/// Destructor which will unload and deallocate all resources for this Pool.
|
||||
/// </summary>
|
||||
|
@ -75,7 +75,7 @@ namespace SHADE
|
|||
/* Overloaded Operators */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
SHVkDescriptorPool& operator=(const SHVkDescriptorPool&) = delete;
|
||||
SHVkDescriptorPool& operator=(SHVkDescriptorPool&& rhs) noexcept = default;
|
||||
SHVkDescriptorPool& operator=(SHVkDescriptorPool&& rhs) noexcept;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Getter Functions */
|
||||
|
|
|
@ -509,6 +509,12 @@ namespace SHADE
|
|||
|
||||
}
|
||||
|
||||
Handle<SHVkDescriptorPool> SHVkLogicalDevice::CreateDescriptorPools(const SHVkDescriptorPool::Config& config /*= {}*/) noexcept
|
||||
{
|
||||
return SHVkInstance::GetResourceManager().Create <SHVkDescriptorPool>(GetHandle(), config);
|
||||
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
/*!
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "Graphics/Pipeline/SHPipelineState.h"
|
||||
#include "Graphics/Pipeline/SHPipelineType.h"
|
||||
#include "vk_mem_alloc.h"
|
||||
//#include "Graphics/DescriptorSets/SHDescriptorPool.h"
|
||||
#include "Graphics/Descriptors/SHVkDescriptorPool.h"
|
||||
#include "Graphics/Descriptors/SHVkDescriptorSetLayout.h"
|
||||
|
||||
namespace SHADE
|
||||
|
@ -165,6 +165,7 @@ namespace SHADE
|
|||
Handle<SHVkRenderpass> CreateRenderpass (std::span<vk::AttachmentDescription> const vkDescriptions, std::span<vk::SubpassDescription> const spDescs, std::span<vk::SubpassDependency> const spDeps) noexcept;
|
||||
Handle<SHVkFramebuffer> CreateFramebuffer (Handle<SHVkRenderpass> const& renderpassHdl, std::vector<Handle<SHVkImageView>> const& attachments, uint32_t inWidth, uint32_t inHeight) noexcept;
|
||||
Handle<SHVkDescriptorSetLayout> CreateDescriptorSetLayout (std::vector<SHVkDescriptorSetLayout::Binding> const& bindings) noexcept;
|
||||
Handle<SHVkDescriptorPool> CreateDescriptorPools (const SHVkDescriptorPool::Config& config = {}) noexcept;
|
||||
Handle<SHVkPipelineLayout> CreatePipelineLayout (SHPipelineLayoutParams& pipelineLayoutParams) noexcept;
|
||||
Handle<SHVkFence> CreateFence (void) const noexcept;
|
||||
Handle<SHVkSemaphore> CreateSemaphore (void) const noexcept;
|
||||
|
|
|
@ -86,6 +86,8 @@ namespace SHADE
|
|||
|
||||
|
||||
|
||||
descPool = device->CreateDescriptorPools();
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
|
|
@ -22,6 +22,7 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include "Graphics/MiddleEnd/PerFrame/SHRenderContext.h"
|
||||
#include "Graphics/RenderGraph/SHRenderGraph.h"
|
||||
#include "Engine/ECS_Base/System/SHSystem.h"
|
||||
#include "Graphics/Descriptors/SHVkDescriptorPool.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
|
@ -114,6 +115,7 @@ namespace SHADE
|
|||
Handle<SHVkSurface> GetSurface() const { return surface; }
|
||||
Handle<SHVkPhysicalDevice> GetPhysicalDevice() const {return physicalDevice;}
|
||||
Handle<SHVkQueue> GetQueue() const { return queue; }
|
||||
Handle<SHVkDescriptorPool> GetDescriptorPool() const { return descPool; }
|
||||
//Handle<SHVkRenderpass> GetRenderPass() const { return renderPass; }
|
||||
|
||||
|
||||
|
@ -127,6 +129,7 @@ namespace SHADE
|
|||
Handle<SHVkSurface> surface;
|
||||
Handle<SHVkSwapchain> swapchain;
|
||||
Handle<SHVkQueue> queue;
|
||||
Handle<SHVkDescriptorPool> descPool;
|
||||
//Handle<SHVkRenderpass> renderPass; // Potentially bring out?
|
||||
std::vector<SHScreenSegment> screenSegments;
|
||||
SHRenderContext renderContext;
|
||||
|
|
Loading…
Reference in New Issue