Skip to content

Commit ef865cf

Browse files
committed
Renamed vk::physical to vk::physical_gpu for the enum for selecting gpu device types
1 parent f465f33 commit ef865cf

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

vulkan-cpp/physical_device.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export namespace vk {
9999
private:
100100
VkPhysicalDevice enumerate_physical_devices(
101101
const VkInstance& p_instance,
102-
const physical& p_physical_device_type) {
102+
const physical_gpu& p_physical_device_type) {
103103
uint32_t device_count = 0;
104104
vkEnumeratePhysicalDevices(p_instance, &device_count, nullptr);
105105

vulkan-cpp/types.cppm

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -492,16 +492,25 @@ export namespace vk {
492492
std::string description;
493493
};
494494

495-
//! @brief vk::physical defines what kinds of physical device
496-
//! specification to use that is available based on your current
497-
//! physical hardware specifications.
498-
enum class physical : uint8_t {
499-
integrated,
500-
discrete,
501-
virtualized,
502-
cpu,
503-
max_enum,
504-
other
495+
//! @brief Defines the enum types for a selection of gpu device
496+
// types to select according to your hardware specs
497+
498+
/**
499+
* @brief Defines the enum types for a selection of gpu device
500+
* types to select according to your hardware specs
501+
*
502+
* @param other - device does not match any other available types
503+
* @param integrated - the device is typically embedded in or tightly coupled with the host.
504+
* @param discrete - the device is typically a separate processor connected to the host via an interlink.
505+
* @param virtual - the device is typically a virtual node in a virtualization environment.
506+
* @param type_cpu - the device is typically running on the same processor as the host
507+
*/
508+
enum class physical_gpu : uint8_t {
509+
other = VK_PHYSICAL_DEVICE_TYPE_OTHER,
510+
integrated = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
511+
discrete = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
512+
virtualized = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
513+
type_cpu = VK_PHYSICAL_DEVICE_TYPE_CPU,
505514
};
506515

507516
/**
@@ -511,7 +520,7 @@ export namespace vk {
511520
* created with
512521
*/
513522
struct physical_enumeration {
514-
physical device_type;
523+
physical_gpu device_type;
515524
};
516525

517526
struct surface_params {

0 commit comments

Comments
 (0)