KhronosGroup / KhronosGroup/OpenCL-Headers
inconsistent handling of interop API headers
- Dominant language
- C
- Stars
- 766
- Forks
- 273
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 3
Description
I discovered this issue while working generated OpenCL headers for extensions (see #113).
We currently handle interop API headers (e.g. DX headers for DX interop) inconsistently:
* For CL-GL sharing, we do not include any OpenGL headers and instead define opaque handles for GL objects.
* For EGL sharing, we also do not include any EGL headers and instead define opaque handles for EGL objects.
* For DX10 and DX11 sharing, we unconditionally include `d3d10.h` or `d3d11.h` for all platforms and operating systems.
* For DX9 media sharing, we include `d3d9.h` only for Windows platforms.
* The Intel VAAPI sharing extension unconditionally includes `va.h`.
The interop API header for DX9 media sharing is most inconsistent. Should we continue to guard the include for `d3d9.h`, or should we include it unconditionally, similar to DX10, DX11, and VAAPI sharing?
In practice, I think another way to phrase this question is: Should an application be responsible for including the header for DX9 sharing only platforms where the DX9 headers are available, or should the interop API headers attempt to be include-able for all platforms?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the interop header handling described for CL-GL, EGL, DX9, DX10, DX11, and VAAPI, especially the conditional d3d9.h include. Review the generated OpenCL headers work referenced in #113 and determine which platform-inclusion policy should apply. Done requires a maintainer decision on whether DX9 headers should be guarded or universally included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100