Blender V4.3
blender::gpu::VKBackend Class Reference

#include <vk_backend.hh>

Inherits blender::gpu::GPUBackend.

Public Member Functions

 VKBackend ()
 
virtual ~VKBackend ()
 
void delete_resources () override
 
void samplers_update () override
 
void compute_dispatch (int groups_x_len, int groups_y_len, int groups_z_len) override
 
void compute_dispatch_indirect (StorageBuf *indirect_buf) override
 
Contextcontext_alloc (void *ghost_window, void *ghost_context) override
 
Batch * batch_alloc () override
 
DrawListdrawlist_alloc (int list_length) override
 
Fencefence_alloc () override
 
FrameBufferframebuffer_alloc (const char *name) override
 
IndexBufindexbuf_alloc () override
 
PixelBufferpixelbuf_alloc (size_t size) override
 
QueryPoolquerypool_alloc () override
 
Shadershader_alloc (const char *name) override
 
Texturetexture_alloc (const char *name) override
 
UniformBufuniformbuf_alloc (size_t size, const char *name) override
 
StorageBufstoragebuf_alloc (size_t size, GPUUsageType usage, const char *name) override
 
VertBufvertbuf_alloc () override
 
void shader_cache_dir_clear_old () override
 
void render_begin () override
 
void render_end () override
 
void render_step () override
 
bool debug_capture_begin (const char *title)
 
void debug_capture_end ()
 
- Public Member Functions inherited from blender::gpu::GPUBackend
virtual ~GPUBackend ()=default
 

Static Public Member Functions

static bool is_supported ()
 
static VKBackendget ()
 
static void platform_init (const VKDevice &device)
 
static void capabilities_init (VKDevice &device)
 
- Static Public Member Functions inherited from blender::gpu::GPUBackend
static GPUBackendget ()
 

Public Attributes

VKShaderCompiler shader_compiler
 
VKDevice device
 

Friends

class VKContext
 
class VKDescriptorSet
 
class VKDescriptorSetTracker
 

Detailed Description

Definition at line 27 of file vk_backend.hh.

Constructor & Destructor Documentation

◆ VKBackend()

blender::gpu::VKBackend::VKBackend ( )
inline

Definition at line 38 of file vk_backend.hh.

References platform_init().

◆ ~VKBackend()

virtual blender::gpu::VKBackend::~VKBackend ( )
inlinevirtual

Definition at line 43 of file vk_backend.hh.

Member Function Documentation

◆ batch_alloc()

Batch * blender::gpu::VKBackend::batch_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 421 of file vk_backend.cc.

◆ capabilities_init()

void blender::gpu::VKBackend::capabilities_init ( VKDevice & device)
static

Definition at line 518 of file vk_backend.cc.

References BLI_system_thread_count(), blender::gpu::GCaps, blender::gpu::GPUCapabilities::geometry_shader_support, blender::gpu::GPUCapabilities::max_batch_indices, blender::gpu::GPUCapabilities::max_batch_vertices, blender::gpu::GPUCapabilities::max_compute_shader_storage_blocks, max_ii(), blender::gpu::GPUCapabilities::max_images, blender::gpu::GPUCapabilities::max_parallel_compilations, blender::gpu::GPUCapabilities::max_samplers, blender::gpu::GPUCapabilities::max_shader_storage_buffer_bindings, blender::gpu::GPUCapabilities::max_storage_buffer_size, blender::gpu::GPUCapabilities::max_texture_3d_size, blender::gpu::GPUCapabilities::max_texture_layers, blender::gpu::GPUCapabilities::max_texture_size, blender::gpu::GPUCapabilities::max_textures, blender::gpu::GPUCapabilities::max_textures_frag, blender::gpu::GPUCapabilities::max_textures_geom, blender::gpu::GPUCapabilities::max_textures_vert, blender::gpu::GPUCapabilities::max_uniforms_frag, blender::gpu::GPUCapabilities::max_uniforms_vert, blender::gpu::GPUCapabilities::max_varying_floats, blender::gpu::GPUCapabilities::max_vertex_attribs, blender::gpu::GPUCapabilities::max_work_group_count, blender::gpu::GPUCapabilities::max_work_group_size, blender::gpu::GPUCapabilities::mem_stats_support, min_uu(), blender::gpu::VKDevice::physical_device_properties_get(), blender::gpu::VKDevice::physical_device_vulkan_11_features_get(), blender::gpu::GPUCapabilities::shader_draw_parameters_support, blender::gpu::GPUCapabilities::stencil_export_support, blender::gpu::VKDevice::supports_extension(), and blender::gpu::GPUCapabilities::texture_view_support.

Referenced by blender::gpu::VKDevice::init().

◆ compute_dispatch()

◆ compute_dispatch_indirect()

◆ context_alloc()

Context * blender::gpu::VKBackend::context_alloc ( void * ghost_window,
void * ghost_context )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 401 of file vk_backend.cc.

References BLI_assert, and GHOST_GetDrawingContext().

◆ debug_capture_begin()

bool blender::gpu::VKBackend::debug_capture_begin ( const char * title)

◆ debug_capture_end()

void blender::gpu::VKBackend::debug_capture_end ( )

◆ delete_resources()

void blender::gpu::VKBackend::delete_resources ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 366 of file vk_backend.cc.

◆ drawlist_alloc()

DrawList * blender::gpu::VKBackend::drawlist_alloc ( int list_length)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 426 of file vk_backend.cc.

◆ fence_alloc()

Fence * blender::gpu::VKBackend::fence_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 431 of file vk_backend.cc.

◆ framebuffer_alloc()

FrameBuffer * blender::gpu::VKBackend::framebuffer_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 436 of file vk_backend.cc.

◆ get()

static VKBackend & blender::gpu::VKBackend::get ( )
inlinestatic

Definition at line 92 of file vk_backend.hh.

References blender::gpu::GPUBackend::get().

Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::VKImmediate::begin(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_debug_utils_label(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_recording(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_rendering(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKBuffer::create(), blender::gpu::VKSampler::create(), blender::gpu::VKContext::debug_capture_begin(), blender::gpu::VKContext::debug_capture_end(), blender::gpu::VKContext::debug_capture_scope_begin(), blender::gpu::VKContext::debug_capture_scope_end(), blender::gpu::VKDescriptorSetLayouts::deinit(), blender::gpu::VKVertexBuffer::device_format_ensure(), blender::gpu::render_graph::VKCommandBufferWrapper::end_debug_utils_label(), blender::gpu::render_graph::VKCommandBufferWrapper::end_rendering(), blender::gpu::VKShader::ensure_and_get_compute_pipeline(), blender::gpu::VKShader::ensure_and_get_graphics_pipeline(), blender::gpu::VKVertexBuffer::ensure_buffer_view(), blender::gpu::VKShader::finalize(), blender::gpu::VKShaderModule::finalize(), blender::gpu::VKBuffer::flush(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKBuffer::free(), blender::gpu::VKSampler::free(), blender::gpu::VKPipelinePool::free_data(), blender::gpu::VKQueryPool::get_occlusion_result(), blender::gpu::VKDescriptorSetLayouts::get_or_create(), blender::gpu::VKPipelinePool::get_or_create_compute_pipeline(), blender::gpu::VKPipelinePool::get_or_create_graphics_pipeline(), blender::gpu::VKPipelinePool::init(), blender::gpu::VKShaderInterface::init(), blender::gpu::VKTexture::init_internal(), blender::gpu::VKContext::memory_statistics_get(), blender::gpu::VKPipelinePool::read_from_disk(), blender::gpu::VKVertexBuffer::release_data(), blender::gpu::VKPipelinePool::remove(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKDescriptorPools::reset(), blender::gpu::VKFence::signal(), blender::gpu::render_graph::VKCommandBufferWrapper::submit_with_cpu_synchronization(), blender::gpu::VKContext::sync_backbuffer(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKDescriptorSetTracker::upload_descriptor_sets(), blender::gpu::VKShader::vertex_interface_declare(), blender::gpu::VKContext::VKContext(), blender::gpu::VKImageView::VKImageView(), blender::gpu::render_graph::VKCommandBufferWrapper::wait_for_cpu_synchronization(), blender::gpu::VKPipelinePool::write_to_disk(), blender::gpu::render_graph::VKCommandBufferWrapper::~VKCommandBufferWrapper(), blender::gpu::VKContext::~VKContext(), blender::gpu::VKDescriptorPools::~VKDescriptorPools(), blender::gpu::VKFence::~VKFence(), blender::gpu::VKImageView::~VKImageView(), blender::gpu::VKQueryPool::~VKQueryPool(), blender::gpu::VKShader::~VKShader(), blender::gpu::VKShaderModule::~VKShaderModule(), and blender::gpu::VKTexture::~VKTexture().

◆ indexbuf_alloc()

IndexBuf * blender::gpu::VKBackend::indexbuf_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 441 of file vk_backend.cc.

◆ is_supported()

bool blender::gpu::VKBackend::is_supported ( )
static

Does the running platform contain any device that meets the minimum requirements to start the Vulkan backend.

Function is used to validate that a Blender UI can be started. It calls vulkan API commands directly to ensure no parts of Blender needs to be initialized.

Definition at line 139 of file vk_backend.cc.

References CLG_logref_init(), CLOG_ERROR, CLOG_INFO, CLOG_WARN, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::gpu::LOG, and blender::gpu::missing_capabilities_get().

Referenced by gpu_backend_supported().

◆ pixelbuf_alloc()

PixelBuffer * blender::gpu::VKBackend::pixelbuf_alloc ( size_t size)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 446 of file vk_backend.cc.

◆ platform_init()

◆ querypool_alloc()

QueryPool * blender::gpu::VKBackend::querypool_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 451 of file vk_backend.cc.

◆ render_begin()

void blender::gpu::VKBackend::render_begin ( )
overridevirtual

◆ render_end()

◆ render_step()

void blender::gpu::VKBackend::render_step ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 516 of file vk_backend.cc.

◆ samplers_update()

void blender::gpu::VKBackend::samplers_update ( )
overridevirtual

◆ shader_alloc()

Shader * blender::gpu::VKBackend::shader_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 456 of file vk_backend.cc.

◆ shader_cache_dir_clear_old()

void blender::gpu::VKBackend::shader_cache_dir_clear_old ( )
inlineoverridevirtual

◆ storagebuf_alloc()

StorageBuf * blender::gpu::VKBackend::storagebuf_alloc ( size_t size,
GPUUsageType usage,
const char * name )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 471 of file vk_backend.cc.

◆ texture_alloc()

Texture * blender::gpu::VKBackend::texture_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 461 of file vk_backend.cc.

◆ uniformbuf_alloc()

UniformBuf * blender::gpu::VKBackend::uniformbuf_alloc ( size_t size,
const char * name )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 466 of file vk_backend.cc.

◆ vertbuf_alloc()

VertBuf * blender::gpu::VKBackend::vertbuf_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 476 of file vk_backend.cc.

Friends And Related Symbol Documentation

◆ VKContext

friend class VKContext
friend

Definition at line 106 of file vk_backend.hh.

◆ VKDescriptorSet

friend class VKDescriptorSet
friend

Definition at line 107 of file vk_backend.hh.

◆ VKDescriptorSetTracker

friend class VKDescriptorSetTracker
friend

Definition at line 108 of file vk_backend.hh.

Member Data Documentation

◆ device

VKDevice blender::gpu::VKBackend::device

Definition at line 36 of file vk_backend.hh.

Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::VKImmediate::begin(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_debug_utils_label(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_recording(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_rendering(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKBuffer::create(), blender::gpu::VKSampler::create(), debug_capture_begin(), debug_capture_end(), blender::gpu::VKDescriptorSetLayouts::deinit(), blender::gpu::VKVertexBuffer::device_format_ensure(), blender::gpu::render_graph::VKCommandBufferWrapper::end_debug_utils_label(), blender::gpu::render_graph::VKCommandBufferWrapper::end_rendering(), blender::gpu::VKShader::ensure_and_get_compute_pipeline(), blender::gpu::VKShader::ensure_and_get_graphics_pipeline(), blender::gpu::VKVertexBuffer::ensure_buffer_view(), blender::gpu::VKShader::finalize(), blender::gpu::VKShaderModule::finalize(), blender::gpu::VKBuffer::flush(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKBuffer::free(), blender::gpu::VKSampler::free(), blender::gpu::VKPipelinePool::free_data(), blender::gpu::VKQueryPool::get_occlusion_result(), blender::gpu::VKDescriptorSetLayouts::get_or_create(), blender::gpu::VKPipelinePool::get_or_create_compute_pipeline(), blender::gpu::VKPipelinePool::get_or_create_graphics_pipeline(), blender::gpu::VKPipelinePool::init(), blender::gpu::VKShaderInterface::init(), blender::gpu::VKTexture::init_internal(), blender::gpu::VKContext::memory_statistics_get(), blender::gpu::VKPipelinePool::read_from_disk(), blender::gpu::VKVertexBuffer::release_data(), blender::gpu::VKPipelinePool::remove(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKDescriptorPools::reset(), blender::gpu::VKFence::signal(), blender::gpu::render_graph::VKCommandBufferWrapper::submit_with_cpu_synchronization(), blender::gpu::VKContext::sync_backbuffer(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKDescriptorSetTracker::upload_descriptor_sets(), blender::gpu::VKShader::vertex_interface_declare(), blender::gpu::VKImageView::VKImageView(), blender::gpu::render_graph::VKCommandBufferWrapper::wait_for_cpu_synchronization(), blender::gpu::VKPipelinePool::write_to_disk(), blender::gpu::render_graph::VKCommandBufferWrapper::~VKCommandBufferWrapper(), blender::gpu::VKContext::~VKContext(), blender::gpu::VKDescriptorPools::~VKDescriptorPools(), blender::gpu::VKFence::~VKFence(), blender::gpu::VKImageView::~VKImageView(), blender::gpu::VKQueryPool::~VKQueryPool(), blender::gpu::VKShader::~VKShader(), blender::gpu::VKShaderModule::~VKShaderModule(), and blender::gpu::VKTexture::~VKTexture().

◆ shader_compiler

VKShaderCompiler blender::gpu::VKBackend::shader_compiler

Definition at line 34 of file vk_backend.hh.

Referenced by blender::gpu::VKContext::VKContext().


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