{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_swapchain ( createSwapchainKHR
, withSwapchainKHR
, destroySwapchainKHR
, getSwapchainImagesKHR
, acquireNextImageKHR
, acquireNextImageKHRSafe
, queuePresentKHR
, getDeviceGroupPresentCapabilitiesKHR
, getDeviceGroupSurfacePresentModesKHR
, acquireNextImage2KHR
, acquireNextImage2KHRSafe
, getPhysicalDevicePresentRectanglesKHR
, SwapchainCreateInfoKHR(..)
, PresentInfoKHR(..)
, DeviceGroupPresentCapabilitiesKHR(..)
, ImageSwapchainCreateInfoKHR(..)
, BindImageMemorySwapchainInfoKHR(..)
, AcquireNextImageInfoKHR(..)
, DeviceGroupPresentInfoKHR(..)
, DeviceGroupSwapchainCreateInfoKHR(..)
, DeviceGroupPresentModeFlagsKHR
, DeviceGroupPresentModeFlagBitsKHR( DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
, DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
, DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
, DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
, ..
)
, SwapchainCreateFlagsKHR
, SwapchainCreateFlagBitsKHR( SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT
, SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR
, SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
, SWAPCHAIN_CREATE_PROTECTED_BIT_KHR
, ..
)
, KHR_SWAPCHAIN_SPEC_VERSION
, pattern KHR_SWAPCHAIN_SPEC_VERSION
, KHR_SWAPCHAIN_EXTENSION_NAME
, pattern KHR_SWAPCHAIN_EXTENSION_NAME
, SurfaceKHR(..)
, SwapchainKHR(..)
, PresentModeKHR(..)
, ColorSpaceKHR(..)
, CompositeAlphaFlagBitsKHR(..)
, CompositeAlphaFlagsKHR
, SurfaceTransformFlagBitsKHR(..)
, SurfaceTransformFlagsKHR
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
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 GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
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.Utils (lowerArrayPtr)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Extensions.VK_KHR_surface (ColorSpaceKHR)
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagBitsKHR)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkAcquireNextImage2KHR))
import Vulkan.Dynamic (DeviceCmds(pVkAcquireNextImageKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCreateSwapchainKHR))
import Vulkan.Dynamic (DeviceCmds(pVkDestroySwapchainKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceGroupPresentCapabilitiesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceGroupSurfacePresentModesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetSwapchainImagesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkQueuePresentKHR))
import Vulkan.Core10.Handles (Device_T)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_display_swapchain (DisplayPresentInfoKHR)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.Handles (Fence)
import Vulkan.Core10.Handles (Fence(..))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_frame_boundary (FrameBoundaryEXT)
import Vulkan.Core10.Handles (Image)
import Vulkan.Core10.Handles (Image(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_image_compression_control (ImageCompressionControlEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_image_format_list (ImageFormatListCreateInfo)
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDevicePresentRectanglesKHR))
import Vulkan.Core10.APIConstants (MAX_DEVICE_GROUP_SIZE)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_GGP_frame_token (PresentFrameTokenGGP)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_present_id (PresentIdKHR)
import Vulkan.Extensions.VK_KHR_surface (PresentModeKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_incremental_present (PresentRegionsKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_GOOGLE_display_timing (PresentTimesInfoGOOGLE)
import Vulkan.Core10.Handles (Queue)
import Vulkan.Core10.Handles (Queue(..))
import Vulkan.Core10.Handles (Queue(Queue))
import Vulkan.Core10.Handles (Queue_T)
import Vulkan.Core10.FundamentalTypes (Rect2D)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Handles (Semaphore)
import Vulkan.Core10.Handles (Semaphore(..))
import Vulkan.Core10.Enums.SharingMode (SharingMode)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_full_screen_exclusive (SurfaceFullScreenExclusiveInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_full_screen_exclusive (SurfaceFullScreenExclusiveWin32InfoEXT)
import Vulkan.Extensions.Handles (SurfaceKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_display_control (SwapchainCounterCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_display_native_hdr (SwapchainDisplayNativeHdrCreateInfoAMD)
import Vulkan.Extensions.Handles (SwapchainKHR)
import Vulkan.Extensions.Handles (SwapchainKHR(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_low_latency2 (SwapchainLatencyCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_present_barrier (SwapchainPresentBarrierCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_swapchain_maintenance1 (SwapchainPresentFenceInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_swapchain_maintenance1 (SwapchainPresentModeInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_swapchain_maintenance1 (SwapchainPresentModesCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_swapchain_maintenance1 (SwapchainPresentScalingCreateInfoEXT)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.APIConstants (pattern MAX_DEVICE_GROUP_SIZE)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PRESENT_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_surface (ColorSpaceKHR(..))
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagsKHR)
import Vulkan.Extensions.VK_KHR_surface (PresentModeKHR(..))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagsKHR)
import Vulkan.Extensions.Handles (SwapchainKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateSwapchainKHR
:: FunPtr (Ptr Device_T -> Ptr (SomeStruct SwapchainCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr SwapchainKHR -> IO Result) -> Ptr Device_T -> Ptr (SomeStruct SwapchainCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr SwapchainKHR -> IO Result
createSwapchainKHR :: forall a io
. ( Extendss SwapchainCreateInfoKHR a
, PokeChain a
, MonadIO io )
=>
Device
->
(SwapchainCreateInfoKHR a)
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (SwapchainKHR)
createSwapchainKHR :: forall (a :: [*]) (io :: * -> *).
(Extendss SwapchainCreateInfoKHR a, PokeChain a, MonadIO io) =>
Device
-> SwapchainCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SwapchainKHR
createSwapchainKHR Device
device SwapchainCreateInfoKHR a
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCreateSwapchainKHRPtr :: FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result)
vkCreateSwapchainKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result)
pVkCreateSwapchainKHR (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result)
vkCreateSwapchainKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateSwapchainKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCreateSwapchainKHR' :: Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result
vkCreateSwapchainKHR' = FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result)
-> Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result
mkVkCreateSwapchainKHR FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result)
vkCreateSwapchainKHRPtr
Ptr (SwapchainCreateInfoKHR a)
pCreateInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (SwapchainCreateInfoKHR a
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pSwapchain" ::: Ptr SwapchainKHR
pPSwapchain <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @SwapchainKHR Int
8) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateSwapchainKHR" (Ptr Device_T
-> ("pCreateInfo" ::: Ptr (SomeStruct SwapchainCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSwapchain" ::: Ptr SwapchainKHR)
-> IO Result
vkCreateSwapchainKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (SwapchainCreateInfoKHR a)
pCreateInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pSwapchain" ::: Ptr SwapchainKHR
pPSwapchain))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
SwapchainKHR
pSwapchain <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR "pSwapchain" ::: Ptr SwapchainKHR
pPSwapchain
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (SwapchainKHR
pSwapchain)
withSwapchainKHR :: forall a io r . (Extendss SwapchainCreateInfoKHR a, PokeChain a, MonadIO io) => Device -> SwapchainCreateInfoKHR a -> Maybe AllocationCallbacks -> (io SwapchainKHR -> (SwapchainKHR -> io ()) -> r) -> r
withSwapchainKHR :: forall (a :: [*]) (io :: * -> *) r.
(Extendss SwapchainCreateInfoKHR a, PokeChain a, MonadIO io) =>
Device
-> SwapchainCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io SwapchainKHR -> (SwapchainKHR -> io ()) -> r)
-> r
withSwapchainKHR Device
device SwapchainCreateInfoKHR a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io SwapchainKHR -> (SwapchainKHR -> io ()) -> r
b =
io SwapchainKHR -> (SwapchainKHR -> io ()) -> r
b (forall (a :: [*]) (io :: * -> *).
(Extendss SwapchainCreateInfoKHR a, PokeChain a, MonadIO io) =>
Device
-> SwapchainCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SwapchainKHR
createSwapchainKHR Device
device SwapchainCreateInfoKHR a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(SwapchainKHR
o0) -> forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySwapchainKHR Device
device SwapchainKHR
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroySwapchainKHR
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> SwapchainKHR -> Ptr AllocationCallbacks -> IO ()
destroySwapchainKHR :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySwapchainKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySwapchainKHR Device
device SwapchainKHR
swapchain "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkDestroySwapchainKHRPtr :: FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySwapchainKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroySwapchainKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySwapchainKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroySwapchainKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkDestroySwapchainKHR' :: Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySwapchainKHR' = FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroySwapchainKHR FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySwapchainKHRPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroySwapchainKHR" (Ptr Device_T
-> SwapchainKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySwapchainKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(SwapchainKHR
swapchain)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetSwapchainImagesKHR
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Ptr Word32 -> Ptr Image -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Ptr Word32 -> Ptr Image -> IO Result
getSwapchainImagesKHR :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
-> io (Result, ("swapchainImages" ::: Vector Image))
getSwapchainImagesKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR -> io (Result, "swapchainImages" ::: Vector Image)
getSwapchainImagesKHR Device
device SwapchainKHR
swapchain = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetSwapchainImagesKHRPtr :: FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result)
vkGetSwapchainImagesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result)
pVkGetSwapchainImagesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result)
vkGetSwapchainImagesKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetSwapchainImagesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetSwapchainImagesKHR' :: Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result
vkGetSwapchainImagesKHR' = FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result
mkVkGetSwapchainImagesKHR FunPtr
(Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result)
vkGetSwapchainImagesKHRPtr
let device' :: Ptr Device_T
device' = Device -> Ptr Device_T
deviceHandle (Device
device)
"pSwapchainImageCount" ::: Ptr Flags
pPSwapchainImageCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetSwapchainImagesKHR" (Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result
vkGetSwapchainImagesKHR'
Ptr Device_T
device'
(SwapchainKHR
swapchain)
("pSwapchainImageCount" ::: Ptr Flags
pPSwapchainImageCount)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pSwapchainImageCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPSwapchainImageCount
"pSwapchainImages" ::: Ptr Image
pPSwapchainImages <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Image ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pSwapchainImageCount)) forall a. Num a => a -> a -> a
* Int
8)) forall a. Ptr a -> IO ()
free
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetSwapchainImagesKHR" (Ptr Device_T
-> SwapchainKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pSwapchainImages" ::: Ptr Image)
-> IO Result
vkGetSwapchainImagesKHR'
Ptr Device_T
device'
(SwapchainKHR
swapchain)
("pSwapchainImageCount" ::: Ptr Flags
pPSwapchainImageCount)
("pSwapchainImages" ::: Ptr Image
pPSwapchainImages))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Flags
pSwapchainImageCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPSwapchainImageCount
"swapchainImages" ::: Vector Image
pSwapchainImages' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pSwapchainImageCount')) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Image (("pSwapchainImages" ::: Ptr Image
pPSwapchainImages forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Image)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "swapchainImages" ::: Vector Image
pSwapchainImages')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkAcquireNextImageKHRUnsafe
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result
foreign import ccall
"dynamic" mkVkAcquireNextImageKHRSafe
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result
acquireNextImageKHRSafeOrUnsafe :: forall io
. (MonadIO io)
=> (FunPtr (Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Word64 -> Semaphore -> Fence -> Ptr Word32 -> IO Result)
->
Device
->
SwapchainKHR
->
("timeout" ::: Word64)
->
Semaphore
->
Fence
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImageKHRSafeOrUnsafe :: forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> io (Result, Flags)
acquireNextImageKHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImageKHR Device
device
SwapchainKHR
swapchain
Word64
timeout
Semaphore
semaphore
Fence
fence = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkAcquireNextImageKHRPtr :: FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImageKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
pVkAcquireNextImageKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImageKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkAcquireNextImageKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkAcquireNextImageKHR' :: Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
vkAcquireNextImageKHR' = FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImageKHR FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImageKHRPtr
"pSwapchainImageCount" ::: Ptr Flags
pPImageIndex <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkAcquireNextImageKHR" (Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
vkAcquireNextImageKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(SwapchainKHR
swapchain)
(Word64
timeout)
(Semaphore
semaphore)
(Fence
fence)
("pSwapchainImageCount" ::: Ptr Flags
pPImageIndex))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pImageIndex <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPImageIndex
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, Flags
pImageIndex)
acquireNextImageKHR :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
->
("timeout" ::: Word64)
->
Semaphore
->
Fence
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImageKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> io (Result, Flags)
acquireNextImageKHR = forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> io (Result, Flags)
acquireNextImageKHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImageKHRUnsafe
acquireNextImageKHRSafe :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
->
("timeout" ::: Word64)
->
Semaphore
->
Fence
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImageKHRSafe :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> io (Result, Flags)
acquireNextImageKHRSafe = forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> io (Result, Flags)
acquireNextImageKHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Word64
-> Semaphore
-> Fence
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImageKHRSafe
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkQueuePresentKHR
:: FunPtr (Ptr Queue_T -> Ptr (SomeStruct PresentInfoKHR) -> IO Result) -> Ptr Queue_T -> Ptr (SomeStruct PresentInfoKHR) -> IO Result
queuePresentKHR :: forall a io
. (Extendss PresentInfoKHR a, PokeChain a, MonadIO io)
=>
Queue
->
(PresentInfoKHR a)
-> io (Result)
queuePresentKHR :: forall (a :: [*]) (io :: * -> *).
(Extendss PresentInfoKHR a, PokeChain a, MonadIO io) =>
Queue -> PresentInfoKHR a -> io Result
queuePresentKHR Queue
queue PresentInfoKHR a
presentInfo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkQueuePresentKHRPtr :: FunPtr
(Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result)
vkQueuePresentKHRPtr = DeviceCmds
-> FunPtr
(Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result)
pVkQueuePresentKHR (case Queue
queue of Queue{DeviceCmds
$sel:deviceCmds:Queue :: Queue -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result)
vkQueuePresentKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkQueuePresentKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkQueuePresentKHR' :: Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result
vkQueuePresentKHR' = FunPtr
(Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result)
-> Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result
mkVkQueuePresentKHR FunPtr
(Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result)
vkQueuePresentKHRPtr
Ptr (PresentInfoKHR a)
pPresentInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PresentInfoKHR a
presentInfo)
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkQueuePresentKHR" (Ptr Queue_T
-> ("pPresentInfo" ::: Ptr (SomeStruct PresentInfoKHR))
-> IO Result
vkQueuePresentKHR'
(Queue -> Ptr Queue_T
queueHandle (Queue
queue))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (PresentInfoKHR a)
pPresentInfo))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceGroupPresentCapabilitiesKHR
:: FunPtr (Ptr Device_T -> Ptr DeviceGroupPresentCapabilitiesKHR -> IO Result) -> Ptr Device_T -> Ptr DeviceGroupPresentCapabilitiesKHR -> IO Result
getDeviceGroupPresentCapabilitiesKHR :: forall io
. (MonadIO io)
=>
Device
-> io (DeviceGroupPresentCapabilitiesKHR)
getDeviceGroupPresentCapabilitiesKHR :: forall (io :: * -> *).
MonadIO io =>
Device -> io DeviceGroupPresentCapabilitiesKHR
getDeviceGroupPresentCapabilitiesKHR Device
device = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceGroupPresentCapabilitiesKHRPtr :: FunPtr
(Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result)
vkGetDeviceGroupPresentCapabilitiesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result)
pVkGetDeviceGroupPresentCapabilitiesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result)
vkGetDeviceGroupPresentCapabilitiesKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDeviceGroupPresentCapabilitiesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetDeviceGroupPresentCapabilitiesKHR' :: Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result
vkGetDeviceGroupPresentCapabilitiesKHR' = FunPtr
(Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result)
-> Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result
mkVkGetDeviceGroupPresentCapabilitiesKHR FunPtr
(Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result)
vkGetDeviceGroupPresentCapabilitiesKHRPtr
"pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
pPDeviceGroupPresentCapabilities <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @DeviceGroupPresentCapabilitiesKHR)
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceGroupPresentCapabilitiesKHR" (Ptr Device_T
-> ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO Result
vkGetDeviceGroupPresentCapabilitiesKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
pPDeviceGroupPresentCapabilities))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
DeviceGroupPresentCapabilitiesKHR
pDeviceGroupPresentCapabilities <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DeviceGroupPresentCapabilitiesKHR "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
pPDeviceGroupPresentCapabilities
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (DeviceGroupPresentCapabilitiesKHR
pDeviceGroupPresentCapabilities)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceGroupSurfacePresentModesKHR
:: FunPtr (Ptr Device_T -> SurfaceKHR -> Ptr DeviceGroupPresentModeFlagsKHR -> IO Result) -> Ptr Device_T -> SurfaceKHR -> Ptr DeviceGroupPresentModeFlagsKHR -> IO Result
getDeviceGroupSurfacePresentModesKHR :: forall io
. (MonadIO io)
=>
Device
->
SurfaceKHR
-> io (("modes" ::: DeviceGroupPresentModeFlagsKHR))
getDeviceGroupSurfacePresentModesKHR :: forall (io :: * -> *).
MonadIO io =>
Device -> SurfaceKHR -> io DeviceGroupPresentModeFlagBitsKHR
getDeviceGroupSurfacePresentModesKHR Device
device SurfaceKHR
surface = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceGroupSurfacePresentModesKHRPtr :: FunPtr
(Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result)
vkGetDeviceGroupSurfacePresentModesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result)
pVkGetDeviceGroupSurfacePresentModesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result)
vkGetDeviceGroupSurfacePresentModesKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDeviceGroupSurfacePresentModesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetDeviceGroupSurfacePresentModesKHR' :: Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result
vkGetDeviceGroupSurfacePresentModesKHR' = FunPtr
(Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result)
-> Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result
mkVkGetDeviceGroupSurfacePresentModesKHR FunPtr
(Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result)
vkGetDeviceGroupSurfacePresentModesKHRPtr
"pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR
pPModes <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DeviceGroupPresentModeFlagsKHR Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceGroupSurfacePresentModesKHR" (Ptr Device_T
-> SurfaceKHR
-> ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO Result
vkGetDeviceGroupSurfacePresentModesKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(SurfaceKHR
surface)
("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR
pPModes))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
DeviceGroupPresentModeFlagBitsKHR
pModes <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @DeviceGroupPresentModeFlagsKHR "pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR
pPModes
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (DeviceGroupPresentModeFlagBitsKHR
pModes)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkAcquireNextImage2KHRUnsafe
:: FunPtr (Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result) -> Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result
foreign import ccall
"dynamic" mkVkAcquireNextImage2KHRSafe
:: FunPtr (Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result) -> Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result
acquireNextImage2KHRSafeOrUnsafe :: forall io
. (MonadIO io)
=> (FunPtr (Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result) -> Ptr Device_T -> Ptr AcquireNextImageInfoKHR -> Ptr Word32 -> IO Result)
->
Device
->
("acquireInfo" ::: AcquireNextImageInfoKHR)
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImage2KHRSafeOrUnsafe :: forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device -> AcquireNextImageInfoKHR -> io (Result, Flags)
acquireNextImage2KHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImage2KHR Device
device
AcquireNextImageInfoKHR
acquireInfo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkAcquireNextImage2KHRPtr :: FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImage2KHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
pVkAcquireNextImage2KHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImage2KHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkAcquireNextImage2KHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkAcquireNextImage2KHR' :: Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
vkAcquireNextImage2KHR' = FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImage2KHR FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
vkAcquireNextImage2KHRPtr
Ptr AcquireNextImageInfoKHR
pAcquireInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AcquireNextImageInfoKHR
acquireInfo)
"pSwapchainImageCount" ::: Ptr Flags
pPImageIndex <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkAcquireNextImage2KHR" (Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
vkAcquireNextImage2KHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
Ptr AcquireNextImageInfoKHR
pAcquireInfo
("pSwapchainImageCount" ::: Ptr Flags
pPImageIndex))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pImageIndex <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPImageIndex
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, Flags
pImageIndex)
acquireNextImage2KHR :: forall io
. (MonadIO io)
=>
Device
->
("acquireInfo" ::: AcquireNextImageInfoKHR)
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImage2KHR :: forall (io :: * -> *).
MonadIO io =>
Device -> AcquireNextImageInfoKHR -> io (Result, Flags)
acquireNextImage2KHR = forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device -> AcquireNextImageInfoKHR -> io (Result, Flags)
acquireNextImage2KHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImage2KHRUnsafe
acquireNextImage2KHRSafe :: forall io
. (MonadIO io)
=>
Device
->
("acquireInfo" ::: AcquireNextImageInfoKHR)
-> io (Result, ("imageIndex" ::: Word32))
acquireNextImage2KHRSafe :: forall (io :: * -> *).
MonadIO io =>
Device -> AcquireNextImageInfoKHR -> io (Result, Flags)
acquireNextImage2KHRSafe = forall (io :: * -> *).
MonadIO io =>
(FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Device -> AcquireNextImageInfoKHR -> io (Result, Flags)
acquireNextImage2KHRSafeOrUnsafe FunPtr
(Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result)
-> Ptr Device_T
-> Ptr AcquireNextImageInfoKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> IO Result
mkVkAcquireNextImage2KHRSafe
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDevicePresentRectanglesKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr Rect2D -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr Rect2D -> IO Result
getPhysicalDevicePresentRectanglesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (Result, ("rects" ::: Vector Rect2D))
getPhysicalDevicePresentRectanglesKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> SurfaceKHR -> io (Result, "rects" ::: Vector Rect2D)
getPhysicalDevicePresentRectanglesKHR PhysicalDevice
physicalDevice
SurfaceKHR
surface = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDevicePresentRectanglesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result)
vkGetPhysicalDevicePresentRectanglesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result)
pVkGetPhysicalDevicePresentRectanglesKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result)
vkGetPhysicalDevicePresentRectanglesKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDevicePresentRectanglesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetPhysicalDevicePresentRectanglesKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result
vkGetPhysicalDevicePresentRectanglesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result
mkVkGetPhysicalDevicePresentRectanglesKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result)
vkGetPhysicalDevicePresentRectanglesKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pSwapchainImageCount" ::: Ptr Flags
pPRectCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDevicePresentRectanglesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result
vkGetPhysicalDevicePresentRectanglesKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSwapchainImageCount" ::: Ptr Flags
pPRectCount)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pRectCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPRectCount
"pRects" ::: Ptr Rect2D
pPRects <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Rect2D ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pRectCount)) forall a. Num a => a -> a -> a
* Int
16)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pRects" ::: Ptr Rect2D
pPRects forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
16) :: Ptr Rect2D) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pRectCount)) forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDevicePresentRectanglesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSwapchainImageCount" ::: Ptr Flags)
-> ("pRects" ::: Ptr Rect2D)
-> IO Result
vkGetPhysicalDevicePresentRectanglesKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSwapchainImageCount" ::: Ptr Flags
pPRectCount)
(("pRects" ::: Ptr Rect2D
pPRects)))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Flags
pRectCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSwapchainImageCount" ::: Ptr Flags
pPRectCount
"rects" ::: Vector Rect2D
pRects' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pRectCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Rect2D ((("pRects" ::: Ptr Rect2D
pPRects) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "rects" ::: Vector Rect2D
pRects')
data SwapchainCreateInfoKHR (es :: [Type]) = SwapchainCreateInfoKHR
{
forall (es :: [*]). SwapchainCreateInfoKHR es -> Chain es
next :: Chain es
,
forall (es :: [*]).
SwapchainCreateInfoKHR es -> SwapchainCreateFlagBitsKHR
flags :: SwapchainCreateFlagsKHR
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> SurfaceKHR
surface :: SurfaceKHR
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
minImageCount :: Word32
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Format
imageFormat :: Format
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> ColorSpaceKHR
imageColorSpace :: ColorSpaceKHR
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Extent2D
imageExtent :: Extent2D
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
imageArrayLayers :: Word32
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> ImageUsageFlags
imageUsage :: ImageUsageFlags
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> SharingMode
imageSharingMode :: SharingMode
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Vector Flags
queueFamilyIndices :: Vector Word32
,
forall (es :: [*]).
SwapchainCreateInfoKHR es -> SurfaceTransformFlagBitsKHR
preTransform :: SurfaceTransformFlagBitsKHR
,
forall (es :: [*]).
SwapchainCreateInfoKHR es -> CompositeAlphaFlagBitsKHR
compositeAlpha :: CompositeAlphaFlagBitsKHR
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> PresentModeKHR
presentMode :: PresentModeKHR
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> Bool
clipped :: Bool
,
forall (es :: [*]). SwapchainCreateInfoKHR es -> SwapchainKHR
oldSwapchain :: SwapchainKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SwapchainCreateInfoKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (SwapchainCreateInfoKHR es)
instance Extensible SwapchainCreateInfoKHR where
extensibleTypeName :: String
extensibleTypeName = String
"SwapchainCreateInfoKHR"
setNext :: forall (ds :: [*]) (es :: [*]).
SwapchainCreateInfoKHR ds -> Chain es -> SwapchainCreateInfoKHR es
setNext SwapchainCreateInfoKHR{Bool
Flags
Vector Flags
Chain ds
Format
ImageUsageFlags
Extent2D
SwapchainKHR
SurfaceKHR
PresentModeKHR
SharingMode
SurfaceTransformFlagBitsKHR
CompositeAlphaFlagBitsKHR
ColorSpaceKHR
SwapchainCreateFlagBitsKHR
oldSwapchain :: SwapchainKHR
clipped :: Bool
presentMode :: PresentModeKHR
compositeAlpha :: CompositeAlphaFlagBitsKHR
preTransform :: SurfaceTransformFlagBitsKHR
queueFamilyIndices :: Vector Flags
imageSharingMode :: SharingMode
imageUsage :: ImageUsageFlags
imageArrayLayers :: Flags
imageExtent :: Extent2D
imageColorSpace :: ColorSpaceKHR
imageFormat :: Format
minImageCount :: Flags
surface :: SurfaceKHR
flags :: SwapchainCreateFlagBitsKHR
next :: Chain ds
$sel:oldSwapchain:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SwapchainKHR
$sel:clipped:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Bool
$sel:presentMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> PresentModeKHR
$sel:compositeAlpha:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> CompositeAlphaFlagBitsKHR
$sel:preTransform:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SurfaceTransformFlagBitsKHR
$sel:queueFamilyIndices:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Vector Flags
$sel:imageSharingMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SharingMode
$sel:imageUsage:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ImageUsageFlags
$sel:imageArrayLayers:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:imageExtent:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Extent2D
$sel:imageColorSpace:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ColorSpaceKHR
$sel:imageFormat:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Format
$sel:minImageCount:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:surface:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SurfaceKHR
$sel:flags:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SwapchainCreateFlagBitsKHR
$sel:next:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Chain es
..} Chain es
next' = SwapchainCreateInfoKHR{$sel:next:SwapchainCreateInfoKHR :: Chain es
next = Chain es
next', Bool
Flags
Vector Flags
Format
ImageUsageFlags
Extent2D
SwapchainKHR
SurfaceKHR
PresentModeKHR
SharingMode
SurfaceTransformFlagBitsKHR
CompositeAlphaFlagBitsKHR
ColorSpaceKHR
SwapchainCreateFlagBitsKHR
oldSwapchain :: SwapchainKHR
clipped :: Bool
presentMode :: PresentModeKHR
compositeAlpha :: CompositeAlphaFlagBitsKHR
preTransform :: SurfaceTransformFlagBitsKHR
queueFamilyIndices :: Vector Flags
imageSharingMode :: SharingMode
imageUsage :: ImageUsageFlags
imageArrayLayers :: Flags
imageExtent :: Extent2D
imageColorSpace :: ColorSpaceKHR
imageFormat :: Format
minImageCount :: Flags
surface :: SurfaceKHR
flags :: SwapchainCreateFlagBitsKHR
$sel:oldSwapchain:SwapchainCreateInfoKHR :: SwapchainKHR
$sel:clipped:SwapchainCreateInfoKHR :: Bool
$sel:presentMode:SwapchainCreateInfoKHR :: PresentModeKHR
$sel:compositeAlpha:SwapchainCreateInfoKHR :: CompositeAlphaFlagBitsKHR
$sel:preTransform:SwapchainCreateInfoKHR :: SurfaceTransformFlagBitsKHR
$sel:queueFamilyIndices:SwapchainCreateInfoKHR :: Vector Flags
$sel:imageSharingMode:SwapchainCreateInfoKHR :: SharingMode
$sel:imageUsage:SwapchainCreateInfoKHR :: ImageUsageFlags
$sel:imageArrayLayers:SwapchainCreateInfoKHR :: Flags
$sel:imageExtent:SwapchainCreateInfoKHR :: Extent2D
$sel:imageColorSpace:SwapchainCreateInfoKHR :: ColorSpaceKHR
$sel:imageFormat:SwapchainCreateInfoKHR :: Format
$sel:minImageCount:SwapchainCreateInfoKHR :: Flags
$sel:surface:SwapchainCreateInfoKHR :: SurfaceKHR
$sel:flags:SwapchainCreateInfoKHR :: SwapchainCreateFlagBitsKHR
..}
getNext :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Chain es
getNext SwapchainCreateInfoKHR{Bool
Flags
Vector Flags
Chain es
Format
ImageUsageFlags
Extent2D
SwapchainKHR
SurfaceKHR
PresentModeKHR
SharingMode
SurfaceTransformFlagBitsKHR
CompositeAlphaFlagBitsKHR
ColorSpaceKHR
SwapchainCreateFlagBitsKHR
oldSwapchain :: SwapchainKHR
clipped :: Bool
presentMode :: PresentModeKHR
compositeAlpha :: CompositeAlphaFlagBitsKHR
preTransform :: SurfaceTransformFlagBitsKHR
queueFamilyIndices :: Vector Flags
imageSharingMode :: SharingMode
imageUsage :: ImageUsageFlags
imageArrayLayers :: Flags
imageExtent :: Extent2D
imageColorSpace :: ColorSpaceKHR
imageFormat :: Format
minImageCount :: Flags
surface :: SurfaceKHR
flags :: SwapchainCreateFlagBitsKHR
next :: Chain es
$sel:oldSwapchain:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SwapchainKHR
$sel:clipped:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Bool
$sel:presentMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> PresentModeKHR
$sel:compositeAlpha:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> CompositeAlphaFlagBitsKHR
$sel:preTransform:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SurfaceTransformFlagBitsKHR
$sel:queueFamilyIndices:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Vector Flags
$sel:imageSharingMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SharingMode
$sel:imageUsage:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ImageUsageFlags
$sel:imageArrayLayers:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:imageExtent:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Extent2D
$sel:imageColorSpace:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ColorSpaceKHR
$sel:imageFormat:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Format
$sel:minImageCount:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:surface:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SurfaceKHR
$sel:flags:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SwapchainCreateFlagBitsKHR
$sel:next:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends SwapchainCreateInfoKHR e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends SwapchainCreateInfoKHR e => b) -> Maybe b
extends proxy e
_ Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainLatencyCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainLatencyCreateInfoNV = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainPresentScalingCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainPresentScalingCreateInfoEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainPresentModesCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainPresentModesCreateInfoEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: ImageCompressionControlEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ImageCompressionControlEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainPresentBarrierCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainPresentBarrierCreateInfoNV = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SurfaceFullScreenExclusiveWin32InfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SurfaceFullScreenExclusiveWin32InfoEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SurfaceFullScreenExclusiveInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SurfaceFullScreenExclusiveInfoEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: ImageFormatListCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ImageFormatListCreateInfo = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainDisplayNativeHdrCreateInfoAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainDisplayNativeHdrCreateInfoAMD = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: DeviceGroupSwapchainCreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeviceGroupSwapchainCreateInfoKHR = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Just e :~: SwapchainCounterCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainCounterCreateInfoEXT = forall a. a -> Maybe a
Just Extends SwapchainCreateInfoKHR e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss SwapchainCreateInfoKHR es
, PokeChain es ) => ToCStruct (SwapchainCreateInfoKHR es) where
withCStruct :: forall b.
SwapchainCreateInfoKHR es
-> (Ptr (SwapchainCreateInfoKHR es) -> IO b) -> IO b
withCStruct SwapchainCreateInfoKHR es
x Ptr (SwapchainCreateInfoKHR es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
104 forall a b. (a -> b) -> a -> b
$ \Ptr (SwapchainCreateInfoKHR es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (SwapchainCreateInfoKHR es)
p SwapchainCreateInfoKHR es
x (Ptr (SwapchainCreateInfoKHR es) -> IO b
f Ptr (SwapchainCreateInfoKHR es)
p)
pokeCStruct :: forall b.
Ptr (SwapchainCreateInfoKHR es)
-> SwapchainCreateInfoKHR es -> IO b -> IO b
pokeCStruct Ptr (SwapchainCreateInfoKHR es)
p SwapchainCreateInfoKHR{Bool
Flags
Vector Flags
Chain es
Format
ImageUsageFlags
Extent2D
SwapchainKHR
SurfaceKHR
PresentModeKHR
SharingMode
SurfaceTransformFlagBitsKHR
CompositeAlphaFlagBitsKHR
ColorSpaceKHR
SwapchainCreateFlagBitsKHR
oldSwapchain :: SwapchainKHR
clipped :: Bool
presentMode :: PresentModeKHR
compositeAlpha :: CompositeAlphaFlagBitsKHR
preTransform :: SurfaceTransformFlagBitsKHR
queueFamilyIndices :: Vector Flags
imageSharingMode :: SharingMode
imageUsage :: ImageUsageFlags
imageArrayLayers :: Flags
imageExtent :: Extent2D
imageColorSpace :: ColorSpaceKHR
imageFormat :: Format
minImageCount :: Flags
surface :: SurfaceKHR
flags :: SwapchainCreateFlagBitsKHR
next :: Chain es
$sel:oldSwapchain:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SwapchainKHR
$sel:clipped:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Bool
$sel:presentMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> PresentModeKHR
$sel:compositeAlpha:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> CompositeAlphaFlagBitsKHR
$sel:preTransform:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SurfaceTransformFlagBitsKHR
$sel:queueFamilyIndices:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Vector Flags
$sel:imageSharingMode:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SharingMode
$sel:imageUsage:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ImageUsageFlags
$sel:imageArrayLayers:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:imageExtent:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Extent2D
$sel:imageColorSpace:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> ColorSpaceKHR
$sel:imageFormat:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Format
$sel:minImageCount:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Flags
$sel:surface:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> SurfaceKHR
$sel:flags:SwapchainCreateInfoKHR :: forall (es :: [*]).
SwapchainCreateInfoKHR es -> SwapchainCreateFlagBitsKHR
$sel:next:SwapchainCreateInfoKHR :: forall (es :: [*]). SwapchainCreateInfoKHR es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainCreateFlagsKHR)) (SwapchainCreateFlagBitsKHR
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr SurfaceKHR)) (SurfaceKHR
surface)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
minImageCount)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Format)) (Format
imageFormat)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ColorSpaceKHR)) (ColorSpaceKHR
imageColorSpace)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Extent2D)) (Extent2D
imageExtent)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
imageArrayLayers)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr ImageUsageFlags)) (ImageUsageFlags
imageUsage)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr SharingMode)) (SharingMode
imageSharingMode)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Flags
queueFamilyIndices)) :: Word32))
"pSwapchainImageCount" ::: Ptr Flags
pPQueueFamilyIndices' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((forall a. Vector a -> Int
Data.Vector.length (Vector Flags
queueFamilyIndices)) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pSwapchainImageCount" ::: Ptr Flags
pPQueueFamilyIndices' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
queueFamilyIndices)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr Word32))) ("pSwapchainImageCount" ::: Ptr Flags
pPQueueFamilyIndices')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagBitsKHR
preTransform)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr CompositeAlphaFlagBitsKHR)) (CompositeAlphaFlagBitsKHR
compositeAlpha)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr PresentModeKHR)) (PresentModeKHR
presentMode)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
clipped))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr SwapchainKHR)) (SwapchainKHR
oldSwapchain)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
104
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (SwapchainCreateInfoKHR es) -> IO b -> IO b
pokeZeroCStruct Ptr (SwapchainCreateInfoKHR es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR)
Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr SurfaceKHR)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Format)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ColorSpaceKHR)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr ImageUsageFlags)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr SharingMode)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr SurfaceTransformFlagBitsKHR)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr CompositeAlphaFlagBitsKHR)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr PresentModeKHR)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss SwapchainCreateInfoKHR es
, PeekChain es ) => FromCStruct (SwapchainCreateInfoKHR es) where
peekCStruct :: Ptr (SwapchainCreateInfoKHR es) -> IO (SwapchainCreateInfoKHR es)
peekCStruct Ptr (SwapchainCreateInfoKHR es)
p = do
Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
SwapchainCreateFlagBitsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainCreateFlagsKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainCreateFlagsKHR))
SurfaceKHR
surface <- forall a. Storable a => Ptr a -> IO a
peek @SurfaceKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr SurfaceKHR))
Flags
minImageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Format
imageFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Format))
ColorSpaceKHR
imageColorSpace <- forall a. Storable a => Ptr a -> IO a
peek @ColorSpaceKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ColorSpaceKHR))
Extent2D
imageExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Extent2D))
Flags
imageArrayLayers <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
ImageUsageFlags
imageUsage <- forall a. Storable a => Ptr a -> IO a
peek @ImageUsageFlags ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr ImageUsageFlags))
SharingMode
imageSharingMode <- forall a. Storable a => Ptr a -> IO a
peek @SharingMode ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr SharingMode))
Flags
queueFamilyIndexCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32))
"pSwapchainImageCount" ::: Ptr Flags
pQueueFamilyIndices <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr Word32)))
Vector Flags
pQueueFamilyIndices' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
queueFamilyIndexCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSwapchainImageCount" ::: Ptr Flags
pQueueFamilyIndices forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
SurfaceTransformFlagBitsKHR
preTransform <- forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagBitsKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr SurfaceTransformFlagBitsKHR))
CompositeAlphaFlagBitsKHR
compositeAlpha <- forall a. Storable a => Ptr a -> IO a
peek @CompositeAlphaFlagBitsKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr CompositeAlphaFlagBitsKHR))
PresentModeKHR
presentMode <- forall a. Storable a => Ptr a -> IO a
peek @PresentModeKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr PresentModeKHR))
Bool32
clipped <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32))
SwapchainKHR
oldSwapchain <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR ((Ptr (SwapchainCreateInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr SwapchainKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> SwapchainCreateFlagBitsKHR
-> SurfaceKHR
-> Flags
-> Format
-> ColorSpaceKHR
-> Extent2D
-> Flags
-> ImageUsageFlags
-> SharingMode
-> Vector Flags
-> SurfaceTransformFlagBitsKHR
-> CompositeAlphaFlagBitsKHR
-> PresentModeKHR
-> Bool
-> SwapchainKHR
-> SwapchainCreateInfoKHR es
SwapchainCreateInfoKHR
Chain es
next
SwapchainCreateFlagBitsKHR
flags
SurfaceKHR
surface
Flags
minImageCount
Format
imageFormat
ColorSpaceKHR
imageColorSpace
Extent2D
imageExtent
Flags
imageArrayLayers
ImageUsageFlags
imageUsage
SharingMode
imageSharingMode
Vector Flags
pQueueFamilyIndices'
SurfaceTransformFlagBitsKHR
preTransform
CompositeAlphaFlagBitsKHR
compositeAlpha
PresentModeKHR
presentMode
(Bool32 -> Bool
bool32ToBool Bool32
clipped)
SwapchainKHR
oldSwapchain
instance es ~ '[] => Zero (SwapchainCreateInfoKHR es) where
zero :: SwapchainCreateInfoKHR es
zero = forall (es :: [*]).
Chain es
-> SwapchainCreateFlagBitsKHR
-> SurfaceKHR
-> Flags
-> Format
-> ColorSpaceKHR
-> Extent2D
-> Flags
-> ImageUsageFlags
-> SharingMode
-> Vector Flags
-> SurfaceTransformFlagBitsKHR
-> CompositeAlphaFlagBitsKHR
-> PresentModeKHR
-> Bool
-> SwapchainKHR
-> SwapchainCreateInfoKHR es
SwapchainCreateInfoKHR
()
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data PresentInfoKHR (es :: [Type]) = PresentInfoKHR
{
forall (es :: [*]). PresentInfoKHR es -> Chain es
next :: Chain es
,
forall (es :: [*]). PresentInfoKHR es -> Vector Semaphore
waitSemaphores :: Vector Semaphore
,
forall (es :: [*]). PresentInfoKHR es -> Vector SwapchainKHR
swapchains :: Vector SwapchainKHR
,
forall (es :: [*]). PresentInfoKHR es -> Vector Flags
imageIndices :: Vector Word32
,
forall (es :: [*]). PresentInfoKHR es -> Ptr Result
results :: Ptr Result
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PresentInfoKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PresentInfoKHR es)
instance Extensible PresentInfoKHR where
extensibleTypeName :: String
extensibleTypeName = String
"PresentInfoKHR"
setNext :: forall (ds :: [*]) (es :: [*]).
PresentInfoKHR ds -> Chain es -> PresentInfoKHR es
setNext PresentInfoKHR{Ptr Result
Vector Flags
Vector Semaphore
Vector SwapchainKHR
Chain ds
results :: Ptr Result
imageIndices :: Vector Flags
swapchains :: Vector SwapchainKHR
waitSemaphores :: Vector Semaphore
next :: Chain ds
$sel:results:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Ptr Result
$sel:imageIndices:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Flags
$sel:swapchains:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector SwapchainKHR
$sel:waitSemaphores:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Semaphore
$sel:next:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Chain es
..} Chain es
next' = PresentInfoKHR{$sel:next:PresentInfoKHR :: Chain es
next = Chain es
next', Ptr Result
Vector Flags
Vector Semaphore
Vector SwapchainKHR
results :: Ptr Result
imageIndices :: Vector Flags
swapchains :: Vector SwapchainKHR
waitSemaphores :: Vector Semaphore
$sel:results:PresentInfoKHR :: Ptr Result
$sel:imageIndices:PresentInfoKHR :: Vector Flags
$sel:swapchains:PresentInfoKHR :: Vector SwapchainKHR
$sel:waitSemaphores:PresentInfoKHR :: Vector Semaphore
..}
getNext :: forall (es :: [*]). PresentInfoKHR es -> Chain es
getNext PresentInfoKHR{Ptr Result
Vector Flags
Vector Semaphore
Vector SwapchainKHR
Chain es
results :: Ptr Result
imageIndices :: Vector Flags
swapchains :: Vector SwapchainKHR
waitSemaphores :: Vector Semaphore
next :: Chain es
$sel:results:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Ptr Result
$sel:imageIndices:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Flags
$sel:swapchains:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector SwapchainKHR
$sel:waitSemaphores:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Semaphore
$sel:next:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends PresentInfoKHR e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends PresentInfoKHR e => b) -> Maybe b
extends proxy e
_ Extends PresentInfoKHR e => b
f
| Just e :~: SwapchainPresentModeInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainPresentModeInfoEXT = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: SwapchainPresentFenceInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SwapchainPresentFenceInfoEXT = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: FrameBoundaryEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @FrameBoundaryEXT = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: PresentFrameTokenGGP
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PresentFrameTokenGGP = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: PresentTimesInfoGOOGLE
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PresentTimesInfoGOOGLE = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: PresentIdKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PresentIdKHR = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: DeviceGroupPresentInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeviceGroupPresentInfoKHR = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: PresentRegionsKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PresentRegionsKHR = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Just e :~: DisplayPresentInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DisplayPresentInfoKHR = forall a. a -> Maybe a
Just Extends PresentInfoKHR e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss PresentInfoKHR es
, PokeChain es ) => ToCStruct (PresentInfoKHR es) where
withCStruct :: forall b.
PresentInfoKHR es -> (Ptr (PresentInfoKHR es) -> IO b) -> IO b
withCStruct PresentInfoKHR es
x Ptr (PresentInfoKHR es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr (PresentInfoKHR es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PresentInfoKHR es)
p PresentInfoKHR es
x (Ptr (PresentInfoKHR es) -> IO b
f Ptr (PresentInfoKHR es)
p)
pokeCStruct :: forall b.
Ptr (PresentInfoKHR es) -> PresentInfoKHR es -> IO b -> IO b
pokeCStruct Ptr (PresentInfoKHR es)
p PresentInfoKHR{Ptr Result
Vector Flags
Vector Semaphore
Vector SwapchainKHR
Chain es
results :: Ptr Result
imageIndices :: Vector Flags
swapchains :: Vector SwapchainKHR
waitSemaphores :: Vector Semaphore
next :: Chain es
$sel:results:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Ptr Result
$sel:imageIndices:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Flags
$sel:swapchains:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector SwapchainKHR
$sel:waitSemaphores:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Vector Semaphore
$sel:next:PresentInfoKHR :: forall (es :: [*]). PresentInfoKHR es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_INFO_KHR)
Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Semaphore
waitSemaphores)) :: Word32))
Ptr Semaphore
pPWaitSemaphores' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Semaphore ((forall a. Vector a -> Int
Data.Vector.length (Vector Semaphore
waitSemaphores)) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Semaphore
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Semaphore
pPWaitSemaphores' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Semaphore) (Semaphore
e)) (Vector Semaphore
waitSemaphores)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Semaphore))) (Ptr Semaphore
pPWaitSemaphores')
let pSwapchainsLength :: Int
pSwapchainsLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector SwapchainKHR
swapchains)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Flags
imageIndices)) forall a. Eq a => a -> a -> Bool
== Int
pSwapchainsLength) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pImageIndices and pSwapchains must have the same length" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pSwapchainsLength :: Word32))
"pSwapchain" ::: Ptr SwapchainKHR
pPSwapchains' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @SwapchainKHR ((forall a. Vector a -> Int
Data.Vector.length (Vector SwapchainKHR
swapchains)) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SwapchainKHR
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pSwapchain" ::: Ptr SwapchainKHR
pPSwapchains' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SwapchainKHR) (SwapchainKHR
e)) (Vector SwapchainKHR
swapchains)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr SwapchainKHR))) ("pSwapchain" ::: Ptr SwapchainKHR
pPSwapchains')
"pSwapchainImageCount" ::: Ptr Flags
pPImageIndices' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((forall a. Vector a -> Int
Data.Vector.length (Vector Flags
imageIndices)) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pSwapchainImageCount" ::: Ptr Flags
pPImageIndices' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
imageIndices)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32))) ("pSwapchainImageCount" ::: Ptr Flags
pPImageIndices')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr Result))) (Ptr Result
results)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (PresentInfoKHR es) -> IO b -> IO b
pokeZeroCStruct Ptr (PresentInfoKHR es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_INFO_KHR)
Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss PresentInfoKHR es
, PeekChain es ) => FromCStruct (PresentInfoKHR es) where
peekCStruct :: Ptr (PresentInfoKHR es) -> IO (PresentInfoKHR es)
peekCStruct Ptr (PresentInfoKHR es)
p = do
Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
Flags
waitSemaphoreCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Ptr Semaphore
pWaitSemaphores <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Semaphore) ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Semaphore)))
Vector Semaphore
pWaitSemaphores' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
waitSemaphoreCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Semaphore ((Ptr Semaphore
pWaitSemaphores forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Semaphore)))
Flags
swapchainCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
"pSwapchain" ::: Ptr SwapchainKHR
pSwapchains <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr SwapchainKHR) ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr SwapchainKHR)))
Vector SwapchainKHR
pSwapchains' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
swapchainCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR (("pSwapchain" ::: Ptr SwapchainKHR
pSwapchains forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SwapchainKHR)))
"pSwapchainImageCount" ::: Ptr Flags
pImageIndices <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32)))
Vector Flags
pImageIndices' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
swapchainCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSwapchainImageCount" ::: Ptr Flags
pImageIndices forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
Ptr Result
pResults <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Result) ((Ptr (PresentInfoKHR es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr Result)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> Vector Semaphore
-> Vector SwapchainKHR
-> Vector Flags
-> Ptr Result
-> PresentInfoKHR es
PresentInfoKHR
Chain es
next Vector Semaphore
pWaitSemaphores' Vector SwapchainKHR
pSwapchains' Vector Flags
pImageIndices' Ptr Result
pResults
instance es ~ '[] => Zero (PresentInfoKHR es) where
zero :: PresentInfoKHR es
zero = forall (es :: [*]).
Chain es
-> Vector Semaphore
-> Vector SwapchainKHR
-> Vector Flags
-> Ptr Result
-> PresentInfoKHR es
PresentInfoKHR
()
forall a. Monoid a => a
mempty
forall a. Monoid a => a
mempty
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
data DeviceGroupPresentCapabilitiesKHR = DeviceGroupPresentCapabilitiesKHR
{
DeviceGroupPresentCapabilitiesKHR -> Vector Flags
presentMask :: Vector Word32
,
DeviceGroupPresentCapabilitiesKHR
-> DeviceGroupPresentModeFlagBitsKHR
modes :: DeviceGroupPresentModeFlagsKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceGroupPresentCapabilitiesKHR)
#endif
deriving instance Show DeviceGroupPresentCapabilitiesKHR
instance ToCStruct DeviceGroupPresentCapabilitiesKHR where
withCStruct :: forall b.
DeviceGroupPresentCapabilitiesKHR
-> (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO b)
-> IO b
withCStruct DeviceGroupPresentCapabilitiesKHR
x ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
152 forall a b. (a -> b) -> a -> b
$ \"pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p DeviceGroupPresentCapabilitiesKHR
x (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO b
f "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p)
pokeCStruct :: forall b.
("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> DeviceGroupPresentCapabilitiesKHR -> IO b -> IO b
pokeCStruct "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p DeviceGroupPresentCapabilitiesKHR{Vector Flags
DeviceGroupPresentModeFlagBitsKHR
modes :: DeviceGroupPresentModeFlagBitsKHR
presentMask :: Vector Flags
$sel:modes:DeviceGroupPresentCapabilitiesKHR :: DeviceGroupPresentCapabilitiesKHR
-> DeviceGroupPresentModeFlagBitsKHR
$sel:presentMask:DeviceGroupPresentCapabilitiesKHR :: DeviceGroupPresentCapabilitiesKHR -> Vector Flags
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Flags
presentMask)) forall a. Ord a => a -> a -> Bool
<= forall a. Integral a => a
MAX_DEVICE_GROUP_SIZE) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"presentMask is too long, a maximum of MAX_DEVICE_GROUP_SIZE elements are allowed" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ((forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DEVICE_GROUP_SIZE Word32)))) forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
presentMask)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr DeviceGroupPresentModeFlagsKHR)) (DeviceGroupPresentModeFlagBitsKHR
modes)
IO b
f
cStructSize :: Int
cStructSize = Int
152
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO b -> IO b
pokeZeroCStruct "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr DeviceGroupPresentModeFlagsKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceGroupPresentCapabilitiesKHR where
peekCStruct :: ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO DeviceGroupPresentCapabilitiesKHR
peekCStruct "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p = do
Vector Flags
presentMask <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a. Integral a => a
MAX_DEVICE_GROUP_SIZE) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (((forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @Word32 (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DEVICE_GROUP_SIZE Word32)))) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
DeviceGroupPresentModeFlagBitsKHR
modes <- forall a. Storable a => Ptr a -> IO a
peek @DeviceGroupPresentModeFlagsKHR (("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr DeviceGroupPresentModeFlagsKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Vector Flags
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentCapabilitiesKHR
DeviceGroupPresentCapabilitiesKHR
Vector Flags
presentMask DeviceGroupPresentModeFlagBitsKHR
modes
instance Storable DeviceGroupPresentCapabilitiesKHR where
sizeOf :: DeviceGroupPresentCapabilitiesKHR -> Int
sizeOf ~DeviceGroupPresentCapabilitiesKHR
_ = Int
152
alignment :: DeviceGroupPresentCapabilitiesKHR -> Int
alignment ~DeviceGroupPresentCapabilitiesKHR
_ = Int
8
peek :: ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> IO DeviceGroupPresentCapabilitiesKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR)
-> DeviceGroupPresentCapabilitiesKHR -> IO ()
poke "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
ptr DeviceGroupPresentCapabilitiesKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDeviceGroupPresentCapabilities"
::: Ptr DeviceGroupPresentCapabilitiesKHR
ptr DeviceGroupPresentCapabilitiesKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceGroupPresentCapabilitiesKHR where
zero :: DeviceGroupPresentCapabilitiesKHR
zero = Vector Flags
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentCapabilitiesKHR
DeviceGroupPresentCapabilitiesKHR
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
data ImageSwapchainCreateInfoKHR = ImageSwapchainCreateInfoKHR
{
ImageSwapchainCreateInfoKHR -> SwapchainKHR
swapchain :: SwapchainKHR }
deriving (Typeable, ImageSwapchainCreateInfoKHR -> ImageSwapchainCreateInfoKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageSwapchainCreateInfoKHR -> ImageSwapchainCreateInfoKHR -> Bool
$c/= :: ImageSwapchainCreateInfoKHR -> ImageSwapchainCreateInfoKHR -> Bool
== :: ImageSwapchainCreateInfoKHR -> ImageSwapchainCreateInfoKHR -> Bool
$c== :: ImageSwapchainCreateInfoKHR -> ImageSwapchainCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImageSwapchainCreateInfoKHR)
#endif
deriving instance Show ImageSwapchainCreateInfoKHR
instance ToCStruct ImageSwapchainCreateInfoKHR where
withCStruct :: forall b.
ImageSwapchainCreateInfoKHR
-> (Ptr ImageSwapchainCreateInfoKHR -> IO b) -> IO b
withCStruct ImageSwapchainCreateInfoKHR
x Ptr ImageSwapchainCreateInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr ImageSwapchainCreateInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageSwapchainCreateInfoKHR
p ImageSwapchainCreateInfoKHR
x (Ptr ImageSwapchainCreateInfoKHR -> IO b
f Ptr ImageSwapchainCreateInfoKHR
p)
pokeCStruct :: forall b.
Ptr ImageSwapchainCreateInfoKHR
-> ImageSwapchainCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr ImageSwapchainCreateInfoKHR
p ImageSwapchainCreateInfoKHR{SwapchainKHR
swapchain :: SwapchainKHR
$sel:swapchain:ImageSwapchainCreateInfoKHR :: ImageSwapchainCreateInfoKHR -> SwapchainKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (SwapchainKHR
swapchain)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ImageSwapchainCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr ImageSwapchainCreateInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct ImageSwapchainCreateInfoKHR where
peekCStruct :: Ptr ImageSwapchainCreateInfoKHR -> IO ImageSwapchainCreateInfoKHR
peekCStruct Ptr ImageSwapchainCreateInfoKHR
p = do
SwapchainKHR
swapchain <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR ((Ptr ImageSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SwapchainKHR -> ImageSwapchainCreateInfoKHR
ImageSwapchainCreateInfoKHR
SwapchainKHR
swapchain
instance Storable ImageSwapchainCreateInfoKHR where
sizeOf :: ImageSwapchainCreateInfoKHR -> Int
sizeOf ~ImageSwapchainCreateInfoKHR
_ = Int
24
alignment :: ImageSwapchainCreateInfoKHR -> Int
alignment ~ImageSwapchainCreateInfoKHR
_ = Int
8
peek :: Ptr ImageSwapchainCreateInfoKHR -> IO ImageSwapchainCreateInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr ImageSwapchainCreateInfoKHR
-> ImageSwapchainCreateInfoKHR -> IO ()
poke Ptr ImageSwapchainCreateInfoKHR
ptr ImageSwapchainCreateInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageSwapchainCreateInfoKHR
ptr ImageSwapchainCreateInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ImageSwapchainCreateInfoKHR where
zero :: ImageSwapchainCreateInfoKHR
zero = SwapchainKHR -> ImageSwapchainCreateInfoKHR
ImageSwapchainCreateInfoKHR
forall a. Zero a => a
zero
data BindImageMemorySwapchainInfoKHR = BindImageMemorySwapchainInfoKHR
{
BindImageMemorySwapchainInfoKHR -> SwapchainKHR
swapchain :: SwapchainKHR
,
BindImageMemorySwapchainInfoKHR -> Flags
imageIndex :: Word32
}
deriving (Typeable, BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> Bool
$c/= :: BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> Bool
== :: BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> Bool
$c== :: BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindImageMemorySwapchainInfoKHR)
#endif
deriving instance Show BindImageMemorySwapchainInfoKHR
instance ToCStruct BindImageMemorySwapchainInfoKHR where
withCStruct :: forall b.
BindImageMemorySwapchainInfoKHR
-> (Ptr BindImageMemorySwapchainInfoKHR -> IO b) -> IO b
withCStruct BindImageMemorySwapchainInfoKHR
x Ptr BindImageMemorySwapchainInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr BindImageMemorySwapchainInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindImageMemorySwapchainInfoKHR
p BindImageMemorySwapchainInfoKHR
x (Ptr BindImageMemorySwapchainInfoKHR -> IO b
f Ptr BindImageMemorySwapchainInfoKHR
p)
pokeCStruct :: forall b.
Ptr BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> IO b -> IO b
pokeCStruct Ptr BindImageMemorySwapchainInfoKHR
p BindImageMemorySwapchainInfoKHR{Flags
SwapchainKHR
imageIndex :: Flags
swapchain :: SwapchainKHR
$sel:imageIndex:BindImageMemorySwapchainInfoKHR :: BindImageMemorySwapchainInfoKHR -> Flags
$sel:swapchain:BindImageMemorySwapchainInfoKHR :: BindImageMemorySwapchainInfoKHR -> SwapchainKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (SwapchainKHR
swapchain)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Flags
imageIndex)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr BindImageMemorySwapchainInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr BindImageMemorySwapchainInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BindImageMemorySwapchainInfoKHR where
peekCStruct :: Ptr BindImageMemorySwapchainInfoKHR
-> IO BindImageMemorySwapchainInfoKHR
peekCStruct Ptr BindImageMemorySwapchainInfoKHR
p = do
SwapchainKHR
swapchain <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR))
Flags
imageIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr BindImageMemorySwapchainInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SwapchainKHR -> Flags -> BindImageMemorySwapchainInfoKHR
BindImageMemorySwapchainInfoKHR
SwapchainKHR
swapchain Flags
imageIndex
instance Storable BindImageMemorySwapchainInfoKHR where
sizeOf :: BindImageMemorySwapchainInfoKHR -> Int
sizeOf ~BindImageMemorySwapchainInfoKHR
_ = Int
32
alignment :: BindImageMemorySwapchainInfoKHR -> Int
alignment ~BindImageMemorySwapchainInfoKHR
_ = Int
8
peek :: Ptr BindImageMemorySwapchainInfoKHR
-> IO BindImageMemorySwapchainInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BindImageMemorySwapchainInfoKHR
-> BindImageMemorySwapchainInfoKHR -> IO ()
poke Ptr BindImageMemorySwapchainInfoKHR
ptr BindImageMemorySwapchainInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindImageMemorySwapchainInfoKHR
ptr BindImageMemorySwapchainInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BindImageMemorySwapchainInfoKHR where
zero :: BindImageMemorySwapchainInfoKHR
zero = SwapchainKHR -> Flags -> BindImageMemorySwapchainInfoKHR
BindImageMemorySwapchainInfoKHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data AcquireNextImageInfoKHR = AcquireNextImageInfoKHR
{
AcquireNextImageInfoKHR -> SwapchainKHR
swapchain :: SwapchainKHR
,
AcquireNextImageInfoKHR -> Word64
timeout :: Word64
,
AcquireNextImageInfoKHR -> Semaphore
semaphore :: Semaphore
,
AcquireNextImageInfoKHR -> Fence
fence :: Fence
,
AcquireNextImageInfoKHR -> Flags
deviceMask :: Word32
}
deriving (Typeable, AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> Bool
$c/= :: AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> Bool
== :: AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> Bool
$c== :: AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AcquireNextImageInfoKHR)
#endif
deriving instance Show AcquireNextImageInfoKHR
instance ToCStruct AcquireNextImageInfoKHR where
withCStruct :: forall b.
AcquireNextImageInfoKHR
-> (Ptr AcquireNextImageInfoKHR -> IO b) -> IO b
withCStruct AcquireNextImageInfoKHR
x Ptr AcquireNextImageInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \Ptr AcquireNextImageInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AcquireNextImageInfoKHR
p AcquireNextImageInfoKHR
x (Ptr AcquireNextImageInfoKHR -> IO b
f Ptr AcquireNextImageInfoKHR
p)
pokeCStruct :: forall b.
Ptr AcquireNextImageInfoKHR
-> AcquireNextImageInfoKHR -> IO b -> IO b
pokeCStruct Ptr AcquireNextImageInfoKHR
p AcquireNextImageInfoKHR{Flags
Word64
Semaphore
Fence
SwapchainKHR
deviceMask :: Flags
fence :: Fence
semaphore :: Semaphore
timeout :: Word64
swapchain :: SwapchainKHR
$sel:deviceMask:AcquireNextImageInfoKHR :: AcquireNextImageInfoKHR -> Flags
$sel:fence:AcquireNextImageInfoKHR :: AcquireNextImageInfoKHR -> Fence
$sel:semaphore:AcquireNextImageInfoKHR :: AcquireNextImageInfoKHR -> Semaphore
$sel:timeout:AcquireNextImageInfoKHR :: AcquireNextImageInfoKHR -> Word64
$sel:swapchain:AcquireNextImageInfoKHR :: AcquireNextImageInfoKHR -> SwapchainKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (SwapchainKHR
swapchain)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) (Word64
timeout)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Semaphore)) (Semaphore
semaphore)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Fence)) (Fence
fence)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
deviceMask)
IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr AcquireNextImageInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr AcquireNextImageInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AcquireNextImageInfoKHR where
peekCStruct :: Ptr AcquireNextImageInfoKHR -> IO AcquireNextImageInfoKHR
peekCStruct Ptr AcquireNextImageInfoKHR
p = do
SwapchainKHR
swapchain <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR))
Word64
timeout <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64))
Semaphore
semaphore <- forall a. Storable a => Ptr a -> IO a
peek @Semaphore ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Semaphore))
Fence
fence <- forall a. Storable a => Ptr a -> IO a
peek @Fence ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Fence))
Flags
deviceMask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AcquireNextImageInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SwapchainKHR
-> Word64 -> Semaphore -> Fence -> Flags -> AcquireNextImageInfoKHR
AcquireNextImageInfoKHR
SwapchainKHR
swapchain Word64
timeout Semaphore
semaphore Fence
fence Flags
deviceMask
instance Storable AcquireNextImageInfoKHR where
sizeOf :: AcquireNextImageInfoKHR -> Int
sizeOf ~AcquireNextImageInfoKHR
_ = Int
56
alignment :: AcquireNextImageInfoKHR -> Int
alignment ~AcquireNextImageInfoKHR
_ = Int
8
peek :: Ptr AcquireNextImageInfoKHR -> IO AcquireNextImageInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AcquireNextImageInfoKHR -> AcquireNextImageInfoKHR -> IO ()
poke Ptr AcquireNextImageInfoKHR
ptr AcquireNextImageInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AcquireNextImageInfoKHR
ptr AcquireNextImageInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AcquireNextImageInfoKHR where
zero :: AcquireNextImageInfoKHR
zero = SwapchainKHR
-> Word64 -> Semaphore -> Fence -> Flags -> AcquireNextImageInfoKHR
AcquireNextImageInfoKHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DeviceGroupPresentInfoKHR = DeviceGroupPresentInfoKHR
{
DeviceGroupPresentInfoKHR -> Vector Flags
deviceMasks :: Vector Word32
,
DeviceGroupPresentInfoKHR -> DeviceGroupPresentModeFlagBitsKHR
mode :: DeviceGroupPresentModeFlagBitsKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceGroupPresentInfoKHR)
#endif
deriving instance Show DeviceGroupPresentInfoKHR
instance ToCStruct DeviceGroupPresentInfoKHR where
withCStruct :: forall b.
DeviceGroupPresentInfoKHR
-> (Ptr DeviceGroupPresentInfoKHR -> IO b) -> IO b
withCStruct DeviceGroupPresentInfoKHR
x Ptr DeviceGroupPresentInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceGroupPresentInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceGroupPresentInfoKHR
p DeviceGroupPresentInfoKHR
x (Ptr DeviceGroupPresentInfoKHR -> IO b
f Ptr DeviceGroupPresentInfoKHR
p)
pokeCStruct :: forall b.
Ptr DeviceGroupPresentInfoKHR
-> DeviceGroupPresentInfoKHR -> IO b -> IO b
pokeCStruct Ptr DeviceGroupPresentInfoKHR
p DeviceGroupPresentInfoKHR{Vector Flags
DeviceGroupPresentModeFlagBitsKHR
mode :: DeviceGroupPresentModeFlagBitsKHR
deviceMasks :: Vector Flags
$sel:mode:DeviceGroupPresentInfoKHR :: DeviceGroupPresentInfoKHR -> DeviceGroupPresentModeFlagBitsKHR
$sel:deviceMasks:DeviceGroupPresentInfoKHR :: DeviceGroupPresentInfoKHR -> Vector Flags
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Flags
deviceMasks)) :: Word32))
"pSwapchainImageCount" ::: Ptr Flags
pPDeviceMasks' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((forall a. Vector a -> Int
Data.Vector.length (Vector Flags
deviceMasks)) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pSwapchainImageCount" ::: Ptr Flags
pPDeviceMasks' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
deviceMasks)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32))) ("pSwapchainImageCount" ::: Ptr Flags
pPDeviceMasks')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceGroupPresentModeFlagBitsKHR)) (DeviceGroupPresentModeFlagBitsKHR
mode)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr DeviceGroupPresentInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr DeviceGroupPresentInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceGroupPresentModeFlagBitsKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceGroupPresentInfoKHR where
peekCStruct :: Ptr DeviceGroupPresentInfoKHR -> IO DeviceGroupPresentInfoKHR
peekCStruct Ptr DeviceGroupPresentInfoKHR
p = do
Flags
swapchainCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
"pSwapchainImageCount" ::: Ptr Flags
pDeviceMasks <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32)))
Vector Flags
pDeviceMasks' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
swapchainCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSwapchainImageCount" ::: Ptr Flags
pDeviceMasks forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
DeviceGroupPresentModeFlagBitsKHR
mode <- forall a. Storable a => Ptr a -> IO a
peek @DeviceGroupPresentModeFlagBitsKHR ((Ptr DeviceGroupPresentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceGroupPresentModeFlagBitsKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Vector Flags
-> DeviceGroupPresentModeFlagBitsKHR -> DeviceGroupPresentInfoKHR
DeviceGroupPresentInfoKHR
Vector Flags
pDeviceMasks' DeviceGroupPresentModeFlagBitsKHR
mode
instance Zero DeviceGroupPresentInfoKHR where
zero :: DeviceGroupPresentInfoKHR
zero = Vector Flags
-> DeviceGroupPresentModeFlagBitsKHR -> DeviceGroupPresentInfoKHR
DeviceGroupPresentInfoKHR
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
data DeviceGroupSwapchainCreateInfoKHR = DeviceGroupSwapchainCreateInfoKHR
{
DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupPresentModeFlagBitsKHR
modes :: DeviceGroupPresentModeFlagsKHR }
deriving (Typeable, DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> Bool
$c/= :: DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> Bool
== :: DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> Bool
$c== :: DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceGroupSwapchainCreateInfoKHR)
#endif
deriving instance Show DeviceGroupSwapchainCreateInfoKHR
instance ToCStruct DeviceGroupSwapchainCreateInfoKHR where
withCStruct :: forall b.
DeviceGroupSwapchainCreateInfoKHR
-> (Ptr DeviceGroupSwapchainCreateInfoKHR -> IO b) -> IO b
withCStruct DeviceGroupSwapchainCreateInfoKHR
x Ptr DeviceGroupSwapchainCreateInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceGroupSwapchainCreateInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceGroupSwapchainCreateInfoKHR
p DeviceGroupSwapchainCreateInfoKHR
x (Ptr DeviceGroupSwapchainCreateInfoKHR -> IO b
f Ptr DeviceGroupSwapchainCreateInfoKHR
p)
pokeCStruct :: forall b.
Ptr DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr DeviceGroupSwapchainCreateInfoKHR
p DeviceGroupSwapchainCreateInfoKHR{DeviceGroupPresentModeFlagBitsKHR
modes :: DeviceGroupPresentModeFlagBitsKHR
$sel:modes:DeviceGroupSwapchainCreateInfoKHR :: DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupPresentModeFlagBitsKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceGroupPresentModeFlagsKHR)) (DeviceGroupPresentModeFlagBitsKHR
modes)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr DeviceGroupSwapchainCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr DeviceGroupSwapchainCreateInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceGroupPresentModeFlagsKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceGroupSwapchainCreateInfoKHR where
peekCStruct :: Ptr DeviceGroupSwapchainCreateInfoKHR
-> IO DeviceGroupSwapchainCreateInfoKHR
peekCStruct Ptr DeviceGroupSwapchainCreateInfoKHR
p = do
DeviceGroupPresentModeFlagBitsKHR
modes <- forall a. Storable a => Ptr a -> IO a
peek @DeviceGroupPresentModeFlagsKHR ((Ptr DeviceGroupSwapchainCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceGroupPresentModeFlagsKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupSwapchainCreateInfoKHR
DeviceGroupSwapchainCreateInfoKHR
DeviceGroupPresentModeFlagBitsKHR
modes
instance Storable DeviceGroupSwapchainCreateInfoKHR where
sizeOf :: DeviceGroupSwapchainCreateInfoKHR -> Int
sizeOf ~DeviceGroupSwapchainCreateInfoKHR
_ = Int
24
alignment :: DeviceGroupSwapchainCreateInfoKHR -> Int
alignment ~DeviceGroupSwapchainCreateInfoKHR
_ = Int
8
peek :: Ptr DeviceGroupSwapchainCreateInfoKHR
-> IO DeviceGroupSwapchainCreateInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceGroupSwapchainCreateInfoKHR
-> DeviceGroupSwapchainCreateInfoKHR -> IO ()
poke Ptr DeviceGroupSwapchainCreateInfoKHR
ptr DeviceGroupSwapchainCreateInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceGroupSwapchainCreateInfoKHR
ptr DeviceGroupSwapchainCreateInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceGroupSwapchainCreateInfoKHR where
zero :: DeviceGroupSwapchainCreateInfoKHR
zero = DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupSwapchainCreateInfoKHR
DeviceGroupSwapchainCreateInfoKHR
forall a. Zero a => a
zero
type DeviceGroupPresentModeFlagsKHR = DeviceGroupPresentModeFlagBitsKHR
newtype DeviceGroupPresentModeFlagBitsKHR = DeviceGroupPresentModeFlagBitsKHR Flags
deriving newtype (DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c/= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
== :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c== :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
Eq, Eq DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Ordering
DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$cmin :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
max :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$cmax :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
>= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c>= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
> :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c> :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
<= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c<= :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
< :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
$c< :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Bool
compare :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Ordering
$ccompare :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR -> Ordering
Ord, ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO DeviceGroupPresentModeFlagBitsKHR
("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> IO DeviceGroupPresentModeFlagBitsKHR
("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> DeviceGroupPresentModeFlagBitsKHR -> IO ()
DeviceGroupPresentModeFlagBitsKHR -> Int
forall b. Ptr b -> Int -> IO DeviceGroupPresentModeFlagBitsKHR
forall b.
Ptr b -> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> DeviceGroupPresentModeFlagBitsKHR -> IO ()
$cpoke :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> DeviceGroupPresentModeFlagBitsKHR -> IO ()
peek :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO DeviceGroupPresentModeFlagBitsKHR
$cpeek :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> IO DeviceGroupPresentModeFlagBitsKHR
pokeByteOff :: forall b.
Ptr b -> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DeviceGroupPresentModeFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DeviceGroupPresentModeFlagBitsKHR
pokeElemOff :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
$cpokeElemOff :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> DeviceGroupPresentModeFlagBitsKHR -> IO ()
peekElemOff :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> IO DeviceGroupPresentModeFlagBitsKHR
$cpeekElemOff :: ("pModes" ::: Ptr DeviceGroupPresentModeFlagBitsKHR)
-> Int -> IO DeviceGroupPresentModeFlagBitsKHR
alignment :: DeviceGroupPresentModeFlagBitsKHR -> Int
$calignment :: DeviceGroupPresentModeFlagBitsKHR -> Int
sizeOf :: DeviceGroupPresentModeFlagBitsKHR -> Int
$csizeOf :: DeviceGroupPresentModeFlagBitsKHR -> Int
Storable, DeviceGroupPresentModeFlagBitsKHR
forall a. a -> Zero a
zero :: DeviceGroupPresentModeFlagBitsKHR
$czero :: DeviceGroupPresentModeFlagBitsKHR
Zero, Eq DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR
Int -> DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR -> Bool
DeviceGroupPresentModeFlagBitsKHR -> Int
DeviceGroupPresentModeFlagBitsKHR -> Maybe Int
DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR -> Int -> Bool
DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: DeviceGroupPresentModeFlagBitsKHR -> Int
$cpopCount :: DeviceGroupPresentModeFlagBitsKHR -> Int
rotateR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$crotateR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
rotateL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$crotateL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
unsafeShiftR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cunsafeShiftR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
shiftR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cshiftR :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
unsafeShiftL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cunsafeShiftL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
shiftL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cshiftL :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
isSigned :: DeviceGroupPresentModeFlagBitsKHR -> Bool
$cisSigned :: DeviceGroupPresentModeFlagBitsKHR -> Bool
bitSize :: DeviceGroupPresentModeFlagBitsKHR -> Int
$cbitSize :: DeviceGroupPresentModeFlagBitsKHR -> Int
bitSizeMaybe :: DeviceGroupPresentModeFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: DeviceGroupPresentModeFlagBitsKHR -> Maybe Int
testBit :: DeviceGroupPresentModeFlagBitsKHR -> Int -> Bool
$ctestBit :: DeviceGroupPresentModeFlagBitsKHR -> Int -> Bool
complementBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$ccomplementBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
clearBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cclearBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
setBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$csetBit :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
bit :: Int -> DeviceGroupPresentModeFlagBitsKHR
$cbit :: Int -> DeviceGroupPresentModeFlagBitsKHR
zeroBits :: DeviceGroupPresentModeFlagBitsKHR
$czeroBits :: DeviceGroupPresentModeFlagBitsKHR
rotate :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$crotate :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
shift :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
$cshift :: DeviceGroupPresentModeFlagBitsKHR
-> Int -> DeviceGroupPresentModeFlagBitsKHR
complement :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$ccomplement :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
xor :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$cxor :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
.|. :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$c.|. :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
.&. :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
$c.&. :: DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
-> DeviceGroupPresentModeFlagBitsKHR
Bits, Bits DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: DeviceGroupPresentModeFlagBitsKHR -> Int
$ccountTrailingZeros :: DeviceGroupPresentModeFlagBitsKHR -> Int
countLeadingZeros :: DeviceGroupPresentModeFlagBitsKHR -> Int
$ccountLeadingZeros :: DeviceGroupPresentModeFlagBitsKHR -> Int
finiteBitSize :: DeviceGroupPresentModeFlagBitsKHR -> Int
$cfiniteBitSize :: DeviceGroupPresentModeFlagBitsKHR -> Int
FiniteBits)
pattern $bDEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR :: DeviceGroupPresentModeFlagBitsKHR
$mDEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR :: forall {r}.
DeviceGroupPresentModeFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = DeviceGroupPresentModeFlagBitsKHR 0x00000001
pattern $bDEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR :: DeviceGroupPresentModeFlagBitsKHR
$mDEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR :: forall {r}.
DeviceGroupPresentModeFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = DeviceGroupPresentModeFlagBitsKHR 0x00000002
pattern $bDEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR :: DeviceGroupPresentModeFlagBitsKHR
$mDEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR :: forall {r}.
DeviceGroupPresentModeFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = DeviceGroupPresentModeFlagBitsKHR 0x00000004
pattern $bDEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR :: DeviceGroupPresentModeFlagBitsKHR
$mDEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR :: forall {r}.
DeviceGroupPresentModeFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = DeviceGroupPresentModeFlagBitsKHR 0x00000008
conNameDeviceGroupPresentModeFlagBitsKHR :: String
conNameDeviceGroupPresentModeFlagBitsKHR :: String
conNameDeviceGroupPresentModeFlagBitsKHR = String
"DeviceGroupPresentModeFlagBitsKHR"
enumPrefixDeviceGroupPresentModeFlagBitsKHR :: String
enumPrefixDeviceGroupPresentModeFlagBitsKHR :: String
enumPrefixDeviceGroupPresentModeFlagBitsKHR = String
"DEVICE_GROUP_PRESENT_MODE_"
showTableDeviceGroupPresentModeFlagBitsKHR :: [(DeviceGroupPresentModeFlagBitsKHR, String)]
showTableDeviceGroupPresentModeFlagBitsKHR :: [(DeviceGroupPresentModeFlagBitsKHR, String)]
showTableDeviceGroupPresentModeFlagBitsKHR =
[
( DeviceGroupPresentModeFlagBitsKHR
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
, String
"LOCAL_BIT_KHR"
)
,
( DeviceGroupPresentModeFlagBitsKHR
DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
, String
"REMOTE_BIT_KHR"
)
,
( DeviceGroupPresentModeFlagBitsKHR
DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
, String
"SUM_BIT_KHR"
)
,
( DeviceGroupPresentModeFlagBitsKHR
DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
, String
"LOCAL_MULTI_DEVICE_BIT_KHR"
)
]
instance Show DeviceGroupPresentModeFlagBitsKHR where
showsPrec :: Int -> DeviceGroupPresentModeFlagBitsKHR -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixDeviceGroupPresentModeFlagBitsKHR
[(DeviceGroupPresentModeFlagBitsKHR, String)]
showTableDeviceGroupPresentModeFlagBitsKHR
String
conNameDeviceGroupPresentModeFlagBitsKHR
(\(DeviceGroupPresentModeFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read DeviceGroupPresentModeFlagBitsKHR where
readPrec :: ReadPrec DeviceGroupPresentModeFlagBitsKHR
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixDeviceGroupPresentModeFlagBitsKHR
[(DeviceGroupPresentModeFlagBitsKHR, String)]
showTableDeviceGroupPresentModeFlagBitsKHR
String
conNameDeviceGroupPresentModeFlagBitsKHR
Flags -> DeviceGroupPresentModeFlagBitsKHR
DeviceGroupPresentModeFlagBitsKHR
type SwapchainCreateFlagsKHR = SwapchainCreateFlagBitsKHR
newtype SwapchainCreateFlagBitsKHR = SwapchainCreateFlagBitsKHR Flags
deriving newtype (SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c/= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
== :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c== :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
Eq, Eq SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> Ordering
SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$cmin :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
max :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$cmax :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
>= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c>= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
> :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c> :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
<= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c<= :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
< :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
$c< :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR -> Bool
compare :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> Ordering
$ccompare :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> Ordering
Ord, Ptr SwapchainCreateFlagBitsKHR -> IO SwapchainCreateFlagBitsKHR
Ptr SwapchainCreateFlagBitsKHR
-> Int -> IO SwapchainCreateFlagBitsKHR
Ptr SwapchainCreateFlagBitsKHR
-> Int -> SwapchainCreateFlagBitsKHR -> IO ()
Ptr SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> IO ()
SwapchainCreateFlagBitsKHR -> Int
forall b. Ptr b -> Int -> IO SwapchainCreateFlagBitsKHR
forall b. Ptr b -> Int -> SwapchainCreateFlagBitsKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> IO ()
$cpoke :: Ptr SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> IO ()
peek :: Ptr SwapchainCreateFlagBitsKHR -> IO SwapchainCreateFlagBitsKHR
$cpeek :: Ptr SwapchainCreateFlagBitsKHR -> IO SwapchainCreateFlagBitsKHR
pokeByteOff :: forall b. Ptr b -> Int -> SwapchainCreateFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SwapchainCreateFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SwapchainCreateFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SwapchainCreateFlagBitsKHR
pokeElemOff :: Ptr SwapchainCreateFlagBitsKHR
-> Int -> SwapchainCreateFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr SwapchainCreateFlagBitsKHR
-> Int -> SwapchainCreateFlagBitsKHR -> IO ()
peekElemOff :: Ptr SwapchainCreateFlagBitsKHR
-> Int -> IO SwapchainCreateFlagBitsKHR
$cpeekElemOff :: Ptr SwapchainCreateFlagBitsKHR
-> Int -> IO SwapchainCreateFlagBitsKHR
alignment :: SwapchainCreateFlagBitsKHR -> Int
$calignment :: SwapchainCreateFlagBitsKHR -> Int
sizeOf :: SwapchainCreateFlagBitsKHR -> Int
$csizeOf :: SwapchainCreateFlagBitsKHR -> Int
Storable, SwapchainCreateFlagBitsKHR
forall a. a -> Zero a
zero :: SwapchainCreateFlagBitsKHR
$czero :: SwapchainCreateFlagBitsKHR
Zero, Eq SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR
Int -> SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR -> Bool
SwapchainCreateFlagBitsKHR -> Int
SwapchainCreateFlagBitsKHR -> Maybe Int
SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR -> Int -> Bool
SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: SwapchainCreateFlagBitsKHR -> Int
$cpopCount :: SwapchainCreateFlagBitsKHR -> Int
rotateR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$crotateR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
rotateL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$crotateL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
unsafeShiftR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cunsafeShiftR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
shiftR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cshiftR :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
unsafeShiftL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cunsafeShiftL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
shiftL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cshiftL :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
isSigned :: SwapchainCreateFlagBitsKHR -> Bool
$cisSigned :: SwapchainCreateFlagBitsKHR -> Bool
bitSize :: SwapchainCreateFlagBitsKHR -> Int
$cbitSize :: SwapchainCreateFlagBitsKHR -> Int
bitSizeMaybe :: SwapchainCreateFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: SwapchainCreateFlagBitsKHR -> Maybe Int
testBit :: SwapchainCreateFlagBitsKHR -> Int -> Bool
$ctestBit :: SwapchainCreateFlagBitsKHR -> Int -> Bool
complementBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$ccomplementBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
clearBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cclearBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
setBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$csetBit :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
bit :: Int -> SwapchainCreateFlagBitsKHR
$cbit :: Int -> SwapchainCreateFlagBitsKHR
zeroBits :: SwapchainCreateFlagBitsKHR
$czeroBits :: SwapchainCreateFlagBitsKHR
rotate :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$crotate :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
shift :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
$cshift :: SwapchainCreateFlagBitsKHR -> Int -> SwapchainCreateFlagBitsKHR
complement :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$ccomplement :: SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
xor :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$cxor :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
.|. :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$c.|. :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
.&. :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
$c.&. :: SwapchainCreateFlagBitsKHR
-> SwapchainCreateFlagBitsKHR -> SwapchainCreateFlagBitsKHR
Bits, Bits SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SwapchainCreateFlagBitsKHR -> Int
$ccountTrailingZeros :: SwapchainCreateFlagBitsKHR -> Int
countLeadingZeros :: SwapchainCreateFlagBitsKHR -> Int
$ccountLeadingZeros :: SwapchainCreateFlagBitsKHR -> Int
finiteBitSize :: SwapchainCreateFlagBitsKHR -> Int
$cfiniteBitSize :: SwapchainCreateFlagBitsKHR -> Int
FiniteBits)
pattern $bSWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT :: SwapchainCreateFlagBitsKHR
$mSWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT :: forall {r}.
SwapchainCreateFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = SwapchainCreateFlagBitsKHR 0x00000008
pattern $bSWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR :: SwapchainCreateFlagBitsKHR
$mSWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR :: forall {r}.
SwapchainCreateFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = SwapchainCreateFlagBitsKHR 0x00000004
pattern $bSWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR :: SwapchainCreateFlagBitsKHR
$mSWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR :: forall {r}.
SwapchainCreateFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = SwapchainCreateFlagBitsKHR 0x00000001
pattern $bSWAPCHAIN_CREATE_PROTECTED_BIT_KHR :: SwapchainCreateFlagBitsKHR
$mSWAPCHAIN_CREATE_PROTECTED_BIT_KHR :: forall {r}.
SwapchainCreateFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = SwapchainCreateFlagBitsKHR 0x00000002
conNameSwapchainCreateFlagBitsKHR :: String
conNameSwapchainCreateFlagBitsKHR :: String
conNameSwapchainCreateFlagBitsKHR = String
"SwapchainCreateFlagBitsKHR"
enumPrefixSwapchainCreateFlagBitsKHR :: String
enumPrefixSwapchainCreateFlagBitsKHR :: String
enumPrefixSwapchainCreateFlagBitsKHR = String
"SWAPCHAIN_CREATE_"
showTableSwapchainCreateFlagBitsKHR :: [(SwapchainCreateFlagBitsKHR, String)]
showTableSwapchainCreateFlagBitsKHR :: [(SwapchainCreateFlagBitsKHR, String)]
showTableSwapchainCreateFlagBitsKHR =
[
( SwapchainCreateFlagBitsKHR
SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT
, String
"DEFERRED_MEMORY_ALLOCATION_BIT_EXT"
)
,
( SwapchainCreateFlagBitsKHR
SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR
, String
"MUTABLE_FORMAT_BIT_KHR"
)
,
( SwapchainCreateFlagBitsKHR
SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
, String
"SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR"
)
,
( SwapchainCreateFlagBitsKHR
SWAPCHAIN_CREATE_PROTECTED_BIT_KHR
, String
"PROTECTED_BIT_KHR"
)
]
instance Show SwapchainCreateFlagBitsKHR where
showsPrec :: Int -> SwapchainCreateFlagBitsKHR -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixSwapchainCreateFlagBitsKHR
[(SwapchainCreateFlagBitsKHR, String)]
showTableSwapchainCreateFlagBitsKHR
String
conNameSwapchainCreateFlagBitsKHR
(\(SwapchainCreateFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read SwapchainCreateFlagBitsKHR where
readPrec :: ReadPrec SwapchainCreateFlagBitsKHR
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixSwapchainCreateFlagBitsKHR
[(SwapchainCreateFlagBitsKHR, String)]
showTableSwapchainCreateFlagBitsKHR
String
conNameSwapchainCreateFlagBitsKHR
Flags -> SwapchainCreateFlagBitsKHR
SwapchainCreateFlagBitsKHR
type KHR_SWAPCHAIN_SPEC_VERSION = 70
pattern KHR_SWAPCHAIN_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_SWAPCHAIN_SPEC_VERSION :: forall a. Integral a => a
$mKHR_SWAPCHAIN_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_SWAPCHAIN_SPEC_VERSION = 70
type KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"
pattern KHR_SWAPCHAIN_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_SWAPCHAIN_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_SWAPCHAIN_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"