Skip to content

Commit 12a9a65

Browse files
authored
Don't link directly to clFinalizeCommandBufferKHR (KhronosGroup#320)
It's an extension function so use the runtime function pointer like for the other command buffer functions.
1 parent fd348fd commit 12a9a65

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

include/CL/opencl.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11539,7 +11539,10 @@ class CommandBufferKhr : public detail::Wrapper<cl_command_buffer_khr>
1153911539

1154011540
cl_int finalizeCommandBuffer() const
1154111541
{
11542-
return detail::errHandler(::clFinalizeCommandBufferKHR(object_), __FINALIZE_COMMAND_BUFFER_KHR_ERR);
11542+
if (pfn_clFinalizeCommandBufferKHR == nullptr) {
11543+
return detail::errHandler(CL_INVALID_OPERATION, __FINALIZE_COMMAND_BUFFER_KHR_ERR);
11544+
}
11545+
return detail::errHandler(pfn_clFinalizeCommandBufferKHR(object_), __FINALIZE_COMMAND_BUFFER_KHR_ERR);
1154311546
}
1154411547

1154511548
cl_int enqueueCommandBuffer(vector<CommandQueue> &queues,

0 commit comments

Comments
 (0)