Manages a cache of Vulkan graphics pipelines to optimize resource reuse and reduce redundant pipeline creation.
Подробнее...
#include <VulkanPipelineCache.h>
|
| VulkanPipelineCache () |
| Constructs an empty Vulkan pipeline cache.
|
|
| VulkanPipelineCache (const VulkanPipelineCache &)=delete |
| Deleted copy constructor to prevent copying.
|
|
| ~VulkanPipelineCache () |
| Destroys all cached pipelines.
|
|
VulkanPipelineCache & | operator= (const VulkanPipelineCache &)=delete |
| Deleted assignment operator to prevent copying.
|
|
void | clearCache () |
| Clears the pipeline cache, removing all stored pipelines.
|
|
VulkanGraphicsPipeline * | getOrCreatePipeline (const std::string &fragPath, const std::string &vertPath, VkDevice device, VkRenderPass renderPass) |
| Retrieves an existing Vulkan graphics pipeline or creates a new one if it does not exist.
|
|
void | removePipeline (const std::string &fragPath, const std::string &vertPath) |
| Removes a Vulkan graphics pipeline from the cache if it is no longer referenced.
|
|
Manages a cache of Vulkan graphics pipelines to optimize resource reuse and reduce redundant pipeline creation.
◆ getOrCreatePipeline()
VulkanGraphicsPipeline * VulkanPipelineCache::getOrCreatePipeline |
( |
const std::string & | fragPath, |
|
|
const std::string & | vertPath, |
|
|
VkDevice | device, |
|
|
VkRenderPass | renderPass ) |
Retrieves an existing Vulkan graphics pipeline or creates a new one if it does not exist.
- Аргументы
-
fragPath | Path to the fragment shader file. |
vertPath | Path to the vertex shader file. |
device | The Vulkan logical device. |
renderPass | The Vulkan render pass. |
- Возвращает
- Pointer to the Vulkan graphics pipeline.
◆ operator=()
Deleted assignment operator to prevent copying.
- Аргументы
-
rhs | The right-hand side object to assign from. |
- Возвращает
- Reference to this object.
◆ removePipeline()
void VulkanPipelineCache::removePipeline |
( |
const std::string & | fragPath, |
|
|
const std::string & | vertPath ) |
Removes a Vulkan graphics pipeline from the cache if it is no longer referenced.
- Аргументы
-
fragPath | Path to the fragment shader file. |
vertPath | Path to the vertex shader file. |
Объявления и описания членов классов находятся в файлах:
- Engine/Modules/RenderModule/Vulkan/VulkanObjects/VulkanPipelineCache.h
- Engine/Modules/RenderModule/Vulkan/VulkanObjects/VulkanPipelineCache.cpp