From a2dfd46d85be55b82c87853a2f2c0d3d9ac89672 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Tue, 17 Dec 2024 20:00:29 +0200 Subject: [PATCH] Don't link directly to clFinalizeCommandBufferKHR It's an extension function so use the runtime function pointer like for the other command buffer functions. --- include/CL/opencl.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/CL/opencl.hpp b/include/CL/opencl.hpp index 53f479de..b343a964 100644 --- a/include/CL/opencl.hpp +++ b/include/CL/opencl.hpp @@ -11539,7 +11539,10 @@ class CommandBufferKhr : public detail::Wrapper cl_int finalizeCommandBuffer() const { - return detail::errHandler(::clFinalizeCommandBufferKHR(object_), __FINALIZE_COMMAND_BUFFER_KHR_ERR); + if (pfn_clFinalizeCommandBufferKHR == nullptr) { + return detail::errHandler(CL_INVALID_OPERATION, __FINALIZE_COMMAND_BUFFER_KHR_ERR); + } + return detail::errHandler(pfn_clFinalizeCommandBufferKHR(object_), __FINALIZE_COMMAND_BUFFER_KHR_ERR); } cl_int enqueueCommandBuffer(vector &queues,