{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_custom_border_color ( SamplerCustomBorderColorCreateInfoEXT(..)
, PhysicalDeviceCustomBorderColorPropertiesEXT(..)
, PhysicalDeviceCustomBorderColorFeaturesEXT(..)
, EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION
, pattern EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION
, EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME
, pattern EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME
) where
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
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.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.CommandBufferBuilding (ClearColorValue)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT))
data SamplerCustomBorderColorCreateInfoEXT = SamplerCustomBorderColorCreateInfoEXT
{
SamplerCustomBorderColorCreateInfoEXT -> ClearColorValue
customBorderColor :: ClearColorValue
,
SamplerCustomBorderColorCreateInfoEXT -> Format
format :: Format
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SamplerCustomBorderColorCreateInfoEXT)
#endif
deriving instance Show SamplerCustomBorderColorCreateInfoEXT
instance ToCStruct SamplerCustomBorderColorCreateInfoEXT where
withCStruct :: SamplerCustomBorderColorCreateInfoEXT
-> (Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b) -> IO b
withCStruct x :: SamplerCustomBorderColorCreateInfoEXT
x f :: Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b
f = Int
-> Int
-> (Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b) -> IO b)
-> (Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr SamplerCustomBorderColorCreateInfoEXT
p -> Ptr SamplerCustomBorderColorCreateInfoEXT
-> SamplerCustomBorderColorCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SamplerCustomBorderColorCreateInfoEXT
p SamplerCustomBorderColorCreateInfoEXT
x (Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b
f Ptr SamplerCustomBorderColorCreateInfoEXT
p)
pokeCStruct :: Ptr SamplerCustomBorderColorCreateInfoEXT
-> SamplerCustomBorderColorCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr SamplerCustomBorderColorCreateInfoEXT
p SamplerCustomBorderColorCreateInfoEXT{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ClearColorValue -> ClearColorValue -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT
-> Int -> Ptr ClearColorValue
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ClearColorValue)) (ClearColorValue
customBorderColor) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Format)) (Format
format)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr SamplerCustomBorderColorCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr SamplerCustomBorderColorCreateInfoEXT
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ClearColorValue -> ClearColorValue -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT
-> Int -> Ptr ClearColorValue
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ClearColorValue)) (ClearColorValue
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCustomBorderColorCreateInfoEXT
p Ptr SamplerCustomBorderColorCreateInfoEXT -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero SamplerCustomBorderColorCreateInfoEXT where
zero :: SamplerCustomBorderColorCreateInfoEXT
zero = ClearColorValue -> Format -> SamplerCustomBorderColorCreateInfoEXT
SamplerCustomBorderColorCreateInfoEXT
ClearColorValue
forall a. Zero a => a
zero
Format
forall a. Zero a => a
zero
data PhysicalDeviceCustomBorderColorPropertiesEXT = PhysicalDeviceCustomBorderColorPropertiesEXT
{
PhysicalDeviceCustomBorderColorPropertiesEXT -> Word32
maxCustomBorderColorSamplers :: Word32 }
deriving (Typeable, PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool
(PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool)
-> (PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool)
-> Eq PhysicalDeviceCustomBorderColorPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool
$c/= :: PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool
== :: PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool
$c== :: PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCustomBorderColorPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceCustomBorderColorPropertiesEXT
instance ToCStruct PhysicalDeviceCustomBorderColorPropertiesEXT where
withCStruct :: PhysicalDeviceCustomBorderColorPropertiesEXT
-> (Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceCustomBorderColorPropertiesEXT
x f :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p -> Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p PhysicalDeviceCustomBorderColorPropertiesEXT
x (Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b
f Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p PhysicalDeviceCustomBorderColorPropertiesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
maxCustomBorderColorSamplers)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceCustomBorderColorPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT
peekCStruct p :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p = do
Word32
maxCustomBorderColorSamplers <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
p Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT)
-> PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT
forall a b. (a -> b) -> a -> b
$ Word32 -> PhysicalDeviceCustomBorderColorPropertiesEXT
PhysicalDeviceCustomBorderColorPropertiesEXT
Word32
maxCustomBorderColorSamplers
instance Storable PhysicalDeviceCustomBorderColorPropertiesEXT where
sizeOf :: PhysicalDeviceCustomBorderColorPropertiesEXT -> Int
sizeOf ~PhysicalDeviceCustomBorderColorPropertiesEXT
_ = 24
alignment :: PhysicalDeviceCustomBorderColorPropertiesEXT -> Int
alignment ~PhysicalDeviceCustomBorderColorPropertiesEXT
_ = 8
peek :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT
peek = Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> IO PhysicalDeviceCustomBorderColorPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
ptr poked :: PhysicalDeviceCustomBorderColorPropertiesEXT
poked = Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
-> PhysicalDeviceCustomBorderColorPropertiesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCustomBorderColorPropertiesEXT
ptr PhysicalDeviceCustomBorderColorPropertiesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceCustomBorderColorPropertiesEXT where
zero :: PhysicalDeviceCustomBorderColorPropertiesEXT
zero = Word32 -> PhysicalDeviceCustomBorderColorPropertiesEXT
PhysicalDeviceCustomBorderColorPropertiesEXT
Word32
forall a. Zero a => a
zero
data PhysicalDeviceCustomBorderColorFeaturesEXT = PhysicalDeviceCustomBorderColorFeaturesEXT
{
PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
customBorderColors :: Bool
,
PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
customBorderColorWithoutFormat :: Bool
}
deriving (Typeable, PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
(PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool)
-> (PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool)
-> Eq PhysicalDeviceCustomBorderColorFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
$c/= :: PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
== :: PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
$c== :: PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCustomBorderColorFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceCustomBorderColorFeaturesEXT
instance ToCStruct PhysicalDeviceCustomBorderColorFeaturesEXT where
withCStruct :: PhysicalDeviceCustomBorderColorFeaturesEXT
-> (Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b) -> IO b
withCStruct x :: PhysicalDeviceCustomBorderColorFeaturesEXT
x f :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p -> Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p PhysicalDeviceCustomBorderColorFeaturesEXT
x (Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b
f Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p PhysicalDeviceCustomBorderColorFeaturesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
customBorderColors))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
customBorderColorWithoutFormat))
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: 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 PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceCustomBorderColorFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT
peekCStruct p :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p = do
Bool32
customBorderColors <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
customBorderColorWithoutFormat <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
p Ptr PhysicalDeviceCustomBorderColorFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT)
-> PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDeviceCustomBorderColorFeaturesEXT
PhysicalDeviceCustomBorderColorFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
customBorderColors) (Bool32 -> Bool
bool32ToBool Bool32
customBorderColorWithoutFormat)
instance Storable PhysicalDeviceCustomBorderColorFeaturesEXT where
sizeOf :: PhysicalDeviceCustomBorderColorFeaturesEXT -> Int
sizeOf ~PhysicalDeviceCustomBorderColorFeaturesEXT
_ = 24
alignment :: PhysicalDeviceCustomBorderColorFeaturesEXT -> Int
alignment ~PhysicalDeviceCustomBorderColorFeaturesEXT
_ = 8
peek :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT
peek = Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> IO PhysicalDeviceCustomBorderColorFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
ptr poked :: PhysicalDeviceCustomBorderColorFeaturesEXT
poked = Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
-> PhysicalDeviceCustomBorderColorFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCustomBorderColorFeaturesEXT
ptr PhysicalDeviceCustomBorderColorFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceCustomBorderColorFeaturesEXT where
zero :: PhysicalDeviceCustomBorderColorFeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceCustomBorderColorFeaturesEXT
PhysicalDeviceCustomBorderColorFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
type EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION = 12
pattern EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_CUSTOM_BORDER_COLOR_SPEC_VERSION :: a
$mEXT_CUSTOM_BORDER_COLOR_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION = 12
type EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"
pattern EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME :: a
$mEXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"