Blender V4.5
blender::gpu::ShaderCompiler Class Reference

#include <gpu_shader_private.hh>

Inherited by blender::gpu::GLShaderCompiler, blender::gpu::GLSubprocessShaderCompiler, and blender::gpu::MTLShaderCompiler.

Public Member Functions

virtual void specialize_shader (ShaderSpecialization &)
 

Protected Member Functions

void destruct_compilation_worker ()
 

ShaderCompiler

 ShaderCompiler (uint32_t threads_count=1, GPUWorker::ContextType context_type=GPUWorker::ContextType::PerThread, bool support_specializations=false)
 
virtual ~ShaderCompiler ()
 
Shadercompile (const shader::ShaderCreateInfo &info, bool is_batch_compilation)
 
virtual Shadercompile_shader (const shader::ShaderCreateInfo &info)
 
BatchHandle batch_compile (Span< const shader::ShaderCreateInfo * > &infos, CompilationPriority priority)
 
void batch_cancel (BatchHandle &handle)
 
bool batch_is_ready (BatchHandle handle)
 
Vector< Shader * > batch_finalize (BatchHandle &handle)
 
SpecializationBatchHandle precompile_specializations (Span< ShaderSpecialization > specializations, CompilationPriority priority)
 
bool specialization_batch_is_ready (SpecializationBatchHandle &handle)
 
bool is_compiling ()
 
void wait_for_all ()
 

Detailed Description

Definition at line 145 of file gpu_shader_private.hh.

Constructor & Destructor Documentation

◆ ShaderCompiler()

blender::gpu::ShaderCompiler::ShaderCompiler ( uint32_t threads_count = 1,
GPUWorker::ContextType context_type = GPUWorker::ContextType::PerThread,
bool support_specializations = false )

Definition at line 967 of file gpu_shader.cc.

References GPU_use_main_context_workaround().

◆ ~ShaderCompiler()

blender::gpu::ShaderCompiler::~ShaderCompiler ( )
virtual

Definition at line 983 of file gpu_shader.cc.

References BLI_assert.

Member Function Documentation

◆ batch_cancel()

void blender::gpu::ShaderCompiler::batch_cancel ( BatchHandle & handle)

Definition at line 1025 of file gpu_shader.cc.

References batch, and lock.

Referenced by GPU_shader_batch_cancel(), and GPU_shader_batch_specializations_cancel().

◆ batch_compile()

BatchHandle blender::gpu::ShaderCompiler::batch_compile ( Span< const shader::ShaderCreateInfo * > & infos,
CompilationPriority priority )

◆ batch_finalize()

Vector< Shader * > blender::gpu::ShaderCompiler::batch_finalize ( BatchHandle & handle)

Definition at line 1057 of file gpu_shader.cc.

References batch, and lock.

Referenced by GPU_shader_batch_finalize().

◆ batch_is_ready()

bool blender::gpu::ShaderCompiler::batch_is_ready ( BatchHandle handle)

Definition at line 1050 of file gpu_shader.cc.

References lock.

Referenced by GPU_shader_batch_is_ready().

◆ compile()

◆ compile_shader()

Shader * blender::gpu::ShaderCompiler::compile_shader ( const shader::ShaderCreateInfo & info)
virtual

Reimplemented in blender::gpu::MTLShaderCompiler.

Definition at line 991 of file gpu_shader.cc.

References info.

◆ destruct_compilation_worker()

void blender::gpu::ShaderCompiler::destruct_compilation_worker ( )
inlineprotected

Definition at line 278 of file gpu_shader_private.hh.

◆ is_compiling()

bool blender::gpu::ShaderCompiler::is_compiling ( )

Definition at line 1166 of file gpu_shader.cc.

References lock.

Referenced by GPU_shader_batch_is_compiling().

◆ precompile_specializations()

SpecializationBatchHandle blender::gpu::ShaderCompiler::precompile_specializations ( Span< ShaderSpecialization > specializations,
CompilationPriority priority )

◆ specialization_batch_is_ready()

bool blender::gpu::ShaderCompiler::specialization_batch_is_ready ( SpecializationBatchHandle & handle)

Definition at line 1096 of file gpu_shader.cc.

References batch, and lock.

Referenced by GPU_shader_batch_specializations_is_ready().

◆ specialize_shader()

virtual void blender::gpu::ShaderCompiler::specialize_shader ( ShaderSpecialization & )
inlinevirtual

◆ wait_for_all()

void blender::gpu::ShaderCompiler::wait_for_all ( )

Definition at line 1172 of file gpu_shader.cc.

References lock.

Referenced by GPU_shader_batch_wait_for_all().


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