![]() |
VPP
0.8
A high-level modern C++ API for Vulkan
|
Represents physical rendering device. More...
#include <vppPhysicalDevice.hpp>
Public Types | |
enum | EFormatUsage { OPTIMAL_TILING, LINEAR_TILING, BUFFER } |
Enumeration of possible usages for data format. More... | |
Public Member Functions | |
PhysicalDevice () | |
Constructs null reference. | |
PhysicalDevice (VkPhysicalDevice hDevice) | |
Constructs device reference from Vulkan device handle. | |
operator bool () const | |
Checks whether this is not a null reference. | |
VkPhysicalDevice | handle () const |
Retrieves Vulkan handle for this device. | |
const VkPhysicalDeviceProperties & | properties () const |
Retrieves device properties. | |
const DeviceFeatures & | features () const |
Retrieves features and extensions supported by the device. | |
VkPhysicalDeviceMemoryProperties | getMemoryProperties () const |
Retrieves memory properties for this device. | |
size_t | queueFamilyCount () const |
Retrieves number of queue families supported by this device. | |
const VkQueueFamilyProperties & | getQueueFamilyProperties (size_t iFamily) const |
Retrieves properties for specified queue family. | |
bool | supportsSurface (const Surface &surface, size_t iFamily) const |
Checks whether a queue family of this device supports presentation to a given surface. | |
void | getLimitValuesAsText (std::ostream &sst) const |
Gets textual representation of limits section in device properties. Useful for diagnostic logs. | |
VkFormatFeatureFlags | supportsFormat (VkFormat fmt, EFormatUsage u=OPTIMAL_TILING) const |
Checks whether this device supports specified usage of given format. More... | |
bool | supportsDepthStencilFormat (VkFormat fmt) const |
Checks whether this device supports specified depth/stencil format. | |
VkResult | enumerateExtensions (ExtensionProperties *pResult) |
Gets a list of available Vulkan extensions for this device. | |
Represents physical rendering device.
You obtain it from the Instance object, or by providing already known Vulkan physical device handle. In the latter case, PhysicalDevice class does not acquire ownership on the handle.
The PhysicalDevice object has the following purposes:
This object is reference-counted and may be passed by value.
VkFormatFeatureFlags vpp::PhysicalDevice::supportsFormat | ( | VkFormat | fmt, |
EFormatUsage | u = OPTIMAL_TILING |
||
) | const |
Checks whether this device supports specified usage of given format.
For typical applications, OPTIMAL_TILING
is the best choice and largest number of formats support it. The LINEAR_TILING
mode can be useful when you generate image contents on CPU. BUFFER
is required to use with texel buffers.
Examples: