MCPcopy Create free account
hub / github.com/Autodesk/Aurora / loadFile

Method loadFile

Libraries/Aurora/Source/Transpiler.cpp:94–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 virtual ~AuroraSlangFileSystem() = default;
93
94 virtual SLANG_NO_THROW SlangResult SLANG_MCALL loadFile(
95 char const* path, ISlangBlob** outBlob) override
96 {
97 // Is if we already have blob for this path, return that.
98 auto iter = _fileBlobs.find(path);
99 if (iter != _fileBlobs.end())
100 {
101 *outBlob = iter->second.get();
102
103 return SLANG_OK;
104 }
105
106 // Read from the text file map.
107 auto shaderIter = _fileText.find(path);
108 if (shaderIter != _fileText.end())
109 {
110 // Create a blob from the text file string, add to the blob map, and return it.
111 _fileBlobs[path] = make_unique<StringSlangBlob>(shaderIter->second);
112 *outBlob = _fileBlobs[path].get();
113 return SLANG_OK;
114 }
115
116 return SLANG_FAIL;
117 }
118
119 // Slang type interface not needed, just return null.
120 virtual SLANG_NO_THROW SlangResult SLANG_MCALL queryInterface(

Callers

nothing calls this directly

Calls 2

endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected