Open
Conversation
Member
Author
|
any way to reopen? |
63_CUDAInterop/main.cpp
Outdated
Comment on lines
152
to
191
| assert(re); | ||
| if (!re) logFail("Failed to bind CUDA memory to buffer"); |
Member
Author
There was a problem hiding this comment.
btw its return logFail if you want to quit
63_CUDAInterop/main.cpp
Outdated
Comment on lines
166
to
172
| // create and allocate CUmem with CUDA and slap it inside a simple IReferenceCounted wrapper | ||
| ASSERT_SUCCESS(cudaDevice->createSharedMemory(&cudaMemories[0], { .size = size, .alignment = sizeof(float), .location = CU_MEM_LOCATION_TYPE_DEVICE })); | ||
| ASSERT_SUCCESS(cudaDevice->createSharedMemory(&cudaMemories[1], { .size = size, .alignment = sizeof(float), .location = CU_MEM_LOCATION_TYPE_DEVICE })); | ||
| ASSERT_SUCCESS(cudaDevice->createSharedMemory(&cudaMemories[2], { .size = size, .alignment = sizeof(float), .location = CU_MEM_LOCATION_TYPE_DEVICE })); | ||
|
|
||
| sema = m_device->createSemaphore({ .externalHandleTypes = ISemaphore::EHT_OPAQUE_WIN32 }); | ||
| ASSERT_SUCCESS(cudaDevice->importGPUSemaphore(&cusema, sema.get())); | ||
| importedSemaphore = m_device->createSemaphore(0, { .externalHandleTypes = ISemaphore::EHT_OPAQUE_WIN32 }); | ||
| ASSERT_SUCCESS(cudaDevice->importGPUSemaphore(&cudaSemaphore, importedSemaphore.get())); |
Member
Author
There was a problem hiding this comment.
log a message and return false, don't assert
63_CUDAInterop/main.cpp
Outdated
Comment on lines
252
to
254
| .levelCount = 1u, | ||
| .layerCount = 1u, | ||
| } |
Member
Author
There was a problem hiding this comment.
explain why you're not doing the usual UNDEFINED to X layout transition we usually see in samples
IIRC its because the CCUDASharedMemory creates a PREINITIALIZED layout image
63_CUDAInterop/main.cpp
Outdated
| .layerCount = 1u, | ||
| }, | ||
| .oldLayout = IImage::LAYOUT::UNDEFINED, | ||
| .oldLayout = IImage::LAYOUT::PREINITIALIZED, |
Member
Author
There was a problem hiding this comment.
explain that old layout at the time of release was PREINITIALIZED and it needs to match at the time of acquire (external user of an image must put it back to same layout after done according to VK spec)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues #49