|
Blender V5.3
|
#include <vk_backend.hh>
Inherits blender::gpu::GPUBackend.
Public Member Functions | |
| VKBackend () | |
| virtual | ~VKBackend () |
| void | init_resources () override |
| void | delete_resources () 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 (GHOST_IWindow *ghost_window, GHOST_IContext *ghost_context) override |
| Batch * | batch_alloc () override |
| Fence * | fence_alloc () override |
| WorkInFlight * | work_in_flight_alloc (unsigned int max_in_flight) 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 |
| TexturePool * | texturepool_alloc () 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 |
| TopLevelAS * | tlas_alloc (const char *name) override |
| BottomLevelAS * | blas_alloc (const char *name) 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 void | supported_devices_print (FILE *fp) |
| 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 29 of file vk_backend.hh.
|
inline |
|
inlinevirtual |
Definition at line 44 of file vk_backend.hh.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 744 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 818 of file vk_backend.cc.
References blender::gpu::VKBottomLevelAS::VKBottomLevelAS().
|
static |
Definition at line 866 of file vk_backend.cc.
References blender::BLI_system_thread_count(), device, blender::gpu::GPUCapabilities::extension_get, blender::gpu::GPUCapabilities::extensions_len, blender::G, blender::G_DEBUG_GPU_NO_HW_RAYTRACING, blender::gpu::GCaps, blender::gpu::GPUCapabilities::geometry_shader_support, INT_MAX, blender::gpu::GPUCapabilities::max_batch_indices, blender::gpu::GPUCapabilities::max_batch_vertices, blender::gpu::GPUCapabilities::max_buffer_texture_size, blender::gpu::GPUCapabilities::max_compute_shader_storage_blocks, blender::max_ii(), blender::gpu::GPUCapabilities::max_images, blender::gpu::GPUCapabilities::max_parallel_compilations, 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_uniform_buffer_size, 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, blender::min_uu(), blender::gpu::GPUCapabilities::multi_viewport_support, blender::gpu::VKDevice::physical_device_acceleration_structure_properties_get(), blender::gpu::VKDevice::physical_device_features_get(), blender::gpu::VKDevice::physical_device_get(), blender::gpu::VKDevice::physical_device_properties_get(), blender::gpu::GPUCapabilities::ray_query_support, blender::gpu::GPUCapabilities::srgb_write_view_support, blender::gpu::GPUCapabilities::stencil_export_support, blender::gpu::GPUCapabilities::storage_buffer_alignment, blender::gpu::VKDevice::supports_extension(), UINT_MAX, blender::gpu::GPUCapabilities::vertex_pipeline_stores_and_atomics_support, and blender::gpu::vk_extension_get().
Referenced by blender::gpu::VKDevice::init().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 699 of file vk_backend.cc.
References 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.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 711 of file vk_backend.cc.
References blender::BLI_assert(), blender::gpu::render_graph::VKDispatchIndirectData::buffer, 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::VKStorageBuffer::resource(), blender::gpu::unwrap(), and VKContext.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 724 of file vk_backend.cc.
References device, 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_buffer_acquired_callback(), blender::gpu::VKContext::swap_buffer_draw_callback(), VKContext, and blender::gpu::VKContext::VKContext().
| bool blender::gpu::VKBackend::debug_capture_begin | ( | const char * | title | ) |
Definition at line 101 of file vk_debug.cc.
References device, blender::gpu::VKDevice::instance_get(), blender::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 694 of file vk_backend.cc.
References blender::gpu::GPUBackend::compiler_.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 749 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 759 of file vk_backend.cc.
References blender::gpu::VKFrameBuffer::VKFrameBuffer().
|
inlinestatic |
Definition at line 103 of file vk_backend.hh.
References blender::gpu::GPUBackend::get(), and VKBackend().
Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKBottomLevelAS::add_geometry(), blender::gpu::VKTopLevelAS::add_instance(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::VKWorkInFlight::begin_work(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKBottomLevelAS::build(), blender::gpu::VKTopLevelAS::build(), blender::gpu::render_graph::VKCommandBufferWrapper::build_acceleration_structure(), blender::gpu::compile_ex(), blender::gpu::VKBuffer::create(), blender::gpu::VKSampler::create(), blender::gpu::create_and_bind_vk_image(), blender::gpu::create_graphics_pipeline_libs(), blender::gpu::create_graphics_pipeline_no_libs(), 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::VKImageCache::discard_all_of(), blender::gpu::VKDiscardPool::discard_pool_get(), blender::gpu::VKImmediate::end(), 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::ensure_graphics_pipelines(), 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::VKBuffer::flush_mapped_memory(), blender::gpu::VKContext::flush_render_graph(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKBuffer::free(), blender::gpu::VKSampler::free(), blender::gpu::get_image_memory_requirements(), blender::gpu::VKPixelBuffer::get_native_handle(), blender::gpu::VKQueryPool::get_occlusion_result(), blender::gpu::VKDescriptorSetLayouts::get_or_create(), blender::gpu::VKPipelinePool::init(), blender::gpu::VKTexture::init_internal(), blender::gpu::VKBuffer::invalidate_mapped_memory(), blender::gpu::VKContext::memory_statistics_get(), blender::gpu::debug::object_label(), blender::gpu::VKBuffer::read_async(), blender::gpu::VKPipelinePool::read_from_disk(), blender::gpu::VKDescriptorPools::recycle(), blender::gpu::VKTexturePool::release_texture(), blender::gpu::VKFrameBuffer::render_area_update(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), blender::gpu::VKImageCache::reset(), blender::gpu::render_graph::VKCommandBufferWrapper::set_front_face(), blender::gpu::render_graph::VKCommandBufferWrapper::set_vertex_input(), blender::gpu::spirv_target_version_get(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), blender::gpu::to_vk_image_usage(), blender::gpu::VKStorageBuffer::update(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKContext::update_pipeline_data(), blender::gpu::VKTexture::update_sub(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::VKShader::vertex_interface_declare(), blender::gpu::vk_extension_get(), blender::gpu::render_graph::vk_pipeline_dynamic_graphics_build_commands(), 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(), blender::gpu::VKShader::~VKShader(), and blender::gpu::VKTexture::~VKTexture().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 764 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 688 of file vk_backend.cc.
References blender::gpu::GPUBackend::compiler_, blender::GPU_max_parallel_compilations(), and blender::gpu::GPUWorker::Main.
|
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 263 of file vk_backend.cc.
References CLG_logref_init(), CLOG_DEBUG, CLOG_ERROR, CLOG_WARN, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::gpu::GPU_vulkan_is_supported_driver(), blender::LOG, blender::gpu::missing_capabilities_get(), and blender::gpu::vk_instance_create_for_platform_checks().
Referenced by blender::gpu_backend_supported().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 769 of file vk_backend.cc.
References blender::gpu::VKPixelBuffer::VKPixelBuffer().
|
static |
Definition at line 455 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, blender::GPU_ARCHITECTURE_IMR, blender::GPU_BACKEND_VULKAN, blender::GPU_SUPPORT_LEVEL_SUPPORTED, blender::gpu::GPUPlatformGlobal::init(), blender::LOG, blender::gpu::VKDevice::physical_device_id_properties_get(), blender::gpu::VKDevice::physical_device_properties_get(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::gpu::VKDevice::vendor_name().
Referenced by blender::gpu::VKDevice::init(), and VKBackend().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 774 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 823 of file vk_backend.cc.
References BLI_assert_msg, device, and blender::gpu::VKThreadData::rendering_depth.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 830 of file vk_backend.cc.
References BLI_assert_msg, blender::BLI_thread_is_main(), device, blender::G, blender::gpu::VKContext::get(), lock, blender::gpu::VKThreadData::rendering_depth, and VKContext.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 857 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 779 of file vk_backend.cc.
References blender::gpu::VKShader::VKShader().
|
inlineoverridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 89 of file vk_backend.hh.
References blender::gpu::VKShaderCompiler::cache_dir_clear_old().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 804 of file vk_backend.cc.
References blender::gpu::VKStorageBuffer::VKStorageBuffer().
|
static |
Print one line per Vulkan device that meets minimum requirements, in the format used by --gpu-device help. Each line is <vendor-hex>/<device-hex>/<index> <name>. Operates without an active backend (creates a temporary Vulkan instance).
Definition at line 326 of file vk_backend.cc.
References CLG_logref_init(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::gpu::GPU_vulkan_is_supported_driver(), blender::LOG, blender::gpu::missing_capabilities_get(), SNPRINTF_RLEN, and blender::gpu::vk_instance_create_for_platform_checks().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 784 of file vk_backend.cc.
References blender::gpu::VKTexture::VKTexture().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 789 of file vk_backend.cc.
References CLOG_TRACE, blender::gpu::GCaps, blender::LOG, blender::gpu::GPUCapabilities::texture_pool_workaround, and blender::gpu::VKTexturePool::VKTexturePool().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 814 of file vk_backend.cc.
References blender::gpu::VKTopLevelAS::VKTopLevelAS().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 799 of file vk_backend.cc.
References blender::gpu::VKUniformBuffer::VKUniformBuffer().
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 809 of file vk_backend.cc.
|
overridevirtual |
Implements blender::gpu::GPUBackend.
Definition at line 754 of file vk_backend.cc.
References blender::gpu::VKWorkInFlight::VKWorkInFlight().
|
friend |
Definition at line 117 of file vk_backend.hh.
References VKContext.
Referenced by compute_dispatch(), compute_dispatch_indirect(), context_alloc(), render_end(), and VKContext.
|
friend |
Definition at line 118 of file vk_backend.hh.
References VKDescriptorSet.
Referenced by VKDescriptorSet.
|
friend |
Definition at line 119 of file vk_backend.hh.
References VKDescriptorSetTracker.
Referenced by VKDescriptorSetTracker.
| VKDevice blender::gpu::VKBackend::device |
Definition at line 37 of file vk_backend.hh.
Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKBottomLevelAS::add_geometry(), blender::gpu::VKTopLevelAS::add_instance(), blender::gpu::VKDescriptorPools::allocate(), blender::gpu::VKQueryPool::begin_query(), blender::gpu::VKWorkInFlight::begin_work(), blender::gpu::VKVertexAttributeObject::bind(), blender::gpu::VKBottomLevelAS::build(), blender::gpu::VKTopLevelAS::build(), blender::gpu::render_graph::VKCommandBufferWrapper::build_acceleration_structure(), capabilities_init(), blender::gpu::compile_ex(), context_alloc(), blender::gpu::VKBuffer::create(), blender::gpu::VKSampler::create(), blender::gpu::create_and_bind_vk_image(), blender::gpu::create_graphics_pipeline_libs(), blender::gpu::create_graphics_pipeline_no_libs(), debug_capture_begin(), debug_capture_end(), blender::gpu::VKDescriptorSetLayouts::deinit(), blender::gpu::VKImageCache::discard_all_of(), blender::gpu::VKDiscardPool::discard_pool_get(), blender::gpu::VKImmediate::end(), 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::ensure_graphics_pipelines(), 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::VKBuffer::flush_mapped_memory(), blender::gpu::VKContext::flush_render_graph(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKBuffer::free(), blender::gpu::VKSampler::free(), blender::gpu::get_image_memory_requirements(), blender::gpu::VKPixelBuffer::get_native_handle(), blender::gpu::VKQueryPool::get_occlusion_result(), blender::gpu::VKDescriptorSetLayouts::get_or_create(), blender::gpu::VKPipelinePool::init(), blender::gpu::VKTexture::init_internal(), blender::gpu::VKBuffer::invalidate_mapped_memory(), blender::gpu::VKContext::memory_statistics_get(), blender::gpu::debug::object_label(), platform_init(), blender::gpu::VKBuffer::read_async(), blender::gpu::VKPipelinePool::read_from_disk(), blender::gpu::VKDescriptorPools::recycle(), blender::gpu::VKTexturePool::release_texture(), blender::gpu::VKFrameBuffer::render_area_update(), render_begin(), render_end(), render_step(), blender::gpu::VKFrameBuffer::rendering_ensure(), blender::gpu::VKFrameBuffer::rendering_ensure_dynamic_rendering(), blender::gpu::VKImageCache::reset(), blender::gpu::render_graph::VKCommandBufferWrapper::set_front_face(), blender::gpu::render_graph::VKCommandBufferWrapper::set_vertex_input(), blender::gpu::spirv_target_version_get(), blender::gpu::VKFrameBuffer::subpass_transition_impl(), blender::gpu::to_vk_image_usage(), blender::gpu::VKStorageBuffer::update(), blender::gpu::VKDescriptorSetTracker::update_descriptor_set(), blender::gpu::VKContext::update_pipeline_data(), blender::gpu::VKTexture::update_sub(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::VKShader::vertex_interface_declare(), blender::gpu::vk_extension_get(), blender::gpu::render_graph::vk_pipeline_dynamic_graphics_build_commands(), 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(), blender::gpu::VKShader::~VKShader(), and blender::gpu::VKTexture::~VKTexture().