File tree 1 file changed +4
-21
lines changed
Src/Examples/Vulkan/VkColorCube
1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -1284,33 +1284,16 @@ bool AMDVulkanDemo::InitializeVulkan()
1284
1284
return false ;
1285
1285
}
1286
1286
1287
- char modulepath[4096 ];
1288
-
1289
- #ifdef _WIN32
1290
- ::GetModuleFileNameA (NULL , modulepath, sizeof (modulepath));
1291
- #else
1292
- int len = readlink (" /proc/self/exe" , modulepath, 4096 );
1293
-
1294
- if (len <= 0 )
1295
- {
1296
- return false ;
1297
- }
1298
-
1299
- #endif
1300
-
1301
- std::string moduleString (modulepath);
1302
- size_t lastSlashPosition = moduleString.find_last_of (' \\ ' );
1303
-
1304
- std::string m_executablePath = std::string (moduleString.begin (), moduleString.begin () + (lastSlashPosition + 1 ));
1305
- std::string vertexShaderFile = m_executablePath;
1287
+ std::string executablePath = m_GpuPerfApiHelper.GetExecutablePath ();
1288
+ std::string vertexShaderFile = executablePath;
1306
1289
vertexShaderFile.append (" vkcolorcubeshader.vert.spv" );
1307
1290
m_vertexShaderModule = LoadShader (vertexShaderFile.c_str ());
1308
1291
1309
- std::string fragmentShaderFile = m_executablePath ;
1292
+ std::string fragmentShaderFile = executablePath ;
1310
1293
fragmentShaderFile.append (" vkcolorcubeshader.frag.spv" );
1311
1294
m_fragmentShaderModule = LoadShader (fragmentShaderFile.c_str ());
1312
1295
1313
- std::string wireFrameShader = m_executablePath ;
1296
+ std::string wireFrameShader = executablePath ;
1314
1297
wireFrameShader.append (" vkcolorcubewireframeshader.frag.spv" );
1315
1298
m_fragmentShaderWireframeModule = LoadShader (wireFrameShader.c_str ());
1316
1299
You can’t perform that action at this time.
0 commit comments