Blender V5.3
blender::gpu::GPUBackend Class Referenceabstract

#include <gpu_backend.hh>

Inherited by blender::gpu::DummyBackend, blender::gpu::GLBackend, blender::gpu::MTLBackend, and blender::gpu::VKBackend.

Public Member Functions

virtual ~GPUBackend ()=default
virtual void init_resources ()=0
virtual void delete_resources ()=0
ShaderCompiler * get_compiler ()
virtual void compute_dispatch (int groups_x_len, int groups_y_len, int groups_z_len)=0
virtual void compute_dispatch_indirect (StorageBuf *indirect_buf)=0
virtual Context * context_alloc (GHOST_IWindow *ghost_window, GHOST_IContext *ghost_context)=0
virtual Batch * batch_alloc ()=0
virtual Fence * fence_alloc ()=0
virtual WorkInFlight * work_in_flight_alloc (unsigned int max_in_flight)=0
virtual FrameBuffer * framebuffer_alloc (const char *name)=0
virtual IndexBuf * indexbuf_alloc ()=0
virtual PixelBuffer * pixelbuf_alloc (size_t size)=0
virtual QueryPool * querypool_alloc ()=0
virtual Shader * shader_alloc (const char *name)=0
virtual Texture * texture_alloc (const char *name)=0
virtual TexturePool * texturepool_alloc ()=0
virtual UniformBuf * uniformbuf_alloc (size_t size, const char *name)=0
virtual StorageBuf * storagebuf_alloc (size_t size, GPUUsageType usage, const char *name)=0
virtual VertBuf * vertbuf_alloc ()=0
virtual TopLevelAS * tlas_alloc (const char *name)=0
virtual BottomLevelAS * blas_alloc (const char *name)=0
virtual void shader_cache_dir_clear_old ()=0
virtual void render_begin ()=0
virtual void render_end ()=0
virtual void render_step (bool force_resource_release=false)=0

Static Public Member Functions

Backend selection
static GPUBackend * get ()

Protected Attributes

ShaderCompiler * compiler_

Detailed Description

Definition at line 43 of file gpu_backend.hh.

Constructor & Destructor Documentation

◆ ~GPUBackend()

virtual blender::gpu::GPUBackend::~GPUBackend ( )
virtualdefault

Member Function Documentation

◆ batch_alloc()

virtual Batch * blender::gpu::GPUBackend::batch_alloc ( )
pure virtual

◆ blas_alloc()

virtual BottomLevelAS * blender::gpu::GPUBackend::blas_alloc ( const char * name)
pure virtual

◆ compute_dispatch()

virtual void blender::gpu::GPUBackend::compute_dispatch ( int groups_x_len,
int groups_y_len,
int groups_z_len )
pure virtual

◆ compute_dispatch_indirect()

virtual void blender::gpu::GPUBackend::compute_dispatch_indirect ( StorageBuf * indirect_buf)
pure virtual

◆ context_alloc()

virtual Context * blender::gpu::GPUBackend::context_alloc ( GHOST_IWindow * ghost_window,
GHOST_IContext * ghost_context )
pure virtual

◆ delete_resources()

virtual void blender::gpu::GPUBackend::delete_resources ( )
pure virtual

◆ fence_alloc()

virtual Fence * blender::gpu::GPUBackend::fence_alloc ( )
pure virtual

◆ framebuffer_alloc()

virtual FrameBuffer * blender::gpu::GPUBackend::framebuffer_alloc ( const char * name)
pure virtual

◆ get()

GPUBackend * blender::GPUBackend::get ( )
static

Definition at line 642 of file gpu_context.cc.

References blender::g_backend.

Referenced by blender::gpu::GLTexturePool::acquire_texture_impl(), blender::gpu::MTLTexturePool::acquire_texture_impl(), blender::gpu::TexturePoolImpl::acquire_texture_impl(), blender::gpu::ShaderCompiler::compile(), blender::gpu::Context::Context(), blender::gpu::WorkInFlight::create(), delete_resources(), blender::gpu::GLBackend::get(), blender::gpu::MTLBackend::get(), blender::gpu::VKBackend::get(), blender::GPU_batch_calloc(), blender::GPU_compute_dispatch(), blender::GPU_compute_dispatch_indirect(), blender::GPU_context_create(), blender::GPU_context_discard(), blender::GPU_fence_create(), blender::GPU_framebuffer_create(), blender::GPU_indexbuf_calloc(), blender::GPU_pixel_buffer_create(), GPU_ray_tracing_blas_alloc(), GPU_ray_tracing_tlas_alloc(), blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_render_step(), blender::gpu_select_query_begin(), blender::GPU_shader_async_compilation(), blender::GPU_shader_async_compilation_cancel(), blender::GPU_shader_async_compilation_finalize(), blender::GPU_shader_async_compilation_is_ready(), blender::GPU_shader_async_specialization(), blender::GPU_shader_async_specialization_cancel(), blender::GPU_shader_async_specialization_is_ready(), blender::GPU_shader_cache_dir_clear_old(), blender::GPU_shader_compiler_has_pending_work(), blender::GPU_shader_compiler_pause(), blender::GPU_shader_compiler_resume(), blender::GPU_shader_compiler_wait_for_all(), blender::GPU_shader_create_from_info(), blender::GPU_shader_create_from_info_python(), blender::GPU_storagebuf_create_ex(), blender::gpu_texture_create(), blender::GPU_texture_create_compressed_2d(), blender::GPU_texture_create_from_vertbuf(), blender::GPU_texture_create_view(), blender::GPU_uniformbuf_create_ex(), blender::GPU_uniformbuf_create_from_list(), and blender::GPU_vertbuf_calloc().

◆ get_compiler()

◆ indexbuf_alloc()

virtual IndexBuf * blender::gpu::GPUBackend::indexbuf_alloc ( )
pure virtual

◆ init_resources()

virtual void blender::gpu::GPUBackend::init_resources ( )
pure virtual

◆ pixelbuf_alloc()

virtual PixelBuffer * blender::gpu::GPUBackend::pixelbuf_alloc ( size_t size)
pure virtual

◆ querypool_alloc()

virtual QueryPool * blender::gpu::GPUBackend::querypool_alloc ( )
pure virtual

◆ render_begin()

virtual void blender::gpu::GPUBackend::render_begin ( )
pure virtual

◆ render_end()

virtual void blender::gpu::GPUBackend::render_end ( )
pure virtual

◆ render_step()

virtual void blender::gpu::GPUBackend::render_step ( bool force_resource_release = false)
pure virtual

◆ shader_alloc()

virtual Shader * blender::gpu::GPUBackend::shader_alloc ( const char * name)
pure virtual

◆ shader_cache_dir_clear_old()

virtual void blender::gpu::GPUBackend::shader_cache_dir_clear_old ( )
pure virtual

◆ storagebuf_alloc()

virtual StorageBuf * blender::gpu::GPUBackend::storagebuf_alloc ( size_t size,
GPUUsageType usage,
const char * name )
pure virtual

◆ texture_alloc()

◆ texturepool_alloc()

virtual TexturePool * blender::gpu::GPUBackend::texturepool_alloc ( )
pure virtual

◆ tlas_alloc()

virtual TopLevelAS * blender::gpu::GPUBackend::tlas_alloc ( const char * name)
pure virtual

◆ uniformbuf_alloc()

virtual UniformBuf * blender::gpu::GPUBackend::uniformbuf_alloc ( size_t size,
const char * name )
pure virtual

◆ vertbuf_alloc()

virtual VertBuf * blender::gpu::GPUBackend::vertbuf_alloc ( )
pure virtual

◆ work_in_flight_alloc()

virtual WorkInFlight * blender::gpu::GPUBackend::work_in_flight_alloc ( unsigned int max_in_flight)
pure virtual

Member Data Documentation

◆ compiler_


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