8#include "render/general/resource/GpuResourceManager.h"
11#include "VulkanMemoryAllocator/include/vk_mem_alloc.h"
81 const std::string& sResourceName,
82 const VkBufferCreateInfo& bufferInfo,
83 const VmaAllocationCreateInfo& allocationInfo,
84 unsigned int iElementSizeInBytes,
85 unsigned int iElementCount);
104 const std::string& sResourceName,
105 uint32_t iImageWidth,
106 uint32_t iImageHeight,
107 uint32_t iTextureMipLevelCount,
108 VkSampleCountFlagBits sampleCount,
109 VkFormat imageFormat,
110 VkImageTiling imageTilingMode,
111 VkImageUsageFlags imageUsage,
112 std::optional<VkImageAspectFlags> viewDescription,
113 bool bIsCubeMap =
false);
124 const std::string& sResourceName,
const std::filesystem::path& pathToTextureFile)
override;
155 const std::string& sResourceName,
156 size_t iElementSizeInBytes,
157 size_t iElementCount,
158 std::optional<bool> isUsedInShadersAsArrayResource)
override;
186 const std::string& sResourceName,
187 const void* pBufferData,
188 size_t iElementSizeInBytes,
189 size_t iElementCount,
190 ResourceUsageType usage,
191 bool bIsShaderReadWriteResource)
override;
209 const std::string& sResourceName,
210 size_t iElementSizeInBytes,
211 size_t iElementCount,
212 ResourceUsageType usage,
213 bool bIsShaderReadWriteResource)
override;
226 const std::string& sResourceName,
228 unsigned int iHeight,
229 ShaderReadWriteTextureResourceFormat format)
override;
254 static std::optional<VkBufferUsageFlagBits>
269 const std::string& sResourceName,
270 unsigned int iTextureSize,
271 bool bPointLightColorCubemap)
override;
290 const std::string& sResourceName,
291 VkDeviceSize iBufferSize,
292 VkBufferUsageFlags bufferUsage,
294 unsigned int iElementSizeInBytes,
295 unsigned int iElementCount);
Definition: GpuResourceManager.h:43
Renderer *const pRenderer
Definition: GpuResourceManager.h:300
Definition: KtxLoadingCallbackManager.h:17
Definition: UploadBuffer.h:14
Definition: VulkanRenderer.h:26
Definition: VulkanResourceManager.h:18
static std::optional< VkBufferUsageFlagBits > convertResourceUsageTypeToVkBufferUsageType(ResourceUsageType usage)
Definition: VulkanResourceManager.cpp:63
virtual std::variant< std::unique_ptr< GpuResource >, Error > loadTextureFromDisk(const std::string &sResourceName, const std::filesystem::path &pathToTextureFile) override
Definition: VulkanResourceManager.cpp:604
virtual std::variant< std::unique_ptr< UploadBuffer >, Error > createResourceWithCpuWriteAccess(const std::string &sResourceName, size_t iElementSizeInBytes, size_t iElementCount, std::optional< bool > isUsedInShadersAsArrayResource) override
Definition: VulkanResourceManager.cpp:281
virtual std::variant< std::unique_ptr< GpuResource >, Error > createShadowMapTexture(const std::string &sResourceName, unsigned int iTextureSize, bool bPointLightColorCubemap) override
Definition: VulkanResourceManager.cpp:519
std::variant< std::unique_ptr< VulkanResource >, Error > createBuffer(const std::string &sResourceName, const VkBufferCreateInfo &bufferInfo, const VmaAllocationCreateInfo &allocationInfo, unsigned int iElementSizeInBytes, unsigned int iElementCount)
Definition: VulkanResourceManager.cpp:258
VmaAllocator pMemoryAllocator
Definition: VulkanResourceManager.h:298
virtual std::variant< std::unique_ptr< GpuResource >, Error > createResourceWithData(const std::string &sResourceName, const void *pBufferData, size_t iElementSizeInBytes, size_t iElementCount, ResourceUsageType usage, bool bIsShaderReadWriteResource) override
Definition: VulkanResourceManager.cpp:347
virtual std::variant< std::unique_ptr< GpuResource >, Error > createShaderReadWriteTextureResource(const std::string &sResourceName, unsigned int iWidth, unsigned int iHeight, ShaderReadWriteTextureResourceFormat format) override
Definition: VulkanResourceManager.cpp:466
static VkFormat convertTextureResourceFormatToVkFormat(ShaderReadWriteTextureResourceFormat format)
Definition: VulkanResourceManager.cpp:117
virtual std::string getCurrentStateInfo() override
Definition: VulkanResourceManager.cpp:824
std::variant< std::unique_ptr< VulkanResource >, Error > createImage(const std::string &sResourceName, uint32_t iImageWidth, uint32_t iImageHeight, uint32_t iTextureMipLevelCount, VkSampleCountFlagBits sampleCount, VkFormat imageFormat, VkImageTiling imageTilingMode, VkImageUsageFlags imageUsage, std::optional< VkImageAspectFlags > viewDescription, bool bIsCubeMap=false)
Definition: VulkanResourceManager.cpp:559
virtual size_t getUsedVideoMemoryInMb() const override
Definition: VulkanResourceManager.cpp:219
virtual std::variant< std::unique_ptr< GpuResource >, Error > createResource(const std::string &sResourceName, size_t iElementSizeInBytes, size_t iElementCount, ResourceUsageType usage, bool bIsShaderReadWriteResource) override
Definition: VulkanResourceManager.cpp:428
static std::variant< std::unique_ptr< VulkanResourceManager >, Error > create(VulkanRenderer *pRenderer)
Definition: VulkanResourceManager.cpp:142
virtual size_t getTotalVideoMemoryInMb() const override
Definition: VulkanResourceManager.cpp:180
Definition: VulkanResource.h:23