|
2 | 2 |
|
3 | 3 | ## Layer Purpose |
4 | 4 |
|
5 | | -This is a layer that demonstrates how to emulate functionality - in this case, [cl_khr_command_buffer](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer) - using a layer. |
6 | | -It works by intercepting calls to `clGetExtensionFunctionAddressForPlatform` to query function pointers for the `cl_khr_command_buffer` extension APIs. |
7 | | -If a query succeeds by default then the layer does nothing and simply returned the queried function pointer as-is. |
| 5 | +This is a layer that demonstrates how to emulate functionality - in this case, the [cl_khr_command_buffer](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer) extension and the related [cl_khr_command_buffer_mutable_dispatch](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer_mutable_dispatch) extensions - using a layer. |
| 6 | +It works by intercepting calls to `clGetExtensionFunctionAddressForPlatform` to query function pointers for the `cl_khr_command_buffer` and `cl_khr_command_buffer_mutable_dispatch` extension APIs. |
| 7 | +If a query succeeds by default then the layer does nothing and simply returns the queried function pointer as-is. |
8 | 8 | If the query is unsuccessful however, then the layer returns its own function pointer, which will record the contents of the command buffer for later playback. |
9 | 9 |
|
10 | | -This command buffer emulation layer currently implements v0.9.0 of the `cl_khr_command_buffer` extension. |
| 10 | +This command buffer emulation layer currently implements v0.9.0 of the `cl_khr_command_buffer` extension and v0.9.0 of the `cl_khr_command_buffer_mutable_dispatch` extension. |
11 | 11 | The functionality in this emulation layer is sufficient to run the command buffer samples in this repository. |
12 | 12 |
|
13 | | -Please note that the emulated command buffers are intended to be functional, but unlike a native implementation of `cl_khr_command_buffer`, they may not provide any performance benefit over similar code without using command buffers. |
| 13 | +Please note that the emulated command buffers are intended to be functional, but unlike a native implementation, they may not provide any performance benefit over similar code without using command buffers. |
14 | 14 |
|
15 | 15 | ## Layer Requirement |
16 | 16 |
|
17 | 17 | Because this layer calls `clCloneKernel` when recording a command buffer it requires an OpenCL 2.1 or newer device. |
18 | | -If an older device is detected then the layer will not advertise support for the `cl_khr_command_buffer` extension. |
| 18 | +If an older device is detected then the layer will not advertise support for the `cl_khr_command_buffer` or `cl_khr_command_buffer_mutable_dispatch` extensions. |
19 | 19 |
|
20 | 20 | ## Key APIs and Concepts |
21 | 21 |
|
|
0 commit comments