Browse Source

Vk: doc++

pull/491/head
Vladimír Vondruš 6 years ago
parent
commit
42ca60b376
  1. 1
      doc/vulkan-wrapping.dox
  2. 1
      doc/vulkan.dox
  3. 17
      src/Magnum/Vk/Buffer.h
  4. 8
      src/Magnum/Vk/DeviceProperties.h
  5. 5
      src/Magnum/Vk/ExtensionProperties.h
  6. 23
      src/Magnum/Vk/Integration.h
  7. 3
      src/Magnum/Vk/Result.h
  8. 1
      src/Magnum/Vk/vk-info.cpp

1
doc/vulkan-wrapping.dox

@ -26,6 +26,7 @@
namespace Magnum { namespace Magnum {
/** @page vulkan-wrapping Vulkan wrapping layer /** @page vulkan-wrapping Vulkan wrapping layer
@brief Overview of the base Vulkan wrapper API @brief Overview of the base Vulkan wrapper API
@m_since_latest
@tableofcontents @tableofcontents
@m_footernavigation @m_footernavigation

1
doc/vulkan.dox

@ -27,6 +27,7 @@ namespace Magnum {
/** @page vulkan Vuulkan /** @page vulkan Vuulkan
@brief State of Vulkan support, version and extension requirements. @brief State of Vulkan support, version and extension requirements.
@m_since_latest
The following table maps Vulkan function names to Magnum API, useful for The following table maps Vulkan function names to Magnum API, useful for
developers with existing Vulkan background. Note that, as reverse mapping, each developers with existing Vulkan background. Note that, as reverse mapping, each

17
src/Magnum/Vk/Buffer.h

@ -52,14 +52,31 @@ Wraps a @type_vk_keyword{BufferUsageFlagBits}.
@m_enum_values_as_keywords @m_enum_values_as_keywords
*/ */
enum class BufferUsage: UnsignedInt { enum class BufferUsage: UnsignedInt {
/** Source of a transfer command */
TransferSource = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, TransferSource = VK_BUFFER_USAGE_TRANSFER_SRC_BIT,
/** Destination of a transfer command */
TransferDestination = VK_BUFFER_USAGE_TRANSFER_DST_BIT, TransferDestination = VK_BUFFER_USAGE_TRANSFER_DST_BIT,
/** Suitable for creating a uniform texel buffer view */
UniformTexelBuffer = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, UniformTexelBuffer = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT,
/** Suitable for creating a storage texel buffer view */
StorageTexelBuffer = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, StorageTexelBuffer = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT,
/** Suitable for a uniform buffer */
UniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, UniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
/** Suitable for a storage buffer */
StorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, StorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
/** Suitable for an index buffer */
IndexBuffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, IndexBuffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
/** Suitable for a vertex buffer */
VertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, VertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
/** Suitable for a indirect draw buffer */
IndirectBuffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, IndirectBuffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT,
/** @todo VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, 1.2 */ /** @todo VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, 1.2 */

8
src/Magnum/Vk/DeviceProperties.h

@ -246,8 +246,12 @@ MAGNUM_VK_EXPORT Debug& operator<<(Debug& debug, MemoryHeapFlags value);
@m_since_latest @m_since_latest
Wraps a @type_vk_keyword{PhysicalDevice} along with its (lazy-populated) Wraps a @type_vk_keyword{PhysicalDevice} along with its (lazy-populated)
properties such as @type_vk_keyword{PhysicalDeviceProperties2} and properties such as @type_vk_keyword{PhysicalDeviceProperties2},
@type_vk_keyword{GetPhysicalDeviceQueueFamilyProperties2}. @type_vk_keyword{PhysicalDeviceQueueFamilyProperties2} and
@type_vk_keyword{PhysicalDeviceMemoryProperties2}, which are a superset
of @type_vk_keyword{PhysicalDeviceProperties},
@type_vk_keyword{PhysicalDeviceQueueFamilyProperties} and
@type_vk_keyword{PhysicalDeviceMemoryProperties}.
See the @ref Vk-Device-usage "Device class docs" for an example of using this See the @ref Vk-Device-usage "Device class docs" for an example of using this
class for enumerating available devices and picking one of them. class for enumerating available devices and picking one of them.

5
src/Magnum/Vk/ExtensionProperties.h

@ -266,7 +266,10 @@ Expects that all listed layers are supported.
*/ */
MAGNUM_VK_EXPORT InstanceExtensionProperties enumerateInstanceExtensionProperties(Containers::ArrayView<const Containers::StringView> layers = {}); MAGNUM_VK_EXPORT InstanceExtensionProperties enumerateInstanceExtensionProperties(Containers::ArrayView<const Containers::StringView> layers = {});
/** @overload */ /**
* @overload
* @m_since_latest
*/
MAGNUM_VK_EXPORT InstanceExtensionProperties enumerateInstanceExtensionProperties(std::initializer_list<Containers::StringView> layers); MAGNUM_VK_EXPORT InstanceExtensionProperties enumerateInstanceExtensionProperties(std::initializer_list<Containers::StringView> layers);
}} }}

23
src/Magnum/Vk/Integration.h

@ -32,21 +32,22 @@ Provides conversion for the following types:
| Magnum type | Equivalent Vulkan type | | Magnum type | Equivalent Vulkan type |
| ------------------------------------- | ----------------------------- | | ------------------------------------- | ----------------------------- |
| @ref Magnum::Vector2i "Vector2i" | @type_vk{Offset2D}, @type_vk{Extent2D} | | @ref Magnum::Vector2i "Vector2i" | @type_vk_keyword{Offset2D}, @type_vk_keyword{Extent2D} |
| @ref Magnum::Vector3i "Vector3i" | @type_vk{Offset3D}, @type_vk{Extent3D} | | @ref Magnum::Vector3i "Vector3i" | @type_vk_keyword{Offset3D}, @type_vk_keyword{Extent3D} |
| @ref Magnum::Vector2ui "Vector2ui" | @type_vk{Extent2D} | | @ref Magnum::Vector2ui "Vector2ui" | @type_vk_keyword{Extent2D} |
| @ref Magnum::Vector3ui "Vector3ui" | @type_vk{Extent3D} | | @ref Magnum::Vector3ui "Vector3ui" | @type_vk_keyword{Extent3D} |
| @ref Magnum::Vector4 "Vector4", @ref Magnum::Color4 "Color4", @ref Magnum::Vector4i "Vector4i", @ref Magnum::Vector4ui "Vector4ui" | @type_vk{ClearColorValue} | | @ref Magnum::Vector4 "Vector4", @ref Magnum::Color4 "Color4", @ref Magnum::Vector4i "Vector4i", @ref Magnum::Vector4ui "Vector4ui" | @type_vk_keyword{ClearColorValue} |
| @ref Magnum::Vector3 "Vector3", @ref Magnum::Color3 "Color3" | @type_vk{ClearColorValue} | | @ref Magnum::Vector3 "Vector3", @ref Magnum::Color3 "Color3" | @type_vk{ClearColorValue} |
| @ref Magnum::Range3D "Range3D" | @type_vk{Viewport} | | @ref Magnum::Range3D "Range3D" | @type_vk_keyword{Viewport} |
| @ref Magnum::Range2Di "Range2Di" | @type_vk{Rect2D} | | @ref Magnum::Range2Di "Range2Di" | @type_vk_keyword{Rect2D} |
| @ref Magnum::Range3Di "Range3Di" | @type_vk{ClearRect} | | @ref Magnum::Range3Di "Range3Di" | @type_vk_keyword{ClearRect} |
@type_vk{ClearColorValue} is an @cpp union @ce, so it's convertible from/to a @type_vk{ClearColorValue} is an @cpp union @ce, so it's convertible from/to a
floating-point type as well as integer types, but you have to ensure the type floating-point type as well as integer types, but you have to ensure the type
is correct for the API call it'll used in. Conversion of @type_vk{ClearColorValue} is correct for the API call it'll be used in. Conversion of
to @ref Magnum::Color3 "Color3" is not allowed, as it would lead to loss of the @type_vk{ClearColorValue} to @ref Magnum::Color3 "Color3" is not allowed, as it
alpha value. In the other direction, alpha is set to @cpp 1.0f @ce. would lead to loss of the alpha value. In the other direction, alpha is set to
@cpp 1.0f @ce.
Third dimension of @type_vk{Viewport} is a depth range, third dimension of Third dimension of @type_vk{Viewport} is a depth range, third dimension of
@type_vk{ClearRect} is an attachment layer range. In both cases you can use @type_vk{ClearRect} is an attachment layer range. In both cases you can use

3
src/Magnum/Vk/Result.h

@ -42,7 +42,8 @@ namespace Magnum { namespace Vk {
Wraps a @type_vk_keyword{Result}. Wraps a @type_vk_keyword{Result}.
@m_enum_values_as_keywords @m_enum_values_as_keywords
@see @ref MAGNUM_VK_INTERNAL_ASSERT_SUCCESS() @see @ref MAGNUM_VK_INTERNAL_ASSERT_SUCCESS(),
@ref MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR_INCOMPLETE()
*/ */
enum class Result: Int { enum class Result: Int {
/** Command successfully completed */ /** Command successfully completed */

1
src/Magnum/Vk/vk-info.cpp

@ -37,6 +37,7 @@ namespace Magnum {
/** @page magnum-vk-info Magnum Vulkan Info /** @page magnum-vk-info Magnum Vulkan Info
@brief Displays information about Magnum engine Vulkan capabilities @brief Displays information about Magnum engine Vulkan capabilities
@m_since_latest
@m_footernavigation @m_footernavigation
@m_keywords{magnum-vk-info vk-info} @m_keywords{magnum-vk-info vk-info}

Loading…
Cancel
Save