Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider phasing out cl_gl_ext.h? #145

Closed
bashbaug opened this issue Jan 6, 2021 · 4 comments · Fixed by #156
Closed

Consider phasing out cl_gl_ext.h? #145

bashbaug opened this issue Jan 6, 2021 · 4 comments · Fixed by #156

Comments

@bashbaug
Copy link
Contributor

bashbaug commented Jan 6, 2021

I discovered this issue while working generated OpenCL headers for extensions (see #113).

We currently have a header file for OpenGL-related extensions: cl_gl.h.

We currently also have a header file that appears to be for extensions to these extensions (?): cl_gl_ext.h. This header file includes cl_gl.h and adds an enum and API for cl_khr_gl_event.

Is there a reason to keep cl_khr_gl_event separate, or should we phase out cl_gl_ext.h and add this extension to cl_gl.h instead? I think I have the generation scripts setup to generate a separate file if desired, but it'd be one fewer file to generate and it'd fix a weird inconsistency if we combined the two files.

@bashbaug bashbaug mentioned this issue Jan 6, 2021
6 tasks
@kpet
Copy link
Contributor

kpet commented Feb 9, 2021

My vote goes to phasing out cl_gl_ext.h. As an additional observation cl_gl.h also defines functions with a KHR suffix. None of these have different dependencies. I cannot see any reason to keep two separate headers.

@bashbaug
Copy link
Contributor Author

bashbaug commented Feb 9, 2021

I cannot see any reason to keep two separate headers.

Confirming: Are the "two separate headers" cl_gl.h and cl_gl_ext.h? Or cl_ext.h and cl_gl.h"?

Moving the contents from cl_gl_ext.h into cl_gl.h and phasing out cl_gl_ext.h seems pretty easy and straightforward. We could do this ASAP.

I think we could go a bit further and move the contents of both cl_gl.h and cl_gl_ext.h into cl_ext.h, since we've broken the dependencies on the GL headers, but this would be a bigger change.

@kpet
Copy link
Contributor

kpet commented Feb 9, 2021

Confirming: Are the "two separate headers" cl_gl.h and cl_gl_ext.h?

Yes.

As you say we could look into folding cl_gl.h into cl_ext.h but that would be a bigger change better done separately.

@bashbaug
Copy link
Contributor Author

bashbaug commented Feb 9, 2021

Great, agreed.

I'll create a PR to fold cl_gl_ext.h into cl_gl.h. Thanks!

devurandom added a commit to devurandom/ROCclr that referenced this issue Sep 6, 2021
OpenCL headers 2021.04.29 moved `CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR` into
a different header.  (See issue referenced below for details.)

See-also: KhronosGroup/OpenCL-Headers#145
See-also: https://bugs.gentoo.org/790164
devurandom added a commit to devurandom/gentoo-patches that referenced this issue Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants