MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ initialize()

bool MayaFlux::Portal::Graphics::ShaderFoundry::initialize ( const std::shared_ptr< Core::VulkanBackend > &  backend,
const ShaderCompilerConfig config = {} 
)

Initialize shader compiler.

Parameters
backendShared pointer to VulkanBackend
configCompiler configuration
Returns
True if initialization succeeded

Must be called before compiling any shaders.

Definition at line 15 of file ShaderFoundry.cpp.

18{
19 if (s_initialized) {
21 "ShaderFoundry already initialized (static flag)");
22 return true;
23 }
24
25 if (!backend) {
27 "Cannot initialize ShaderFoundry with null backend");
28 return false;
29 }
30
31 if (m_backend) {
33 "ShaderFoundry already initialized");
34 return true;
35 }
36
37 m_backend = backend;
38 m_config = config;
39
40 m_global_descriptor_manager = std::make_shared<Core::VKDescriptorManager>();
41 m_global_descriptor_manager->initialize(get_device(), 1024);
42
43 m_graphics_queue = m_backend->get_context().get_graphics_queue();
44 m_compute_queue = m_backend->get_context().get_compute_queue();
45 m_transfer_queue = m_backend->get_context().get_transfer_queue();
46
47 s_initialized = true;
48
50 "ShaderFoundry initialized");
51 return true;
52}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::shared_ptr< Core::VKDescriptorManager > m_global_descriptor_manager
std::shared_ptr< Core::VulkanBackend > m_backend
@ ShaderCompilation
Shader compilation tasks (Portal::Graphics::ShaderCompiler)
@ Portal
High-level user-facing API layer.

References get_device(), m_backend, m_compute_queue, m_config, m_global_descriptor_manager, m_graphics_queue, m_transfer_queue, MF_ERROR, MF_INFO, MF_WARN, MayaFlux::Journal::Portal, s_initialized, and MayaFlux::Journal::ShaderCompilation.

+ Here is the call graph for this function: