NVIDIA-RTX / NVIDIA-RTX/Streamline
support for vkAcquireNextImage2KHR
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
We use vkAcquireNextImage2KHR, but it is not wrapped in streamline, so I patched the streamline source like below, but I am not sure whether it will work right based on the comment below. Please advise.
// not sure this works correctly if the plugin hook is not using the deviceMask in pAcquireInfo. Streamline needs to support this.
VkResult VKAPI_CALL vkAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex)
{
bool skip = false;
VkResult result = VK_SUCCESS;
{
const auto& hooks = sl::plugin_manager::getInterface()->getBeforeHooks(sl::FunctionHookID::eVulkan_AcquireNextImageKHR);
for (auto [hook, feature] : hooks)
{
result = ((sl::PFunVkAcquireNextImageKHRBefore*)hook)(device, pAcquireInfo->swapchain, pAcquireInfo->timeout, pAcquireInfo->semaphore, pAcquireInfo->fence, pImageIndex, skip);
// report error on first fail
if (result != VK_SUCCESS)
{
return result;
}
}
}
if (!skip)
{
result = s_ddt.AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex);
}
return result;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the vkAcquireNextImage2KHR entry point and compare its proposed hook path with the existing eVulkan_AcquireNextImageKHR interface. Check how pAcquireInfo->deviceMask should be handled before calling s_ddt.AcquireNextImage2KHR. Done means the wrapper and hook behavior correctly support the device mask, with the result and image index preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100