Skip to content

Vk cuda interop#1061

Open
kevyuu wants to merge 180 commits into
masterfrom
vk_cuda_interop
Open

Vk cuda interop#1061
kevyuu wants to merge 180 commits into
masterfrom
vk_cuda_interop

Conversation

@kevyuu
Copy link
Copy Markdown
Contributor

@kevyuu kevyuu commented Apr 23, 2026

Description

Bridging CUDA and Vulkan

Testing

Test Pull Request

kevyuu added 30 commits March 23, 2026 17:37
Comment thread src/nbl/video/CVulkanLogicalDevice.cpp Outdated
Comment on lines +58 to +77
core::smart_refctd_ptr<ISemaphore> CVulkanLogicalDevice::createSemaphore(const uint64_t initialValue)
{

VkSemaphoreTypeCreateInfoKHR type = { VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR };
type.pNext = nullptr; // Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExportSemaphoreCreateInfo, VkExportSemaphoreWin32HandleInfoKHR, or VkSemaphoreTypeCreateInfo
type.semaphoreType = VK_SEMAPHORE_TYPE_TIMELINE_KHR;
type.initialValue = initialValue;

VkSemaphoreCreateInfo createInfo = { VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,&type };
createInfo.flags = static_cast<VkSemaphoreCreateFlags>(0); // flags must be 0

core::smart_refctd_ptr<ISemaphore> CVulkanLogicalDevice::createSemaphore(const uint64_t initialValue, ISemaphore::SCreationParams&& creationParams)
VkSemaphore semaphore;
if (!m_devf.vk.vkCreateSemaphore(m_vkdev, &createInfo, nullptr, &semaphore) == VK_SUCCESS)
return nullptr;

ISemaphore::SCreationParams creationParams;
creationParams.initialValue = initialValue;
return core::make_smart_refctd_ptr<CVulkanSemaphore>(core::smart_refctd_ptr<CVulkanLogicalDevice>(this), std::move(creationParams), semaphore, system::ExternalHandleNull);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unclean duplicate code, it should be a 1-liner to the other function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread src/nbl/video/CCUDAImportedMemory.cpp Outdated
, m_src(std::move(src))
, m_native(std::move(nativeState))
{
assert(m_native);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can actually assert false in every function because the object is never meant to be made, ever

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

kevyuu added 28 commits May 14, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants