From 61380610394f5da479525e897acf4dc2bb62e3d0 Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Fri, 31 Mar 2023 12:51:51 +0100 Subject: [PATCH] Add command-buffer context query Introduce query `CL_COMMAND_BUFFER_CONTEXT_KHR` for the `cl_context` associated with a command-buffer. This PR uses enum value `0x1299` which is also attempting be used by another command-buffer PR https://github.com/KhronosGroup/OpenCL-Docs/pull/850 However, that PR still needs review so would prefer to use that enum here as `0x1299` is contiguous with the other command-buffer query enums, and I can find a new value for PR #850 Closes https://github.com/KhronosGroup/OpenCL-Docs/issues/898 --- ext/cl_khr_command_buffer.asciidoc | 6 ++++++ xml/cl.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/cl_khr_command_buffer.asciidoc b/ext/cl_khr_command_buffer.asciidoc index 0359aa5f7..1d57e11eb 100644 --- a/ext/cl_khr_command_buffer.asciidoc +++ b/ext/cl_khr_command_buffer.asciidoc @@ -20,6 +20,7 @@ This extension adds the ability to record and replay buffers of OpenCL commands. | *Date* | *Version* | *Description* | 2021-11-10 | 0.9.0 | First assigned version (provisional). | 2022-08-24 | 0.9.1 | Specify an error if a command-buffer is finalized multiple times (provisional). +| 2023-03-31 | 0.9.2 | Introduce context query {CL_COMMAND_BUFFER_CONTEXT_KHR} (provisional). |==== ==== Dependencies @@ -422,6 +423,7 @@ CL_COMMAND_BUFFER_NUM_QUEUES_KHR 0x1295 CL_COMMAND_BUFFER_REFERENCE_COUNT_KHR 0x1296 CL_COMMAND_BUFFER_STATE_KHR 0x1297 CL_COMMAND_BUFFER_PROPERTIES_ARRAY_KHR 0x1298 +CL_COMMAND_BUFFER_CONTEXT_KHR 0x1299 // cl_event command-buffer enqueue command type CL_COMMAND_COMMAND_BUFFER_KHR 0x12A8 @@ -1590,6 +1592,10 @@ _param_value_ by {clGetCommandBufferInfoKHR} is described in the table below. or the implementation may return a property value of 0 (where 0 is used to terminate the properties list). +| {CL_COMMAND_BUFFER_CONTEXT_KHR} +| {cl_context_TYPE} +| Return the context associated with _command_buffer_. + |==== {clGetCommandBufferInfoKHR} returns {CL_SUCCESS} if the function is executed diff --git a/xml/cl.xml b/xml/cl.xml index 94cf2919f..dde5cdc5c 100644 --- a/xml/cl.xml +++ b/xml/cl.xml @@ -1728,7 +1728,7 @@ server's OpenCL/api-docs repository. - +