| 89 | } |
| 90 | |
| 91 | void PTPipelineVariant::ShaderPermutation::LoadShaderLibraryIfNeeded(PTPipelineBaker & baker) |
| 92 | { |
| 93 | if (US_compileError != "" || ShaderLibrary != nullptr) |
| 94 | return; |
| 95 | |
| 96 | std::shared_ptr<donut::vfs::IBlob> data = baker.GetFS()->readFile(("/" + c_PTShaderBinariesRoot + "/" + CompiledFileNameNoExt + ".bin").c_str()); |
| 97 | |
| 98 | if (data) |
| 99 | ShaderLibrary = baker.GetDevice()->createShaderLibrary(data->data(), data->size()); |
| 100 | |
| 101 | if (!ShaderLibrary) |
| 102 | US_compileError = StringFormat("ERROR creating ShaderLibrary for file %s", CompiledFullPath.c_str()); |
| 103 | } |
| 104 | |
| 105 | PTPipelineVariant::PTPipelineVariant(const std::string & relativeSourcePath, const std::vector<donut::engine::ShaderMacro> & variantMacros, const std::shared_ptr<PTPipelineBaker>& baker, const std::string & shortUniqueDebugID, bool raygenOnly) |
| 106 | : m_macros(variantMacros), m_baker(baker), m_rayGenOnly(raygenOnly) |
no test coverage detected