MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / addComputeShader

Function addComputeShader

src/dll/shaderRegistry.cpp:84–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 ShaderHandle addComputeShader(std::string path) {
85 path = getDataFilePath("shaders\\" + path, true);
86
87 mutex.lock();
88 {
89 auto existing = csPathToHandle.find(path);
90 if (existing != csPathToHandle.end()) {
91 mutex.unlock();
92 return existing->second;
93 }
94 }
95 ShaderHandle handle(shaderReloadInfo.size());
96 shaderReloadInfo.push_back(ShaderReloadInfo { path, ShaderType::Compute, FILETIME { 0, 0 } });
97 loadedShaders.push_back(CompiledShader { nullptr });
98 csPathToHandle[path] = handle;
99 mutex.unlock();
100 return handle;
101 }
102
103 bool reload(ShaderReloadInfo *const reloadInfo, CompiledShader *const shader) {
104 LPCSTR profile =

Callers 1

renderTaaFunction · 0.85

Calls 1

getDataFilePathFunction · 0.85

Tested by

no test coverage detected