| 99 | } |
| 100 | |
| 101 | static wstring MakeShaderCacheName(const std::string& shaderCode, const char* functionName, |
| 102 | const char* profile, const D3D_SHADER_MACRO* defines) |
| 103 | { |
| 104 | string hashString = shaderCode; |
| 105 | hashString += "\n"; |
| 106 | hashString += functionName; |
| 107 | hashString += "\n"; |
| 108 | hashString += profile; |
| 109 | hashString += "\n"; |
| 110 | |
| 111 | hashString += MakeDefinesString(defines); |
| 112 | |
| 113 | Hash codeHash = GenerateHash(hashString.data(), int(hashString.length()), 0); |
| 114 | |
| 115 | return cacheDir + codeHash.ToString() + L".cache"; |
| 116 | } |
| 117 | |
| 118 | static ID3DBlob* CompileShader(const wchar* path, const char* functionName, const char* profile, |
| 119 | const D3D_SHADER_MACRO* defines, bool forceOptimization, |
no test coverage detected