SWDEV-336378 - cmake support for vulkan example (#2725)

Change-Id: I5ac28d2f57c1732e243674aa904cabe23be34797

[ROCm/hip-tests commit: e9202ded5b]
이 커밋은 다음에 포함됨:
ROCm CI Service Account 작성하고 GitHub가 2022-06-13 15:35:33 +05:30를 커밋함
1 부모 7cf8008999
커밋 3913b8282b
4 파일이 변경됨
+264 -3

검색과 일치하는 파일 없음

+14 -2
파일 보기
@@ -37,7 +37,7 @@
#include <chrono>
#include <algorithm>
#include "linmath.h"
#include "hip_runtime.h"
#include "hip/hip_runtime.h"
#include "SineWaveSimulation.h"
@@ -50,6 +50,18 @@ std::string execution_path;
#define ENABLE_VALIDATION (true)
#endif
#ifndef _WIN64
#define MAX_PATH 260
int GetModuleFileName(void* hndl, char* name, int size)
{
FILE* stream = fopen("/proc/self/cmdline", "r");
fgets(name, size, stream);
fclose(stream);
return strlen(name);
}
#endif
class VulkanCudaSineWave : public VulkanBaseApp
{
@@ -93,7 +105,7 @@ public:
throw std::runtime_error("Requested height and width is too large for this sample!");
}
// Add our compiled vulkan shader files
TCHAR buffer[MAX_PATH] = { 0 };
char buffer[MAX_PATH] = { 0 }; //assuming none unicode
GetModuleFileName(NULL, buffer, MAX_PATH);
std::string str3 = std::string(buffer);
std::string str1 = "vert.spv" ; //sdkFindFilePath("sinewave.vert", execution_path.c_str());