File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed
Src/Examples/Vulkan/VkColorCube Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -1284,33 +1284,16 @@ bool AMDVulkanDemo::InitializeVulkan()
12841284 return false ;
12851285 }
12861286
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;
13061289 vertexShaderFile.append (" vkcolorcubeshader.vert.spv" );
13071290 m_vertexShaderModule = LoadShader (vertexShaderFile.c_str ());
13081291
1309- std::string fragmentShaderFile = m_executablePath ;
1292+ std::string fragmentShaderFile = executablePath ;
13101293 fragmentShaderFile.append (" vkcolorcubeshader.frag.spv" );
13111294 m_fragmentShaderModule = LoadShader (fragmentShaderFile.c_str ());
13121295
1313- std::string wireFrameShader = m_executablePath ;
1296+ std::string wireFrameShader = executablePath ;
13141297 wireFrameShader.append (" vkcolorcubewireframeshader.frag.spv" );
13151298 m_fragmentShaderWireframeModule = LoadShader (wireFrameShader.c_str ());
13161299
You can’t perform that action at this time.
0 commit comments