[WIP] Refactor creation of descriptorsets
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
#include "IShaderOwner.hpp"
|
||||
#include "ManagedResource.hpp"
|
||||
#include "Vulkan/Image.hpp"
|
||||
#include "Scene/Shader/DescriptorInputDescription.hpp"
|
||||
#include <mutex>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
||||
namespace openVulkanoCpp
|
||||
{
|
||||
@@ -22,15 +24,20 @@ namespace openVulkanoCpp
|
||||
class Geometry;
|
||||
class Material;
|
||||
class Texture;
|
||||
class Shader;
|
||||
}
|
||||
|
||||
namespace Vulkan
|
||||
{
|
||||
class Context;
|
||||
class VulkanGeometry;
|
||||
class VulkanTexture;
|
||||
class UniformBuffer;
|
||||
|
||||
class ResourceManager : public ICloseable, public IShaderOwner
|
||||
{
|
||||
friend UniformBuffer;
|
||||
|
||||
Context* context;
|
||||
vk::Device device = nullptr;
|
||||
vk::Queue transferQueue = nullptr;
|
||||
@@ -45,6 +52,8 @@ namespace openVulkanoCpp
|
||||
std::vector<std::vector<ManagedBuffer*>> toFree;
|
||||
std::vector<ManagedBuffer*> recycleBuffers;
|
||||
std::function<void(ManagedBuffer*)> freeFunction;
|
||||
vk::DescriptorPool descriptorPool;
|
||||
std::map<DescriptorSetLayoutBinding, vk::DescriptorSetLayout> descriptorSetLayoutCache;
|
||||
|
||||
int buffers = -1, currentBuffer = -1;
|
||||
|
||||
@@ -104,6 +113,8 @@ namespace openVulkanoCpp
|
||||
|
||||
MemoryAllocation* GetFreeMemoryAllocation(size_t size, uint32_t type, bool createIfAllFull = true);
|
||||
|
||||
vk::DescriptorSetLayout* GetDescriptorLayoutSet(const DescriptorSetLayoutBinding& descriptorSetLayoutBinding);
|
||||
|
||||
public:
|
||||
VulkanShader* CreateShader(Scene::Shader* shader);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user