OpenCL-Docs icon indicating copy to clipboard operation
OpenCL-Docs copied to clipboard

Semantics of structure pointer chains in cl_khr_command_buffer_mutable_dispatch

Open oddhack opened this issue 2 years ago • 1 comments

Noticed this in passing and wanted to make sure people were aware of some of the pitfalls we have encountered in Vulkan as a result of initially underspecifying how these behave, then later trying to resolve different implementation choices. A non-exhaustive list of things to consider:

  • Behavior when multiple instances of the same extending struct (possibly with different values) are included
  • Behavior when passing chained structures through layers which may not be aware of some of them, and which may need to modify others for their own purposes
  • Behavior when passing chained structures valid for extensions that are not enabled / supported in the context they are passed through

Not saying Vulkan has all the answers, but if this approach takes off in OpenCL too, it seems likely you will encounter some or all of the same issues downstream.

oddhack avatar Oct 29 '23 06:10 oddhack

Thanks for flagging this up Jon, I wasn't aware of these pitfalls Vulkan has encountered. Will take a look into them and see how we can update the cl_khr_command_buffer_mutable_dispatch wording

EwanC avatar Oct 30 '23 07:10 EwanC