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

extensions: make naming and layout consistent across all extensions #494

Merged
merged 5 commits into from
Dec 11, 2021

Conversation

filnet
Copy link
Contributor

@filnet filnet commented Nov 12, 2021

breaking change:

  • some extensions were exposing instance() instead of device()

includes:

  • renaming function pointer member to fns
  • moving name(), fp(), device()/instance() functions at end of file
  • adding missing device()/instance() functions
  • using result() instead of into()

@filnet filnet force-pushed the extension_cleanup branch 5 times, most recently from cda2c50 to bb29817 Compare November 15, 2021 22:31
@MarijnS95
Copy link
Collaborator

I guess we want to get this in after #495?

@filnet
Copy link
Contributor Author

filnet commented Nov 16, 2021

I guess we want to get this in after #495?

The two PRs are independent AFAIK.

@MarijnS95
Copy link
Collaborator

This PR also converts some of the .into() calls to .result(). Those should disappear as soon as #495 is merged, hence the suggestion to merge that one in first (and reduce the size of this diff a little).

@filnet
Copy link
Contributor Author

filnet commented Nov 16, 2021

This PR also converts some of the .into() calls to .result(). Those should disappear as soon as #495 is merged, hence the suggestion to merge that one in first (and reduce the size of this diff a little).

Ok. Makes sense.

@filnet filnet force-pushed the extension_cleanup branch 2 times, most recently from cb41ef9 to 6eef4c7 Compare November 16, 2021 20:58
Copy link
Collaborator

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

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

Not seeing any red flags with this PR, looks good overall. Thanks for the hard work!

@MarijnS95 MarijnS95 requested a review from Ralith November 19, 2021 12:14
@filnet
Copy link
Contributor Author

filnet commented Nov 19, 2021

Not seeing any red flags with this PR, looks good overall. Thanks for the hard work!

You're welcome.

Just pushed some commit log rewording.

Changelog.md Outdated Show resolved Hide resolved
@filnet
Copy link
Contributor Author

filnet commented Nov 19, 2021

There are two "extensions" I left untouched:

  • ext::PhysicalDeviceDrm
  • experimental::amd

@filnet filnet force-pushed the extension_cleanup branch 3 times, most recently from 21c5ddc to e945b88 Compare November 23, 2021 00:04
breaking change:
- some extensions were exposing `instance()` instead of `device()`

includes:
- renaming function pointer member to `fns`
- moving `name()`, `fp(`), `device()`/`instance()` functions at end of file
- adding missing `device()`/`instance()` functions

see ash-rs#493
Changelog.md Outdated Show resolved Hide resolved
Changelog.md Outdated
Comment on lines 13 to 28
### Changed

- Device extension `ext::ExtendedDynamicState` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PushDescriptor` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PipelineExecutableProperties` now exposes `fn device()` instead of `fn instance()` (#499)
- Changed `khr::PipelineExecutableProperties::new()` to take `instance` and `device` as arguments (#499)
- Device extension `khr::TimelineSemaphore` now exposes `fn device()` instead of `fn instance()` (#499)
- Changed `khr::TimelineSemaphore::new()` to take `instance` and `device` as arguments (#499)

### Removed

- Removed `device` argument from `ext::DebugMarkers::debug_marker_set_object_name` function (#494)
- Removed `From<vk::Result>` trait for `VkResult` (#495)
- Removed `instance` argument from `ext::DebugUtils::submit_debug_utils_message` function (#499)
- Removed `device` argument from `khr::PipelineExecutableProperties` functions (#499)
- Removed `device` argument from `khr::TimelineSemaphore` functions (#499)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, also for taking care of #499. Just not sure if we should mention some single PRs this often in the changelog.

For example, the ### Removed section is afaik for removed API - changing the arguments to remove ie. device that's already available in the struct is already documented under ### Changed, no need to repeat that again.

Furthermore, we can probably make lists, ie turn this:

- Device extension `ext::ExtendedDynamicState` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PushDescriptor` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PipelineExecutableProperties` now exposes `fn device()` instead of `fn instance()` (#499)

into:

- Device extensions `ext::ExtendedDynamicState`, `khr::PushDescriptor` and `khr::PipelineExecutableProperties` now expose `fn device()` instead of `fn instance()` (#494, #499)

I think that's much more more concise (more readable).

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Ralith What are your thoughts on this, and this PR in general? Seems to be pretty much ready to go in besides some changelog bikeshedding, unless you have some burning comments?

Would like to get this in and do a release soon, it has been way too long.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Your proposed tweaks to the changelog SGTM, and overall this looks like great cleanup, though I haven't reviewed every single change in detail.

Copy link
Contributor Author

@filnet filnet Nov 27, 2021

Choose a reason for hiding this comment

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

The changes are pretty boring. It's mostly code gardening.
Could help if we want to generate that code in the future though.

PS: Redacting the Changelog is actually harder than it was doing the code changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@filnet Yes, curating the changelog (usually when preparing for a release) is pretty tough. We usually end up going for just the commit titles since the last release, but that's usually not fully representative nor are all the titles good enough for direct use :)

ash/src/extensions/ext/extended_dynamic_state.rs Outdated Show resolved Hide resolved
Changelog.md Outdated
Comment on lines 13 to 28
### Changed

- Device extension `ext::ExtendedDynamicState` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PushDescriptor` now exposes `fn device()` instead of `fn instance()` (#494)
- Device extension `khr::PipelineExecutableProperties` now exposes `fn device()` instead of `fn instance()` (#499)
- Changed `khr::PipelineExecutableProperties::new()` to take `instance` and `device` as arguments (#499)
- Device extension `khr::TimelineSemaphore` now exposes `fn device()` instead of `fn instance()` (#499)
- Changed `khr::TimelineSemaphore::new()` to take `instance` and `device` as arguments (#499)

### Removed

- Removed `device` argument from `ext::DebugMarkers::debug_marker_set_object_name` function (#494)
- Removed `From<vk::Result>` trait for `VkResult` (#495)
- Removed `instance` argument from `ext::DebugUtils::submit_debug_utils_message` function (#499)
- Removed `device` argument from `khr::PipelineExecutableProperties` functions (#499)
- Removed `device` argument from `khr::TimelineSemaphore` functions (#499)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your proposed tweaks to the changelog SGTM, and overall this looks like great cleanup, though I haven't reviewed every single change in detail.

Changelog.md Outdated Show resolved Hide resolved
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.

Approving wrt. the issues I've previously specifically highlighted.

Copy link
Collaborator

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

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

Changelog seems fine besides this - will re-re-re-review the rest of the code later on :)

Changelog.md Outdated Show resolved Hide resolved
@filnet filnet force-pushed the extension_cleanup branch from 5de9ed4 to 78197b7 Compare December 7, 2021 12:10
Copy link
Collaborator

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

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

This all looks good now. Thanks for your perseverance in dealing with all the review comments and repeated large changes!

@MarijnS95 MarijnS95 merged commit 289a57e into ash-rs:master Dec 11, 2021
@MarijnS95 MarijnS95 changed the title extensions: make naming and layout consistent accross all extensions extensions: make naming and layout consistent across all extensions Dec 11, 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 this pull request may close these issues.

4 participants