{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_pipeline_properties ( getPipelinePropertiesEXT
, pattern STRUCTURE_TYPE_PIPELINE_INFO_EXT
, PipelinePropertiesIdentifierEXT(..)
, PhysicalDevicePipelinePropertiesFeaturesEXT(..)
, PipelineInfoEXT
, EXT_PIPELINE_PROPERTIES_SPEC_VERSION
, pattern EXT_PIPELINE_PROPERTIES_SPEC_VERSION
, EXT_PIPELINE_PROPERTIES_EXTENSION_NAME
, pattern EXT_PIPELINE_PROPERTIES_EXTENSION_NAME
, PipelineInfoKHR(..)
) where
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
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 Control.Monad.IO.Class (MonadIO)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.NamedType ((:::))
import Vulkan.CStruct.Extends (BaseOutStructure)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkGetPipelinePropertiesEXT))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Extensions.VK_KHR_pipeline_executable_properties (PipelineInfoKHR)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.APIConstants (UUID_SIZE)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_pipeline_executable_properties (PipelineInfoKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPipelinePropertiesEXT
:: FunPtr (Ptr Device_T -> Ptr PipelineInfoEXT -> Ptr BaseOutStructure -> IO Result) -> Ptr Device_T -> Ptr PipelineInfoEXT -> Ptr BaseOutStructure -> IO Result
getPipelinePropertiesEXT :: forall io
. (MonadIO io)
=>
Device
->
PipelineInfoEXT
->
("pipelineProperties" ::: Ptr BaseOutStructure)
-> io ()
getPipelinePropertiesEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineInfoEXT
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> io ()
getPipelinePropertiesEXT Device
device
PipelineInfoEXT
pipelineInfo
"pipelineProperties" ::: Ptr BaseOutStructure
pipelineProperties = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkGetPipelinePropertiesEXTPtr :: FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
vkGetPipelinePropertiesEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
pVkGetPipelinePropertiesEXT (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
vkGetPipelinePropertiesEXTPtr FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPipelinePropertiesEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPipelinePropertiesEXT' :: Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result
vkGetPipelinePropertiesEXT' = FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
-> Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result
mkVkGetPipelinePropertiesEXT FunPtr
(Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result)
vkGetPipelinePropertiesEXTPtr
"pPipelineInfo" ::: Ptr PipelineInfoEXT
pPipelineInfo <- ((("pPipelineInfo" ::: Ptr PipelineInfoEXT) -> IO ()) -> IO ())
-> ContT () IO ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPipelineInfo" ::: Ptr PipelineInfoEXT) -> IO ()) -> IO ())
-> ContT () IO ("pPipelineInfo" ::: Ptr PipelineInfoEXT))
-> ((("pPipelineInfo" ::: Ptr PipelineInfoEXT) -> IO ()) -> IO ())
-> ContT () IO ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
forall a b. (a -> b) -> a -> b
$ PipelineInfoEXT
-> (("pPipelineInfo" ::: Ptr PipelineInfoEXT) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PipelineInfoEXT
pipelineInfo)
Result
r <- IO Result -> ContT () IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPipelinePropertiesEXT" (Ptr Device_T
-> ("pPipelineInfo" ::: Ptr PipelineInfoEXT)
-> ("pipelineProperties" ::: Ptr BaseOutStructure)
-> IO Result
vkGetPipelinePropertiesEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pPipelineInfo" ::: Ptr PipelineInfoEXT
pPipelineInfo
("pipelineProperties" ::: Ptr BaseOutStructure
pipelineProperties))
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
pattern $bSTRUCTURE_TYPE_PIPELINE_INFO_EXT :: StructureType
$mSTRUCTURE_TYPE_PIPELINE_INFO_EXT :: forall {r}. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_PIPELINE_INFO_EXT = STRUCTURE_TYPE_PIPELINE_INFO_KHR
data PipelinePropertiesIdentifierEXT = PipelinePropertiesIdentifierEXT
{
PipelinePropertiesIdentifierEXT -> ByteString
pipelineIdentifier :: ByteString }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelinePropertiesIdentifierEXT)
#endif
deriving instance Show PipelinePropertiesIdentifierEXT
instance ToCStruct PipelinePropertiesIdentifierEXT where
withCStruct :: forall b.
PipelinePropertiesIdentifierEXT
-> (Ptr PipelinePropertiesIdentifierEXT -> IO b) -> IO b
withCStruct PipelinePropertiesIdentifierEXT
x Ptr PipelinePropertiesIdentifierEXT -> IO b
f = Int -> (Ptr PipelinePropertiesIdentifierEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PipelinePropertiesIdentifierEXT -> IO b) -> IO b)
-> (Ptr PipelinePropertiesIdentifierEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelinePropertiesIdentifierEXT
p -> Ptr PipelinePropertiesIdentifierEXT
-> PipelinePropertiesIdentifierEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelinePropertiesIdentifierEXT
p PipelinePropertiesIdentifierEXT
x (Ptr PipelinePropertiesIdentifierEXT -> IO b
f Ptr PipelinePropertiesIdentifierEXT
p)
pokeCStruct :: forall b.
Ptr PipelinePropertiesIdentifierEXT
-> PipelinePropertiesIdentifierEXT -> IO b -> IO b
pokeCStruct Ptr PipelinePropertiesIdentifierEXT
p PipelinePropertiesIdentifierEXT{ByteString
pipelineIdentifier :: ByteString
$sel:pipelineIdentifier:PipelinePropertiesIdentifierEXT :: PipelinePropertiesIdentifierEXT -> ByteString
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
pipelineIdentifier)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PipelinePropertiesIdentifierEXT -> IO b -> IO b
pokeZeroCStruct Ptr PipelinePropertiesIdentifierEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
forall a. Monoid a => a
mempty)
IO b
f
instance FromCStruct PipelinePropertiesIdentifierEXT where
peekCStruct :: Ptr PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT
peekCStruct Ptr PipelinePropertiesIdentifierEXT
p = do
ByteString
pipelineIdentifier <- Ptr (FixedArray UUID_SIZE Word8) -> IO ByteString
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> IO ByteString
peekByteStringFromSizedVectorPtr ((Ptr PipelinePropertiesIdentifierEXT
p Ptr PipelinePropertiesIdentifierEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray UUID_SIZE Word8)))
PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT)
-> PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT
forall a b. (a -> b) -> a -> b
$ ByteString -> PipelinePropertiesIdentifierEXT
PipelinePropertiesIdentifierEXT
ByteString
pipelineIdentifier
instance Storable PipelinePropertiesIdentifierEXT where
sizeOf :: PipelinePropertiesIdentifierEXT -> Int
sizeOf ~PipelinePropertiesIdentifierEXT
_ = Int
32
alignment :: PipelinePropertiesIdentifierEXT -> Int
alignment ~PipelinePropertiesIdentifierEXT
_ = Int
8
peek :: Ptr PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT
peek = Ptr PipelinePropertiesIdentifierEXT
-> IO PipelinePropertiesIdentifierEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelinePropertiesIdentifierEXT
-> PipelinePropertiesIdentifierEXT -> IO ()
poke Ptr PipelinePropertiesIdentifierEXT
ptr PipelinePropertiesIdentifierEXT
poked = Ptr PipelinePropertiesIdentifierEXT
-> PipelinePropertiesIdentifierEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelinePropertiesIdentifierEXT
ptr PipelinePropertiesIdentifierEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelinePropertiesIdentifierEXT where
zero :: PipelinePropertiesIdentifierEXT
zero = ByteString -> PipelinePropertiesIdentifierEXT
PipelinePropertiesIdentifierEXT
ByteString
forall a. Monoid a => a
mempty
data PhysicalDevicePipelinePropertiesFeaturesEXT = PhysicalDevicePipelinePropertiesFeaturesEXT
{
PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
pipelinePropertiesIdentifier :: Bool }
deriving (Typeable, PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
(PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool)
-> (PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool)
-> Eq PhysicalDevicePipelinePropertiesFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
$c/= :: PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
== :: PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
$c== :: PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePipelinePropertiesFeaturesEXT)
#endif
deriving instance Show PhysicalDevicePipelinePropertiesFeaturesEXT
instance ToCStruct PhysicalDevicePipelinePropertiesFeaturesEXT where
withCStruct :: forall b.
PhysicalDevicePipelinePropertiesFeaturesEXT
-> (Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDevicePipelinePropertiesFeaturesEXT
x Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p -> Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p PhysicalDevicePipelinePropertiesFeaturesEXT
x (Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b
f Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p PhysicalDevicePipelinePropertiesFeaturesEXT{Bool
pipelinePropertiesIdentifier :: Bool
$sel:pipelinePropertiesIdentifier:PhysicalDevicePipelinePropertiesFeaturesEXT :: PhysicalDevicePipelinePropertiesFeaturesEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelinePropertiesIdentifier))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePipelinePropertiesFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDevicePipelinePropertiesFeaturesEXT where
peekCStruct :: Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT
peekCStruct Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p = do
Bool32
pipelinePropertiesIdentifier <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
p Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT)
-> PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDevicePipelinePropertiesFeaturesEXT
PhysicalDevicePipelinePropertiesFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
pipelinePropertiesIdentifier)
instance Storable PhysicalDevicePipelinePropertiesFeaturesEXT where
sizeOf :: PhysicalDevicePipelinePropertiesFeaturesEXT -> Int
sizeOf ~PhysicalDevicePipelinePropertiesFeaturesEXT
_ = Int
24
alignment :: PhysicalDevicePipelinePropertiesFeaturesEXT -> Int
alignment ~PhysicalDevicePipelinePropertiesFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT
peek = Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> IO PhysicalDevicePipelinePropertiesFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> IO ()
poke Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
ptr PhysicalDevicePipelinePropertiesFeaturesEXT
poked = Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
-> PhysicalDevicePipelinePropertiesFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePipelinePropertiesFeaturesEXT
ptr PhysicalDevicePipelinePropertiesFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePipelinePropertiesFeaturesEXT where
zero :: PhysicalDevicePipelinePropertiesFeaturesEXT
zero = Bool -> PhysicalDevicePipelinePropertiesFeaturesEXT
PhysicalDevicePipelinePropertiesFeaturesEXT
Bool
forall a. Zero a => a
zero
type PipelineInfoEXT = PipelineInfoKHR
type EXT_PIPELINE_PROPERTIES_SPEC_VERSION = 1
pattern EXT_PIPELINE_PROPERTIES_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_PIPELINE_PROPERTIES_SPEC_VERSION :: forall a. Integral a => a
$mEXT_PIPELINE_PROPERTIES_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_PIPELINE_PROPERTIES_SPEC_VERSION = 1
type EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"
pattern EXT_PIPELINE_PROPERTIES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_PIPELINE_PROPERTIES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_PIPELINE_PROPERTIES_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"