-
Notifications
You must be signed in to change notification settings - Fork 862
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
glslang: Only export public interface for SOs #2282
Conversation
Default to `-fvisibility=hidden`, and annotate the public glslang interface with `GLSLANG_EXPORT` to change the visibility of these cherry-picked symbols to default. This is also used by Windows builds for `__declspec(dllexport)`-ing the public DLL interface. This allows us to classify API changes into those that are publicly backwards compatible, and those that are not. Note that libSPIRV will likely need similar treatment.
1fff9c8
to
5a4ee31
Compare
@@ -415,6 +409,15 @@ enum TResourceType { | |||
EResCount | |||
}; | |||
|
|||
enum TLayoutPacking { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This move seems a bit odd, because these seem like an internal interface, not a public interface.
I'll try to say more in the main conversation.
This generally looks quite good. I'm a bit worried about "which" interface is being dealt with. I think maybe there are two levels of interface to maintain:
And possibly two more that got added that we might want to consider distinct from interface 2:
The original scheme was that only interface 1 existed, it was to be captured in I'd consider interfaces 1 and 2 as the primary Khronos-provided tools to do GLSL validation and GLSL -> SPIR-V translation of valid GLSL. The other interfaces are more kind of side projects and more maintained by the community. So, one thing that's a red flag in this PR is moving something I think is in interface 2 ( It could be that only interface 1 is what needs to be subjected to the SO rigor, and that people using the other interfaces do things more from a static library perspective. |
I agree. Due to versioning practicality, I feel that interface 1. is the only one we're going to sensibly provide as a versioned, shared library right now. Interface 2 has no separation of stable-public from anything else (AFAICT), which would mean touching pretty much any internal function or struct would technically require a major version bump. This seems impractical, but there's nothing stopping us trying to define a public and stable internal interface (2) over time.
Agreed. I wasn't really sure what to do with this. |
What makes |
A good question, and clearly this is broken. We get away with these not being made public as I'm going to have to thing hard about these. |
Closing this PR. I have another approach in the works to resolve the |
Default to
-fvisibility=hidden
, and annotate the public glslang interface withGLSLANG_EXPORT
to change the visibility of these cherry-picked symbols to default.This is also used by Windows builds for
__declspec(dllexport)
-ing the public DLL interface.This allows us to classify API changes into those that are publicly backwards compatible, and those that are not.
Note that libSPIRV will likely need similar treatment.