{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_shader_image_atomic_int64 ( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT(..)
, EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION
, pattern EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION
, EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME
, pattern EXT_SHADER_IMAGE_ATOMIC_INT64_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_IMAGE_ATOMIC_INT64_FEATURES_EXT))
data PhysicalDeviceShaderImageAtomicInt64FeaturesEXT = PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
{
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
shaderImageInt64Atomics :: Bool
,
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
sparseImageInt64Atomics :: Bool
}
deriving (Typeable, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
$c/= :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
== :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
$c== :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderImageAtomicInt64FeaturesEXT)
#endif
deriving instance Show PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
instance ToCStruct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> (Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
x Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
x (Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO b
f Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p PhysicalDeviceShaderImageAtomicInt64FeaturesEXT{Bool
sparseImageInt64Atomics :: Bool
shaderImageInt64Atomics :: Bool
$sel:sparseImageInt64Atomics:PhysicalDeviceShaderImageAtomicInt64FeaturesEXT :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
$sel:shaderImageInt64Atomics:PhysicalDeviceShaderImageAtomicInt64FeaturesEXT :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
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 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderImageInt64Atomics))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseImageInt64Atomics))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
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 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
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 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> IO PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
peekCStruct Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p = do
Bool32
shaderImageInt64Atomics <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
sparseImageInt64Atomics <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
shaderImageInt64Atomics)
(Bool32 -> Bool
bool32ToBool Bool32
sparseImageInt64Atomics)
instance Storable PhysicalDeviceShaderImageAtomicInt64FeaturesEXT where
sizeOf :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Int
sizeOf ~PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> Int
alignment ~PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> IO PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
-> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT -> IO ()
poke Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
ptr PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderImageAtomicInt64FeaturesEXT where
zero :: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
type EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION = 1
pattern EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION :: forall a. Integral a => a
$mEXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION = 1
type EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"
pattern EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"