From 282ee019d40519c27447b72e3fc10b80d5d32d35 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Mon, 28 Feb 2022 17:12:10 +0100 Subject: [PATCH 1/7] Documentation for ash::Device --- ash/src/device.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index 1009cc494..d66112d00 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -6,7 +6,16 @@ use std::mem; use std::os::raw::c_void; use std::ptr; -/// +/// This is a dispatchable object, whose main purpose is to provide access to Vulkan's functions. +/// +/// It is not identical to Vulkan's device object (see [vk::Device][vk::Device]). +/// The latter, however, can be accessed via the `[handle()][Self::handle()]` method. +/// In this sense, `ash::Device` is a Vulkan device handle together with all its associated function pointers. +/// +/// All functions from the Vulkan API (except those from extensions) which have a VkDevice as their first argument, have become methods of `ash::Device`. +/// Their VkDevice argument is always passed implicitly. +/// +/// Also, all `vkCmd*` functions are accessed as methods of `ash::Device`. #[derive(Clone)] pub struct Device { pub(crate) handle: vk::Device, From d7d865ce5c5863acd2bd309bce44c520c0dcf6b6 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Mon, 28 Feb 2022 17:13:38 +0100 Subject: [PATCH 2/7] Document ash::Instance --- ash/src/instance.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 732b73ffe..7456ce177 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -6,7 +6,11 @@ use std::mem; use std::os::raw::c_char; use std::ptr; -/// +/// `ash::Instance` contains a [vk::Instance][vk::Instance] (accessible via `[handle()][Self::handle()]`) and all associated function pointers. +/// +/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their frist argument have become methods of `ash::Instance`. +/// Their VkInstance argument is always passed implicitly. + #[derive(Clone)] pub struct Instance { pub(crate) handle: vk::Instance, From ddbae54bd83d8d5b033a5af5b2b1ff8123b54641 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Mon, 28 Feb 2022 17:37:02 +0100 Subject: [PATCH 3/7] typo --- ash/src/instance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 7456ce177..81142ef78 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -8,7 +8,7 @@ use std::ptr; /// `ash::Instance` contains a [vk::Instance][vk::Instance] (accessible via `[handle()][Self::handle()]`) and all associated function pointers. /// -/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their frist argument have become methods of `ash::Instance`. +/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their first argument have become methods of `ash::Instance`. /// Their VkInstance argument is always passed implicitly. #[derive(Clone)] From f109b5285052e16f0d476639d023f0c94d37f975 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Thu, 17 Mar 2022 18:23:16 +0100 Subject: [PATCH 4/7] improve links --- ash/src/device.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index d66112d00..0c36924c8 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -8,14 +8,17 @@ use std::ptr; /// This is a dispatchable object, whose main purpose is to provide access to Vulkan's functions. /// -/// It is not identical to Vulkan's device object (see [vk::Device][vk::Device]). -/// The latter, however, can be accessed via the `[handle()][Self::handle()]` method. +/// It is not identical to Vulkan's device object (see [vk::Device]). +/// The latter, however, can be accessed via the [`handle()`][Self::handle()] method. /// In this sense, `ash::Device` is a Vulkan device handle together with all its associated function pointers. /// -/// All functions from the Vulkan API (except those from extensions) which have a VkDevice as their first argument, have become methods of `ash::Device`. -/// Their VkDevice argument is always passed implicitly. +/// All functions from the Vulkan API (except those from extensions) which have a [`VkDevice`] as their first argument, have become methods of `ash::Device`. +/// Their [`VkDevice`] argument is always passed implicitly. /// -/// Also, all `vkCmd*` functions are accessed as methods of `ash::Device`. +/// Also, all `vkCmd*` functions are accessed as methods of `ash::Device`. +/// +/// [`VkDevice`]: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDevice.html + #[derive(Clone)] pub struct Device { pub(crate) handle: vk::Device, From 5ad7240ca28624baa5daf5a542c98fdfd303aca3 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Thu, 17 Mar 2022 18:24:05 +0100 Subject: [PATCH 5/7] improve links --- ash/src/instance.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 81142ef78..2ebf1f780 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -6,10 +6,12 @@ use std::mem; use std::os::raw::c_char; use std::ptr; -/// `ash::Instance` contains a [vk::Instance][vk::Instance] (accessible via `[handle()][Self::handle()]`) and all associated function pointers. +/// `ash::Instance` contains a [vk::Instance] (accessible via [`handle()`][Self::handle()]) and all associated function pointers. /// -/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their first argument have become methods of `ash::Instance`. -/// Their VkInstance argument is always passed implicitly. +/// All functions from the Vulkan API (except those from extensions) which have a [`VkInstance`] as their first argument have become methods of `ash::Instance`. +/// Their [`VkInstance`] argument is always passed implicitly. +/// +/// [`VkInstance`]: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkInstance.html #[derive(Clone)] pub struct Instance { From 10bb4997c6402066853fd4372b24004dfd1035e8 Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Mon, 4 Apr 2022 21:33:58 +0200 Subject: [PATCH 6/7] rewrite documentation of ash::Device --- ash/src/device.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index 0b96ad0d5..c669530b5 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -6,18 +6,11 @@ use std::mem; use std::os::raw::c_void; use std::ptr; -/// This is a dispatchable object, whose main purpose is to provide access to Vulkan's functions. -/// -/// It is not identical to Vulkan's device object (see [vk::Device]). -/// The latter, however, can be accessed via the [`handle()`][Self::handle()] method. -/// In this sense, `ash::Device` is a Vulkan device handle together with all its associated function pointers. -/// -/// All functions from the Vulkan API (except those from extensions) which have a [`VkDevice`] as their first argument, have become methods of `ash::Device`. -/// Their [`VkDevice`] argument is always passed implicitly. -/// -/// Also, all `vkCmd*` functions are accessed as methods of `ash::Device`. -/// -/// [`VkDevice`]: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDevice.html +/// Holds a Vulkan [`vk::Device`] handle together with Vulkan 1.0 - 1.3 device-level function pointers loaded from it, +/// providing convenient wrappers to call these functions. +/// +/// The internal handle is available through [`handle()`][Self::handle()] if needed externally. + #[derive(Clone)] pub struct Device { From 3b6e305b6827a5c7cd5b8153297f9582ba18a32b Mon Sep 17 00:00:00 2001 From: hoj-senna <53797493+hoj-senna@users.noreply.github.com> Date: Mon, 4 Apr 2022 21:35:10 +0200 Subject: [PATCH 7/7] expanded documentation --- ash/src/instance.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 6e7632d24..ad31f4c5a 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -6,12 +6,11 @@ use std::mem; use std::os::raw::c_char; use std::ptr; -/// `ash::Instance` contains a [vk::Instance] (accessible via [`handle()`][Self::handle()]) and all associated function pointers. +/// Holds a Vulkan [`vk::Instance`] handle together with Vulkan 1.0 - 1.3 instance-level function pointers loaded from it, providing convenient wrappers to call these functions: +/// All functions from the Vulkan API (except those from extensions) which have a `VkInstance` as their first argument have become methods of `ash::Instance`. +/// Their `VkInstance` argument is always passed implicitly. /// -/// All functions from the Vulkan API (except those from extensions) which have a [`VkInstance`] as their first argument have become methods of `ash::Instance`. -/// Their [`VkInstance`] argument is always passed implicitly. -/// -/// [`VkInstance`]: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkInstance.html +/// The internal handle is available through [`handle()`][Self::handle()] if needed externally. #[derive(Clone)] pub struct Instance {