{-# language CPP #-}
module Vulkan.Core12.Promoted_From_VK_KHR_shader_float_controls  ( PhysicalDeviceFloatControlsProperties(..)
                                                                 , StructureType(..)
                                                                 , ShaderFloatControlsIndependence(..)
                                                                 ) where

import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core12.Enums.ShaderFloatControlsIndependence (ShaderFloatControlsIndependence)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
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
--
-- = Members
--
-- The members of the 'PhysicalDeviceFloatControlsProperties' structure
-- describe the following implementation-dependent limits:
--
-- = Description
--
-- If the 'PhysicalDeviceFloatControlsProperties' structure is included in
-- the @pNext@ chain of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2',
-- it is filled with the implementation-dependent limits.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core12.Enums.ShaderFloatControlsIndependence.ShaderFloatControlsIndependence',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceFloatControlsProperties = PhysicalDeviceFloatControlsProperties
  { -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
  , -- | @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
(PhysicalDeviceFloatControlsProperties
 -> PhysicalDeviceFloatControlsProperties -> Bool)
-> (PhysicalDeviceFloatControlsProperties
    -> PhysicalDeviceFloatControlsProperties -> Bool)
-> Eq PhysicalDeviceFloatControlsProperties
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 :: PhysicalDeviceFloatControlsProperties
-> (Ptr PhysicalDeviceFloatControlsProperties -> IO b) -> IO b
withCStruct x :: PhysicalDeviceFloatControlsProperties
x f :: Ptr PhysicalDeviceFloatControlsProperties -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceFloatControlsProperties -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 88 8 ((Ptr PhysicalDeviceFloatControlsProperties -> IO b) -> IO b)
-> (Ptr PhysicalDeviceFloatControlsProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceFloatControlsProperties
p -> Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO b -> IO b
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 :: Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceFloatControlsProperties
p PhysicalDeviceFloatControlsProperties{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
denormBehaviorIndependence)
    Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
roundingModeIndependence)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat16))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat32))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSignedZeroInfNanPreserveFloat64))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat16))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat32))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormPreserveFloat64))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat16))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat32))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderDenormFlushToZeroFloat64))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat16))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat32))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTEFloat64))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat16))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat32))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderRoundingModeRTZFloat64))
    IO b
f
  cStructSize :: Int
cStructSize = 88
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PhysicalDeviceFloatControlsProperties -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceFloatControlsProperties
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
forall a. Zero a => a
zero)
    Ptr ShaderFloatControlsIndependence
-> ShaderFloatControlsIndependence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr ShaderFloatControlsIndependence)) (ShaderFloatControlsIndependence
forall a. Zero a => a
zero)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceFloatControlsProperties where
  peekCStruct :: Ptr PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
peekCStruct p :: Ptr PhysicalDeviceFloatControlsProperties
p = do
    ShaderFloatControlsIndependence
denormBehaviorIndependence <- Ptr ShaderFloatControlsIndependence
-> IO ShaderFloatControlsIndependence
forall a. Storable a => Ptr a -> IO a
peek @ShaderFloatControlsIndependence ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ShaderFloatControlsIndependence))
    ShaderFloatControlsIndependence
roundingModeIndependence <- Ptr ShaderFloatControlsIndependence
-> IO ShaderFloatControlsIndependence
forall a. Storable a => Ptr a -> IO a
peek @ShaderFloatControlsIndependence ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties
-> Int -> Ptr ShaderFloatControlsIndependence
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr ShaderFloatControlsIndependence))
    Bool32
shaderSignedZeroInfNanPreserveFloat16 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
    Bool32
shaderSignedZeroInfNanPreserveFloat32 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32))
    Bool32
shaderSignedZeroInfNanPreserveFloat64 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat16 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat32 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32))
    Bool32
shaderDenormPreserveFloat64 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat16 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat32 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Bool32))
    Bool32
shaderDenormFlushToZeroFloat64 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat16 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat32 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTEFloat64 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat16 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat32 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32))
    Bool32
shaderRoundingModeRTZFloat64 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFloatControlsProperties
p Ptr PhysicalDeviceFloatControlsProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32))
    PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFloatControlsProperties
 -> IO PhysicalDeviceFloatControlsProperties)
-> PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
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
_ = 88
  alignment :: PhysicalDeviceFloatControlsProperties -> Int
alignment ~PhysicalDeviceFloatControlsProperties
_ = 8
  peek :: Ptr PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
peek = Ptr PhysicalDeviceFloatControlsProperties
-> IO PhysicalDeviceFloatControlsProperties
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO ()
poke ptr :: Ptr PhysicalDeviceFloatControlsProperties
ptr poked :: PhysicalDeviceFloatControlsProperties
poked = Ptr PhysicalDeviceFloatControlsProperties
-> PhysicalDeviceFloatControlsProperties -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFloatControlsProperties
ptr PhysicalDeviceFloatControlsProperties
poked (() -> IO ()
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
           ShaderFloatControlsIndependence
forall a. Zero a => a
zero
           ShaderFloatControlsIndependence
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero