|
Blender V5.0
|
#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 () |
| Shader * | compile (const shader::ShaderCreateInfo &info, bool is_batch_compilation) |
| virtual Shader * | compile_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 () |
Definition at line 130 of file gpu_shader_private.hh.
| blender::gpu::ShaderCompiler::ShaderCompiler | ( | uint32_t | threads_count = 1, |
| GPUWorker::ContextType | context_type = GPUWorker::ContextType::PerThread, | ||
| bool | support_specializations = false ) |
Definition at line 849 of file gpu_shader.cc.
References GPU_use_main_context_workaround().
Referenced by blender::gpu::GLShaderCompiler::GLShaderCompiler(), and blender::gpu::MTLShaderCompiler::MTLShaderCompiler().
|
virtual |
Definition at line 865 of file gpu_shader.cc.
References BLI_assert.
| void blender::gpu::ShaderCompiler::batch_cancel | ( | BatchHandle & | handle | ) |
Definition at line 907 of file gpu_shader.cc.
Referenced by GPU_shader_batch_cancel(), and GPU_shader_batch_specializations_cancel().
| BatchHandle blender::gpu::ShaderCompiler::batch_compile | ( | Span< const shader::ShaderCreateInfo * > & | infos, |
| CompilationPriority | priority ) |
Definition at line 878 of file gpu_shader.cc.
References batch, compile(), i, blender::Span< T >::index_range(), lock, and blender::Span< T >::size().
Referenced by GPU_shader_batch_create_from_infos().
| Vector< Shader * > blender::gpu::ShaderCompiler::batch_finalize | ( | BatchHandle & | handle | ) |
Definition at line 930 of file gpu_shader.cc.
Referenced by GPU_shader_batch_finalize().
| bool blender::gpu::ShaderCompiler::batch_is_ready | ( | BatchHandle | handle | ) |
Definition at line 923 of file gpu_shader.cc.
References lock.
Referenced by GPU_shader_batch_is_ready(), and specialization_batch_is_ready().
| Shader * blender::gpu::ShaderCompiler::compile | ( | const shader::ShaderCreateInfo & | info, |
| bool | is_batch_compilation ) |
Definition at line 665 of file gpu_shader.cc.
References blender::gpu::ProfileReport::add_group_cpu(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, blender::StringRefNull::c_str(), blender::gpu::shader::ShaderCreateInfo::check_error(), blender::gpu::shader::ShaderCreateInfo::compute_entry_fn_, blender::gpu::shader::ShaderCreateInfo::compute_source_, blender::gpu::shader::ShaderCreateInfo::compute_source_generated, blender::gpu::shader::ShaderCreateInfo::do_static_compilation_, error(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend_non_duplicates(), blender::gpu::shader::ShaderCreateInfo::fragment_outputs_, blender::gpu::shader::ShaderCreateInfo::fragment_source_, G, blender::gpu::shader::ShaderCreateInfo::generated_sources, blender::gpu::shader::ShaderCreateInfo::geometry_source_, blender::gpu::Context::get(), blender::gpu::GPUBackend::get(), blender::gpu::ProfileReport::get(), GPU_debug_group_begin(), GPU_debug_group_end(), GPU_DEBUG_SHADER_COMPILATION_GROUP, blender::gpu::shader::gpu_shader_dependency_get_resolved_source(), blender::gpu::shader::gpu_shader_dependency_get_source(), blender::gpu::shader::ShaderCreateInfo::FragOut::index, blender::StringRefBase::is_empty(), blender::gpu::shader::ShaderCreateInfo::is_generated_, blender::gpu::shader::ShaderCreateInfo::name_, blender::gpu::shader::ShaderCreateInfo::resource_guard_defines(), blender::gpu::GPUBackend::shader_alloc(), standard_defines(), blender::gpu::shader::ShaderCreateInfo::typedef_source_generated, blender::gpu::shader::ShaderCreateInfo::typedef_sources_, and blender::gpu::shader::ShaderCreateInfo::vertex_source_.
Referenced by batch_compile(), blender::gpu::MTLShaderCompiler::compile_shader(), compile_shader(), GPU_shader_create_from_info(), and GPU_shader_create_from_info_python().
|
virtual |
Reimplemented in blender::gpu::MTLShaderCompiler.
Definition at line 873 of file gpu_shader.cc.
References compile().
|
inlineprotected |
Definition at line 262 of file gpu_shader_private.hh.
| bool blender::gpu::ShaderCompiler::is_compiling | ( | ) |
Definition at line 1035 of file gpu_shader.cc.
References lock.
Referenced by GPU_shader_batch_is_compiling().
| SpecializationBatchHandle blender::gpu::ShaderCompiler::precompile_specializations | ( | Span< ShaderSpecialization > | specializations, |
| CompilationPriority | priority ) |
Definition at line 945 of file gpu_shader.cc.
References batch, i, blender::Span< T >::index_range(), lock, and blender::Span< T >::size().
Referenced by GPU_shader_batch_specializations().
| bool blender::gpu::ShaderCompiler::specialization_batch_is_ready | ( | SpecializationBatchHandle & | handle | ) |
Definition at line 969 of file gpu_shader.cc.
References batch, batch_is_ready(), and lock.
Referenced by GPU_shader_batch_specializations_is_ready().
|
inlinevirtual |
Reimplemented in blender::gpu::GLShaderCompiler, and blender::gpu::MTLShaderCompiler.
Definition at line 276 of file gpu_shader_private.hh.
| void blender::gpu::ShaderCompiler::wait_for_all | ( | ) |
Definition at line 1041 of file gpu_shader.cc.
References lock.
Referenced by GPU_shader_batch_wait_for_all().