MCPcopy Create free account
hub / github.com/3Shain/dxmt / InitializeMetalCachePath

Function InitializeMetalCachePath

src/dxgi/dxgi.cpp:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50};
51
52static void InitializeMetalCachePath() {
53 if (env::getEnvVar("DXMT_USE_DEFAULT_METAL_CACHE") == "1")
54 return;
55 // This is the framework cache (mainly for PSOs), not managed by DXMT
56 auto metal_cache_path = str::format("dxmt/", env::getExeName(), "/com.apple.metal");
57 if (!WMTSetMetalShaderCachePath(metal_cache_path.c_str())) {
58 Logger::info("Failed to set Metal cache path, fallback to system default");
59 }
60}
61
62extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason,
63 LPVOID reserved) {

Callers 1

DllMainFunction · 0.85

Calls 4

getEnvVarFunction · 0.85
formatFunction · 0.85
getExeNameFunction · 0.85

Tested by

no test coverage detected