Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve debug messenger, remove second Instance constructor #2275

Merged
merged 10 commits into from
Aug 5, 2023

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jul 29, 2023

Changelog:

### Breaking changes
Changes to instances:
- `DebugUtilsMessengerCreateInfo::user_callback` is now a custom type `DebugUtilsMessengerCallback`, and is unsafe to create.
- The debug messenger callback now takes three parameters instead of one, corresponding to the first three parameters of the Vulkan callback (the fourth, user data, is represented by the closure itself).
- `InstanceCreateInfo` now has a `debug_utils_messengers` field. The `Instance::with_debug_utils_messengers` constructor is removed, as the unsafety has been moved to the user callback construction itself.

### Additions
- Added a `set_debug_utils_object_name` method to the `DeviceOwned` trait.

Fixes #2272, fixes #2242.

vulkano/src/device/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

Looks good, just some nits.

vulkano/src/device/mod.rs Outdated Show resolved Hide resolved
vulkano/src/instance/debug.rs Outdated Show resolved Hide resolved
vulkano/src/instance/debug.rs Outdated Show resolved Hide resolved
vulkano/src/instance/debug.rs Show resolved Hide resolved
Rua and others added 4 commits August 5, 2023 20:29
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
@marc0246
Copy link
Contributor

marc0246 commented Aug 5, 2023

Thanks!

@marc0246 marc0246 merged commit 5c67f85 into vulkano-rs:master Aug 5, 2023
marc0246 added a commit that referenced this pull request Aug 5, 2023
@Rua Rua deleted the debug-messenger branch October 25, 2023 14:24
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
…o-rs#2275)

* Improve debug messenger, remove second `Instance` constructor

* vulkano-rs#2242

* Doctest fix

* Take Arc out

* DeviceOwnedVulkanObject

* Update vulkano/src/device/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/instance/debug.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Fixes

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants