{-# language CPP #-}
-- No documentation found for Chapter "Promoted_From_VK_KHR_shader_float_controls"
module Vulkan.Core12.Promoted_From_VK_KHR_shader_float_controls  ( PhysicalDeviceFloatControlsProperties(..)
                                                                 , StructureType(..)
                                                                 , ShaderFloatControlsIndependence(..)
                                                                 ) where

import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core12.Enums.ShaderFloatControlsIndependence (ShaderFloatControlsIndependence)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES))
import Vulkan.Core12.Enums.ShaderFloatControlsIndependence (ShaderFloatControlsIndependence(..))
import Vulkan.Core10.Enums.StructureType (StructureType(..))
-- | VkPhysicalDeviceFloatControlsProperties - Structure describing
-- properties supported by VK_KHR_shader_float_controls
--
-- = Description
--
-- If the 'PhysicalDeviceFloatControlsProperties' structure is included in
-- the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_shader_float_controls VK_KHR_shader_float_controls>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_2 VK_VERSION_1_2>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core12.Enums.ShaderFloatControlsIndependence.ShaderFloatControlsIndependence',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFloatControlsProperties = PhysicalDeviceFloatControlsProperties
  { -- | #extension-features-denormBehaviorIndependence#
    -- @denormBehaviorIndependence@ is a
    -- 'Vulkan.Core12.Enums.ShaderFloatControlsIndependence.ShaderFloatControlsIndependence'
    -- value indicating whether, and how, denorm behavior can be set
    -- independently for different bit widths.
    PhysicalDeviceFloatControlsProperties
-> ShaderFloatControlsIndependence
denormBehaviorIndependence :: ShaderFloatControlsIndependence
  , -- | #extension-features-roundingModeIndependence# @roundingModeIndependence@
    -- is a
    -- 'Vulkan.Core12.Enums.ShaderFloatControlsIndependence.ShaderFloatControlsIndependence'
    -- value indicating whether, and how, rounding modes can be set
    -- independently for different bit widths.
    PhysicalDeviceFloatControlsProperties
-> ShaderFloatControlsIndependence
roundingModeIndependence :: ShaderFloatControlsIndependence
  , -- | #extension-limits-shaderSignedZeroInfNanPreserveFloat16#
    -- @shaderSignedZeroInfNanPreserveFloat16@ is a boolean value indicating
    -- whether sign of a zero, Nans and \(\pm\infty\) /can/ be preserved in
    -- 16-bit floating-point computations. It also indicates whether the
    -- @SignedZeroInfNanPreserve@ execution mode /can/ be used for 16-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderSignedZeroInfNanPreserveFloat16 :: Bool
  , -- | #extension-limits-shaderSignedZeroInfNanPreserveFloat32#
    -- @shaderSignedZeroInfNanPreserveFloat32@ is a boolean value indicating
    -- whether sign of a zero, Nans and \(\pm\infty\) /can/ be preserved in
    -- 32-bit floating-point computations. It also indicates whether the
    -- @SignedZeroInfNanPreserve@ execution mode /can/ be used for 32-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderSignedZeroInfNanPreserveFloat32 :: Bool
  , -- | #extension-limits-shaderSignedZeroInfNanPreserveFloat64#
    -- @shaderSignedZeroInfNanPreserveFloat64@ is a boolean value indicating
    -- whether sign of a zero, Nans and \(\pm\infty\) /can/ be preserved in
    -- 64-bit floating-point computations. It also indicates whether the
    -- @SignedZeroInfNanPreserve@ execution mode /can/ be used for 64-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderSignedZeroInfNanPreserveFloat64 :: Bool
  , -- | #extension-limits-shaderDenormPreserveFloat16#
    -- @shaderDenormPreserveFloat16@ is a boolean value indicating whether
    -- denormals /can/ be preserved in 16-bit floating-point computations. It
    -- also indicates whether the @DenormPreserve@ execution mode /can/ be used
    -- for 16-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormPreserveFloat16 :: Bool
  , -- | #extension-limits-shaderDenormPreserveFloat32#
    -- @shaderDenormPreserveFloat32@ is a boolean value indicating whether
    -- denormals /can/ be preserved in 32-bit floating-point computations. It
    -- also indicates whether the @DenormPreserve@ execution mode /can/ be used
    -- for 32-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormPreserveFloat32 :: Bool
  , -- | #extension-limits-shaderDenormPreserveFloat64#
    -- @shaderDenormPreserveFloat64@ is a boolean value indicating whether
    -- denormals /can/ be preserved in 64-bit floating-point computations. It
    -- also indicates whether the @DenormPreserve@ execution mode /can/ be used
    -- for 64-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormPreserveFloat64 :: Bool
  , -- | #extension-limits-shaderDenormFlushToZeroFloat16#
    -- @shaderDenormFlushToZeroFloat16@ is a boolean value indicating whether
    -- denormals /can/ be flushed to zero in 16-bit floating-point
    -- computations. It also indicates whether the @DenormFlushToZero@
    -- execution mode /can/ be used for 16-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormFlushToZeroFloat16 :: Bool
  , -- | #extension-limits-shaderDenormFlushToZeroFloat32#
    -- @shaderDenormFlushToZeroFloat32@ is a boolean value indicating whether
    -- denormals /can/ be flushed to zero in 32-bit floating-point
    -- computations. It also indicates whether the @DenormFlushToZero@
    -- execution mode /can/ be used for 32-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormFlushToZeroFloat32 :: Bool
  , -- | #extension-limits-shaderDenormFlushToZeroFloat64#
    -- @shaderDenormFlushToZeroFloat64@ is a boolean value indicating whether
    -- denormals /can/ be flushed to zero in 64-bit floating-point
    -- computations. It also indicates whether the @DenormFlushToZero@
    -- execution mode /can/ be used for 64-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderDenormFlushToZeroFloat64 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTEFloat16#
    -- @shaderRoundingModeRTEFloat16@ is a boolean value indicating whether an
    -- implementation supports the round-to-nearest-even rounding mode for
    -- 16-bit floating-point arithmetic and conversion instructions. It also
    -- indicates whether the @RoundingModeRTE@ execution mode /can/ be used for
    -- 16-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTEFloat16 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTEFloat32#
    -- @shaderRoundingModeRTEFloat32@ is a boolean value indicating whether an
    -- implementation supports the round-to-nearest-even rounding mode for
    -- 32-bit floating-point arithmetic and conversion instructions. It also
    -- indicates whether the @RoundingModeRTE@ execution mode /can/ be used for
    -- 32-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTEFloat32 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTEFloat64#
    -- @shaderRoundingModeRTEFloat64@ is a boolean value indicating whether an
    -- implementation supports the round-to-nearest-even rounding mode for
    -- 64-bit floating-point arithmetic and conversion instructions. It also
    -- indicates whether the @RoundingModeRTE@ execution mode /can/ be used for
    -- 64-bit floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTEFloat64 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTZFloat16#
    -- @shaderRoundingModeRTZFloat16@ is a boolean value indicating whether an
    -- implementation supports the round-towards-zero rounding mode for 16-bit
    -- floating-point arithmetic and conversion instructions. It also indicates
    -- whether the @RoundingModeRTZ@ execution mode /can/ be used for 16-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTZFloat16 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTZFloat32#
    -- @shaderRoundingModeRTZFloat32@ is a boolean value indicating whether an
    -- implementation supports the round-towards-zero rounding mode for 32-bit
    -- floating-point arithmetic and conversion instructions. It also indicates
    -- whether the @RoundingModeRTZ@ execution mode /can/ be used for 32-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTZFloat32 :: Bool
  , -- | #extension-limits-shaderRoundingModeRTZFloat64#
    -- @shaderRoundingModeRTZFloat64@ is a boolean value indicating whether an
    -- implementation supports the round-towards-zero rounding mode for 64-bit
    -- floating-point arithmetic and conversion instructions. It also indicates
    -- whether the @RoundingModeRTZ@ execution mode /can/ be used for 64-bit
    -- floating-point types.
    PhysicalDeviceFloatControlsProperties -> Bool
shaderRoundingModeRTZFloat64 :: Bool
  }
  deriving (Typeable, PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> Bool
$c/= :: PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> Bool
== :: PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> Bool
$c== :: PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFloatControlsProperties)
#endif
deriving instance Show PhysicalDeviceFloatControlsProperties

instance ToCStruct PhysicalDeviceFloatControlsProperties where
  withCStruct :: forall b.
PhysicalDeviceFloatControlsProperties
-> (Ptr PhysicalDeviceFloatControlsProperties -> IO b) -> IO b
withCStruct PhysicalDeviceFloatControlsProperties
x Ptr PhysicalDeviceFloatControlsProperties -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
88 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFloatControlsProperties
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFloatControlsProperties
p PhysicalDeviceFloatControlsProperties
x (Ptr PhysicalDeviceFloatControlsProperties -> IO b
f Ptr PhysicalDeviceFloatControlsProperties
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFloatControlsProperties
p PhysicalDeviceFloatControlsProperties{Bool
ShaderFloatControlsIndependence
shaderRoundingModeRTZFloat64 :: Bool
shaderRoundingModeRTZFloat32 :: Bool
shaderRoundingModeRTZFloat16 :: Bool
shaderRoundingModeRTEFloat64 :: Bool
shaderRoundingModeRTEFloat32 :: Bool
shaderRoundingModeRTEFloat16 :: Bool
shaderDenormFlushToZeroFloat64 :: Bool
shaderDenormFlushToZeroFloat32 :: Bool
shaderDenormFlushToZeroFloat16 :: Bool
shaderDenormPreserveFloat64 :: Bool
shaderDenormPreserveFloat32 :: Bool
shaderDenormPreserveFloat16 :: Bool
shaderSignedZeroInfNanPreserveFloat64 :: Bool
shaderSignedZeroInfNanPreserveFloat32 :: Bool
shaderSignedZeroInfNanPreserveFloat16 :: Bool
roundingModeIndependence :: ShaderFloatControlsIndependence
denormBehaviorIndependence :: ShaderFloatControlsIndependence
$sel:shaderRoundingModeRTZFloat64:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderRoundingModeRTZFloat32:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderRoundingModeRTZFloat16:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderRoundingModeRTEFloat64:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderRoundingModeRTEFloat32:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderRoundingModeRTEFloat16:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormFlushToZeroFloat64:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormFlushToZeroFloat32:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormFlushToZeroFloat16:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormPreserveFloat64:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormPreserveFloat32:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderDenormPreserveFloat16:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderSignedZeroInfNanPreserveFloat64:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderSignedZeroInfNanPreserveFloat32:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:shaderSignedZeroInfNanPreserveFloat16:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties -> Bool
$sel:roundingModeIndependence:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties
-> ShaderFloatControlsIndependence
$sel:denormBehaviorIndependence:PhysicalDeviceFloatControlsProperties :: PhysicalDeviceFloatControlsProperties
-> ShaderFloatControlsIndependence
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
denormBehaviorIndependence)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
roundingModeIndependence)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat16))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat32))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat64))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat16))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat32))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat64))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat16))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat32))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat64))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat16))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat32))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat64))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat16))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat32))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat64))
    IO b
