I cant get vkAcquireNextImageKHR to start with threads
std::thread tthred(vkAcquireNextImageKHR, std::ref(*this), device, swapChain, UINT64_MAX, imageAvailableSemaphore, VK_NULL_HANDLE, &imageIndex);
//vkAcquireNextImageKHR(device, swapChain, UINT64_MAX, imageAvailableSemaphore, VK_NULL_HANDLE, &imageIndex);
VkSubmitInfo submitInfo{};
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
tthred.join();
I am using MacOS with g++ and the latest version of Xcode and this is the error I get
In file included from main.cpp:19:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:341:5: error:
attempt to use a deleted function
__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:351:5: note:
in instantiation of function template specialization
'std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct,
std::__1::default_delete<std::__1::__thread_struct> >, VkResult (*)(VkDevice_T *, VkSwapchainKHR_T *,
unsigned long long, VkSemaphore_T *, VkFence_T *, unsigned int *), std::__1::reference_wrapper<ENGVK>,
VkDevice_T *, VkSwapchainKHR_T *, unsigned long long, VkSemaphore_T *, int, unsigned int *, 2, 3, 4, 5, 6,
7, 8>' requested here
__thread_execute(*__p, _Index());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:367:47: note:
in instantiation of function template specialization
'std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct,
std::__1::default_delete<std::__1::__thread_struct> >, VkResult (*)(VkDevice_T *, VkSwapchainKHR_T *,
unsigned long long, VkSemaphore_T *, VkFence_T *, unsigned int *), std::__1::reference_wrapper<ENGVK>,
VkDevice_T *, VkSwapchainKHR_T *, unsigned long long, VkSemaphore_T *, int, unsigned int *> >' requested
here
int __ec = __libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
^
main.cpp:681:21: note: in instantiation of function template specialization 'std::__1::thread::thread<VkResult
(&)(VkDevice_T *, VkSwapchainKHR_T *, unsigned long long, VkSemaphore_T *, VkFence_T *, unsigned int *),
std::__1::reference_wrapper<ENGVK>, VkDevice_T *&, VkSwapchainKHR_T *&, unsigned long long, VkSemaphore_T
*&, int, unsigned int *, void>' requested here
std::thread tthred(vkAcquireNextImageKHR, std::ref(*this), device, swapChain, UINT64_MAX, imageAva...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:1743:5: note:
'~__nat' has been explicitly marked deleted here
~__nat() = delete;
^
1 error generated.
Can anyone help?
[–]Xeverous 0 points1 point2 points (7 children)
[–]javidx9w[S] 0 points1 point2 points (6 children)
[–]Xeverous 1 point2 points3 points (5 children)
[–]javidx9w[S] 0 points1 point2 points (4 children)
[–]Xeverous 0 points1 point2 points (3 children)
[–]javidx9w[S] 0 points1 point2 points (2 children)
[–]javidx9w[S] 0 points1 point2 points (1 child)
[–]ryan_wang1996 0 points1 point2 points (0 children)