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

generator: Do not generate code for "disabled" extensions #448

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

MarijnS95
Copy link
Collaborator

@MarijnS95 MarijnS95 commented Jun 7, 2021

It is unlikely that disabled, reserved extensions (without naming whatsoever) are used through Ash bindings generated from Vulkan-Headers releases, and are best ignored to reduce diff noise and spurious issues 1 with unfinished extension definitions.

This approach matches what is defined in the registry spec for supported="disabled" 2:

use `supported="disabled"` to indicate this extension should never be processed.

Let me know if someone is using our bindings to access in-development extensions through these means though! (But in that case I expect a local substitution in vk.xml + regeneration...)

@MarijnS95 MarijnS95 force-pushed the disabled-extensions branch from e028ca2 to 90e3dac Compare June 7, 2021 08:03
@MarijnS95
Copy link
Collaborator Author

Whoops, should have ran cargo check, this fails to compile for the same reason as #417 (comment) :/

We should either:

  1. Exempt some well-defined but disabled extensions from this check (only VK_ANDROID_native_buffer for now);
  2. Fold extension-types with their extension (scheduled for the new generator as it's quite an overhaul, see linked comment above);
  3. Not do this at all, accept the numbered extensions and skip 1.2.180 until vk.xml is fixed (or - unlikely - skip the broken extension if someone absolutely needs 1.2.180).

@MarijnS95 MarijnS95 force-pushed the disabled-extensions branch 2 times, most recently from 74a9cf5 to e660827 Compare June 7, 2021 10:36
@MarijnS95 MarijnS95 force-pushed the disabled-extensions branch 2 times, most recently from 261d91b to c867654 Compare June 17, 2021 08:53
@MarijnS95 MarijnS95 requested a review from Ralith December 10, 2022 19:37
Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Looks like some unrelated updates got mixed in?

It is unlikely that disabled, reserved extensions (without naming
whatsoever) are used through Ash bindings generated from Vulkan-Headers
releases, and are best ignored to reduce diff noise and spurious issues
[1] with unfinished extension definitions.

This approach matches what is defined in the registry spec for
`supported="disabled"` [2]:

    use `supported="disabled"` to indicate this extension should never
    be processed.

[1]: KhronosGroup/Vulkan-Docs#1549
[2]: https://github.com/KhronosGroup/Vulkan-Docs/blob/b4e8cd820b2487bc892b391fb26b49501473a6a6/registry.txt#L1302-L1306
@MarijnS95
Copy link
Collaborator Author

MarijnS95 commented Dec 11, 2022

Looks like I either forgot to re-sync the submodule to 1.3.235, or base this on top of #688. It's self-supporting now on 1.3.235.

EDIT: And in the force-push I forgot to update the readme yet again.

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Nice!

@Ralith Ralith merged commit 86b0f45 into master Dec 12, 2022
@Ralith Ralith deleted the disabled-extensions branch December 12, 2022 00:36
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.

2 participants