{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_maintenance4 ( getDeviceBufferMemoryRequirementsKHR
, getDeviceImageMemoryRequirementsKHR
, getDeviceImageSparseMemoryRequirementsKHR
, DeviceBufferMemoryRequirementsKHR(..)
, DeviceImageMemoryRequirementsKHR(..)
, PhysicalDeviceMaintenance4FeaturesKHR(..)
, PhysicalDeviceMaintenance4PropertiesKHR(..)
, KHR_MAINTENANCE_4_SPEC_VERSION
, pattern KHR_MAINTENANCE_4_SPEC_VERSION
, KHR_MAINTENANCE_4_EXTENSION_NAME
, pattern KHR_MAINTENANCE_4_EXTENSION_NAME
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
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 Data.Vector (generateM)
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 (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (withSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Buffer (BufferCreateInfo)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceBufferMemoryRequirementsKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceImageMemoryRequirementsKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceImageSparseMemoryRequirementsKHR))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.Core10.Enums.ImageAspectFlagBits (ImageAspectFlagBits)
import Vulkan.Core10.Image (ImageCreateInfo)
import Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.CStruct.Extends (SomeStruct(..))
import Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (SparseImageMemoryRequirements2)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceBufferMemoryRequirementsKHR
:: FunPtr (Ptr Device_T -> Ptr DeviceBufferMemoryRequirementsKHR -> Ptr (SomeStruct MemoryRequirements2) -> IO ()) -> Ptr Device_T -> Ptr DeviceBufferMemoryRequirementsKHR -> Ptr (SomeStruct MemoryRequirements2) -> IO ()
getDeviceBufferMemoryRequirementsKHR :: forall a io
. (Extendss MemoryRequirements2 a, PokeChain a, PeekChain a, MonadIO io)
=>
Device
->
("info" ::: DeviceBufferMemoryRequirementsKHR)
-> io (MemoryRequirements2 a)
getDeviceBufferMemoryRequirementsKHR :: Device
-> ("info" ::: DeviceBufferMemoryRequirementsKHR)
-> io (MemoryRequirements2 a)
getDeviceBufferMemoryRequirementsKHR Device
device "info" ::: DeviceBufferMemoryRequirementsKHR
info = IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a))
-> (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceBufferMemoryRequirementsKHRPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceBufferMemoryRequirementsKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
pVkGetDeviceBufferMemoryRequirementsKHR (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceBufferMemoryRequirementsKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
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 vkGetDeviceBufferMemoryRequirementsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetDeviceBufferMemoryRequirementsKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetDeviceBufferMemoryRequirementsKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
mkVkGetDeviceBufferMemoryRequirementsKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceBufferMemoryRequirementsKHRPtr
"pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
pInfo <- ((("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)))
-> ((("pInfo"
::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
forall a b. (a -> b) -> a -> b
$ ("info" ::: DeviceBufferMemoryRequirementsKHR)
-> (("pInfo"
::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("info" ::: DeviceBufferMemoryRequirementsKHR
info)
Ptr (MemoryRequirements2 a)
pPMemoryRequirements <- ((Ptr (MemoryRequirements2 a) -> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (Ptr (MemoryRequirements2 a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct (MemoryRequirements2 a) =>
(Ptr (MemoryRequirements2 a) -> IO b) -> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2 _))
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceBufferMemoryRequirementsKHR" (Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetDeviceBufferMemoryRequirementsKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
pInfo (Ptr (MemoryRequirements2 a)
-> "pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (MemoryRequirements2 a)
pPMemoryRequirements)))
MemoryRequirements2 a
pMemoryRequirements <- IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ Ptr (MemoryRequirements2 a) -> IO (MemoryRequirements2 a)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2 _) Ptr (MemoryRequirements2 a)
pPMemoryRequirements
MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2 a
pMemoryRequirements)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceImageMemoryRequirementsKHR
:: FunPtr (Ptr Device_T -> Ptr DeviceImageMemoryRequirementsKHR -> Ptr (SomeStruct MemoryRequirements2) -> IO ()) -> Ptr Device_T -> Ptr DeviceImageMemoryRequirementsKHR -> Ptr (SomeStruct MemoryRequirements2) -> IO ()
getDeviceImageMemoryRequirementsKHR :: forall a io
. (Extendss MemoryRequirements2 a, PokeChain a, PeekChain a, MonadIO io)
=>
Device
->
("info" ::: DeviceImageMemoryRequirementsKHR)
-> io (MemoryRequirements2 a)
getDeviceImageMemoryRequirementsKHR :: Device
-> ("info" ::: DeviceImageMemoryRequirementsKHR)
-> io (MemoryRequirements2 a)
getDeviceImageMemoryRequirementsKHR Device
device "info" ::: DeviceImageMemoryRequirementsKHR
info = IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a))
-> (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceImageMemoryRequirementsKHRPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceImageMemoryRequirementsKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
pVkGetDeviceImageMemoryRequirementsKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceImageMemoryRequirementsKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
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 vkGetDeviceImageMemoryRequirementsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetDeviceImageMemoryRequirementsKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetDeviceImageMemoryRequirementsKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
mkVkGetDeviceImageMemoryRequirementsKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetDeviceImageMemoryRequirementsKHRPtr
"pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
pInfo <- ((("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)))
-> ((("pInfo"
::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
forall a b. (a -> b) -> a -> b
$ ("info" ::: DeviceImageMemoryRequirementsKHR)
-> (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("info" ::: DeviceImageMemoryRequirementsKHR
info)
Ptr (MemoryRequirements2 a)
pPMemoryRequirements <- ((Ptr (MemoryRequirements2 a) -> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (Ptr (MemoryRequirements2 a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct (MemoryRequirements2 a) =>
(Ptr (MemoryRequirements2 a) -> IO b) -> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2 _))
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceImageMemoryRequirementsKHR" (Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetDeviceImageMemoryRequirementsKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
pInfo (Ptr (MemoryRequirements2 a)
-> "pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (MemoryRequirements2 a)
pPMemoryRequirements)))
MemoryRequirements2 a
pMemoryRequirements <- IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ Ptr (MemoryRequirements2 a) -> IO (MemoryRequirements2 a)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2 _) Ptr (MemoryRequirements2 a)
pPMemoryRequirements
MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2 a
pMemoryRequirements)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceImageSparseMemoryRequirementsKHR
:: FunPtr (Ptr Device_T -> Ptr DeviceImageMemoryRequirementsKHR -> Ptr Word32 -> Ptr SparseImageMemoryRequirements2 -> IO ()) -> Ptr Device_T -> Ptr DeviceImageMemoryRequirementsKHR -> Ptr Word32 -> Ptr SparseImageMemoryRequirements2 -> IO ()
getDeviceImageSparseMemoryRequirementsKHR :: forall io
. (MonadIO io)
=>
Device
->
("info" ::: DeviceImageMemoryRequirementsKHR)
-> io (("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2))
getDeviceImageSparseMemoryRequirementsKHR :: Device
-> ("info" ::: DeviceImageMemoryRequirementsKHR)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
getDeviceImageSparseMemoryRequirementsKHR Device
device "info" ::: DeviceImageMemoryRequirementsKHR
info = IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> (ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> io
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceImageSparseMemoryRequirementsKHRPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
vkGetDeviceImageSparseMemoryRequirementsKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
pVkGetDeviceImageSparseMemoryRequirementsKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
())
-> IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
vkGetDeviceImageSparseMemoryRequirementsKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
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 vkGetDeviceImageSparseMemoryRequirementsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetDeviceImageSparseMemoryRequirementsKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ()
vkGetDeviceImageSparseMemoryRequirementsKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ()
mkVkGetDeviceImageSparseMemoryRequirementsKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
vkGetDeviceImageSparseMemoryRequirementsKHRPtr
let device' :: Ptr Device_T
device' = Device -> Ptr Device_T
deviceHandle (Device
device)
"pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
pInfo <- ((("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)))
-> ((("pInfo"
::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
forall a b. (a -> b) -> a -> b
$ ("info" ::: DeviceImageMemoryRequirementsKHR)
-> (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("info" ::: DeviceImageMemoryRequirementsKHR
info)
"pSparseMemoryRequirementCount" ::: Ptr Word32
pPSparseMemoryRequirementCount <- ((("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirementCount" ::: Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirementCount" ::: Ptr Word32))
-> ((("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirementCount" ::: Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> (("pSparseMemoryRequirementCount" ::: Ptr Word32) -> IO ())
-> (("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSparseMemoryRequirementCount" ::: Ptr Word32)
forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) ("pSparseMemoryRequirementCount" ::: Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
free
IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
())
-> IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceImageSparseMemoryRequirementsKHR" (Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ()
vkGetDeviceImageSparseMemoryRequirementsKHR' Ptr Device_T
device' "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
pInfo ("pSparseMemoryRequirementCount" ::: Ptr Word32
pPSparseMemoryRequirementCount) ("pSparseMemoryRequirements" ::: Ptr SparseImageMemoryRequirements2
forall a. Ptr a
nullPtr))
Word32
pSparseMemoryRequirementCount <- IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32)
-> IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pSparseMemoryRequirementCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSparseMemoryRequirementCount" ::: Ptr Word32
pPSparseMemoryRequirementCount
"pSparseMemoryRequirements" ::: Ptr SparseImageMemoryRequirements2
pPSparseMemoryRequirements <- ((("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2))
-> ((("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
forall a b. (a -> b) -> a -> b
$ IO
("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> (("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ())
-> (("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
forall a. Int -> IO (Ptr a)
callocBytes @SparseImageMemoryRequirements2 ((Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pSparseMemoryRequirementCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
64)) ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ()
forall a. Ptr a -> IO ()
free
[()]
_ <- (Int
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
())
-> [Int]
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
[()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> ((()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
())
-> ((()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall a b. (a -> b) -> a -> b
$ ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pSparseMemoryRequirements" ::: Ptr SparseImageMemoryRequirements2
pPSparseMemoryRequirements ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> Int
-> "pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
64) :: Ptr SparseImageMemoryRequirements2) (IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ((()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> (()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ()
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pSparseMemoryRequirementCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1]
IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
())
-> IO ()
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceImageSparseMemoryRequirementsKHR" (Ptr Device_T
-> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("pSparseMemoryRequirementCount" ::: Ptr Word32)
-> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO ()
vkGetDeviceImageSparseMemoryRequirementsKHR' Ptr Device_T
device' "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
pInfo ("pSparseMemoryRequirementCount" ::: Ptr Word32
pPSparseMemoryRequirementCount) (("pSparseMemoryRequirements" ::: Ptr SparseImageMemoryRequirements2
pPSparseMemoryRequirements)))
Word32
pSparseMemoryRequirementCount' <- IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32)
-> IO Word32
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pSparseMemoryRequirementCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSparseMemoryRequirementCount" ::: Ptr Word32
pPSparseMemoryRequirementCount
"sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2
pSparseMemoryRequirements' <- IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO SparseImageMemoryRequirements2)
-> IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pSparseMemoryRequirementCount')) (\Int
i -> ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> IO SparseImageMemoryRequirements2
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SparseImageMemoryRequirements2 ((("pSparseMemoryRequirements" ::: Ptr SparseImageMemoryRequirements2
pPSparseMemoryRequirements) ("pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2)
-> Int
-> "pSparseMemoryRequirements"
::: Ptr SparseImageMemoryRequirements2
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
64 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SparseImageMemoryRequirements2)))
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2))
-> ("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
-> ContT
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
IO
("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2)
forall a b. (a -> b) -> a -> b
$ ("sparseMemoryRequirements"
::: Vector SparseImageMemoryRequirements2
pSparseMemoryRequirements')
data DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirementsKHR
{
("info" ::: DeviceBufferMemoryRequirementsKHR)
-> SomeStruct BufferCreateInfo
createInfo :: SomeStruct BufferCreateInfo }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceBufferMemoryRequirementsKHR)
#endif
deriving instance Show DeviceBufferMemoryRequirementsKHR
instance ToCStruct DeviceBufferMemoryRequirementsKHR where
withCStruct :: ("info" ::: DeviceBufferMemoryRequirementsKHR)
-> (("pInfo"
::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b)
-> IO b
withCStruct "info" ::: DeviceBufferMemoryRequirementsKHR
x ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b
f = Int
-> (("pInfo"
::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b)
-> IO b)
-> (("pInfo"
::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p -> ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("info" ::: DeviceBufferMemoryRequirementsKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p "info" ::: DeviceBufferMemoryRequirementsKHR
x (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b
f "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p)
pokeCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("info" ::: DeviceBufferMemoryRequirementsKHR) -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p DeviceBufferMemoryRequirementsKHR{SomeStruct BufferCreateInfo
createInfo :: SomeStruct BufferCreateInfo
$sel:createInfo:DeviceBufferMemoryRequirementsKHR :: ("info" ::: DeviceBufferMemoryRequirementsKHR)
-> SomeStruct BufferCreateInfo
..} 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 (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR)
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 (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (BufferCreateInfo '[])
pCreateInfo'' <- ((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (BufferCreateInfo '[])) (((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[])))
-> ((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (BufferCreateInfo '[]) -> IO b
cont -> SomeStruct BufferCreateInfo
-> (forall (es :: [*]).
(Extendss BufferCreateInfo es, PokeChain es) =>
Ptr (BufferCreateInfo es) -> IO b)
-> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @BufferCreateInfo (SomeStruct BufferCreateInfo
createInfo) (Ptr (BufferCreateInfo '[]) -> IO b
cont (Ptr (BufferCreateInfo '[]) -> IO b)
-> (Ptr (BufferCreateInfo es) -> Ptr (BufferCreateInfo '[]))
-> Ptr (BufferCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (BufferCreateInfo es) -> Ptr (BufferCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
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 (BufferCreateInfo '[]))
-> Ptr (BufferCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (BufferCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (BufferCreateInfo _)))) Ptr (BufferCreateInfo '[])
pCreateInfo''
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 = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p 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 (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR)
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 (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (BufferCreateInfo '[])
pCreateInfo'' <- ((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (BufferCreateInfo '[])) (((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[])))
-> ((Ptr (BufferCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (BufferCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (BufferCreateInfo '[]) -> IO b
cont -> SomeStruct BufferCreateInfo
-> (forall (es :: [*]).
(Extendss BufferCreateInfo es, PokeChain es) =>
Ptr (BufferCreateInfo es) -> IO b)
-> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @BufferCreateInfo ((BufferCreateInfo '[] -> SomeStruct BufferCreateInfo
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct BufferCreateInfo '[]
forall a. Zero a => a
zero)) (Ptr (BufferCreateInfo '[]) -> IO b
cont (Ptr (BufferCreateInfo '[]) -> IO b)
-> (Ptr (BufferCreateInfo es) -> Ptr (BufferCreateInfo '[]))
-> Ptr (BufferCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (BufferCreateInfo es) -> Ptr (BufferCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
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 (BufferCreateInfo '[]))
-> Ptr (BufferCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (BufferCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (BufferCreateInfo _)))) Ptr (BufferCreateInfo '[])
pCreateInfo''
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 FromCStruct DeviceBufferMemoryRequirementsKHR where
peekCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> IO ("info" ::: DeviceBufferMemoryRequirementsKHR)
peekCStruct "pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p = do
SomeStruct BufferCreateInfo
pCreateInfo <- Ptr (SomeStruct BufferCreateInfo)
-> IO (SomeStruct BufferCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (SomeStruct BufferCreateInfo)
-> IO (SomeStruct BufferCreateInfo))
-> (Ptr (BufferCreateInfo Any)
-> Ptr (SomeStruct BufferCreateInfo))
-> Ptr (BufferCreateInfo Any)
-> IO (SomeStruct BufferCreateInfo)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (BufferCreateInfo Any) -> Ptr (SomeStruct BufferCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (BufferCreateInfo Any) -> IO (SomeStruct BufferCreateInfo))
-> IO (Ptr (BufferCreateInfo Any))
-> IO (SomeStruct BufferCreateInfo)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr (BufferCreateInfo Any)) -> IO (Ptr (BufferCreateInfo Any))
forall a. Storable a => Ptr a -> IO a
peek (("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (BufferCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (BufferCreateInfo _))))
("info" ::: DeviceBufferMemoryRequirementsKHR)
-> IO ("info" ::: DeviceBufferMemoryRequirementsKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("info" ::: DeviceBufferMemoryRequirementsKHR)
-> IO ("info" ::: DeviceBufferMemoryRequirementsKHR))
-> ("info" ::: DeviceBufferMemoryRequirementsKHR)
-> IO ("info" ::: DeviceBufferMemoryRequirementsKHR)
forall a b. (a -> b) -> a -> b
$ SomeStruct BufferCreateInfo
-> "info" ::: DeviceBufferMemoryRequirementsKHR
DeviceBufferMemoryRequirementsKHR
SomeStruct BufferCreateInfo
pCreateInfo
instance Zero DeviceBufferMemoryRequirementsKHR where
zero :: "info" ::: DeviceBufferMemoryRequirementsKHR
zero = SomeStruct BufferCreateInfo
-> "info" ::: DeviceBufferMemoryRequirementsKHR
DeviceBufferMemoryRequirementsKHR
(BufferCreateInfo '[] -> SomeStruct BufferCreateInfo
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct BufferCreateInfo '[]
forall a. Zero a => a
zero)
data DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirementsKHR
{
("info" ::: DeviceImageMemoryRequirementsKHR)
-> SomeStruct ImageCreateInfo
createInfo :: SomeStruct ImageCreateInfo
,
("info" ::: DeviceImageMemoryRequirementsKHR)
-> ImageAspectFlagBits
planeAspect :: ImageAspectFlagBits
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceImageMemoryRequirementsKHR)
#endif
deriving instance Show DeviceImageMemoryRequirementsKHR
instance ToCStruct DeviceImageMemoryRequirementsKHR where
withCStruct :: ("info" ::: DeviceImageMemoryRequirementsKHR)
-> (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b)
-> IO b
withCStruct "info" ::: DeviceImageMemoryRequirementsKHR
x ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b
f = Int
-> (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p -> ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("info" ::: DeviceImageMemoryRequirementsKHR) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p "info" ::: DeviceImageMemoryRequirementsKHR
x (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b
f "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p)
pokeCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("info" ::: DeviceImageMemoryRequirementsKHR) -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p DeviceImageMemoryRequirementsKHR{ImageAspectFlagBits
SomeStruct ImageCreateInfo
planeAspect :: ImageAspectFlagBits
createInfo :: SomeStruct ImageCreateInfo
$sel:planeAspect:DeviceImageMemoryRequirementsKHR :: ("info" ::: DeviceImageMemoryRequirementsKHR)
-> ImageAspectFlagBits
$sel:createInfo:DeviceImageMemoryRequirementsKHR :: ("info" ::: DeviceImageMemoryRequirementsKHR)
-> SomeStruct ImageCreateInfo
..} 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 (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR)
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 (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (ImageCreateInfo '[])
pCreateInfo'' <- ((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (ImageCreateInfo '[])) (((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[])))
-> ((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (ImageCreateInfo '[]) -> IO b
cont -> SomeStruct ImageCreateInfo
-> (forall (es :: [*]).
(Extendss ImageCreateInfo es, PokeChain es) =>
Ptr (ImageCreateInfo es) -> IO b)
-> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @ImageCreateInfo (SomeStruct ImageCreateInfo
createInfo) (Ptr (ImageCreateInfo '[]) -> IO b
cont (Ptr (ImageCreateInfo '[]) -> IO b)
-> (Ptr (ImageCreateInfo es) -> Ptr (ImageCreateInfo '[]))
-> Ptr (ImageCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (ImageCreateInfo es) -> Ptr (ImageCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
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 (ImageCreateInfo '[]))
-> Ptr (ImageCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (ImageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (ImageCreateInfo _)))) Ptr (ImageCreateInfo '[])
pCreateInfo''
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 ImageAspectFlagBits -> ImageAspectFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr ImageAspectFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ImageAspectFlagBits)) (ImageAspectFlagBits
planeAspect)
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 = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p 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 (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR)
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 (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (ImageCreateInfo '[])
pCreateInfo'' <- ((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (ImageCreateInfo '[])) (((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[])))
-> ((Ptr (ImageCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (ImageCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (ImageCreateInfo '[]) -> IO b
cont -> SomeStruct ImageCreateInfo
-> (forall (es :: [*]).
(Extendss ImageCreateInfo es, PokeChain es) =>
Ptr (ImageCreateInfo es) -> IO b)
-> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @ImageCreateInfo ((ImageCreateInfo '[] -> SomeStruct ImageCreateInfo
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct ImageCreateInfo '[]
forall a. Zero a => a
zero)) (Ptr (ImageCreateInfo '[]) -> IO b
cont (Ptr (ImageCreateInfo '[]) -> IO b)
-> (Ptr (ImageCreateInfo es) -> Ptr (ImageCreateInfo '[]))
-> Ptr (ImageCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (ImageCreateInfo es) -> Ptr (ImageCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
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 (ImageCreateInfo '[]))
-> Ptr (ImageCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (ImageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (ImageCreateInfo _)))) Ptr (ImageCreateInfo '[])
pCreateInfo''
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 ImageAspectFlagBits -> ImageAspectFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr ImageAspectFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ImageAspectFlagBits)) (ImageAspectFlagBits
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 FromCStruct DeviceImageMemoryRequirementsKHR where
peekCStruct :: ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> IO ("info" ::: DeviceImageMemoryRequirementsKHR)
peekCStruct "pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p = do
SomeStruct ImageCreateInfo
pCreateInfo <- Ptr (SomeStruct ImageCreateInfo) -> IO (SomeStruct ImageCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (SomeStruct ImageCreateInfo)
-> IO (SomeStruct ImageCreateInfo))
-> (Ptr (ImageCreateInfo Any) -> Ptr (SomeStruct ImageCreateInfo))
-> Ptr (ImageCreateInfo Any)
-> IO (SomeStruct ImageCreateInfo)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (ImageCreateInfo Any) -> Ptr (SomeStruct ImageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (ImageCreateInfo Any) -> IO (SomeStruct ImageCreateInfo))
-> IO (Ptr (ImageCreateInfo Any))
-> IO (SomeStruct ImageCreateInfo)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr (ImageCreateInfo Any)) -> IO (Ptr (ImageCreateInfo Any))
forall a. Storable a => Ptr a -> IO a
peek (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr (Ptr (ImageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (ImageCreateInfo _))))
ImageAspectFlagBits
planeAspect <- Ptr ImageAspectFlagBits -> IO ImageAspectFlagBits
forall a. Storable a => Ptr a -> IO a
peek @ImageAspectFlagBits (("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR)
p ("pInfo" ::: Ptr ("info" ::: DeviceImageMemoryRequirementsKHR))
-> Int -> Ptr ImageAspectFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ImageAspectFlagBits))
("info" ::: DeviceImageMemoryRequirementsKHR)
-> IO ("info" ::: DeviceImageMemoryRequirementsKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("info" ::: DeviceImageMemoryRequirementsKHR)
-> IO ("info" ::: DeviceImageMemoryRequirementsKHR))
-> ("info" ::: DeviceImageMemoryRequirementsKHR)
-> IO ("info" ::: DeviceImageMemoryRequirementsKHR)
forall a b. (a -> b) -> a -> b
$ SomeStruct ImageCreateInfo
-> ImageAspectFlagBits
-> "info" ::: DeviceImageMemoryRequirementsKHR
DeviceImageMemoryRequirementsKHR
SomeStruct ImageCreateInfo
pCreateInfo ImageAspectFlagBits
planeAspect
instance Zero DeviceImageMemoryRequirementsKHR where
zero :: "info" ::: DeviceImageMemoryRequirementsKHR
zero = SomeStruct ImageCreateInfo
-> ImageAspectFlagBits
-> "info" ::: DeviceImageMemoryRequirementsKHR
DeviceImageMemoryRequirementsKHR
(ImageCreateInfo '[] -> SomeStruct ImageCreateInfo
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct ImageCreateInfo '[]
forall a. Zero a => a
zero)
ImageAspectFlagBits
forall a. Zero a => a
zero
data PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4FeaturesKHR
{
PhysicalDeviceMaintenance4FeaturesKHR -> Bool
maintenance4 :: Bool }
deriving (Typeable, PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool
(PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool)
-> (PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool)
-> Eq PhysicalDeviceMaintenance4FeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool
$c/= :: PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool
== :: PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool
$c== :: PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMaintenance4FeaturesKHR)
#endif
deriving instance Show PhysicalDeviceMaintenance4FeaturesKHR
instance ToCStruct PhysicalDeviceMaintenance4FeaturesKHR where
withCStruct :: PhysicalDeviceMaintenance4FeaturesKHR
-> (Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b) -> IO b
withCStruct PhysicalDeviceMaintenance4FeaturesKHR
x Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b
f = Int -> (Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMaintenance4FeaturesKHR
p -> Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4FeaturesKHR
p PhysicalDeviceMaintenance4FeaturesKHR
x (Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b
f Ptr PhysicalDeviceMaintenance4FeaturesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4FeaturesKHR
p PhysicalDeviceMaintenance4FeaturesKHR{Bool
maintenance4 :: Bool
$sel:maintenance4:PhysicalDeviceMaintenance4FeaturesKHR :: PhysicalDeviceMaintenance4FeaturesKHR -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR -> 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 PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
maintenance4))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceMaintenance4FeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMaintenance4FeaturesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR -> 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 PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR -> 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 PhysicalDeviceMaintenance4FeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR
peekCStruct Ptr PhysicalDeviceMaintenance4FeaturesKHR
p = do
Bool32
maintenance4 <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMaintenance4FeaturesKHR
p Ptr PhysicalDeviceMaintenance4FeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR)
-> PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceMaintenance4FeaturesKHR
PhysicalDeviceMaintenance4FeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
maintenance4)
instance Storable PhysicalDeviceMaintenance4FeaturesKHR where
sizeOf :: PhysicalDeviceMaintenance4FeaturesKHR -> Int
sizeOf ~PhysicalDeviceMaintenance4FeaturesKHR
_ = Int
24
alignment :: PhysicalDeviceMaintenance4FeaturesKHR -> Int
alignment ~PhysicalDeviceMaintenance4FeaturesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR
peek = Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> IO PhysicalDeviceMaintenance4FeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> IO ()
poke Ptr PhysicalDeviceMaintenance4FeaturesKHR
ptr PhysicalDeviceMaintenance4FeaturesKHR
poked = Ptr PhysicalDeviceMaintenance4FeaturesKHR
-> PhysicalDeviceMaintenance4FeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4FeaturesKHR
ptr PhysicalDeviceMaintenance4FeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMaintenance4FeaturesKHR where
zero :: PhysicalDeviceMaintenance4FeaturesKHR
zero = Bool -> PhysicalDeviceMaintenance4FeaturesKHR
PhysicalDeviceMaintenance4FeaturesKHR
Bool
forall a. Zero a => a
zero
data PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4PropertiesKHR
{
PhysicalDeviceMaintenance4PropertiesKHR -> DeviceSize
maxBufferSize :: DeviceSize }
deriving (Typeable, PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool
(PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool)
-> (PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool)
-> Eq PhysicalDeviceMaintenance4PropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool
$c/= :: PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool
== :: PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool
$c== :: PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMaintenance4PropertiesKHR)
#endif
deriving instance Show PhysicalDeviceMaintenance4PropertiesKHR
instance ToCStruct PhysicalDeviceMaintenance4PropertiesKHR where
withCStruct :: PhysicalDeviceMaintenance4PropertiesKHR
-> (Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b) -> IO b
withCStruct PhysicalDeviceMaintenance4PropertiesKHR
x Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMaintenance4PropertiesKHR
p -> Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4PropertiesKHR
p PhysicalDeviceMaintenance4PropertiesKHR
x (Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b
f Ptr PhysicalDeviceMaintenance4PropertiesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4PropertiesKHR
p PhysicalDeviceMaintenance4PropertiesKHR{DeviceSize
maxBufferSize :: DeviceSize
$sel:maxBufferSize:PhysicalDeviceMaintenance4PropertiesKHR :: PhysicalDeviceMaintenance4PropertiesKHR -> DeviceSize
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceSize
maxBufferSize)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceMaintenance4PropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMaintenance4PropertiesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceMaintenance4PropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR
peekCStruct Ptr PhysicalDeviceMaintenance4PropertiesKHR
p = do
DeviceSize
maxBufferSize <- Ptr DeviceSize -> IO DeviceSize
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceMaintenance4PropertiesKHR
p Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR)
-> PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR
forall a b. (a -> b) -> a -> b
$ DeviceSize -> PhysicalDeviceMaintenance4PropertiesKHR
PhysicalDeviceMaintenance4PropertiesKHR
DeviceSize
maxBufferSize
instance Storable PhysicalDeviceMaintenance4PropertiesKHR where
sizeOf :: PhysicalDeviceMaintenance4PropertiesKHR -> Int
sizeOf ~PhysicalDeviceMaintenance4PropertiesKHR
_ = Int
24
alignment :: PhysicalDeviceMaintenance4PropertiesKHR -> Int
alignment ~PhysicalDeviceMaintenance4PropertiesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR
peek = Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> IO PhysicalDeviceMaintenance4PropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> IO ()
poke Ptr PhysicalDeviceMaintenance4PropertiesKHR
ptr PhysicalDeviceMaintenance4PropertiesKHR
poked = Ptr PhysicalDeviceMaintenance4PropertiesKHR
-> PhysicalDeviceMaintenance4PropertiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance4PropertiesKHR
ptr PhysicalDeviceMaintenance4PropertiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMaintenance4PropertiesKHR where
zero :: PhysicalDeviceMaintenance4PropertiesKHR
zero = DeviceSize -> PhysicalDeviceMaintenance4PropertiesKHR
PhysicalDeviceMaintenance4PropertiesKHR
DeviceSize
forall a. Zero a => a
zero
type KHR_MAINTENANCE_4_SPEC_VERSION = 1
pattern KHR_MAINTENANCE_4_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_MAINTENANCE_4_SPEC_VERSION :: a
$mKHR_MAINTENANCE_4_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_MAINTENANCE_4_SPEC_VERSION = 1
type KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"
pattern KHR_MAINTENANCE_4_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_MAINTENANCE_4_EXTENSION_NAME :: a
$mKHR_MAINTENANCE_4_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"