mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-12-05 03:27:36 +00:00
refactor(linux/cuda): take the CUDA function table callback as std::function
This commit is contained in:
1 parent
5bb027798c
commit
a04da1da55
2 files changed
+3
-3
No files matched your search
@@ -660,7 +660,7 @@ namespace cuda {
|
||||
*/
|
||||
vulkan_shared_memory_t(const vulkan_calls_t &vulkan_calls, cuda_functions_fn cuda_functions):
|
||||
vk {vulkan_calls},
|
||||
cu_functions {cuda_functions} {
|
||||
cu_functions {std::move(cuda_functions)} {
|
||||
}
|
||||
|
||||
bool supported() override {
|
||||
@@ -995,7 +995,7 @@ namespace cuda {
|
||||
* @return The driver.
|
||||
*/
|
||||
std::unique_ptr<shared_memory_driver_t> make_vulkan_shared_memory(const vulkan_calls_t &calls, cuda_functions_fn cuda_functions) {
|
||||
return std::make_unique<vulkan_shared_memory_t>(calls, cuda_functions);
|
||||
return std::make_unique<vulkan_shared_memory_t>(calls, std::move(cuda_functions));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ namespace cuda {
|
||||
/**
|
||||
* @brief Function returning the CUDA function table.
|
||||
*/
|
||||
using cuda_functions_fn = const ::CudaFunctions *(*)();
|
||||
using cuda_functions_fn = std::function<const ::CudaFunctions *()>;
|
||||
|
||||
/**
|
||||
* @brief Create a driver that shares plane memory through Vulkan.
|
||||
|
||||
Reference in new issue
Block a user