SpiecsEngine
 
Loading...
Searching...
No Matches

◆ IsPropertyMeetDemand()

bool Spices::VulkanDevice::IsPropertyMeetDemand ( const VkPhysicalDevice & device)
private

Check all Property we need meet.

Parameters
[in]deviceVkPhysicalDevice.
Returns
Returns true if all Property we need meet.

Get all RayTracing Properties supported.

Get all RayTracing Properties supported.

Definition at line 353 of file VulkanDevice.cpp.

354 {
356
360 m_DGCProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV;
361 m_DGCProperties.pNext = nullptr;
362
363 m_RayTracingProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR;
365
366 VkPhysicalDeviceMeshShaderPropertiesEXT meshShaderProperties{};
367 meshShaderProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT;
368 meshShaderProperties.pNext = &m_RayTracingProperties;
369
370 VkPhysicalDeviceSubgroupProperties subGroupProperties{};
371 subGroupProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
372 subGroupProperties.pNext = &meshShaderProperties;
373
374 VkPhysicalDeviceProperties2 prop2 {};
375 prop2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
376 prop2.pNext = &subGroupProperties;
377 vkGetPhysicalDeviceProperties2(device, &prop2);
378 m_DeviceProperties = prop2.properties;
379
380 {
381 std::stringstream ss;
382 ss << "Limits : maxFragmentOutputAttachments = " << m_DeviceProperties.limits.maxFragmentOutputAttachments;
383 SPICES_CORE_INFO(ss.str())
384 }
385
386 {
387 std::stringstream ss;
388 ss << "MeshShader : maxMeshOutputVertices = " << meshShaderProperties.maxMeshOutputVertices;
389 SPICES_CORE_INFO(ss.str())
390 }
391
392 {
393 std::stringstream ss;
394 ss << "MeshShader : maxMeshOutputPrimitives = " << meshShaderProperties.maxMeshOutputPrimitives;
395 SPICES_CORE_INFO(ss.str())
396 }
397
398 {
399 std::stringstream ss;
400 ss << "SubGroup : subgroupSize = " << subGroupProperties.subgroupSize;
401 SPICES_CORE_INFO(ss.str())
402 assert(subGroupProperties.supportedStages & VK_SHADER_STAGE_TASK_BIT_EXT);
403 assert(subGroupProperties.supportedStages & VK_SHADER_STAGE_MESH_BIT_EXT);
404 }
405
406 return true;
407 }
#define SPICES_PROFILE_ZONE
static VkPhysicalDeviceRayTracingPipelinePropertiesKHR m_RayTracingProperties
Device RayTracing Properties.
static VkPhysicalDeviceProperties m_DeviceProperties
Selected Physical Device Properties.
static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV m_DGCProperties
Device DGC Properties.