Skip to content

Clarify the necessity of CL_COMMAND_BUFFER_STATE_KHR #1311

@joshqti

Description

@joshqti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cl_khr_command_bufferRelating to the command-buffer family of extension

    Type

    No type

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions