vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_shader_fma

Description

Name

VK_KHR_shader_fma - device extension

VK_KHR_shader_fma

Name String
VK_KHR_shader_fma
Extension Type
Device extension
Registered Extension Number
580
Revision
1
Ratification Status
Ratified
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Vulkan Version 1.1
SPIR-V Dependencies
Contact
Extension Proposal
VK_KHR_shader_fma

Other Extension Metadata

Last Modified Date
2025-06-10
Contributors
  • Graeme Leese, Broadcom

Description

This extension allows applications to use the SPV_KHR_fma extension to obtain correctly-rounded results for fused-multiply add (fma) operations.

Fused-multiply add is a building block of many high-precision numerical functions. It provides better accuracy than separate operations, because of the removal of the intermediate rounding step, and often costs less than the pair of separate operations.

Vulkan currently exposes an fma primitive that can give the reduced cost, but it is not guaranteed to be a fused operation, so the accuracy cannot be relied on. For applications which require the high accuracy, therefore, the operation must be emulated or the algorithm changed so as not to require fma. This is often vastly more costly, even though fma is supported in much of the underlying hardware.

New Structures

New Enum Constants

Version History

  • Revision 1, 2025-06-10 (Graeme Leese)

    • Initial draft

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

data PhysicalDeviceShaderFmaFeaturesKHR Source #

VkPhysicalDeviceShaderFmaFeaturesKHR - Structure indicating support for SPV_KHR_fma OpFmaKHR

Members

This structure describes the following feature:

Description

If the PhysicalDeviceShaderFmaFeaturesKHR structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceShaderFmaFeaturesKHR, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Valid Usage (Implicit)

See Also

VK_KHR_shader_fma, Bool32, StructureType

Constructors

PhysicalDeviceShaderFmaFeaturesKHR 

Fields

  • shaderFmaFloat16 :: Bool

    shaderFmaFloat16 indicates whether the implementation supports OpFmaKHR for Float16 types in shaders.

  • shaderFmaFloat32 :: Bool

    shaderFmaFloat32 indicates whether the implementation supports OpFmaKHR for Float32 types in shaders.

  • shaderFmaFloat64 :: Bool

    shaderFmaFloat64 indicates whether the implementation supports OpFmaKHR for Float64 types in shaders.

Instances

Instances details
Eq PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

Storable PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

Show PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

FromCStruct PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

ToCStruct PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

Zero PhysicalDeviceShaderFmaFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_shader_fma

type KHR_SHADER_FMA_EXTENSION_NAME = "VK_KHR_shader_fma" Source #