Fix copy paste typo in main.cpp

Luckily the defines are the same values fd `0x01`, win32 `0x02` and win32_kmt `0x04` for both
memory and semaphore so it doesn't matter, but made me a bit confused as I read the code.
This commit is contained in:
Jakob Bornecrantz 2021-11-26 10:44:23 +00:00 committed by GitHub
parent 0563025cde
commit 34b5844b40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,13 +331,13 @@ class VulkanCudaSineWave : public VulkanBaseApp {
VkExternalMemoryHandleTypeFlagBits handleType) {
cudaExternalMemoryHandleDesc externalMemoryHandleDesc = {};
if (handleType & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT) {
if (handleType & VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT) {
externalMemoryHandleDesc.type = cudaExternalMemoryHandleTypeOpaqueWin32;
} else if (handleType &
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT) {
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT) {
externalMemoryHandleDesc.type =
cudaExternalMemoryHandleTypeOpaqueWin32Kmt;
} else if (handleType & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) {
} else if (handleType & VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT) {
externalMemoryHandleDesc.type = cudaExternalMemoryHandleTypeOpaqueFd;
} else {
throw std::runtime_error("Unknown handle type requested!");