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

Add "aliases" fields to the grammar and remove duplicated #447

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

Naghasan
Copy link
Member

Promotion of extensions lead to duplicated entries. The patch introduce a new entry "aliases" to the grammar. It is a list of strings, where each string is an alternative name for the token, and applies on instructions and operand kind's enumerants. The grammar is updated to use the fields and all duplicated were removed.

The header generator now processes the aliases when generating the headers to account for the change. This ensure the generated headers doesn't change.

Note: this change is breaking for tools processing the grammar directly, tools relying on the generated header aren't affected.

The PR supersedes #138 and #139

Promotion of extensions lead to duplicated entries.
The patch introduce a new entry "aliases" to the grammar.
It is a list of strings, where each string is an alternative name for the token,
and applies on instructions and operand kind's enumerants.
The grammar is updated to use the fields and all duplicated were removed.

The header generator now processes the aliases when generating the headers to account for the change.
This ensure the generated headers doesn't change.
@alan-baker
Copy link
Contributor

KhronosGroup/SPIRV-Tools#5799 handles the tooling side of this change.

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.
Thank you, this is so much better. :-)

@alan-baker
Copy link
Contributor

2024-09-25 SPIR WG telecon: Set a feedback date of October 9 prior to accepting this change.

@bashbaug
Copy link
Contributor

bashbaug commented Oct 9, 2024

Merging as discussed in the October 9th teleconference.

@bashbaug bashbaug merged commit d92cf88 into KhronosGroup:main Oct 9, 2024
10 checks passed
dneto0 added a commit to dneto0/shaderc that referenced this pull request Oct 9, 2024
These now use the 'alias' mechanism in the SPIR-V json grammar.
See KhronosGroup/SPIRV-Headers#447
and KhronosGroup/SPIRV-Tools#5799
dneto0 added a commit to google/shaderc that referenced this pull request Oct 9, 2024
These now use the 'alias' mechanism in the SPIR-V json grammar.
See KhronosGroup/SPIRV-Headers#447
and KhronosGroup/SPIRV-Tools#5799
cmarcelo added a commit to cmarcelo/llvm-project that referenced this pull request Oct 10, 2024
SPIR-V grammar was updated in upstream to have an "aliases" field
instead of duplicating symbols with same values.  See
KhronosGroup/SPIRV-Headers#447 for details.
@spencer-lunarg
Copy link
Contributor

Just hit this change now rebasing, this is awesome! ... time to throw away all the old code that use to do this manually

oddhack added a commit to KhronosGroup/Vulkan-Docs that referenced this pull request Oct 18, 2024
Internal Issues

  * Update XML feature description schema to support feature names in the
    `depends` attributes of `require` tags, as well as enabling AND/OR lists
    of feature dependencies, and use the new syntax to generate more of the
    content in the <<features-requirements, Feature Requirements>> section
    (internal issues 3947, 3949, and 3950).
  * Minimize use of extraneous "`set to`" and add corresponding style guide
    section and CI test (internal issue 3966).
  * Add a <<features-multisampledRenderToSingleSampled,
    pname:multisampledRenderToSingleSampled>> exception to common draw VU
    07474 (internal issue 4024).
  * Update VkVideoEncodeRateControlInfoKHR VU 08358 to allow
    initialVirtualBufferSizeInMs to equal virtualBufferSizeInMs (internal
    issue 4028).
  * Add conditional render state VU for vkCmdExecuteGeneratedCommandsEXT
    (internal issue 4037).
  * Combine common draw validity VUs 03417, 03418, 03419, and 08635 covering
    shader object and graphics pipeline viewport count (internal MR 6870).
  * Fix missing exception for
    VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR in video profile
    compatibility in <<video-profile-compatibility, Video Profile
    Compatibility>> (internal MR 6909).
  * Fix buffer offset calculation to not offset based on image offsets in
    the <<copies-buffers-images, Copying Data Between Buffers and Images>>
    section (internal MR 6919).
  * Fix and add VkImageCreateInfo and VkImageViewCreateInfo VUs to restrict
    sparse and 2D views, moving them to image create time (internal MR
    6920).
  * Fix minor asciidoc conditional markup errors causing errors when
    building with specific extensions, which required refactoring some
    vendor extension interactions with KHR extensions into the vendor
    extension (internal MR 6923).
  * Remove redundant VkWriteIndirectExecutionSetPipelineEXT VU 11028
    (internal MR 6926).
  * Improve cross-references to the deviceGeneratedCommands feature from
    different VUs to distinguish between the NV and EXT
    device_generated_commands extensions where relevant (internal MR 6933).
  * Update cross-references and XML descriptions of spirvcapability alias
    names to match alias naming introduced in SPIRV-Headers by
    KhronosGroup/SPIRV-Headers#447 (internal MR
    6936).
  * Fix UniformTexelBufferArrayDynamicIndexing VUs 10132 and 10133, and
    StorageTexelBufferArrayNonUniformIndexing VU 10140 to properly limit the
    VUs to when the corresponding capability is *not* declared (internal MR
    6938).
  * Mark VK_EXT_feedback_loop_layout and VK_EXT_feedback_loop_dynamic_state
    as `specialuse="glemulation,d3demulation"` (internal MR 6941).
kuhar pushed a commit to llvm/llvm-project that referenced this pull request Oct 30, 2024
#111778)

SPIR-V grammar was updated in upstream to have an "aliases" field
instead of duplicating symbols with same values. See
KhronosGroup/SPIRV-Headers#447 for details.
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
llvm#111778)

SPIR-V grammar was updated in upstream to have an "aliases" field
instead of duplicating symbols with same values. See
KhronosGroup/SPIRV-Headers#447 for details.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
llvm#111778)

SPIR-V grammar was updated in upstream to have an "aliases" field
instead of duplicating symbols with same values. See
KhronosGroup/SPIRV-Headers#447 for details.
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.

5 participants