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

◆ compile_from_source_cached()

std::shared_ptr< Core::VKShaderModule > MayaFlux::Portal::Graphics::ShaderFoundry::compile_from_source_cached ( const std::string &  source,
ShaderStage  stage,
const std::string &  cache_key,
const std::string &  entry_point = "main" 
)
private

Definition at line 189 of file ShaderFoundry.cpp.

194{
195 auto it = m_shader_cache.find(cache_key);
196 if (it != m_shader_cache.end()) {
198 "Using cached shader: {}", cache_key);
199 return it->second;
200 }
201
202 auto shader = compile_from_source(source, stage, entry_point);
203 if (!shader) {
204 return nullptr;
205 }
206
207 m_shader_cache[cache_key] = shader;
208 return shader;
209}
#define MF_DEBUG(comp, ctx,...)
std::unordered_map< std::string, std::shared_ptr< Core::VKShaderModule > > m_shader_cache
std::shared_ptr< Core::VKShaderModule > compile_from_source(const std::string &source, ShaderStage stage, const std::string &entry_point="main")
@ ShaderCompilation
Shader compilation tasks (Portal::Graphics::ShaderCompiler)
@ Portal
High-level user-facing API layer.

References compile_from_source(), m_shader_cache, MF_DEBUG, MayaFlux::Journal::Portal, and MayaFlux::Journal::ShaderCompilation.

+ Here is the call graph for this function: