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

Enforce grammar naming conventions for aliases #432

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

alan-baker
Copy link
Contributor

Fixes #429

  • Enforce Core -> KHR -> EXT -> Vendor conventions for aliased names
  • Update grammar to satisfy these conventions and regenerate headers

Fixes KhronosGroup#429

* Enforce Core -> KHR -> EXT -> Vendor conventions for aliased names
* Update grammar to satisfy these conventions and regenerate headers
@alan-baker alan-baker requested review from kpet and dneto0 May 29, 2024 20:18
Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This will cause disassembly to change. So it may require SPIRV-Tools updates.

Copy link
Contributor

@kpet kpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@@ -5938,7 +5938,7 @@
"version" : "None"
},
{
"opname" : "OpReportIntersectionKHR",
"opname" : "OpReportIntersectionNV",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this change but this makes me wonder whether we shouldn't introduce a way of encoding aliases that does not require duplicating whole definitions. The first idea that comes to mind is something like:

{
  "opname": "OpReportIntersectionKHR",
  "aliases": ["OpReportIntersectionNV"]
}

Is there a reason we wouldn't want to do something like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the topic of #138

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion is that we should do something along those lines, but it will take longer to nail down how we want it to work (e.g. in conjunction with the spec). So for now this is desirable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a much bigger change. I'm not suggesting we try to do this here and now, just checking that I hadn't missed a reason we couldn't (or didn't want to) go there.

tools/buildHeaders/jsonToSpirv.cpp Outdated Show resolved Hide resolved
@bashbaug
Copy link
Contributor

bashbaug commented Jun 5, 2024

Merging as discussed in the June 5th teleconference.

@bashbaug bashbaug merged commit fbf2402 into KhronosGroup:main Jun 5, 2024
10 checks passed
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 this pull request may close these issues.

Enforce naming conventions for aliased tokens
4 participants