Skip to content

Latest commit

 

History

History
428 lines (342 loc) · 13.7 KB

FeatureSet.md

File metadata and controls

428 lines (342 loc) · 13.7 KB

Source: FeatureSet.h

This is some kind of Vulkan Profiles and Metal Feature Set Tables.

Use FeatureSetGen application to generate feature sets from Vulkan device info JSON and from Metal feature set table.
Predefined FeatureSet's located in the feature_set folder, use them to get GPU limits and features in resource compilation stage.

Use FeatureSet const& GraphicsScheduler().GetFeatureSet() to get cross-platform limits and features of the current GPU in runtime.

Render States

  • alphaToOne
    Same as VkPhysicalDeviceFeatures::alphaToOne.
  • depthBiasClamp
    Same as VkPhysicalDeviceFeatures::depthBiasClamp.
  • depthBounds
    Same as VkPhysicalDeviceFeatures::depthBounds.
  • depthClamp
    Same as VkPhysicalDeviceFeatures::depthClamp.
  • dualSrcBlend
    Same as VkPhysicalDeviceFeatures::dualSrcBlend.
  • fillModeNonSolid
    Same as VkPhysicalDeviceFeatures::fillModeNonSolid.
  • independentBlend
    Same as VkPhysicalDeviceFeatures::independentBlend.
  • logicOp
    Same as VkPhysicalDeviceFeatures::logicOp.
  • sampleRateShading
    Same as VkPhysicalDeviceFeatures::sampleRateShading.
  • constantAlphaColorBlendFactors
    Same as VkPhysicalDevicePortabilitySubsetFeaturesKHR::constantAlphaColorBlendFactors.
  • pointPolygons
    Same as VkPhysicalDevicePortabilitySubsetFeaturesKHR::pointPolygons.
  • triangleFans
    Same as VkPhysicalDevicePortabilitySubsetFeaturesKHR::triangleFans.

Shader variable types and functions

Subgroup

  • subgroupOperations
  • subgroupTypes
  • subgroupStages
  • subgroupQuadStages
  • requiredSubgroupSizeStages
  • subgroup
  • subgroupBroadcastDynamicId
  • subgroupSizeControl Same as VkPhysicalDeviceSubgroupSizeControlFeatures::subgroupSizeControl.
    Metal: require SIMD feature.
  • shaderSubgroupUniformControlFlow
    Same as VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR::shaderSubgroupUniformControlFlow.
    Metal: TODO
  • minSubgroupSize
    Maximal value of VkPhysicalDeviceSubgroupSizeControlProperties::minSubgroupSize.
    Metal: 4.
  • maxSubgroupSize
    Minimal value of VkPhysicalDeviceSubgroupSizeControlProperties::maxSubgroupSize.
    Metal: 32 or 64.

Types

  • shaderInt8
    Same as VkPhysicalDeviceShaderFloat16Int8FeaturesKHR::shaderInt8.
    Metal: always supported.
  • shaderInt16
    Same as VkPhysicalDeviceFeatures::shaderInt16.
    Metal: always supported.
  • shaderInt64
    Same as VkPhysicalDeviceFeatures::shaderInt64.
    Metal: v2.3+.
  • shaderFloat16
    Same as VkPhysicalDeviceShaderFloat16Int8FeaturesKHR::shaderFloat16.
    Metal: always supported.
  • shaderFloat64
    Same as VkPhysicalDeviceFeatures::shaderFloat64.
    Metal: not supported.

Uniform / Storage buffer

  • storageBuffer16BitAccess
  • uniformAndStorageBuffer16BitAccess
  • storageInputOutput16
  • storageBuffer8BitAccess
  • uniformAndStorageBuffer8BitAccess
  • uniformBufferStandardLayout
  • scalarBlockLayout
  • bufferDeviceAddress

Push constant

  • storagePushConstant8
  • storagePushConstant16

Atomic

  • fragmentStoresAndAtomics
  • vertexPipelineStoresAndAtomics
  • shaderImageInt64Atomics

- GL_EXT_shader_atomic_int64:

  • shaderBufferInt64Atomics
  • shaderSharedInt64Atomics

- GL_EXT_shader_atomic_float:

  • shaderBufferFloat32Atomics
  • shaderBufferFloat32AtomicAdd
  • shaderBufferFloat64Atomics
  • shaderBufferFloat64AtomicAdd
  • shaderSharedFloat32Atomics
  • shaderSharedFloat32AtomicAdd
  • shaderSharedFloat64Atomics
  • shaderSharedFloat64AtomicAdd
  • shaderImageFloat32Atomics
  • shaderImageFloat32AtomicAdd

- GL_EXT_shader_atomic_float2:

  • shaderBufferFloat16Atomics
  • shaderBufferFloat16AtomicAdd
  • shaderBufferFloat16AtomicMinMax
  • shaderBufferFloat32AtomicMinMax
  • shaderBufferFloat64AtomicMinMax
  • shaderSharedFloat16Atomics
  • shaderSharedFloat16AtomicAdd
  • shaderSharedFloat16AtomicMinMax
  • shaderSharedFloat32AtomicMinMax
  • shaderSharedFloat64AtomicMinMax
  • shaderImageFloat32AtomicMinMax
  • sparseImageFloat32AtomicMinMax

Output

  • shaderOutputViewportIndex
  • shaderOutputLayer

Clock

  • shaderSubgroupClock
  • shaderDeviceClock

Shader features and limits

  • shaderClipDistance
  • shaderCullDistance
  • shaderResourceMinLod
  • shaderDrawParameters
  • runtimeDescriptorArray
  • shaderSMBuiltinsNV
  • shaderCoreBuiltinsARM
  • shaderSampleRateInterpolationFunctions
  • shaderStencilExport
  • shaderDemoteToHelperInvocation
  • shaderTerminateInvocation
  • shaderZeroInitializeWorkgroupMemory
  • shaderIntegerDotProduct
  • maxShaderVersion

Array dynamic indexing

  • shaderSampledImageArrayDynamicIndexing
  • shaderStorageBufferArrayDynamicIndexing
  • shaderStorageImageArrayDynamicIndexing
  • shaderUniformBufferArrayDynamicIndexing
  • shaderInputAttachmentArrayDynamicIndexing
  • shaderUniformTexelBufferArrayDynamicIndexing
  • shaderStorageTexelBufferArrayDynamicIndexing

Non uniform indexing (GL_EXT_nonuniform_qualifier)

  • shaderUniformBufferArrayNonUniformIndexing
  • shaderSampledImageArrayNonUniformIndexing
  • shaderStorageBufferArrayNonUniformIndexing
  • shaderStorageImageArrayNonUniformIndexing
  • shaderInputAttachmentArrayNonUniformIndexing
  • shaderUniformTexelBufferArrayNonUniformIndexing
  • shaderStorageTexelBufferArrayNonUniformIndexing

Storage image format

  • shaderStorageImageMultisample
  • shaderStorageImageReadWithoutFormat
  • shaderStorageImageWriteWithoutFormat

Memory model (GL_KHR_memory_scope_semantics)

  • vulkanMemoryModel
  • vulkanMemoryModelDeviceScope
  • vulkanMemoryModelAvailabilityVisibilityChains

Fragment shader interlock (GL_ARB_fragment_shader_interlock)

  • fragmentShaderSampleInterlock
  • fragmentShaderPixelInterlock
  • fragmentShaderShadingRateInterlock

Fragment shading rate (GL_EXT_fragment_shading_rate)

  • pipelineFragmentShadingRate
  • primitiveFragmentShadingRate
  • attachmentFragmentShadingRate
  • primitiveFragmentShadingRateWithMultipleViewports
  • layeredShadingRateAttachments
  • fragmentShadingRateWithShaderDepthStencilWrites
  • fragmentShadingRateWithSampleMask
  • fragmentShadingRateWithShaderSampleMask
  • fragmentShadingRateWithFragmentShaderInterlock
  • fragmentShadingRateWithCustomSampleLocations
  • fragmentShadingRateTexelSize
  • fragmentShadingRates

Inline ray tracing (GL_EXT_ray_query)

  • rayQuery
    Same as VkPhysicalDeviceRayQueryFeaturesKHR::rayQuery.
  • rayQueryStages
    Vulkan: all supported stages.
    Metal: separate features for compute and graphics stages.

Ray tracing (GL_EXT_ray_tracing)

  • rayTracingPipeline
    Same as VkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipeline.
    Metal: not supported (can be emulated).
  • rayTraversalPrimitiveCulling
    Same as VkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTraversalPrimitiveCulling.
    Metal: not supported.
  • maxRayRecursionDepth
    Minimal value of VkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayRecursionDepth.
    Metal: not supported.

Multiview

  • multiview
  • multiviewGeometryShader
  • multiviewTessellationShader
  • maxMultiviewViewCount

Multi viewport

  • multiViewport
  • maxViewports

Sample locations

  • sampleLocations
  • variableSampleLocations

Tessellation

  • tessellationShader
    Same as VkPhysicalDeviceFeatures::tessellationShader.
  • tessellationIsolines
    Same as VkPhysicalDevicePortabilitySubsetFeaturesKHR::tessellationIsolines.
  • tessellationPointMode
    Same as VkPhysicalDevicePortabilitySubsetFeaturesKHR::tessellationPointMode.

Shader limits

  • maxTexelBufferElements
  • maxUniformBufferSize
  • maxStorageBufferSize
  • perDescrSet
  • perStage
  • maxDescriptorSets
  • maxTexelOffset
  • maxTexelGatherOffset
  • maxFragmentOutputAttachments
  • maxFragmentDualSrcAttachments
  • maxFragmentCombinedOutputResources
  • maxPushConstantsSize
  • maxTotalThreadgroupSize
  • maxTotalTileMemory
  • maxVertAmplification

Compute shader

  • computeShader
    Vulkan: always supported.
    Metal: always supported.
  • maxComputeSharedMemorySize
    Minimal value of VkPhysicalDeviceLimits::maxComputeSharedMemorySize.
    Metal: constant.
  • maxComputeWorkGroupInvocations
    Minimal value of VkPhysicalDeviceLimits::maxComputeWorkGroupInvocations.
    Metal: constant.
  • minComputeWorkGroupSize [X,Y,Z]
    Minimal value of VkPhysicalDeviceLimits::maxComputeWorkGroupCount.
    Metal: [MTLDevice maxThreadsPerThreadgroup].

Mesh shader (GL_EXT_mesh_shader)

  • taskShader
    Same as VkPhysicalDeviceMeshShaderFeaturesEXT::taskShader.
  • meshShader
    Same as VkPhysicalDeviceMeshShaderFeaturesEXT::meshShader.
  • maxTaskWorkGroupSize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskWorkGroupInvocations and maxTaskWorkGroupSize. In current implementations this values are same and equal to 32.
  • maxMeshWorkGroupSize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupInvocations and maxMeshWorkGroupSize. In current implementations this values are same and equal to 32.
  • maxMeshOutputVertices
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshOutputVertices.
  • maxMeshOutputPrimitives
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshOutputPrimitives.
  • maxMeshOutputPerVertexGranularity
    Maximal value of VkPhysicalDeviceMeshShaderPropertiesEXT::meshOutputPerVertexGranularity.
  • maxMeshOutputPerPrimitiveGranularity
    Maximal value of VkPhysicalDeviceMeshShaderPropertiesEXT::meshOutputPerPrimitiveGranularity.
  • maxTaskPayloadSize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskPayloadSize.
  • maxTaskSharedMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskSharedMemorySize.
  • maxTaskPayloadAndSharedMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskPayloadAndSharedMemorySize.
  • maxMeshSharedMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshSharedMemorySize.
  • maxMeshPayloadAndSharedMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshPayloadAndSharedMemorySize.
  • maxMeshOutputMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshOutputMemorySize.
  • maxMeshPayloadAndOutputMemorySize
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshPayloadAndOutputMemorySize.
  • maxMeshMultiviewViewCount
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshMultiviewViewCount.
  • maxPreferredTaskWorkGroupInvocations
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxPreferredTaskWorkGroupInvocations.
  • maxPreferredMeshWorkGroupInvocations
    Minimal value of VkPhysicalDeviceMeshShaderPropertiesEXT::maxPreferredMeshWorkGroupInvocations.

Raster order group

  • maxRasterOrderGroups

Shaders

  • geometryShader
    Same as VkPhysicalDeviceFeatures::geometryShader.
    Metal: not supported.
  • tileShader
    Vulkan: not supported.
    Metal: requires tile shader feature.

Vertex buffer

  • maxVertexAttributes
  • maxVertexBuffers

- VK_EXT_vertex_attribute_divisor:

  • vertexDivisor
  • maxVertexAttribDivisor

Buffer

  • vertexFormats
    Formats which supports VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT in vkGetPhysicalDeviceFormatProperties().
  • uniformTexBufferFormats
    Formats which supports VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT in vkGetPhysicalDeviceFormatProperties().
  • storageTexBufferFormats
    Formats which supports VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT in vkGetPhysicalDeviceFormatProperties().
  • storageTexBufferAtomicFormats
    Formats which supports VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT in vkGetPhysicalDeviceFormatProperties().
  • accelStructVertexFormats
    Formats which supports VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR in vkGetPhysicalDeviceFormatProperties().

Image

  • imageCubeArray
  • textureCompressionASTC_LDR
  • textureCompressionASTC_HDR
  • textureCompressionBC
  • textureCompressionETC2
  • imageViewMinLod
  • multisampleArrayImage
  • maxImageArrayLayers
  • storageImageAtomicFormats
    Formats which supports VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT in vkGetPhysicalDeviceFormatProperties().
  • storageImageFormats
    Formats which supports VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT in vkGetPhysicalDeviceFormatProperties().
  • attachmentBlendFormats
    Formats which supports VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT in vkGetPhysicalDeviceFormatProperties().
  • attachmentFormats
    Formats which supports VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT in vkGetPhysicalDeviceFormatProperties().
  • linearSampledFormats
    Formats which supports VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in vkGetPhysicalDeviceFormatProperties().
  • surfaceFormats
  • hwCompressedAttachmentFormats
  • lossyCompressedAttachmentFormats

Sampler

  • samplerAnisotropy
  • samplerMirrorClampToEdge
  • samplerFilterMinmax
  • filterMinmaxImageComponentMapping
  • samplerMipLodBias
  • samplerYcbcrConversion
  • ycbcr2Plane444
  • maxSamplerAnisotropy
  • maxSamplerLodBias

Framebuffer

  • framebufferColorSampleCounts
  • framebufferDepthSampleCounts
  • maxFramebufferLayers

Render pass

  • variableMultisampleRate

Metal specific

  • metalArgBufferTier

Hardware info

  • queues
  • vendorIds
  • devicesIds