@@ -29,21 +29,18 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
29
29
}
30
30
31
31
// Get physical device's limits/properties
32
- VkPhysicalDeviceDriverProperties driverProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES };
33
- VkPhysicalDeviceIDProperties deviceIDProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES , &driverProperties };
34
- VkPhysicalDeviceSubgroupProperties subgroupProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES , &deviceIDProperties };
35
- VkPhysicalDeviceRayTracingPipelinePropertiesKHR rayTracingPipelineProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR, &subgroupProperties };
32
+ VkPhysicalDeviceVulkan13Properties vulkan13Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES, nullptr };
33
+ VkPhysicalDeviceVulkan12Properties vulkan12Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES , &vulkan13Properties };
34
+ VkPhysicalDeviceVulkan11Properties vulkan11Properties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES , &vulkan12Properties };
35
+ VkPhysicalDeviceRayTracingPipelinePropertiesKHR rayTracingPipelineProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR, &vulkan11Properties };
36
36
VkPhysicalDeviceAccelerationStructurePropertiesKHR accelerationStructureProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR, &rayTracingPipelineProperties };
37
37
{
38
38
VkPhysicalDeviceProperties2 deviceProperties = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 };
39
39
deviceProperties.pNext = &accelerationStructureProperties;
40
40
vkGetPhysicalDeviceProperties2 (m_vkPhysicalDevice, &deviceProperties);
41
-
42
- memcpy (m_properties.deviceUUID , deviceIDProperties.deviceUUID , VK_UUID_SIZE);
43
- m_properties.deviceType = static_cast <E_TYPE>(deviceProperties.properties .deviceType );
44
- m_properties.driverID = static_cast <E_DRIVER_ID>(driverProperties.driverID );
45
-
41
+
46
42
/* Vulkan Core 1.0 */
43
+ m_properties.deviceType = static_cast <E_TYPE>(deviceProperties.properties .deviceType );
47
44
m_properties.limits .maxImageDimension1D = deviceProperties.properties .limits .maxImageDimension1D ;
48
45
m_properties.limits .maxImageDimension2D = deviceProperties.properties .limits .maxImageDimension2D ;
49
46
m_properties.limits .maxImageDimension3D = deviceProperties.properties .limits .maxImageDimension3D ;
@@ -78,19 +75,31 @@ class CVulkanPhysicalDevice final : public IPhysicalDevice
78
75
m_properties.limits .lineWidthRange [1 ] = deviceProperties.properties .limits .lineWidthRange [1 ];
79
76
m_properties.limits .nonCoherentAtomSize = deviceProperties.properties .limits .nonCoherentAtomSize ;
80
77
78
+ /* Vulkan Core 1.1 */
79
+ memcpy (m_properties.deviceUUID , vulkan11Properties.deviceUUID , VK_UUID_SIZE);
80
+
81
81
/* SubgroupProperties */
82
- m_properties.limits .subgroupSize = subgroupProperties .subgroupSize ;
83
- m_properties.limits .subgroupOpsShaderStages = static_cast <asset::IShader::E_SHADER_STAGE>(subgroupProperties. supportedStages );
84
- m_properties.limits .shaderSubgroupBasic = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_BASIC_BIT;
85
- m_properties.limits .shaderSubgroupVote = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_VOTE_BIT;
86
- m_properties.limits .shaderSubgroupArithmetic = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_ARITHMETIC_BIT;
87
- m_properties.limits .shaderSubgroupBallot = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT;
88
- m_properties.limits .shaderSubgroupShuffle = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_SHUFFLE_BIT;
89
- m_properties.limits .shaderSubgroupShuffleRelative = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT;
90
- m_properties.limits .shaderSubgroupClustered = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_CLUSTERED_BIT;
91
- m_properties.limits .shaderSubgroupQuad = subgroupProperties. supportedOperations & VK_SUBGROUP_FEATURE_QUAD_BIT;
92
- m_properties.limits .shaderSubgroupQuadAllStages = subgroupProperties. quadOperationsInAllStages ;
82
+ m_properties.limits .subgroupSize = vulkan11Properties .subgroupSize ;
83
+ m_properties.limits .subgroupOpsShaderStages = static_cast <asset::IShader::E_SHADER_STAGE>(vulkan11Properties. subgroupSupportedStages );
84
+ m_properties.limits .shaderSubgroupBasic = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_BASIC_BIT;
85
+ m_properties.limits .shaderSubgroupVote = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_VOTE_BIT;
86
+ m_properties.limits .shaderSubgroupArithmetic = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_ARITHMETIC_BIT;
87
+ m_properties.limits .shaderSubgroupBallot = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT;
88
+ m_properties.limits .shaderSubgroupShuffle = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_SHUFFLE_BIT;
89
+ m_properties.limits .shaderSubgroupShuffleRelative = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT;
90
+ m_properties.limits .shaderSubgroupClustered = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_CLUSTERED_BIT;
91
+ m_properties.limits .shaderSubgroupQuad = vulkan11Properties. subgroupSupportedOperations & VK_SUBGROUP_FEATURE_QUAD_BIT;
92
+ m_properties.limits .shaderSubgroupQuadAllStages = vulkan11Properties. subgroupQuadOperationsInAllStages ;
93
93
94
+ /* Vulkan Core 1.2 */
95
+ m_properties.driverID = static_cast <E_DRIVER_ID>(vulkan12Properties.driverID );
96
+ memcpy (m_properties.driverName , vulkan12Properties.driverName , VK_MAX_DRIVER_NAME_SIZE);
97
+ memcpy (m_properties.driverInfo , vulkan12Properties.driverInfo , VK_MAX_DRIVER_INFO_SIZE);
98
+ m_properties.conformanceVersion = vulkan12Properties.conformanceVersion ;
99
+
100
+ /* Vulkan Core 1.3 */
101
+
102
+
94
103
/* Nabla */
95
104
m_properties.limits .maxBufferSize = core::max (m_properties.limits .maxUBOSize , m_properties.limits .maxSSBOSize );
96
105
m_properties.limits .maxOptimallyResidentWorkgroupInvocations = core::min (core::roundDownToPoT (deviceProperties.properties .limits .maxComputeWorkGroupInvocations ),512u );
0 commit comments