|
Blender V4.5
|
#include <vk_backend.hh>
Inherits blender::gpu::GPUBackend.
Public Member Functions | |
| VKBackend () | |
| virtual | ~VKBackend () |
| void | init_resources () override |
| 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 |
| Context * | context_alloc (void *ghost_window, void *ghost_context) override |
| Batch * | batch_alloc () override |
| Fence * | fence_alloc () override |
| FrameBuffer * | framebuffer_alloc (const char *name) override |
| IndexBuf * | indexbuf_alloc () override |
| PixelBuffer * | pixelbuf_alloc (size_t size) override |
| QueryPool * | querypool_alloc () override |
| Shader * | shader_alloc (const char *name) override |
| Texture * | texture_alloc (const char *name) override |
| UniformBuf * | uniformbuf_alloc (size_t size, const char *name) override |
| StorageBuf * | storagebuf_alloc (size_t size, GPUUsageType usage, const char *name) override |
| VertBuf * | vertbuf_alloc () override |
| void | shader_cache_dir_clear_old () override |
| void | render_begin () override |
| void | render_end () override |
| void | render_step (bool) override |
| bool | debug_capture_begin (const char *title) |
| void | debug_capture_end () |
| Public Member Functions inherited from blender::gpu::GPUBackend | |
| virtual | ~GPUBackend ()=default |
| ShaderCompiler * | get_compiler () |
Static Public Member Functions | |
| static bool | is_supported () |
| static VKBackend & | get () |
| static void | platform_init (const VKDevice &device) |
| static void | capabilities_init (VKDevice &device) |
| Static Public Member Functions inherited from blender::gpu::GPUBackend | |
| static GPUBackend * | get () |
Public Attributes | |
| VKDevice | device |
Friends | |
| class | VKContext |
| class | VKDescriptorSet |
| class | VKDescriptorSetTracker |
Additional Inherited Members | |
| Protected Attributes inherited from blender::gpu::GPUBackend | |
| ShaderCompiler * | compiler_ |
Definition at line 27 of file vk_backend.hh.
|
inline |
|
inlinevirtual |
Definition at line 42 of file vk_backend.hh.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 608 of file vk_backend.cc.
References batch_alloc().
Referenced by batch_alloc().
|
static |
Definition at line 706 of file vk_backend.cc.
References BLI_system_thread_count(), capabilities_init(), blender::gpu::GPUCapabilities::clip_control_support, device, blender::gpu::GPUCapabilities::extension_get, blender::gpu::GPUCapabilities::extensions_len, blender::gpu::GCaps, blender::gpu::GPUCapabilities::geometry_shader_support, i, 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_get(), 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::GPUCapabilities::storage_buffer_alignment, blender::gpu::VKDevice::supports_extension(), and blender::gpu::vk_extension_get().
Referenced by capabilities_init(), and blender::gpu::VKDevice::init().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 558 of file vk_backend.cc.
References compute_dispatch(), blender::gpu::render_graph::VKDispatchCreateInfo::dispatch_node, blender::gpu::VKContext::get(), blender::gpu::render_graph::VKDispatchData::group_count_x, blender::gpu::render_graph::VKDispatchData::group_count_y, blender::gpu::render_graph::VKDispatchData::group_count_z, blender::gpu::render_graph::VKDispatchData::pipeline_data, and VKContext.
Referenced by compute_dispatch().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 570 of file vk_backend.cc.
References BLI_assert, blender::gpu::render_graph::VKDispatchIndirectData::buffer, compute_dispatch_indirect(), blender::gpu::render_graph::VKDispatchIndirectCreateInfo::dispatch_indirect_node, blender::gpu::VKContext::get(), blender::gpu::render_graph::VKDispatchIndirectData::offset, blender::gpu::render_graph::VKDispatchIndirectData::pipeline_data, blender::gpu::unwrap(), blender::gpu::VKStorageBuffer::vk_handle(), and VKContext.
Referenced by compute_dispatch_indirect().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 583 of file vk_backend.cc.
References BLI_assert, context_alloc(), device, GHOST_GetDrawingContext(), blender::gpu::init_device_list(), blender::gpu::VKContext::openxr_acquire_framebuffer_image_callback(), blender::gpu::VKContext::openxr_release_framebuffer_image_callback(), blender::gpu::VKContext::swap_buffers_post_callback(), blender::gpu::VKContext::swap_buffers_pre_callback(), and VKContext.
Referenced by context_alloc().
| bool blender::gpu::VKBackend::debug_capture_begin | ( | const char * | title | ) |
Definition at line 99 of file vk_debug.cc.
References device, blender::gpu::VKDevice::instance_get(), result, and UNUSED_VARS.
Referenced by blender::gpu::VKContext::debug_capture_begin(), and blender::gpu::VKContext::debug_capture_scope_begin().
| void blender::gpu::VKBackend::debug_capture_end | ( | ) |
Definition at line 120 of file vk_debug.cc.
References device, and blender::gpu::VKDevice::instance_get().
Referenced by blender::gpu::VKContext::debug_capture_end(), and blender::gpu::VKContext::debug_capture_scope_end().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 545 of file vk_backend.cc.
References blender::gpu::GPUBackend::compiler_, and delete_resources().
Referenced by delete_resources().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 613 of file vk_backend.cc.
References fence_alloc().
Referenced by fence_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 618 of file vk_backend.cc.
References framebuffer_alloc().
Referenced by framebuffer_alloc().
|
inlinestatic |
Definition at line 91 of file vk_backend.hh.
References blender::gpu::GPUBackend::get(), and VKBackend().
Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_debug_utils_label(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_rendering(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKDescriptorBufferUpdator::bind_buffer(), blender::gpu::render_graph::VKCommandBufferWrapper::bind_descriptor_buffers(), blender::gpu::VKDescriptorBufferUpdator::bind_image(), blender::gpu::VKDescriptorBufferUpdator::bind_texel_buffer(), 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::debug::VKDebuggingTools::destroy_messenger(), blender::gpu::VKDescriptorPools::discard(), blender::gpu::VKDiscardPool::discard_pool_get(), 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::VKTexture::export_memory(), blender::gpu::VKBuffer::export_memory_get(), blender::gpu::VKShader::finalize(), blender::gpu::VKShaderModule::finalize(), blender::gpu::VKBuffer::flush(), blender::gpu::VKContext::flush_render_graph(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKSampler::free(), blender::gpu::VKPipelinePool::free_data(), blender::gpu::VKPixelBuffer::get_native_handle(), 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::debug::VKDebuggingTools::init_messenger(), blender::gpu::VKContext::memory_statistics_get(), blender::gpu::debug::object_label(), blender::gpu::VKBuffer::read_async(), blender::gpu::VKPipelinePool::read_from_disk(), blender::gpu::VKFrameBuffer::rendering_end(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), blender::gpu::VKFrameBuffer::rendering_ensure_render_pass(), samplers_update(), blender::gpu::render_graph::VKCommandBufferWrapper::set_descriptor_buffer_offsets(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), blender::gpu::to_vk_image_usage(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::VKDescriptorSetTracker::upload_descriptor_sets(), blender::gpu::vk_extension_get(), blender::gpu::VKImageView::VKImageView(), blender::gpu::VKFence::wait(), blender::gpu::VKPipelinePool::write_to_disk(), blender::gpu::VKContext::~VKContext(), blender::gpu::VKDescriptorPools::~VKDescriptorPools(), blender::gpu::VKQueryPool::~VKQueryPool(), and blender::gpu::VKShader::~VKShader().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 623 of file vk_backend.cc.
References indexbuf_alloc().
Referenced by indexbuf_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 539 of file vk_backend.cc.
References blender::gpu::GPUBackend::compiler_, GPU_max_parallel_compilations(), init_resources(), and blender::gpu::GPUWorker::Main.
Referenced by init_resources().
|
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 201 of file vk_backend.cc.
References BLI_setenv(), CLG_logref_init(), CLOG_ERROR, CLOG_INFO, CLOG_WARN, blender::Array< T, InlineBufferCapacity, Allocator >::data(), G, G_DEBUG_GPU, blender::gpu::GPU_vulkan_is_supported_driver(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), LOG, and blender::gpu::missing_capabilities_get().
Referenced by gpu_backend_supported().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 628 of file vk_backend.cc.
References pixelbuf_alloc().
Referenced by pixelbuf_alloc().
|
static |
Definition at line 355 of file vk_backend.cc.
References CLOG_INFO, blender::gpu::determine_os_type(), device, blender::gpu::GPUPlatformGlobal::device_luid, blender::gpu::GPUPlatformGlobal::device_luid_node_mask, blender::gpu::VKDevice::device_type(), blender::gpu::GPUPlatformGlobal::device_uuid, blender::gpu::GPUPlatformGlobal::devices, blender::gpu::VKDevice::driver_type(), blender::gpu::VKDevice::driver_version(), blender::gpu::GPG, GPU_ARCHITECTURE_IMR, GPU_BACKEND_VULKAN, GPU_SUPPORT_LEVEL_SUPPORTED, blender::gpu::GPUPlatformGlobal::init(), LOG, blender::gpu::VKDevice::physical_device_id_properties_get(), blender::gpu::VKDevice::physical_device_properties_get(), platform_init(), Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::gpu::VKDevice::vendor_name().
Referenced by blender::gpu::VKDevice::init(), platform_init(), and VKBackend().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 633 of file vk_backend.cc.
References querypool_alloc().
Referenced by querypool_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 663 of file vk_backend.cc.
References BLI_assert_msg, device, render_begin(), and blender::gpu::VKThreadData::rendering_depth.
Referenced by render_begin().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 670 of file vk_backend.cc.
References BLI_assert_msg, BLI_thread_is_main(), device, G, blender::gpu::VKContext::get(), lock, render_end(), blender::gpu::VKThreadData::rendering_depth, and VKContext.
Referenced by render_end().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 697 of file vk_backend.cc.
References device, lock, and render_step().
Referenced by render_step().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 550 of file vk_backend.cc.
References device, get(), blender::gpu::VKDevice::is_initialized(), blender::gpu::VKDevice::reinit(), and samplers_update().
Referenced by samplers_update().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 638 of file vk_backend.cc.
References shader_alloc().
Referenced by shader_alloc().
|
inlineoverridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 77 of file vk_backend.hh.
References blender::gpu::VKShaderCompiler::cache_dir_clear_old().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 653 of file vk_backend.cc.
References storagebuf_alloc().
Referenced by storagebuf_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 643 of file vk_backend.cc.
References texture_alloc().
Referenced by texture_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 648 of file vk_backend.cc.
References uniformbuf_alloc().
Referenced by uniformbuf_alloc().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 658 of file vk_backend.cc.
References vertbuf_alloc().
Referenced by vertbuf_alloc().
|
friend |
Definition at line 105 of file vk_backend.hh.
References VKContext.
Referenced by compute_dispatch(), compute_dispatch_indirect(), context_alloc(), render_end(), and VKContext.
|
friend |
Definition at line 106 of file vk_backend.hh.
References VKDescriptorSet.
Referenced by VKDescriptorSet.
|
friend |
Definition at line 107 of file vk_backend.hh.
References VKDescriptorSetTracker.
Referenced by VKDescriptorSetTracker.
| VKDevice blender::gpu::VKBackend::device |
Definition at line 35 of file vk_backend.hh.
Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_debug_utils_label(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_rendering(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKDescriptorBufferUpdator::bind_buffer(), blender::gpu::render_graph::VKCommandBufferWrapper::bind_descriptor_buffers(), blender::gpu::VKDescriptorBufferUpdator::bind_image(), blender::gpu::VKDescriptorBufferUpdator::bind_texel_buffer(), capabilities_init(), context_alloc(), blender::gpu::VKBuffer::create(), blender::gpu::VKSampler::create(), debug_capture_begin(), debug_capture_end(), blender::gpu::VKDescriptorSetLayouts::deinit(), blender::gpu::VKDescriptorPools::discard(), blender::gpu::VKDiscardPool::discard_pool_get(), blender::gpu::render_graph::VKCommandBufferWrapper::end_debug_utils_label(), blender::gpu::render_graph::VKCommandBufferWrapper::end_rendering(), blender::gpu::VKVertexBuffer::ensure_buffer_view(), blender::gpu::VKTexture::export_memory(), blender::gpu::VKBuffer::export_memory_get(), blender::gpu::VKShader::finalize(), blender::gpu::VKShaderModule::finalize(), blender::gpu::VKBuffer::flush(), blender::gpu::VKContext::flush_render_graph(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKSampler::free(), blender::gpu::VKPipelinePool::free_data(), blender::gpu::VKPixelBuffer::get_native_handle(), 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(), platform_init(), blender::gpu::VKBuffer::read_async(), blender::gpu::VKPipelinePool::read_from_disk(), render_begin(), render_end(), render_step(), blender::gpu::VKFrameBuffer::rendering_end(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), blender::gpu::VKFrameBuffer::rendering_ensure_render_pass(), samplers_update(), blender::gpu::render_graph::VKCommandBufferWrapper::set_descriptor_buffer_offsets(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), blender::gpu::to_vk_image_usage(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::VKDescriptorSetTracker::upload_descriptor_sets(), blender::gpu::vk_extension_get(), blender::gpu::VKImageView::VKImageView(), blender::gpu::VKFence::wait(), blender::gpu::VKPipelinePool::write_to_disk(), blender::gpu::VKContext::~VKContext(), blender::gpu::VKDescriptorPools::~VKDescriptorPools(), blender::gpu::VKQueryPool::~VKQueryPool(), and blender::gpu::VKShader::~VKShader().