{-# language CPP #-}
-- | = Name
--
-- VK_EXT_shader_atomic_float2 - device extension
--
-- == VK_EXT_shader_atomic_float2
--
-- [__Name String__]
--     @VK_EXT_shader_atomic_float2@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     274
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_shader_atomic_float VK_EXT_shader_atomic_float>
--
-- [__Contact__]
--
--     -   Faith Ekstrand
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_shader_atomic_float2] @gfxstrand%0A*Here describe the issue or question you have about the VK_EXT_shader_atomic_float2 extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2020-08-14
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires the VK_EXT_shader_atomic_float
--         extension.
--
--     -   This extension requires
--         <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/EXT/SPV_EXT_shader_atomic_float_min_max.html SPV_EXT_shader_atomic_float_min_max>
--         and
--         <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/EXT/SPV_EXT_shader_atomic_float16_add.html SPV_EXT_shader_atomic_float16_add>
--
--     -   This extension provides API support for
--         <https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_shader_atomic_float2.txt GLSL_EXT_shader_atomic_float2>
--
-- [__Contributors__]
--
--     -   Faith Ekstrand, Intel
--
-- == Description
--
-- This extension allows a shader to perform 16-bit floating-point atomic
-- operations on buffer and workgroup memory as well as floating-point
-- atomic minimum and maximum operations on buffer, workgroup, and image
-- memory. It advertises the SPIR-V @AtomicFloat16AddEXT@ capability which
-- allows atomic add operations on 16-bit floating-point numbers and the
-- SPIR-V @AtomicFloat16MinMaxEXT@, @AtomicFloat32MinMaxEXT@ and
-- @AtomicFloat64MinMaxEXT@ capabilities which allow atomic minimum and
-- maximum operations on floating-point numbers. The supported operations
-- include @OpAtomicFAddEXT@, @OpAtomicFMinEXT@ and @OpAtomicFMaxEXT@.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceShaderAtomicFloat2FeaturesEXT'
--
-- == New Enum Constants
--
-- -   'EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME'
--
-- -   'EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT'
--
-- == Issues
--
-- 1) Should this extension add support for 16-bit image atomics?
--
-- __RESOLVED__: No. While Vulkan supports creating storage images with
-- 'Vulkan.Core10.Enums.Format.FORMAT_R16_SFLOAT' and doing load and store
-- on them, the data in the shader has a 32-bit representation. Vulkan
-- currently has no facility for even basic reading or writing such images
-- using 16-bit float values in the shader. Adding such functionality would
-- be required before 16-bit image atomics would make sense and is outside
-- the scope of this extension.
--
-- == New SPIR-V Capabilities
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#spirvenv-capabilities-table-AtomicFloat16AddEXT AtomicFloat32MinMaxEXT>
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#spirvenv-capabilities-table-AtomicFloat16MinMaxEXT AtomicFloat32MinMaxEXT>
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#spirvenv-capabilities-table-AtomicFloat32MinMaxEXT AtomicFloat32MinMaxEXT>
--
-- -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#spirvenv-capabilities-table-AtomicFloat64MinMaxEXT AtomicFloat64MinMaxEXT>
--
-- == Version History
--
-- -   Revision 1, 2020-08-14 (Faith Ekstrand)
--
--     -   Internal revisions
--
-- == See Also
--
-- 'PhysicalDeviceShaderAtomicFloat2FeaturesEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_shader_atomic_float2 Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_shader_atomic_float2  ( PhysicalDeviceShaderAtomicFloat2FeaturesEXT(..)
                                                      , EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION
                                                      , pattern EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION
                                                      , EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME
                                                      , pattern EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME
                                                      ) 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.String (IsString)
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.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT))
-- | VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT - Structure describing
-- features supported by VK_EXT_shader_atomic_float2
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceShaderAtomicFloat2FeaturesEXT' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceShaderAtomicFloat2FeaturesEXT' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_shader_atomic_float2 VK_EXT_shader_atomic_float2>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceShaderAtomicFloat2FeaturesEXT = PhysicalDeviceShaderAtomicFloat2FeaturesEXT
  { -- | #features-shaderBufferFloat16Atomics# @shaderBufferFloat16Atomics@
    -- indicates whether shaders /can/ perform 16-bit floating-point load,
    -- store, and exchange atomic operations on storage buffers.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderBufferFloat16Atomics :: Bool
  , -- | #features-shaderBufferFloat16AtomicAdd# @shaderBufferFloat16AtomicAdd@
    -- indicates whether shaders /can/ perform 16-bit floating-point add atomic
    -- operations on storage buffers.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderBufferFloat16AtomicAdd :: Bool
  , -- | #features-shaderBufferFloat16AtomicMinMax#
    -- @shaderBufferFloat16AtomicMinMax@ indicates whether shaders /can/
    -- perform 16-bit floating-point min and max atomic operations on storage
    -- buffers.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderBufferFloat16AtomicMinMax :: Bool
  , -- | #features-shaderBufferFloat32AtomicMinMax#
    -- @shaderBufferFloat32AtomicMinMax@ indicates whether shaders /can/
    -- perform 32-bit floating-point min and max atomic operations on storage
    -- buffers.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderBufferFloat32AtomicMinMax :: Bool
  , -- | #features-shaderBufferFloat64AtomicMinMax#
    -- @shaderBufferFloat64AtomicMinMax@ indicates whether shaders /can/
    -- perform 64-bit floating-point min and max atomic operations on storage
    -- buffers.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderBufferFloat64AtomicMinMax :: Bool
  , -- | #features-shaderSharedFloat16Atomics# @shaderSharedFloat16Atomics@
    -- indicates whether shaders /can/ perform 16-bit floating-point load,
    -- store and exchange atomic operations on shared and payload memory.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderSharedFloat16Atomics :: Bool
  , -- | #features-shaderSharedFloat16AtomicAdd# @shaderSharedFloat16AtomicAdd@
    -- indicates whether shaders /can/ perform 16-bit floating-point add atomic
    -- operations on shared and payload memory.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderSharedFloat16AtomicAdd :: Bool
  , -- | #features-shaderSharedFloat16AtomicMinMax#
    -- @shaderSharedFloat16AtomicMinMax@ indicates whether shaders /can/
    -- perform 16-bit floating-point min and max atomic operations on shared
    -- and payload memory.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderSharedFloat16AtomicMinMax :: Bool
  , -- | #features-shaderSharedFloat32AtomicMinMax#
    -- @shaderSharedFloat32AtomicMinMax@ indicates whether shaders /can/
    -- perform 32-bit floating-point min and max atomic operations on shared
    -- and payload memory.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderSharedFloat32AtomicMinMax :: Bool
  , -- | #features-shaderSharedFloat64AtomicMinMax#
    -- @shaderSharedFloat64AtomicMinMax@ indicates whether shaders /can/
    -- perform 64-bit floating-point min and max atomic operations on shared
    -- and payload memory.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderSharedFloat64AtomicMinMax :: Bool
  , -- | #features-shaderImageFloat32AtomicMinMax#
    -- @shaderImageFloat32AtomicMinMax@ indicates whether shaders /can/ perform
    -- 32-bit floating-point min and max atomic image operations.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
shaderImageFloat32AtomicMinMax :: Bool
  , -- | #features-sparseImageFloat32AtomicMinMax#
    -- @sparseImageFloat32AtomicMinMax@ indicates whether 32-bit floating-point
    -- min and max atomic operations /can/ be used on sparse images.
    PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
sparseImageFloat32AtomicMinMax :: Bool
  }
  deriving (Typeable, PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$c/= :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
== :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$c== :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderAtomicFloat2FeaturesEXT)
#endif
deriving instance Show PhysicalDeviceShaderAtomicFloat2FeaturesEXT

instance ToCStruct PhysicalDeviceShaderAtomicFloat2FeaturesEXT where
  withCStruct :: forall b.
PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> (Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceShaderAtomicFloat2FeaturesEXT
x Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p PhysicalDeviceShaderAtomicFloat2FeaturesEXT
x (Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> IO b
f Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p PhysicalDeviceShaderAtomicFloat2FeaturesEXT{Bool
sparseImageFloat32AtomicMinMax :: Bool
shaderImageFloat32AtomicMinMax :: Bool
shaderSharedFloat64AtomicMinMax :: Bool
shaderSharedFloat32AtomicMinMax :: Bool
shaderSharedFloat16AtomicMinMax :: Bool
shaderSharedFloat16AtomicAdd :: Bool
shaderSharedFloat16Atomics :: Bool
shaderBufferFloat64AtomicMinMax :: Bool
shaderBufferFloat32AtomicMinMax :: Bool
shaderBufferFloat16AtomicMinMax :: Bool
shaderBufferFloat16AtomicAdd :: Bool
shaderBufferFloat16Atomics :: Bool
$sel:sparseImageFloat32AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderImageFloat32AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderSharedFloat64AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderSharedFloat32AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderSharedFloat16AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderSharedFloat16AtomicAdd:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderSharedFloat16Atomics:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderBufferFloat64AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderBufferFloat32AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderBufferFloat16AtomicMinMax:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderBufferFloat16AtomicAdd:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
$sel:shaderBufferFloat16Atomics:PhysicalDeviceShaderAtomicFloat2FeaturesEXT :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderBufferFloat16Atomics))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderBufferFloat16AtomicAdd))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderBufferFloat16AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderBufferFloat32AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderBufferFloat64AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSharedFloat16Atomics))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSharedFloat16AtomicAdd))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSharedFloat16AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSharedFloat32AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSharedFloat64AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderImageFloat32AtomicMinMax))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseImageFloat32AtomicMinMax))
    IO b
f
  cStructSize :: Int
cStructSize = Int
64
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
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 PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceShaderAtomicFloat2FeaturesEXT where
  peekCStruct :: Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
-> IO PhysicalDeviceShaderAtomicFloat2FeaturesEXT
peekCStruct Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p = do
    Bool32
shaderBufferFloat16Atomics <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    Bool32
shaderBufferFloat16AtomicAdd <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
shaderBufferFloat16AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    Bool32
shaderBufferFloat32AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
    Bool32
shaderBufferFloat64AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
    Bool32
shaderSharedFloat16Atomics <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    Bool32
shaderSharedFloat16AtomicAdd <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
    Bool32
shaderSharedFloat16AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32))
    Bool32
shaderSharedFloat32AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32))
    Bool32
shaderSharedFloat64AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32))
    Bool32
shaderImageFloat32AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32))
    Bool32
sparseImageFloat32AtomicMinMax <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderAtomicFloat2FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT
PhysicalDeviceShaderAtomicFloat2FeaturesEXT
             (Bool32 -> Bool
bool32ToBool Bool32
shaderBufferFloat16Atomics)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderBufferFloat16AtomicAdd)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderBufferFloat16AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderBufferFloat32AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderBufferFloat64AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSharedFloat16Atomics)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSharedFloat16AtomicAdd)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSharedFloat16AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSharedFloat32AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderSharedFloat64AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
shaderImageFloat32AtomicMinMax)
             (Bool32 -> Bool
bool32ToBool Bool32
sparseImageFloat32AtomicMinMax)

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

instance Zero PhysicalDeviceShaderAtomicFloat2FeaturesEXT where
  zero :: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceShaderAtomicFloat2FeaturesEXT
PhysicalDeviceShaderAtomicFloat2FeaturesEXT
           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


type EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION"
pattern EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION :: forall a. Integral a => a
$mEXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION = 1


type EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"

-- No documentation found for TopLevel "VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME"
pattern EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"