Blender V5.0
blender::gpu::VKDescriptorSetLayouts Class Reference

#include <vk_descriptor_set_layouts.hh>

Inherits blender::NonCopyable.

Public Member Functions

 VKDescriptorSetLayouts ()
virtual ~VKDescriptorSetLayouts ()
VkDescriptorSetLayout get_or_create (const VKDescriptorSetLayoutInfo &info, bool &r_created, bool &r_needed)
VKDescriptorBufferLayout descriptor_buffer_layout_get (VkDescriptorSetLayout vk_descriptor_set_layout)
void deinit ()
int64_t size () const

Friends

class VKDevice

Detailed Description

Registries of descriptor set layouts.

Definition at line 91 of file vk_descriptor_set_layouts.hh.

Constructor & Destructor Documentation

◆ VKDescriptorSetLayouts()

blender::gpu::VKDescriptorSetLayouts::VKDescriptorSetLayouts ( )

Definition at line 13 of file vk_descriptor_set_layouts.cc.

◆ ~VKDescriptorSetLayouts()

blender::gpu::VKDescriptorSetLayouts::~VKDescriptorSetLayouts ( )
virtual

Definition at line 20 of file vk_descriptor_set_layouts.cc.

References deinit().

Member Function Documentation

◆ deinit()

void blender::gpu::VKDescriptorSetLayouts::deinit ( )

Free all descriptor set layouts.

This method is called when the VKDevice is destroyed.

Definition at line 94 of file vk_descriptor_set_layouts.cc.

References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), mutex, blender::gpu::VKDevice::vk_handle(), and VKDevice.

Referenced by ~VKDescriptorSetLayouts().

◆ descriptor_buffer_layout_get()

VKDescriptorBufferLayout blender::gpu::VKDescriptorSetLayouts::descriptor_buffer_layout_get ( VkDescriptorSetLayout vk_descriptor_set_layout)
inline

Return the descriptor buffer layout offsets and alignment for the given vk_descriptor_set_layout handle.

A copy of the buffer layout is returned due to other threads can alter the location of the items.

This function has undefined behavior when descriptor buffers extension isn't enabled on the VKDevice.

Definition at line 132 of file vk_descriptor_set_layouts.hh.

References lock.

Referenced by blender::gpu::VKDescriptorBufferUpdator::allocate_new_descriptor_set().

◆ get_or_create()

VkDescriptorSetLayout blender::gpu::VKDescriptorSetLayouts::get_or_create ( const VKDescriptorSetLayoutInfo & info,
bool & r_created,
bool & r_needed )

Get an existing descriptor set layout, or create when not available. r_created is set to true when a new descriptor set layout was created, set to false when an existing descriptor set layout is returned. r_needed is set to true, when a descriptor set layout is needed

Definition at line 25 of file vk_descriptor_set_layouts.cc.

References blender::gpu::VKDescriptorSetLayoutInfo::bindings, BLI_assert, blender::gpu::VKExtensions::descriptor_buffer, blender::gpu::VKBackend::device, blender::gpu::VKDevice::extensions_get(), blender::gpu::VKBackend::get(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), mutex, blender::gpu::VKDevice::vk_handle(), and VKDevice.

◆ size()

int64_t blender::gpu::VKDescriptorSetLayouts::size ( ) const
inline

Return the number of descriptor set layouts.

Definition at line 149 of file vk_descriptor_set_layouts.hh.

◆ VKDevice

friend class VKDevice
friend

Definition at line 92 of file vk_descriptor_set_layouts.hh.

References VKDevice.

Referenced by deinit(), get_or_create(), and VKDevice.


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