Update shader builder code and add initial work on a shader caching class
This commit is contained in:
parent
7ba1f35142
commit
41a345d399
10 changed files with 561 additions and 118 deletions
|
|
@ -519,11 +519,13 @@ std::unique_ptr<VulkanShader> VkLightprober::CompileShader(const std::string& na
|
|||
auto onIncludeSystem = [](std::string headerName, std::string includerName, size_t depth) { return OnInclude(headerName.c_str(), includerName.c_str(), depth, true); };
|
||||
|
||||
return ShaderBuilder()
|
||||
.Type(ShaderType::Compute)
|
||||
.AddSource("VersionBlock", prefix)
|
||||
.AddSource(name, LoadPrivateShaderLump(filename.c_str()).GetChars())
|
||||
.OnIncludeLocal(onIncludeLocal)
|
||||
.OnIncludeSystem(onIncludeSystem)
|
||||
.Code(GLSLCompiler()
|
||||
.Type(ShaderType::Compute)
|
||||
.AddSource("VersionBlock", prefix)
|
||||
.AddSource(name, LoadPrivateShaderLump(filename.c_str()).GetChars())
|
||||
.OnIncludeLocal(onIncludeLocal)
|
||||
.OnIncludeSystem(onIncludeSystem)
|
||||
.Compile(fb->GetDevice()))
|
||||
.DebugName(debugName)
|
||||
.Create(debugName, fb->GetDevice());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue