Add Linux support

- Add linux build system using MakeGen
- Fix a swapchain validation error, likelydue to my linux system using a
  different vulkan version
- Make DescriptorPool take in amount of descriptors it needs, instead of
  allocating a mass amount for every pool, causing loads of RAM/VRAM usage
This commit is contained in:
Tim Håkansson
2025-08-09 21:42:15 +02:00
committed by GitHub
parent ecc11f07db
commit 4d2dfce31c
69 changed files with 389 additions and 152 deletions
@@ -1,6 +1,5 @@
#include "copium/pipeline/Pipeline.h"
#include "copium/asset/AssetManager.h"
#include "copium/buffer/Framebuffer.h"
#include "copium/core/Vulkan.h"
#include "copium/pipeline/Shader.h"
@@ -8,7 +7,6 @@
#include "copium/mesh/VertexPassthrough.h"
#include "copium/mesh/Vertex.h"
#include "copium/renderer/LineVertex.h"
#include "copium/util/FileSystem.h"
namespace Copium
{
@@ -121,6 +119,11 @@ namespace Copium
return DescriptorSet{descriptorPool, descriptorSetLayouts[setIndex], bindings};
}
int Pipeline::GetDescriptorSetCount() const
{
return boundDescriptorSets.size();
}
void Pipeline::InitializeDescriptorSetLayout(const PipelineCreator& creator)
{
boundDescriptorSets.resize(creator.descriptorSetLayouts.size());
@@ -284,4 +287,4 @@ namespace Copium
CP_VK_ASSERT(vkCreateGraphicsPipelines(Vulkan::GetDevice(), VK_NULL_HANDLE, 1, &graphicsPipelineCreateInfo, nullptr, &graphicsPipeline), "Failed to initialize graphics pipeline");
}
}
}