// Copyright(c) 2019, NVIDIA CORPORATION. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // VulkanHpp Samples : PhysicalDeviceFeatures // Get the fine-grained features of the physical devices that can be supported by an implementation. #include "../utils/utils.hpp" #include "vulkan/vulkan.hpp" #include static char const * AppName = "PhysicalDeviceFeatures"; static char const * EngineName = "Vulkan.hpp"; int main( int /*argc*/, char ** /*argv*/ ) { try { vk::UniqueInstance instance = vk::su::createInstance( AppName, EngineName ); #if !defined( NDEBUG ) vk::UniqueDebugUtilsMessengerEXT debugUtilsMessenger = vk::su::createDebugUtilsMessenger( instance ); #endif // enumerate the physicalDevices std::vector physicalDevices = instance->enumeratePhysicalDevices(); /* VULKAN_KEY_START */ std::cout << std::boolalpha; for ( size_t i = 0; i < physicalDevices.size(); i++ ) { // some features are only valid, if a corresponding extension is available! std::vector extensionProperties = physicalDevices[i].enumerateDeviceExtensionProperties(); std::cout << "PhysicalDevice " << i << "\n"; auto features2 = physicalDevices[i] .getFeatures2(); vk::PhysicalDeviceFeatures const & features = features2.get().features; std::cout << "\tFeatures:\n"; std::cout << "\t\talphaToOne : " << static_cast( features.alphaToOne ) << "\n"; std::cout << "\t\tdepthBiasClamp : " << static_cast( features.depthBiasClamp ) << "\n"; std::cout << "\t\tdepthBounds : " << static_cast( features.depthBounds ) << "\n"; std::cout << "\t\tdepthClamp : " << static_cast( features.depthClamp ) << "\n"; std::cout << "\t\tdrawIndirectFirstInstance : " << static_cast( features.drawIndirectFirstInstance ) << "\n"; std::cout << "\t\tdualSrcBlend : " << static_cast( features.dualSrcBlend ) << "\n"; std::cout << "\t\tfillModeNonSolid : " << static_cast( features.fillModeNonSolid ) << "\n"; std::cout << "\t\tfragmentStoresAndAtomics : " << static_cast( features.fragmentStoresAndAtomics ) << "\n"; std::cout << "\t\tfullDrawIndexUint32 : " << static_cast( features.fullDrawIndexUint32 ) << "\n"; std::cout << "\t\tgeometryShader : " << static_cast( features.geometryShader ) << "\n"; std::cout << "\t\timageCubeArray : " << static_cast( features.imageCubeArray ) << "\n"; std::cout << "\t\tindependentBlend : " << static_cast( features.independentBlend ) << "\n"; std::cout << "\t\tinheritedQueries : " << static_cast( features.inheritedQueries ) << "\n"; std::cout << "\t\tlargePoints : " << static_cast( features.largePoints ) << "\n"; std::cout << "\t\tlogicOp : " << static_cast( features.logicOp ) << "\n"; std::cout << "\t\tmultiDrawIndirect : " << static_cast( features.multiDrawIndirect ) << "\n"; std::cout << "\t\tmultiViewport : " << static_cast( features.multiViewport ) << "\n"; std::cout << "\t\tocclusionQueryPrecise : " << static_cast( features.occlusionQueryPrecise ) << "\n"; std::cout << "\t\tpipelineStatisticsQuery : " << static_cast( features.pipelineStatisticsQuery ) << "\n"; std::cout << "\t\trobustBufferAccess : " << static_cast( features.robustBufferAccess ) << "\n"; std::cout << "\t\tsamplerAnisotropy : " << static_cast( features.samplerAnisotropy ) << "\n"; std::cout << "\t\tsampleRateShading : " << static_cast( features.sampleRateShading ) << "\n"; std::cout << "\t\tshaderClipDistance : " << static_cast( features.shaderClipDistance ) << "\n"; std::cout << "\t\tshaderCullDistance : " << static_cast( features.shaderCullDistance ) << "\n"; std::cout << "\t\tshaderFloat64 : " << static_cast( features.shaderFloat64 ) << "\n"; std::cout << "\t\tshaderImageGatherExtended : " << static_cast( features.shaderImageGatherExtended ) << "\n"; std::cout << "\t\tshaderInt16 : " << static_cast( features.shaderInt16 ) << "\n"; std::cout << "\t\tshaderInt64 : " << static_cast( features.shaderInt64 ) << "\n"; std::cout << "\t\tshaderResourceMinLod : " << static_cast( features.shaderResourceMinLod ) << "\n"; std::cout << "\t\tshaderResourceResidency : " << static_cast( features.shaderResourceResidency ) << "\n"; std::cout << "\t\tshaderSampledImageArrayDynamicIndexing : " << static_cast( features.shaderSampledImageArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderStorageBufferArrayDynamicIndexing : " << static_cast( features.shaderStorageBufferArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderStorageImageArrayDynamicIndexing : " << static_cast( features.shaderStorageImageArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderStorageImageExtendedFormats : " << static_cast( features.shaderStorageImageExtendedFormats ) << "\n"; std::cout << "\t\tshaderStorageImageMultisample : " << static_cast( features.shaderStorageImageMultisample ) << "\n"; std::cout << "\t\tshaderStorageImageReadWithoutFormat : " << static_cast( features.shaderStorageImageReadWithoutFormat ) << "\n"; std::cout << "\t\tshaderStorageImageWriteWithoutFormat : " << static_cast( features.shaderStorageImageWriteWithoutFormat ) << "\n"; std::cout << "\t\tshaderTessellationAndGeometryPointSize : " << static_cast( features.shaderTessellationAndGeometryPointSize ) << "\n"; std::cout << "\t\tshaderUniformBufferArrayDynamicIndexing : " << static_cast( features.shaderUniformBufferArrayDynamicIndexing ) << "\n"; std::cout << "\t\tsparseBinding : " << static_cast( features.sparseBinding ) << "\n"; std::cout << "\t\tsparseResidency16Samples : " << static_cast( features.sparseResidency16Samples ) << "\n"; std::cout << "\t\tsparseResidency2Samples : " << static_cast( features.sparseResidency2Samples ) << "\n"; std::cout << "\t\tsparseResidency4Samples : " << static_cast( features.sparseResidency4Samples ) << "\n"; std::cout << "\t\tsparseResidency8Samples : " << static_cast( features.sparseResidency8Samples ) << "\n"; std::cout << "\t\tsparseResidencyAliased : " << static_cast( features.sparseResidencyAliased ) << "\n"; std::cout << "\t\tsparseResidencyBuffer : " << static_cast( features.sparseResidencyBuffer ) << "\n"; std::cout << "\t\tsparseResidencyImage2D : " << static_cast( features.sparseResidencyImage2D ) << "\n"; std::cout << "\t\tsparseResidencyImage3D : " << static_cast( features.sparseResidencyImage3D ) << "\n"; std::cout << "\t\ttessellationShader : " << static_cast( features.tessellationShader ) << "\n"; std::cout << "\t\ttextureCompressionASTC_LDR : " << static_cast( features.textureCompressionASTC_LDR ) << "\n"; std::cout << "\t\ttextureCompressionBC : " << static_cast( features.textureCompressionBC ) << "\n"; std::cout << "\t\ttextureCompressionETC2 : " << static_cast( features.textureCompressionETC2 ) << "\n"; std::cout << "\t\tvariableMultisampleRate : " << static_cast( features.variableMultisampleRate ) << "\n"; std::cout << "\t\tvertexPipelineStoresAndAtomics : " << static_cast( features.vertexPipelineStoresAndAtomics ) << "\n"; std::cout << "\t\twideLines : " << static_cast( features.wideLines ) << "\n"; std::cout << "\n"; vk::PhysicalDevice16BitStorageFeatures const & sixteenBitStorageFeatures = features2.get(); std::cout << "\t16BitStorageFeatures:\n"; std::cout << "\t\tstorageBuffer16BitAccess : " << static_cast( sixteenBitStorageFeatures.storageBuffer16BitAccess ) << "\n"; std::cout << "\t\tstorageInputOutput16 : " << static_cast( sixteenBitStorageFeatures.storageInputOutput16 ) << "\n"; std::cout << "\t\tstoragePushConstant16 : " << static_cast( sixteenBitStorageFeatures.storagePushConstant16 ) << "\n"; std::cout << "\t\tuniformAndStorageBuffer16BitAccess : " << static_cast( sixteenBitStorageFeatures.uniformAndStorageBuffer16BitAccess ) << "\n"; std::cout << "\n"; if ( vk::su::contains( extensionProperties, "VK_KHR_8bit_storage" ) ) { vk::PhysicalDevice8BitStorageFeaturesKHR const & eightBitStorageFeatures = features2.get(); std::cout << "\t8BitStorageFeatures:\n"; std::cout << "\t\tstorageBuffer8BitAccess : " << static_cast( eightBitStorageFeatures.storageBuffer8BitAccess ) << "\n"; std::cout << "\t\tstoragePushConstant8 : " << static_cast( eightBitStorageFeatures.storagePushConstant8 ) << "\n"; std::cout << "\t\tuniformAndStorageBuffer8BitAccess : " << static_cast( eightBitStorageFeatures.uniformAndStorageBuffer8BitAccess ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_astc_decode_mode" ) ) { vk::PhysicalDeviceASTCDecodeFeaturesEXT const & astcDecodeFeatures = features2.get(); std::cout << "\tASTCDecodeFeature:\n"; std::cout << "\t\tdecodeModeSharedExponent : " << static_cast( astcDecodeFeatures.decodeModeSharedExponent ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_blend_operation_advanced" ) ) { vk::PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & blendOperationAdvancedFeatures = features2.get(); std::cout << "\tBlendOperationAdvancedFeatures:\n"; std::cout << "\t\tadvancedBlendCoherentOperations : " << static_cast( blendOperationAdvancedFeatures.advancedBlendCoherentOperations ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_buffer_device_address" ) ) { vk::PhysicalDeviceBufferDeviceAddressFeaturesEXT const & bufferDeviceAddressFeatures = features2.get(); std::cout << "\tBufferDeviceAddressFeatures:\n"; std::cout << "\t\tbufferDeviceAddress : " << static_cast( bufferDeviceAddressFeatures.bufferDeviceAddress ) << "\n"; std::cout << "\t\tbufferDeviceAddressCaptureReplay : " << static_cast( bufferDeviceAddressFeatures.bufferDeviceAddressCaptureReplay ) << "\n"; std::cout << "\t\tbufferDeviceAddressMultiDevice : " << static_cast( bufferDeviceAddressFeatures.bufferDeviceAddressMultiDevice ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_AMD_device_coherent_memory" ) ) { vk::PhysicalDeviceCoherentMemoryFeaturesAMD const & coherentMemoryFeatures = features2.get(); std::cout << "\tCoherentMemoryFeatures:\n"; std::cout << "\t\tdeviceCoherentMemory : " << static_cast( coherentMemoryFeatures.deviceCoherentMemory ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_compute_shader_derivatives" ) ) { vk::PhysicalDeviceComputeShaderDerivativesFeaturesNV const & computeShaderDerivativesFeatures = features2.get(); std::cout << "\tComputeShaderDerivativeFeatures:\n"; std::cout << "\t\tcomputeDerivativeGroupLinear : " << static_cast( computeShaderDerivativesFeatures.computeDerivativeGroupLinear ) << "\n"; std::cout << "\t\tcomputeDerivativeGroupQuads : " << static_cast( computeShaderDerivativesFeatures.computeDerivativeGroupQuads ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_conditional_rendering" ) ) { vk::PhysicalDeviceConditionalRenderingFeaturesEXT const & conditionalRenderingFeatures = features2.get(); std::cout << "\tConditionalRenderingFeatures:\n"; std::cout << "\t\tconditionalRendering : " << static_cast( conditionalRenderingFeatures.conditionalRendering ) << "\n"; std::cout << "\t\tinheritedConditionalRendering : " << static_cast( conditionalRenderingFeatures.inheritedConditionalRendering ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_cooperative_matrix" ) ) { vk::PhysicalDeviceCooperativeMatrixFeaturesNV const & cooperativeMatrixFeatures = features2.get(); std::cout << "\tCooperativeMatrixFeatures:\n"; std::cout << "\t\tcooperativeMatrix : " << static_cast( cooperativeMatrixFeatures.cooperativeMatrix ) << "\n"; std::cout << "\t\tcooperativeMatrixRobustBufferAccess : " << static_cast( cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_corner_sampled_image" ) ) { vk::PhysicalDeviceCornerSampledImageFeaturesNV const & cornerSampledImageFeatures = features2.get(); std::cout << "\tCornerSampledImageFeatures:\n"; std::cout << "\t\tcornerSampledImage : " << static_cast( cornerSampledImageFeatures.cornerSampledImage ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_coverage_reduction_mode" ) ) { vk::PhysicalDeviceCoverageReductionModeFeaturesNV const & coverageReductionModeFeatures = features2.get(); std::cout << "\tCoverageReductionModeFeatures:\n"; std::cout << "\t\tcoverageReductionMode : " << static_cast( coverageReductionModeFeatures.coverageReductionMode ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_dedicated_allocation_image_aliasing" ) ) { vk::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & dedicatedAllocationImageAliasingFeatures = features2.get(); std::cout << "\tDedicatedAllocationAliasingFeatures:\n"; std::cout << "\t\tdedicatedAllocationImageAliasing : " << static_cast( dedicatedAllocationImageAliasingFeatures.dedicatedAllocationImageAliasing ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_depth_clip_enable" ) ) { vk::PhysicalDeviceDepthClipEnableFeaturesEXT const & depthClipEnabledFeatures = features2.get(); std::cout << "\tDepthClipEnabledFeatures:\n"; std::cout << "\t\tdepthClipEnable : " << static_cast( depthClipEnabledFeatures.depthClipEnable ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_descriptor_indexing" ) ) { vk::PhysicalDeviceDescriptorIndexingFeaturesEXT const & descriptorIndexingFeatures = features2.get(); std::cout << "\tDescriptorIndexingFeatures:\n"; std::cout << "\t\tdescriptorBindingPartiallyBound : " << static_cast( descriptorIndexingFeatures.descriptorBindingPartiallyBound ) << "\n"; std::cout << "\t\tdescriptorBindingSampledImageUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingSampledImageUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingStorageBufferUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingStorageBufferUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingStorageImageUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingStorageImageUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingStorageTexelBufferUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingStorageTexelBufferUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingUniformBufferUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingUniformBufferUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingUniformTexelBufferUpdateAfterBind : " << static_cast( descriptorIndexingFeatures.descriptorBindingUniformTexelBufferUpdateAfterBind ) << "\n"; std::cout << "\t\tdescriptorBindingUpdateUnusedWhilePending : " << static_cast( descriptorIndexingFeatures.descriptorBindingUpdateUnusedWhilePending ) << "\n"; std::cout << "\t\tdescriptorBindingVariableDescriptorCount : " << static_cast( descriptorIndexingFeatures.descriptorBindingVariableDescriptorCount ) << "\n"; std::cout << "\t\truntimeDescriptorArray : " << static_cast( descriptorIndexingFeatures.runtimeDescriptorArray ) << "\n"; std::cout << "\t\tshaderInputAttachmentArrayDynamicIndexing : " << static_cast( descriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderInputAttachmentArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderSampledImageArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderStorageBufferArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderStorageImageArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderStorageTexelBufferArrayDynamicIndexing : " << static_cast( descriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderStorageTexelBufferArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderUniformBufferArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing ) << "\n"; std::cout << "\t\tshaderUniformTexelBufferArrayDynamicIndexing : " << static_cast( descriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing ) << "\n"; std::cout << "\t\tshaderUniformTexelBufferArrayNonUniformIndexing : " << static_cast( descriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_scissor_exclusive" ) ) { vk::PhysicalDeviceExclusiveScissorFeaturesNV const & exclusiveScissorFeatures = features2.get(); std::cout << "\tExclusiveScissorFeatures:\n"; std::cout << "\t\texclusiveScissor : " << static_cast( exclusiveScissorFeatures.exclusiveScissor ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_fragment_density_map" ) ) { vk::PhysicalDeviceFragmentDensityMapFeaturesEXT const & fragmentDensityMapFeatures = features2.get(); std::cout << "\tFragmentDensityMapFeatures:\n"; std::cout << "\t\tfragmentDensityMap : " << static_cast( fragmentDensityMapFeatures.fragmentDensityMap ) << "\n"; std::cout << "\t\tfragmentDensityMapDynamic : " << static_cast( fragmentDensityMapFeatures.fragmentDensityMapDynamic ) << "\n"; std::cout << "\t\tfragmentDensityMapNonSubsampledImages : " << static_cast( fragmentDensityMapFeatures.fragmentDensityMapNonSubsampledImages ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_fragment_shader_barycentric" ) ) { vk::PhysicalDeviceFragmentShaderBarycentricFeaturesNV const & fragmentShaderBarycentricFeatures = features2.get(); std::cout << "\tFragmentShaderBarycentricFeatures:\n"; std::cout << "\t\tfragmentShaderBarycentric : " << static_cast( fragmentShaderBarycentricFeatures.fragmentShaderBarycentric ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_fragment_shader_interlock" ) ) { vk::PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & fragmentShaderInterlockFeatures = features2.get(); std::cout << "\tFragmentShaderInterlockFeatures:\n"; std::cout << "\t\tfragmentShaderPixelInterlock : " << static_cast( fragmentShaderInterlockFeatures.fragmentShaderPixelInterlock ) << "\n"; std::cout << "\t\tfragmentShaderSampleInterlock : " << static_cast( fragmentShaderInterlockFeatures.fragmentShaderSampleInterlock ) << "\n"; std::cout << "\t\tfragmentShaderShadingRateInterlock : " << static_cast( fragmentShaderInterlockFeatures.fragmentShaderShadingRateInterlock ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_host_query_reset" ) ) { vk::PhysicalDeviceHostQueryResetFeaturesEXT const & hostQueryResetFeatures = features2.get(); std::cout << "\tHostQueryResetFeatures:\n"; std::cout << "\t\thostQueryReset : " << static_cast( hostQueryResetFeatures.hostQueryReset ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_imageless_framebuffer" ) ) { vk::PhysicalDeviceImagelessFramebufferFeaturesKHR const & imagelessFramebufferFeatures = features2.get(); std::cout << "\tImagelessFramebufferFeatures:\n"; std::cout << "\t\timagelessFramebuffer : " << static_cast( imagelessFramebufferFeatures.imagelessFramebuffer ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_index_type_uint8" ) ) { vk::PhysicalDeviceIndexTypeUint8FeaturesEXT const & indexTypeUint8Features = features2.get(); std::cout << "\tIndexTypeUint8Features:\n"; std::cout << "\t\tindexTypeUint8 : " << static_cast( indexTypeUint8Features.indexTypeUint8 ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_inline_uniform_block" ) ) { vk::PhysicalDeviceInlineUniformBlockFeaturesEXT const & inlineUniformBlockFeatures = features2.get(); std::cout << "\tInlineUniformBlockFeatures:\n"; std::cout << "\t\tdescriptorBindingInlineUniformBlockUpdateAfterBind : " << static_cast( inlineUniformBlockFeatures.descriptorBindingInlineUniformBlockUpdateAfterBind ) << "\n"; std::cout << "\t\tinlineUniformBlock : " << static_cast( inlineUniformBlockFeatures.inlineUniformBlock ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_line_rasterization" ) ) { vk::PhysicalDeviceLineRasterizationFeaturesEXT const & lineRasterizationFeatures = features2.get(); std::cout << "\tLineRasterizationFeatures:\n"; std::cout << "\t\tbresenhamLines : " << static_cast( lineRasterizationFeatures.bresenhamLines ) << "\n"; std::cout << "\t\trectangularLines : " << static_cast( lineRasterizationFeatures.rectangularLines ) << "\n"; std::cout << "\t\tsmoothLines : " << static_cast( lineRasterizationFeatures.smoothLines ) << "\n"; std::cout << "\t\tstippledBresenhamLines : " << static_cast( lineRasterizationFeatures.stippledBresenhamLines ) << "\n"; std::cout << "\t\tstippledRectangularLines : " << static_cast( lineRasterizationFeatures.stippledRectangularLines ) << "\n"; std::cout << "\t\tstippledSmoothLines : " << static_cast( lineRasterizationFeatures.stippledSmoothLines ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_memory_priority" ) ) { vk::PhysicalDeviceMemoryPriorityFeaturesEXT const & memoryPriorityFeatures = features2.get(); std::cout << "\tMemoryPriorityFeatures:\n"; std::cout << "\t\tmemoryPriority : " << static_cast( memoryPriorityFeatures.memoryPriority ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_mesh_shader" ) ) { vk::PhysicalDeviceMeshShaderFeaturesNV const & meshShaderFeatures = features2.get(); std::cout << "\tMeshShaderFeatures:\n"; std::cout << "\t\tmeshShader : " << static_cast( meshShaderFeatures.meshShader ) << "\n"; std::cout << "\t\ttaskShader : " << static_cast( meshShaderFeatures.taskShader ) << "\n"; std::cout << "\n"; } vk::PhysicalDeviceMultiviewFeatures const & multiviewFeatures = features2.get(); std::cout << "\tMultiviewFeatures:\n"; std::cout << "\t\tmultiview : " << static_cast( multiviewFeatures.multiview ) << "\n"; std::cout << "\t\tmultiviewGeometryShader : " << static_cast( multiviewFeatures.multiviewGeometryShader ) << "\n"; std::cout << "\t\tmultiviewTessellationShader : " << static_cast( multiviewFeatures.multiviewTessellationShader ) << "\n"; std::cout << "\n"; if ( vk::su::contains( extensionProperties, "VK_KHR_pipeline_executable_properties" ) ) { vk::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & pipelineExecutablePropertiesFeatures = features2.get(); std::cout << "\tPipelineExectuablePropertiesFeatures:\n"; std::cout << "\t\tpipelineExecutableInfo : " << static_cast( pipelineExecutablePropertiesFeatures.pipelineExecutableInfo ) << "\n"; std::cout << "\n"; } vk::PhysicalDeviceProtectedMemoryFeatures const & protectedMemoryFeatures = features2.get(); std::cout << "\tProtectedMemoryFeatures:\n"; std::cout << "\t\tprotectedMemory : " << static_cast( protectedMemoryFeatures.protectedMemory ) << "\n"; std::cout << "\n"; if ( vk::su::contains( extensionProperties, "VK_NV_representative_fragment_test" ) ) { vk::PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & representativeFragmentTestFeatures = features2.get(); std::cout << "\tRepresentativeFragmentTestFeatures:\n"; std::cout << "\t\trepresentativeFragmentTest : " << static_cast( representativeFragmentTestFeatures.representativeFragmentTest ) << "\n"; std::cout << "\n"; } vk::PhysicalDeviceSamplerYcbcrConversionFeatures const & samplerYcbcrConversionFeatures = features2.get(); std::cout << "\tSamplerYcbcrConversionFeatures:\n"; std::cout << "\t\tsamplerYcbcrConversion : " << static_cast( samplerYcbcrConversionFeatures.samplerYcbcrConversion ) << "\n"; std::cout << "\n"; if ( vk::su::contains( extensionProperties, "VK_EXT_scalar_block_layout" ) ) { vk::PhysicalDeviceScalarBlockLayoutFeaturesEXT const & scalarBlockLayoutFeatures = features2.get(); std::cout << "\tScalarBlockLayoutFeatures:\n"; std::cout << "\t\tscalarBlockLayout : " << static_cast( scalarBlockLayoutFeatures.scalarBlockLayout ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_shader_atomic_int64" ) ) { vk::PhysicalDeviceShaderAtomicInt64FeaturesKHR const & shaderAtomicInt64Features = features2.get(); std::cout << "\tShaderAtomicInt64Features:\n"; std::cout << "\t\tshaderBufferInt64Atomics : " << static_cast( shaderAtomicInt64Features.shaderBufferInt64Atomics ) << "\n"; std::cout << "\t\tshaderSharedInt64Atomics : " << static_cast( shaderAtomicInt64Features.shaderSharedInt64Atomics ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_shader_demote_to_helper_invocation" ) ) { vk::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const & shaderDemoteToHelperInvocationFeatures = features2.get(); std::cout << "\tShaderDemoteToHelperInvocationFeatures:\n"; std::cout << "\t\tshaderDemoteToHelperInvocation : " << static_cast( shaderDemoteToHelperInvocationFeatures.shaderDemoteToHelperInvocation ) << "\n"; std::cout << "\n"; } vk::PhysicalDeviceShaderDrawParametersFeatures const & shaderDrawParametersFeature = features2.get(); std::cout << "\tShaderDrawParametersFeature:\n"; std::cout << "\t\tshaderDrawParameters : " << static_cast( shaderDrawParametersFeature.shaderDrawParameters ) << "\n"; std::cout << "\n"; if ( vk::su::contains( extensionProperties, "VK_KHR_shader_float16_int8" ) ) { vk::PhysicalDeviceShaderFloat16Int8FeaturesKHR const & shaderFloat16Int8Features = features2.get(); std::cout << "\tShaderFloat16Int8Features:\n"; std::cout << "\t\tshaderFloat16 : " << static_cast( shaderFloat16Int8Features.shaderFloat16 ) << "\n"; std::cout << "\t\tshaderInt8 : " << static_cast( shaderFloat16Int8Features.shaderInt8 ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_shader_image_footprint" ) ) { vk::PhysicalDeviceShaderImageFootprintFeaturesNV const & shaderImageFootprintFeatures = features2.get(); std::cout << "\tShaderImageFootprintFeatures:\n"; std::cout << "\t\timageFootprint : " << static_cast( shaderImageFootprintFeatures.imageFootprint ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_INTEL_shader_integer_functions2" ) ) { vk::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & shaderIntegerFunctions2Features = features2.get(); std::cout << "\tShaderIntegerFunctions2Features:\n"; std::cout << "\t\tshaderIntegerFunctions2 : " << static_cast( shaderIntegerFunctions2Features.shaderIntegerFunctions2 ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_shader_sm_builtins" ) ) { vk::PhysicalDeviceShaderSMBuiltinsFeaturesNV const & shaderSMBuiltinsFeatures = features2.get(); std::cout << "\tShaderSMBuiltinsFeatures:\n"; std::cout << "\t\tshaderSMBuiltins : " << static_cast( shaderSMBuiltinsFeatures.shaderSMBuiltins ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_shader_subgroup_extended_types" ) ) { vk::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR const & shaderSubgroupExtendedTypesFeatures = features2.get(); std::cout << "\tShaderSubgroupExtendedTypeFeatures:\n"; std::cout << "\t\tshaderSubgroupExtendedTypes : " << static_cast( shaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_NV_shading_rate_image" ) ) { vk::PhysicalDeviceShadingRateImageFeaturesNV const & shadingRateImageFeatures = features2.get(); std::cout << "\tShadingRateImageFeatures:\n"; std::cout << "\t\tshadingRateCoarseSampleOrder : " << static_cast( shadingRateImageFeatures.shadingRateCoarseSampleOrder ) << "\n"; std::cout << "\t\tshadingRateImage : " << static_cast( shadingRateImageFeatures.shadingRateImage ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_subgroup_size_control" ) ) { vk::PhysicalDeviceSubgroupSizeControlFeaturesEXT const & subgroupSizeControlFeatures = features2.get(); std::cout << "\tSubgroupSizeControlFeatures:\n"; std::cout << "\t\tcomputeFullSubgroups : " << static_cast( subgroupSizeControlFeatures.computeFullSubgroups ) << "\n"; std::cout << "\t\tsubgroupSizeControl : " << static_cast( subgroupSizeControlFeatures.subgroupSizeControl ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_texel_buffer_alignment" ) ) { vk::PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & texelBufferAlignmentFeatures = features2.get(); std::cout << "\tTexelBufferAlignmentFeatures:\n"; std::cout << "\t\ttexelBufferAlignment : " << static_cast( texelBufferAlignmentFeatures.texelBufferAlignment ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_texture_compression_astc_hdr" ) ) { vk::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const & textureCompressionASTCHDRFeatures = features2.get(); std::cout << "\tTextureCompressionASTCHHRFeatures:\n"; std::cout << "\t\ttextureCompressionASTC_HDR : " << static_cast( textureCompressionASTCHDRFeatures.textureCompressionASTC_HDR ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_timeline_semaphore" ) ) { vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR const & timelineSemaphoreFeatures = features2.get(); std::cout << "\tTimelineSemaphoreFeatures:\n"; std::cout << "\t\ttimelineSemaphore :" << static_cast( timelineSemaphoreFeatures.timelineSemaphore ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_transform_feedback" ) ) { vk::PhysicalDeviceTransformFeedbackFeaturesEXT const & transformFeedbackFeatures = features2.get(); std::cout << "\tTransformFeedbackFeatures:\n"; std::cout << "\t\tgeometryStreams : " << static_cast( transformFeedbackFeatures.geometryStreams ) << "\n"; std::cout << "\t\ttransformFeedback : " << static_cast( transformFeedbackFeatures.transformFeedback ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_uniform_buffer_standard_layout" ) ) { vk::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR const & uniformBufferStandardLayoutFeatures = features2.get(); std::cout << "\tUniformBufferStandardLayoutFeatures:\n"; std::cout << "\t\tuniformBufferStandardLayout : " << static_cast( uniformBufferStandardLayoutFeatures.uniformBufferStandardLayout ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_variable_pointers" ) ) { vk::PhysicalDeviceVariablePointersFeatures const & variablePointersFeatures = features2.get(); std::cout << "\tVariablePointersFeatures:\n"; std::cout << "\t\tvariablePointers : " << static_cast( variablePointersFeatures.variablePointers ) << "\n"; std::cout << "\t\tvariablePointersStorageBuffer : " << static_cast( variablePointersFeatures.variablePointersStorageBuffer ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_EXT_vertex_attribute_divisor" ) ) { vk::PhysicalDeviceVertexAttributeDivisorFeaturesEXT const & vertexAttributeDivisorFeatures = features2.get(); std::cout << "\tVertexAttributeDivisorFeature:\n"; std::cout << "\t\tvertexAttributeInstanceRateDivisor : " << static_cast( vertexAttributeDivisorFeatures.vertexAttributeInstanceRateDivisor ) << "\n"; std::cout << "\t\tvertexAttributeInstanceRateZeroDivisor : " << static_cast( vertexAttributeDivisorFeatures.vertexAttributeInstanceRateZeroDivisor ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_vulkan_memory_model" ) ) { vk::PhysicalDeviceVulkanMemoryModelFeaturesKHR const & vulkanMemoryModelFeatures = features2.get(); std::cout << "\tVulkanMemoryModelFeatures:\n"; std::cout << "\t\tvulkanMemoryModel : " << static_cast( vulkanMemoryModelFeatures.vulkanMemoryModel ) << "\n"; std::cout << "\t\tvulkanMemoryModelAvailabilityVisibilityChains : " << static_cast( vulkanMemoryModelFeatures.vulkanMemoryModelAvailabilityVisibilityChains ) << "\n"; std::cout << "\t\tvulkanMemoryModelDeviceScope : " << static_cast( vulkanMemoryModelFeatures.vulkanMemoryModelDeviceScope ) << "\n"; std::cout << "\n"; } if ( vk::su::contains( extensionProperties, "VK_KHR_sampler_ycbcr_conversion" ) ) { vk::PhysicalDeviceYcbcrImageArraysFeaturesEXT const & ycbcrImageArraysFeatures = features2.get(); std::cout << "\tYcbcrImageArraysFeatures:\n"; std::cout << "\t\tycbcrImageArrays : " << static_cast( ycbcrImageArraysFeatures.ycbcrImageArrays ) << "\n"; std::cout << "\n"; } } /* VULKAN_KEY_END */ } catch ( vk::SystemError & err ) { std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } catch ( std::runtime_error & err ) { std::cout << "std::runtime_error: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) { std::cout << "unknown error\n"; exit( -1 ); } return 0; }