Created
April 16, 2022 07:17
-
-
Save Kuranes/da4dec628f6cf60dbb013e66ed6cd472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r peters2022_permutation_coding_supplemental/vulkan_code/CMakeLists.txt peters2022_permutation_coding_supplemental_win32/vulkan_code/CMakeLists.txt | |
32a33,46 | |
> | |
> | |
> if(MSVC) | |
> target_link_libraries(blend_attributes PRIVATE Vulkan::Vulkan glfw) | |
> | |
> | |
> set_target_properties( blend_attributes | |
> PROPERTIES | |
> RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}" | |
> RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}" | |
> VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" | |
> ) | |
> | |
> else(MSVC) | |
33a48 | |
> endif(MSVC) | |
\ No newline at end of file | |
diff -r peters2022_permutation_coding_supplemental/vulkan_code/main.c peters2022_permutation_coding_supplemental_win32/vulkan_code/main.c | |
18a19,44 | |
> #ifdef WIN32 | |
> #include <windows.h> | |
> #define uint unsigned int | |
> #define CLOCK_REALTIME 0 | |
> | |
> struct timespec { | |
> long tv_sec; | |
> long tv_nsec; | |
> }; | |
> typedef struct timespec timespec; | |
> | |
> | |
> int clock_gettime(int a, timespec* spec) | |
> { | |
> __int64 wintime; | |
> GetSystemTimeAsFileTime((FILETIME*)&wintime); | |
> wintime -= 116444736000000000i64; // 1jan1601 to 1jan1970 | |
> spec->tv_sec = wintime / 10000000i64; // seconds | |
> spec->tv_nsec = wintime % 10000000i64 * 100; // nano-seconds | |
> return 0; | |
> } | |
> | |
> #endif | |
> | |
> | |
> | |
29d54 | |
< #include <time.h> | |
30a56,58 | |
> #ifndef WIN32 | |
> #include <time.h> | |
> #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment