Blender V5.3
blender::gpu::VKPipelineMap< PipelineInfo > Class Template Reference

#include <vk_pipeline_pool.hh>

Public Member Functions

VkPipeline get_or_create (const PipelineInfo &pipeline_info, VkPipelineCache vk_pipeline_cache, VkPipeline vk_pipeline_base, StringRefNull name, bool &r_created)
void discard (VKDiscardPool &discard_pool, VkPipelineLayout vk_pipeline_layout)
void free_data (VkDevice vk_device, const volk::VolkDeviceTable &functions)
uint64_t size () const

Detailed Description

template<typename PipelineInfo>
class blender::gpu::VKPipelineMap< PipelineInfo >

Thread safe map to pipelines of a certain type (graphics or compute).

Definition at line 214 of file vk_pipeline_pool.hh.

Member Function Documentation

◆ discard()

template<typename PipelineInfo>
void blender::gpu::VKPipelineMap< PipelineInfo >::discard ( VKDiscardPool & discard_pool,
VkPipelineLayout vk_pipeline_layout )
inline

Discard all pipelines associated with the given layout

Definition at line 284 of file vk_pipeline_pool.hh.

References blender::gpu::VKDiscardPool::discard_pipeline(), and lock.

◆ free_data()

template<typename PipelineInfo>
void blender::gpu::VKPipelineMap< PipelineInfo >::free_data ( VkDevice vk_device,
const volk::VolkDeviceTable & functions )
inline

Free all data.

Note
Handle is passed to fix recursive inclusion of vk_device.hh

Definition at line 300 of file vk_pipeline_pool.hh.

References lock.

◆ get_or_create()

template<typename PipelineInfo>
VkPipeline blender::gpu::VKPipelineMap< PipelineInfo >::get_or_create ( const PipelineInfo & pipeline_info,
VkPipelineCache vk_pipeline_cache,
VkPipeline vk_pipeline_base,
StringRefNull name,
bool & r_created )
inline

Get an existing or create a new pipeline based on the provided PipelineInfo.

When vk_pipeline_base is a valid pipeline handle, the pipeline base will be used to speed up pipeline creation process.

Parameters
pipeline_infoDescription of the pipeline to compile.
vk_pipeline_cachePipeline cache to use.
vk_pipeline_baseAn already existing pipeline that can be used as a base when compiling the pipeline.
nameName to give as a debug label when creating a pipeline.
Returns
The handle of the compiled pipeline.

Definition at line 233 of file vk_pipeline_pool.hh.

References BLI_assert_unreachable, and lock.

◆ size()

template<typename PipelineInfo>
uint64_t blender::gpu::VKPipelineMap< PipelineInfo >::size ( ) const
inline

Number of pipelines stored inside the instance.

Definition at line 311 of file vk_pipeline_pool.hh.


The documentation for this class was generated from the following file: