The query for command buffer state via CL_COMMAND_BUFFER_STATE_KHR seems unnecessary. The application can deduce if a command buffer is PENDING or EXECUTABLE by checking the state of the cl_event returned by clEnqueueCommandBufferKHR. Querying the state of a command buffer will incur a performance penalty in the implementation, especially in the case of simultaneous use.
Can we remove this query? I can see the utility of a query for if a command buffer has been finalized. Perhaps we could replace CL_COMMAND_BUFFER_STATE_KHR with CL_COMMAND_BUFFER_HAS_BEEN_FINALIZED, which will report if a command buffer has been finalized or not.
The query for command buffer state via CL_COMMAND_BUFFER_STATE_KHR seems unnecessary. The application can deduce if a command buffer is PENDING or EXECUTABLE by checking the state of the cl_event returned by clEnqueueCommandBufferKHR. Querying the state of a command buffer will incur a performance penalty in the implementation, especially in the case of simultaneous use.
Can we remove this query? I can see the utility of a query for if a command buffer has been finalized. Perhaps we could replace CL_COMMAND_BUFFER_STATE_KHR with CL_COMMAND_BUFFER_HAS_BEEN_FINALIZED, which will report if a command buffer has been finalized or not.