f
  cStructSize :: Int
cStructSize = Int
88
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceFloatControlsProperties -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFloatControlsProperties
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderFloatControlsIndependence)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderFloatControlsIndependence)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceFloatControlsProperties where
  peekCStruct :: Ptr PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
peekCStruct Ptr PhysicalDeviceFloatControlsProperties
p = do
    ShaderFloatControlsIndependence
denormBehaviorIndependence <- forall a. Storable a => Ptr a -> IO a
peek @ShaderFloatControlsIndependence ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderFloatControlsIndependence))
    ShaderFloatControlsIndependence
roundingModeIndependence <- forall a. Storable a => Ptr a -> IO a
peek @ShaderFloatControlsIndependence ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderFloatControlsIndependence))
    Bool32
shaderSignedZeroInfNanPreserveFloat16 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    Bool32
shaderSignedZeroInfNanPreserveFloat32 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
    Bool32
shaderSignedZeroInfNanPreserveFloat64 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat16 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat32 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat64 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat16 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat32 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat64 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat16 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat32 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat64 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat16 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat32 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat64 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFloatControlsProperties
PhysicalDeviceFloatControlsProperties
             ShaderFloatControlsIndependence
denormBehaviorIndependence
             ShaderFloatControlsIndependence
roundingModeIndependence
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSignedZeroInfNanPreserveFloat16)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSignedZeroInfNanPreserveFloat32)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSignedZeroInfNanPreserveFloat64)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormPreserveFloat16)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormPreserveFloat32)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormPreserveFloat64)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormFlushToZeroFloat16)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormFlushToZeroFloat32)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderDenormFlushToZeroFloat64)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTEFloat16)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTEFloat32)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTEFloat64)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTZFloat16)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTZFloat32)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderRoundingModeRTZFloat64)

instance Storable PhysicalDeviceFloatControlsProperties where
  sizeOf :: PhysicalDeviceFloatControlsProperties -> Int
sizeOf ~PhysicalDeviceFloatControlsProperties
_ = Int
88
  alignment :: PhysicalDeviceFloatControlsProperties -> Int
alignment ~PhysicalDeviceFloatControlsProperties
_ = Int
8
  peek :: Ptr PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO ()
poke Ptr PhysicalDeviceFloatControlsProperties
ptr PhysicalDeviceFloatControlsProperties
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFloatControlsProperties
ptr PhysicalDeviceFloatControlsProperties
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceFloatControlsProperties where
  zero :: PhysicalDeviceFloatControlsProperties
zero = ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFloatControlsProperties
PhysicalDeviceFloatControlsProperties
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero