As discovered in KhronosGroup/OpenCL-CTS#1931 (comment) clEnqueueCommandBuffer currently defines these two error cases:
CL_INCOMPATIBLE_COMMAND_QUEUE_KHR if any element of queues is not compatible with the command-queue set on command_buffer creation at the same list index.
CL_INVALID_CONTEXT if any element of queues does not have the same context as the command-queue set on command_buffer creation at the same list index.
However the definition of "compatible" is the following, which includes mismatch queue context.
A compatible command-queue is defined as a command-queue with identical properties targeting the same device and in the same OpenCL context.
Therefore it is ambiguous if CL_INVALID_CONTEXT or CL_INCOMPATIBLE_COMMAND_QUEUE_KHR should be returned by an implementation if the context of the queue used on command-buffer creation and enqueue don't match.
As discovered in KhronosGroup/OpenCL-CTS#1931 (comment)
clEnqueueCommandBuffercurrently defines these two error cases:However the definition of "compatible" is the following, which includes mismatch queue context.
Therefore it is ambiguous if
CL_INVALID_CONTEXTorCL_INCOMPATIBLE_COMMAND_QUEUE_KHRshould be returned by an implementation if the context of the queue used on command-buffer creation and enqueue don't match.