{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_surface ( destroySurfaceKHR
, getPhysicalDeviceSurfaceSupportKHR
, getPhysicalDeviceSurfaceCapabilitiesKHR
, getPhysicalDeviceSurfaceFormatsKHR
, getPhysicalDeviceSurfacePresentModesKHR
, pattern COLORSPACE_SRGB_NONLINEAR_KHR
, SurfaceCapabilitiesKHR(..)
, SurfaceFormatKHR(..)
, PresentModeKHR( PRESENT_MODE_IMMEDIATE_KHR
, PRESENT_MODE_MAILBOX_KHR
, PRESENT_MODE_FIFO_KHR
, PRESENT_MODE_FIFO_RELAXED_KHR
, PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
, PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
, ..
)
, ColorSpaceKHR( COLOR_SPACE_SRGB_NONLINEAR_KHR
, COLOR_SPACE_DISPLAY_NATIVE_AMD
, COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
, COLOR_SPACE_PASS_THROUGH_EXT
, COLOR_SPACE_ADOBERGB_NONLINEAR_EXT
, COLOR_SPACE_ADOBERGB_LINEAR_EXT
, COLOR_SPACE_HDR10_HLG_EXT
, COLOR_SPACE_DOLBYVISION_EXT
, COLOR_SPACE_HDR10_ST2084_EXT
, COLOR_SPACE_BT2020_LINEAR_EXT
, COLOR_SPACE_BT709_NONLINEAR_EXT
, COLOR_SPACE_BT709_LINEAR_EXT
, COLOR_SPACE_DCI_P3_NONLINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_LINEAR_EXT
, COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT
, ..
)
, CompositeAlphaFlagsKHR
, CompositeAlphaFlagBitsKHR( COMPOSITE_ALPHA_OPAQUE_BIT_KHR
, COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
, COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
, COMPOSITE_ALPHA_INHERIT_BIT_KHR
, ..
)
, SurfaceTransformFlagsKHR
, SurfaceTransformFlagBitsKHR( SURFACE_TRANSFORM_IDENTITY_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
, SURFACE_TRANSFORM_INHERIT_BIT_KHR
, ..
)
, KHR_SURFACE_SPEC_VERSION
, pattern KHR_SURFACE_SPEC_VERSION
, KHR_SURFACE_EXTENSION_NAME
, pattern KHR_SURFACE_EXTENSION_NAME
, SurfaceKHR(..)
) where
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 Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Dynamic (InstanceCmds(pVkDestroySurfaceKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceCapabilitiesKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceFormatsKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfacePresentModesKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceSupportKHR))
import Vulkan.Core10.Handles (Instance_T)
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Extensions.Handles (SurfaceKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroySurfaceKHR
:: FunPtr (Ptr Instance_T -> SurfaceKHR -> Ptr AllocationCallbacks -> IO ()) -> Ptr Instance_T -> SurfaceKHR -> Ptr AllocationCallbacks -> IO ()
destroySurfaceKHR :: forall io
. (MonadIO io)
=>
Instance
->
SurfaceKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySurfaceKHR :: Instance
-> SurfaceKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySurfaceKHR instance' :: Instance
instance' surface :: SurfaceKHR
surface allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkDestroySurfaceKHRPtr :: FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroySurfaceKHR (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkDestroySurfaceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroySurfaceKHR' :: Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySurfaceKHR' = FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroySurfaceKHR FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkDestroySurfaceKHR" (Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySurfaceKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) (SurfaceKHR
surface) "pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceSupportKHR
:: FunPtr (Ptr PhysicalDevice_T -> Word32 -> SurfaceKHR -> Ptr Bool32 -> IO Result) -> Ptr PhysicalDevice_T -> Word32 -> SurfaceKHR -> Ptr Bool32 -> IO Result
getPhysicalDeviceSurfaceSupportKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
("queueFamilyIndex" ::: Word32)
->
SurfaceKHR
-> io (("supported" ::: Bool))
getPhysicalDeviceSurfaceSupportKHR :: PhysicalDevice
-> ("queueFamilyIndex" ::: Word32) -> SurfaceKHR -> io Bool
getPhysicalDeviceSurfaceSupportKHR physicalDevice :: PhysicalDevice
physicalDevice queueFamilyIndex :: "queueFamilyIndex" ::: Word32
queueFamilyIndex surface :: SurfaceKHR
surface = IO Bool -> io Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> io Bool)
-> (ContT Bool IO Bool -> IO Bool) -> ContT Bool IO Bool -> io Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Bool IO Bool -> IO Bool
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Bool IO Bool -> io Bool) -> ContT Bool IO Bool -> io Bool
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceSupportKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
pVkGetPhysicalDeviceSurfaceSupportKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO () -> ContT Bool IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Bool IO ()) -> IO () -> ContT Bool IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceSurfaceSupportKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceSupportKHR' :: Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
vkGetPhysicalDeviceSurfaceSupportKHR' = FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
mkVkGetPhysicalDeviceSurfaceSupportKHR FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr
"pSupported" ::: Ptr Bool32
pPSupported <- ((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32))
-> ((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32)
forall a b. (a -> b) -> a -> b
$ IO ("pSupported" ::: Ptr Bool32)
-> (("pSupported" ::: Ptr Bool32) -> IO ())
-> (("pSupported" ::: Ptr Bool32) -> IO Bool)
-> IO Bool
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSupported" ::: Ptr Bool32)
forall a. Int -> IO (Ptr a)
callocBytes @Bool32 4) ("pSupported" ::: Ptr Bool32) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT Bool IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Bool IO Result)
-> IO Result -> ContT Bool IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfaceSupportKHR" (Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
vkGetPhysicalDeviceSurfaceSupportKHR' (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)) ("queueFamilyIndex" ::: Word32
queueFamilyIndex) (SurfaceKHR
surface) ("pSupported" ::: Ptr Bool32
pPSupported))
IO () -> ContT Bool IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Bool IO ()) -> IO () -> ContT Bool IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Bool32
pSupported <- IO Bool32 -> ContT Bool IO Bool32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Bool32 -> ContT Bool IO Bool32)
-> IO Bool32 -> ContT Bool IO Bool32
forall a b. (a -> b) -> a -> b
$ ("pSupported" ::: Ptr Bool32) -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 "pSupported" ::: Ptr Bool32
pPSupported
Bool -> ContT Bool IO Bool
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Bool -> ContT Bool IO Bool) -> Bool -> ContT Bool IO Bool
forall a b. (a -> b) -> a -> b
$ ((Bool32 -> Bool
bool32ToBool Bool32
pSupported))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceCapabilitiesKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilitiesKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilitiesKHR -> IO Result
getPhysicalDeviceSurfaceCapabilitiesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (SurfaceCapabilitiesKHR)
getPhysicalDeviceSurfaceCapabilitiesKHR :: PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilitiesKHR
getPhysicalDeviceSurfaceCapabilitiesKHR physicalDevice :: PhysicalDevice
physicalDevice surface :: SurfaceKHR
surface = IO SurfaceCapabilitiesKHR -> io SurfaceCapabilitiesKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceCapabilitiesKHR -> io SurfaceCapabilitiesKHR)
-> (ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> IO SurfaceCapabilitiesKHR)
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> IO SurfaceCapabilitiesKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR)
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfaceCapabilitiesKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilitiesKHR IO ())
-> IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceSurfaceCapabilitiesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceCapabilitiesKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilitiesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfaceCapabilitiesKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr
"pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities <- ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR)
-> ContT
SurfaceCapabilitiesKHR
IO
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct SurfaceCapabilitiesKHR =>
(("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b)
-> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @SurfaceCapabilitiesKHR)
Result
r <- IO Result -> ContT SurfaceCapabilitiesKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceCapabilitiesKHR IO Result)
-> IO Result -> ContT SurfaceCapabilitiesKHR IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilitiesKHR' (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)) (SurfaceKHR
surface) ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities))
IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilitiesKHR IO ())
-> IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
SurfaceCapabilitiesKHR
pSurfaceCapabilities <- IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceCapabilitiesKHR "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities
SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ (SurfaceCapabilitiesKHR
pSurfaceCapabilities)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceFormatsKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr SurfaceFormatKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr SurfaceFormatKHR -> IO Result
getPhysicalDeviceSurfaceFormatsKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (Result, ("surfaceFormats" ::: Vector SurfaceFormatKHR))
getPhysicalDeviceSurfaceFormatsKHR :: PhysicalDevice
-> SurfaceKHR
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
getPhysicalDeviceSurfaceFormatsKHR physicalDevice :: PhysicalDevice
physicalDevice surface :: SurfaceKHR
surface = IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceFormatsKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfaceFormatsKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceSurfaceFormatsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceFormatsKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfaceFormatsKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPSurfaceFormatCount <- ((("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pSurfaceFormatCount"
::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> (("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ())
-> (("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result)
-> IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfaceFormatsKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR' Ptr PhysicalDevice_T
physicalDevice' (SurfaceKHR
surface) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPSurfaceFormatCount) ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a
nullPtr))
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"queueFamilyIndex" ::: Word32
pSurfaceFormatCount <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPSurfaceFormatCount
"pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats <- ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR))
-> ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO ())
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
forall a. Int -> IO (Ptr a)
callocBytes @SurfaceFormatKHR ((("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pSurfaceFormatCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8)) ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO ()
forall a. Ptr a -> IO ()
free
[()]
_ <- (Int
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> [Int]
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO [()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\i :: Int
i -> ((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> ((()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8) :: Ptr SurfaceFormatKHR) (IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ((()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> () -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ ())) [0..(("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pSurfaceFormatCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- 1]
Result
r' <- IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result)
-> IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfaceFormatsKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR' Ptr PhysicalDevice_T
physicalDevice' (SurfaceKHR
surface) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPSurfaceFormatCount) (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats)))
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
"queueFamilyIndex" ::: Word32
pSurfaceFormatCount' <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPSurfaceFormatCount
"surfaceFormats" ::: Vector SurfaceFormatKHR
pSurfaceFormats' <- IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO SurfaceFormatKHR)
-> IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pSurfaceFormatCount')) (\i :: Int
i -> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceFormatKHR ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats) ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SurfaceFormatKHR)))
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "surfaceFormats" ::: Vector SurfaceFormatKHR
pSurfaceFormats')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfacePresentModesKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr PresentModeKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr PresentModeKHR -> IO Result
getPhysicalDeviceSurfacePresentModesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (Result, ("presentModes" ::: Vector PresentModeKHR))
getPhysicalDeviceSurfacePresentModesKHR :: PhysicalDevice
-> SurfaceKHR
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
getPhysicalDeviceSurfacePresentModesKHR physicalDevice :: PhysicalDevice
physicalDevice surface :: SurfaceKHR
surface = IO (Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR))
-> (ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfacePresentModesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfacePresentModesKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceSurfacePresentModesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfacePresentModesKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfacePresentModesKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPPresentModeCount <- ((("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pSurfaceFormatCount"
::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> (("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ())
-> (("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result)
-> IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfacePresentModesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR' Ptr PhysicalDevice_T
physicalDevice' (SurfaceKHR
surface) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPPresentModeCount) ("pPresentModes" ::: Ptr PresentModeKHR
forall a. Ptr a
nullPtr))
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"queueFamilyIndex" ::: Word32
pPresentModeCount <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPPresentModeCount
"pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes <- ((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR))
-> ((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pPresentModes" ::: Ptr PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR) -> IO ())
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pPresentModes" ::: Ptr PresentModeKHR)
forall a. Int -> IO (Ptr a)
callocBytes @PresentModeKHR ((("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pPresentModeCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4)) ("pPresentModes" ::: Ptr PresentModeKHR) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result)
-> IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfacePresentModesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR' Ptr PhysicalDevice_T
physicalDevice' (SurfaceKHR
surface) ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPPresentModeCount) ("pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes))
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
"queueFamilyIndex" ::: Word32
pPresentModeCount' <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPPresentModeCount
"presentModes" ::: Vector PresentModeKHR
pPresentModes' <- IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR))
-> IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PresentModeKHR)
-> IO ("presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pPresentModeCount')) (\i :: Int
i -> ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
forall a. Storable a => Ptr a -> IO a
peek @PresentModeKHR (("pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> "pPresentModes" ::: Ptr PresentModeKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PresentModeKHR)))
(Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR))
-> (Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "presentModes" ::: Vector PresentModeKHR
pPresentModes')
pattern $bCOLORSPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR
$mCOLORSPACE_SRGB_NONLINEAR_KHR :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLORSPACE_SRGB_NONLINEAR_KHR = COLOR_SPACE_SRGB_NONLINEAR_KHR
data SurfaceCapabilitiesKHR = SurfaceCapabilitiesKHR
{
SurfaceCapabilitiesKHR -> "queueFamilyIndex" ::: Word32
minImageCount :: Word32
,
SurfaceCapabilitiesKHR -> "queueFamilyIndex" ::: Word32
maxImageCount :: Word32
,
SurfaceCapabilitiesKHR -> Extent2D
currentExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> Extent2D
minImageExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> Extent2D
maxImageExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> "queueFamilyIndex" ::: Word32
maxImageArrayLayers :: Word32
,
SurfaceCapabilitiesKHR -> SurfaceTransformFlagsKHR
supportedTransforms :: SurfaceTransformFlagsKHR
,
SurfaceCapabilitiesKHR -> SurfaceTransformFlagsKHR
currentTransform :: SurfaceTransformFlagBitsKHR
,
SurfaceCapabilitiesKHR -> CompositeAlphaFlagsKHR
supportedCompositeAlpha :: CompositeAlphaFlagsKHR
,
SurfaceCapabilitiesKHR -> ImageUsageFlags
supportedUsageFlags :: ImageUsageFlags
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfaceCapabilitiesKHR)
#endif
deriving instance Show SurfaceCapabilitiesKHR
instance ToCStruct SurfaceCapabilitiesKHR where
withCStruct :: SurfaceCapabilitiesKHR
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
withCStruct x :: SurfaceCapabilitiesKHR
x f :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b
f = Int
-> Int
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 52 4 ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b)
-> IO b)
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p SurfaceCapabilitiesKHR
x (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b
f "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p)
pokeCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO b -> IO b
pokeCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p SurfaceCapabilitiesKHR{..} f :: IO b
f = do
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
minImageCount)
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
maxImageCount)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Extent2D)) (Extent2D
currentExtent)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) (Extent2D
minImageExtent)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) (Extent2D
maxImageExtent)
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
maxImageArrayLayers)
Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr SurfaceTransformFlagsKHR)) (SurfaceTransformFlagsKHR
supportedTransforms)
Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagsKHR
currentTransform)
Ptr CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr CompositeAlphaFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr CompositeAlphaFlagsKHR)) (CompositeAlphaFlagsKHR
supportedCompositeAlpha)
Ptr ImageUsageFlags -> ImageUsageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr ImageUsageFlags)) (ImageUsageFlags
supportedUsageFlags)
IO b
f
cStructSize :: Int
cStructSize = 52
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p f :: IO b
f = do
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero)
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero)
Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagsKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SurfaceCapabilitiesKHR where
peekCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
peekCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p = do
"queueFamilyIndex" ::: Word32
minImageCount <- ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32))
"queueFamilyIndex" ::: Word32
maxImageCount <- ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32))
Extent2D
currentExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Extent2D))
Extent2D
minImageExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D))
Extent2D
maxImageExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D))
"queueFamilyIndex" ::: Word32
maxImageArrayLayers <- ("pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int
-> "pSurfaceFormatCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
SurfaceTransformFlagsKHR
supportedTransforms <- Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr SurfaceTransformFlagsKHR))
SurfaceTransformFlagsKHR
currentTransform <- Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagBitsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr SurfaceTransformFlagBitsKHR))
CompositeAlphaFlagsKHR
supportedCompositeAlpha <- Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @CompositeAlphaFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr CompositeAlphaFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr CompositeAlphaFlagsKHR))
ImageUsageFlags
supportedUsageFlags <- Ptr ImageUsageFlags -> IO ImageUsageFlags
forall a. Storable a => Ptr a -> IO a
peek @ImageUsageFlags (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr ImageUsageFlags))
SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ ("queueFamilyIndex" ::: Word32)
-> ("queueFamilyIndex" ::: Word32)
-> Extent2D
-> Extent2D
-> Extent2D
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR
-> CompositeAlphaFlagsKHR
-> ImageUsageFlags
-> SurfaceCapabilitiesKHR
SurfaceCapabilitiesKHR
"queueFamilyIndex" ::: Word32
minImageCount "queueFamilyIndex" ::: Word32
maxImageCount Extent2D
currentExtent Extent2D
minImageExtent Extent2D
maxImageExtent "queueFamilyIndex" ::: Word32
maxImageArrayLayers SurfaceTransformFlagsKHR
supportedTransforms SurfaceTransformFlagsKHR
currentTransform CompositeAlphaFlagsKHR
supportedCompositeAlpha ImageUsageFlags
supportedUsageFlags
instance Storable SurfaceCapabilitiesKHR where
sizeOf :: SurfaceCapabilitiesKHR -> Int
sizeOf ~SurfaceCapabilitiesKHR
_ = 52
alignment :: SurfaceCapabilitiesKHR -> Int
alignment ~SurfaceCapabilitiesKHR
_ = 4
peek :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
peek = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO ()
poke ptr :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
ptr poked :: SurfaceCapabilitiesKHR
poked = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
ptr SurfaceCapabilitiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SurfaceCapabilitiesKHR where
zero :: SurfaceCapabilitiesKHR
zero = ("queueFamilyIndex" ::: Word32)
-> ("queueFamilyIndex" ::: Word32)
-> Extent2D
-> Extent2D
-> Extent2D
-> ("queueFamilyIndex" ::: Word32)
-> SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR
-> CompositeAlphaFlagsKHR
-> ImageUsageFlags
-> SurfaceCapabilitiesKHR
SurfaceCapabilitiesKHR
"queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero
"queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
"queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero
SurfaceTransformFlagsKHR
forall a. Zero a => a
zero
SurfaceTransformFlagsKHR
forall a. Zero a => a
zero
CompositeAlphaFlagsKHR
forall a. Zero a => a
zero
ImageUsageFlags
forall a. Zero a => a
zero
data SurfaceFormatKHR = SurfaceFormatKHR
{
SurfaceFormatKHR -> Format
format :: Format
,
SurfaceFormatKHR -> ColorSpaceKHR
colorSpace :: ColorSpaceKHR
}
deriving (Typeable, SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
(SurfaceFormatKHR -> SurfaceFormatKHR -> Bool)
-> (SurfaceFormatKHR -> SurfaceFormatKHR -> Bool)
-> Eq SurfaceFormatKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
$c/= :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
== :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
$c== :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfaceFormatKHR)
#endif
deriving instance Show SurfaceFormatKHR
instance ToCStruct SurfaceFormatKHR where
withCStruct :: SurfaceFormatKHR
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b
withCStruct x :: SurfaceFormatKHR
x f :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b
f = Int
-> Int
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 8 4 ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b)
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p -> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p SurfaceFormatKHR
x (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b
f "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p)
pokeCStruct :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO b -> IO b
pokeCStruct p :: "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p SurfaceFormatKHR{..} f :: IO b
f = do
Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Format)) (Format
format)
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ColorSpaceKHR)) (ColorSpaceKHR
colorSpace)
IO b
f
cStructSize :: Int
cStructSize = 8
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b -> IO b
pokeZeroCStruct p :: "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p f :: IO b
f = do
Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ColorSpaceKHR)) (ColorSpaceKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SurfaceFormatKHR where
peekCStruct :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
peekCStruct p :: "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p = do
Format
format <- Ptr Format -> IO Format
forall a. Storable a => Ptr a -> IO a
peek @Format (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Format))
ColorSpaceKHR
colorSpace <- Ptr ColorSpaceKHR -> IO ColorSpaceKHR
forall a. Storable a => Ptr a -> IO a
peek @ColorSpaceKHR (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ColorSpaceKHR))
SurfaceFormatKHR -> IO SurfaceFormatKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceFormatKHR -> IO SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO SurfaceFormatKHR
forall a b. (a -> b) -> a -> b
$ Format -> ColorSpaceKHR -> SurfaceFormatKHR
SurfaceFormatKHR
Format
format ColorSpaceKHR
colorSpace
instance Storable SurfaceFormatKHR where
sizeOf :: SurfaceFormatKHR -> Int
sizeOf ~SurfaceFormatKHR
_ = 8
alignment :: SurfaceFormatKHR -> Int
alignment ~SurfaceFormatKHR
_ = 4
peek :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
peek = ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO ()
poke ptr :: "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
ptr poked :: SurfaceFormatKHR
poked = ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
ptr SurfaceFormatKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SurfaceFormatKHR where
zero :: SurfaceFormatKHR
zero = Format -> ColorSpaceKHR -> SurfaceFormatKHR
SurfaceFormatKHR
Format
forall a. Zero a => a
zero
ColorSpaceKHR
forall a. Zero a => a
zero
newtype PresentModeKHR = PresentModeKHR Int32
deriving newtype (PresentModeKHR -> PresentModeKHR -> Bool
(PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool) -> Eq PresentModeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PresentModeKHR -> PresentModeKHR -> Bool
$c/= :: PresentModeKHR -> PresentModeKHR -> Bool
== :: PresentModeKHR -> PresentModeKHR -> Bool
$c== :: PresentModeKHR -> PresentModeKHR -> Bool
Eq, Eq PresentModeKHR
Eq PresentModeKHR =>
(PresentModeKHR -> PresentModeKHR -> Ordering)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> PresentModeKHR)
-> (PresentModeKHR -> PresentModeKHR -> PresentModeKHR)
-> Ord PresentModeKHR
PresentModeKHR -> PresentModeKHR -> Bool
PresentModeKHR -> PresentModeKHR -> Ordering
PresentModeKHR -> PresentModeKHR -> PresentModeKHR
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 :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
$cmin :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
max :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
$cmax :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
>= :: PresentModeKHR -> PresentModeKHR -> Bool
$c>= :: PresentModeKHR -> PresentModeKHR -> Bool
> :: PresentModeKHR -> PresentModeKHR -> Bool
$c> :: PresentModeKHR -> PresentModeKHR -> Bool
<= :: PresentModeKHR -> PresentModeKHR -> Bool
$c<= :: PresentModeKHR -> PresentModeKHR -> Bool
< :: PresentModeKHR -> PresentModeKHR -> Bool
$c< :: PresentModeKHR -> PresentModeKHR -> Bool
compare :: PresentModeKHR -> PresentModeKHR -> Ordering
$ccompare :: PresentModeKHR -> PresentModeKHR -> Ordering
$cp1Ord :: Eq PresentModeKHR
Ord, Ptr b -> Int -> IO PresentModeKHR
Ptr b -> Int -> PresentModeKHR -> IO ()
("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
PresentModeKHR -> Int
(PresentModeKHR -> Int)
-> (PresentModeKHR -> Int)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PresentModeKHR)
-> (forall b. Ptr b -> Int -> PresentModeKHR -> IO ())
-> (("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> PresentModeKHR -> IO ())
-> Storable PresentModeKHR
forall b. Ptr b -> Int -> IO PresentModeKHR
forall b. Ptr b -> Int -> PresentModeKHR -> 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 :: ("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
$cpoke :: ("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
peek :: ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
$cpeek :: ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
pokeByteOff :: Ptr b -> Int -> PresentModeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentModeKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO PresentModeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentModeKHR
pokeElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
$cpokeElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
peekElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
$cpeekElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
alignment :: PresentModeKHR -> Int
$calignment :: PresentModeKHR -> Int
sizeOf :: PresentModeKHR -> Int
$csizeOf :: PresentModeKHR -> Int
Storable, PresentModeKHR
PresentModeKHR -> Zero PresentModeKHR
forall a. a -> Zero a
zero :: PresentModeKHR
$czero :: PresentModeKHR
Zero)
pattern $bPRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR
$mPRESENT_MODE_IMMEDIATE_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_IMMEDIATE_KHR = PresentModeKHR 0
pattern $bPRESENT_MODE_MAILBOX_KHR :: PresentModeKHR
$mPRESENT_MODE_MAILBOX_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_MAILBOX_KHR = PresentModeKHR 1
pattern $bPRESENT_MODE_FIFO_KHR :: PresentModeKHR
$mPRESENT_MODE_FIFO_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_FIFO_KHR = PresentModeKHR 2
pattern $bPRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR
$mPRESENT_MODE_FIFO_RELAXED_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_FIFO_RELAXED_KHR = PresentModeKHR 3
pattern $bPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR
$mPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = PresentModeKHR 1000111001
pattern $bPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR
$mPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: forall r. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = PresentModeKHR 1000111000
{-# complete PRESENT_MODE_IMMEDIATE_KHR,
PRESENT_MODE_MAILBOX_KHR,
PRESENT_MODE_FIFO_KHR,
PRESENT_MODE_FIFO_RELAXED_KHR,
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR,
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR #-}
conNamePresentModeKHR :: String
conNamePresentModeKHR :: String
conNamePresentModeKHR = "PresentModeKHR"
enumPrefixPresentModeKHR :: String
enumPrefixPresentModeKHR :: String
enumPrefixPresentModeKHR = "PRESENT_MODE_"
showTablePresentModeKHR :: [(PresentModeKHR, String)]
showTablePresentModeKHR :: [(PresentModeKHR, String)]
showTablePresentModeKHR =
[ (PresentModeKHR
PRESENT_MODE_IMMEDIATE_KHR , "IMMEDIATE_KHR")
, (PresentModeKHR
PRESENT_MODE_MAILBOX_KHR , "MAILBOX_KHR")
, (PresentModeKHR
PRESENT_MODE_FIFO_KHR , "FIFO_KHR")
, (PresentModeKHR
PRESENT_MODE_FIFO_RELAXED_KHR , "FIFO_RELAXED_KHR")
, (PresentModeKHR
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, "SHARED_CONTINUOUS_REFRESH_KHR")
, (PresentModeKHR
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR , "SHARED_DEMAND_REFRESH_KHR")
]
instance Show PresentModeKHR where
showsPrec :: Int -> PresentModeKHR -> ShowS
showsPrec = String
-> [(PresentModeKHR, String)]
-> String
-> (PresentModeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PresentModeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPresentModeKHR
[(PresentModeKHR, String)]
showTablePresentModeKHR
String
conNamePresentModeKHR
(\(PresentModeKHR x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read PresentModeKHR where
readPrec :: ReadPrec PresentModeKHR
readPrec = String
-> [(PresentModeKHR, String)]
-> String
-> (Int32 -> PresentModeKHR)
-> ReadPrec PresentModeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPresentModeKHR [(PresentModeKHR, String)]
showTablePresentModeKHR String
conNamePresentModeKHR Int32 -> PresentModeKHR
PresentModeKHR
newtype ColorSpaceKHR = ColorSpaceKHR Int32
deriving newtype (ColorSpaceKHR -> ColorSpaceKHR -> Bool
(ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool) -> Eq ColorSpaceKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c/= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
== :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c== :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
Eq, Eq ColorSpaceKHR
Eq ColorSpaceKHR =>
(ColorSpaceKHR -> ColorSpaceKHR -> Ordering)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR)
-> (ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR)
-> Ord ColorSpaceKHR
ColorSpaceKHR -> ColorSpaceKHR -> Bool
ColorSpaceKHR -> ColorSpaceKHR -> Ordering
ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
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 :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
$cmin :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
max :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
$cmax :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
>= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c>= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
> :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c> :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
<= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c<= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
< :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c< :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
compare :: ColorSpaceKHR -> ColorSpaceKHR -> Ordering
$ccompare :: ColorSpaceKHR -> ColorSpaceKHR -> Ordering
$cp1Ord :: Eq ColorSpaceKHR
Ord, Ptr b -> Int -> IO ColorSpaceKHR
Ptr b -> Int -> ColorSpaceKHR -> IO ()
Ptr ColorSpaceKHR -> IO ColorSpaceKHR
Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
ColorSpaceKHR -> Int
(ColorSpaceKHR -> Int)
-> (ColorSpaceKHR -> Int)
-> (Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR)
-> (Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO ColorSpaceKHR)
-> (forall b. Ptr b -> Int -> ColorSpaceKHR -> IO ())
-> (Ptr ColorSpaceKHR -> IO ColorSpaceKHR)
-> (Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ())
-> Storable ColorSpaceKHR
forall b. Ptr b -> Int -> IO ColorSpaceKHR
forall b. Ptr b -> Int -> ColorSpaceKHR -> 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 ColorSpaceKHR -> ColorSpaceKHR -> IO ()
$cpoke :: Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
peek :: Ptr ColorSpaceKHR -> IO ColorSpaceKHR
$cpeek :: Ptr ColorSpaceKHR -> IO ColorSpaceKHR
pokeByteOff :: Ptr b -> Int -> ColorSpaceKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ColorSpaceKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO ColorSpaceKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ColorSpaceKHR
pokeElemOff :: Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
$cpokeElemOff :: Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
peekElemOff :: Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
$cpeekElemOff :: Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
alignment :: ColorSpaceKHR -> Int
$calignment :: ColorSpaceKHR -> Int
sizeOf :: ColorSpaceKHR -> Int
$csizeOf :: ColorSpaceKHR -> Int
Storable, ColorSpaceKHR
ColorSpaceKHR -> Zero ColorSpaceKHR
forall a. a -> Zero a
zero :: ColorSpaceKHR
$czero :: ColorSpaceKHR
Zero)
pattern $bCOLOR_SPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR
$mCOLOR_SPACE_SRGB_NONLINEAR_KHR :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_SRGB_NONLINEAR_KHR = ColorSpaceKHR 0
pattern $bCOLOR_SPACE_DISPLAY_NATIVE_AMD :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_NATIVE_AMD :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_NATIVE_AMD = ColorSpaceKHR 1000213000
pattern $bCOLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = ColorSpaceKHR 1000104014
pattern $bCOLOR_SPACE_PASS_THROUGH_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_PASS_THROUGH_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_PASS_THROUGH_EXT = ColorSpaceKHR 1000104013
pattern $bCOLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = ColorSpaceKHR 1000104012
pattern $bCOLOR_SPACE_ADOBERGB_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_ADOBERGB_LINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_ADOBERGB_LINEAR_EXT = ColorSpaceKHR 1000104011
pattern $bCOLOR_SPACE_HDR10_HLG_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_HDR10_HLG_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_HDR10_HLG_EXT = ColorSpaceKHR 1000104010
pattern $bCOLOR_SPACE_DOLBYVISION_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DOLBYVISION_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DOLBYVISION_EXT = ColorSpaceKHR 1000104009
pattern $bCOLOR_SPACE_HDR10_ST2084_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_HDR10_ST2084_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_HDR10_ST2084_EXT = ColorSpaceKHR 1000104008
pattern $bCOLOR_SPACE_BT2020_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT2020_LINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT2020_LINEAR_EXT = ColorSpaceKHR 1000104007
pattern $bCOLOR_SPACE_BT709_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT709_NONLINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT709_NONLINEAR_EXT = ColorSpaceKHR 1000104006
pattern $bCOLOR_SPACE_BT709_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT709_LINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT709_LINEAR_EXT = ColorSpaceKHR 1000104005
pattern $bCOLOR_SPACE_DCI_P3_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DCI_P3_NONLINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DCI_P3_NONLINEAR_EXT = ColorSpaceKHR 1000104004
pattern $bCOLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = ColorSpaceKHR 1000104003
pattern $bCOLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = ColorSpaceKHR 1000104002
pattern $bCOLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: forall r. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = ColorSpaceKHR 1000104001
{-# complete COLOR_SPACE_SRGB_NONLINEAR_KHR,
COLOR_SPACE_DISPLAY_NATIVE_AMD,
COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT,
COLOR_SPACE_PASS_THROUGH_EXT,
COLOR_SPACE_ADOBERGB_NONLINEAR_EXT,
COLOR_SPACE_ADOBERGB_LINEAR_EXT,
COLOR_SPACE_HDR10_HLG_EXT,
COLOR_SPACE_DOLBYVISION_EXT,
COLOR_SPACE_HDR10_ST2084_EXT,
COLOR_SPACE_BT2020_LINEAR_EXT,
COLOR_SPACE_BT709_NONLINEAR_EXT,
COLOR_SPACE_BT709_LINEAR_EXT,
COLOR_SPACE_DCI_P3_NONLINEAR_EXT,
COLOR_SPACE_DISPLAY_P3_LINEAR_EXT,
COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT,
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: ColorSpaceKHR #-}
conNameColorSpaceKHR :: String
conNameColorSpaceKHR :: String
conNameColorSpaceKHR = "ColorSpaceKHR"
enumPrefixColorSpaceKHR :: String
enumPrefixColorSpaceKHR :: String
enumPrefixColorSpaceKHR = "COLOR_SPACE_"
showTableColorSpaceKHR :: [(ColorSpaceKHR, String)]
showTableColorSpaceKHR :: [(ColorSpaceKHR, String)]
showTableColorSpaceKHR =
[ (ColorSpaceKHR
COLOR_SPACE_SRGB_NONLINEAR_KHR , "SRGB_NONLINEAR_KHR")
, (ColorSpaceKHR
COLOR_SPACE_DISPLAY_NATIVE_AMD , "DISPLAY_NATIVE_AMD")
, (ColorSpaceKHR
COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT, "EXTENDED_SRGB_NONLINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_PASS_THROUGH_EXT , "PASS_THROUGH_EXT")
, (ColorSpaceKHR
COLOR_SPACE_ADOBERGB_NONLINEAR_EXT , "ADOBERGB_NONLINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_ADOBERGB_LINEAR_EXT , "ADOBERGB_LINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_HDR10_HLG_EXT , "HDR10_HLG_EXT")
, (ColorSpaceKHR
COLOR_SPACE_DOLBYVISION_EXT , "DOLBYVISION_EXT")
, (ColorSpaceKHR
COLOR_SPACE_HDR10_ST2084_EXT , "HDR10_ST2084_EXT")
, (ColorSpaceKHR
COLOR_SPACE_BT2020_LINEAR_EXT , "BT2020_LINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_BT709_NONLINEAR_EXT , "BT709_NONLINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_BT709_LINEAR_EXT , "BT709_LINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_DCI_P3_NONLINEAR_EXT , "DCI_P3_NONLINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_DISPLAY_P3_LINEAR_EXT , "DISPLAY_P3_LINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT , "EXTENDED_SRGB_LINEAR_EXT")
, (ColorSpaceKHR
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT , "DISPLAY_P3_NONLINEAR_EXT")
]
instance Show ColorSpaceKHR where
showsPrec :: Int -> ColorSpaceKHR -> ShowS
showsPrec = String
-> [(ColorSpaceKHR, String)]
-> String
-> (ColorSpaceKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ColorSpaceKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixColorSpaceKHR
[(ColorSpaceKHR, String)]
showTableColorSpaceKHR
String
conNameColorSpaceKHR
(\(ColorSpaceKHR x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read ColorSpaceKHR where
readPrec :: ReadPrec ColorSpaceKHR
readPrec = String
-> [(ColorSpaceKHR, String)]
-> String
-> (Int32 -> ColorSpaceKHR)
-> ReadPrec ColorSpaceKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixColorSpaceKHR [(ColorSpaceKHR, String)]
showTableColorSpaceKHR String
conNameColorSpaceKHR Int32 -> ColorSpaceKHR
ColorSpaceKHR
type CompositeAlphaFlagsKHR = CompositeAlphaFlagBitsKHR
newtype CompositeAlphaFlagBitsKHR = CompositeAlphaFlagBitsKHR Flags
deriving newtype (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
(CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> Eq CompositeAlphaFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c/= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
== :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c== :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
Eq, Eq CompositeAlphaFlagsKHR
Eq CompositeAlphaFlagsKHR =>
(CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Ordering)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> Ord CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Ordering
CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
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 :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$cmin :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
max :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$cmax :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
>= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c>= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
> :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c> :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
<= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c<= :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
< :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
$c< :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Bool
compare :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Ordering
$ccompare :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> Ordering
$cp1Ord :: Eq CompositeAlphaFlagsKHR
Ord, Ptr b -> Int -> IO CompositeAlphaFlagsKHR
Ptr b -> Int -> CompositeAlphaFlagsKHR -> IO ()
Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR
Ptr CompositeAlphaFlagsKHR -> Int -> IO CompositeAlphaFlagsKHR
Ptr CompositeAlphaFlagsKHR
-> Int -> CompositeAlphaFlagsKHR -> IO ()
Ptr CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ()
CompositeAlphaFlagsKHR -> Int
(CompositeAlphaFlagsKHR -> Int)
-> (CompositeAlphaFlagsKHR -> Int)
-> (Ptr CompositeAlphaFlagsKHR -> Int -> IO CompositeAlphaFlagsKHR)
-> (Ptr CompositeAlphaFlagsKHR
-> Int -> CompositeAlphaFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO CompositeAlphaFlagsKHR)
-> (forall b. Ptr b -> Int -> CompositeAlphaFlagsKHR -> IO ())
-> (Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR)
-> (Ptr CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ())
-> Storable CompositeAlphaFlagsKHR
forall b. Ptr b -> Int -> IO CompositeAlphaFlagsKHR
forall b. Ptr b -> Int -> CompositeAlphaFlagsKHR -> 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 CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ()
$cpoke :: Ptr CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ()
peek :: Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR
$cpeek :: Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR
pokeByteOff :: Ptr b -> Int -> CompositeAlphaFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CompositeAlphaFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO CompositeAlphaFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CompositeAlphaFlagsKHR
pokeElemOff :: Ptr CompositeAlphaFlagsKHR
-> Int -> CompositeAlphaFlagsKHR -> IO ()
$cpokeElemOff :: Ptr CompositeAlphaFlagsKHR
-> Int -> CompositeAlphaFlagsKHR -> IO ()
peekElemOff :: Ptr CompositeAlphaFlagsKHR -> Int -> IO CompositeAlphaFlagsKHR
$cpeekElemOff :: Ptr CompositeAlphaFlagsKHR -> Int -> IO CompositeAlphaFlagsKHR
alignment :: CompositeAlphaFlagsKHR -> Int
$calignment :: CompositeAlphaFlagsKHR -> Int
sizeOf :: CompositeAlphaFlagsKHR -> Int
$csizeOf :: CompositeAlphaFlagsKHR -> Int
Storable, CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR -> Zero CompositeAlphaFlagsKHR
forall a. a -> Zero a
zero :: CompositeAlphaFlagsKHR
$czero :: CompositeAlphaFlagsKHR
Zero, Eq CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR
Eq CompositeAlphaFlagsKHR =>
(CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> CompositeAlphaFlagsKHR
-> (Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> Bool)
-> (CompositeAlphaFlagsKHR -> Maybe Int)
-> (CompositeAlphaFlagsKHR -> Int)
-> (CompositeAlphaFlagsKHR -> Bool)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR)
-> (CompositeAlphaFlagsKHR -> Int)
-> Bits CompositeAlphaFlagsKHR
Int -> CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR -> Bool
CompositeAlphaFlagsKHR -> Int
CompositeAlphaFlagsKHR -> Maybe Int
CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR -> Int -> Bool
CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
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 :: CompositeAlphaFlagsKHR -> Int
$cpopCount :: CompositeAlphaFlagsKHR -> Int
rotateR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$crotateR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
rotateL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$crotateL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
unsafeShiftR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cunsafeShiftR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
shiftR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cshiftR :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
unsafeShiftL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cunsafeShiftL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
shiftL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cshiftL :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
isSigned :: CompositeAlphaFlagsKHR -> Bool
$cisSigned :: CompositeAlphaFlagsKHR -> Bool
bitSize :: CompositeAlphaFlagsKHR -> Int
$cbitSize :: CompositeAlphaFlagsKHR -> Int
bitSizeMaybe :: CompositeAlphaFlagsKHR -> Maybe Int
$cbitSizeMaybe :: CompositeAlphaFlagsKHR -> Maybe Int
testBit :: CompositeAlphaFlagsKHR -> Int -> Bool
$ctestBit :: CompositeAlphaFlagsKHR -> Int -> Bool
complementBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$ccomplementBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
clearBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cclearBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
setBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$csetBit :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
bit :: Int -> CompositeAlphaFlagsKHR
$cbit :: Int -> CompositeAlphaFlagsKHR
zeroBits :: CompositeAlphaFlagsKHR
$czeroBits :: CompositeAlphaFlagsKHR
rotate :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$crotate :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
shift :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
$cshift :: CompositeAlphaFlagsKHR -> Int -> CompositeAlphaFlagsKHR
complement :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$ccomplement :: CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
xor :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$cxor :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
.|. :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$c.|. :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
.&. :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$c.&. :: CompositeAlphaFlagsKHR
-> CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR
$cp1Bits :: Eq CompositeAlphaFlagsKHR
Bits, Bits CompositeAlphaFlagsKHR
Bits CompositeAlphaFlagsKHR =>
(CompositeAlphaFlagsKHR -> Int)
-> (CompositeAlphaFlagsKHR -> Int)
-> (CompositeAlphaFlagsKHR -> Int)
-> FiniteBits CompositeAlphaFlagsKHR
CompositeAlphaFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: CompositeAlphaFlagsKHR -> Int
$ccountTrailingZeros :: CompositeAlphaFlagsKHR -> Int
countLeadingZeros :: CompositeAlphaFlagsKHR -> Int
$ccountLeadingZeros :: CompositeAlphaFlagsKHR -> Int
finiteBitSize :: CompositeAlphaFlagsKHR -> Int
$cfiniteBitSize :: CompositeAlphaFlagsKHR -> Int
$cp1FiniteBits :: Bits CompositeAlphaFlagsKHR
FiniteBits)
pattern $bCOMPOSITE_ALPHA_OPAQUE_BIT_KHR :: CompositeAlphaFlagsKHR
$mCOMPOSITE_ALPHA_OPAQUE_BIT_KHR :: forall r.
CompositeAlphaFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_OPAQUE_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000001
pattern $bCOMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagsKHR
$mCOMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: forall r.
CompositeAlphaFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000002
pattern $bCOMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagsKHR
$mCOMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: forall r.
CompositeAlphaFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000004
pattern $bCOMPOSITE_ALPHA_INHERIT_BIT_KHR :: CompositeAlphaFlagsKHR
$mCOMPOSITE_ALPHA_INHERIT_BIT_KHR :: forall r.
CompositeAlphaFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_INHERIT_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000008
conNameCompositeAlphaFlagBitsKHR :: String
conNameCompositeAlphaFlagBitsKHR :: String
conNameCompositeAlphaFlagBitsKHR = "CompositeAlphaFlagBitsKHR"
enumPrefixCompositeAlphaFlagBitsKHR :: String
enumPrefixCompositeAlphaFlagBitsKHR :: String
enumPrefixCompositeAlphaFlagBitsKHR = "COMPOSITE_ALPHA_"
showTableCompositeAlphaFlagBitsKHR :: [(CompositeAlphaFlagBitsKHR, String)]
showTableCompositeAlphaFlagBitsKHR :: [(CompositeAlphaFlagsKHR, String)]
showTableCompositeAlphaFlagBitsKHR =
[ (CompositeAlphaFlagsKHR
COMPOSITE_ALPHA_OPAQUE_BIT_KHR , "OPAQUE_BIT_KHR")
, (CompositeAlphaFlagsKHR
COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR , "PRE_MULTIPLIED_BIT_KHR")
, (CompositeAlphaFlagsKHR
COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR, "POST_MULTIPLIED_BIT_KHR")
, (CompositeAlphaFlagsKHR
COMPOSITE_ALPHA_INHERIT_BIT_KHR , "INHERIT_BIT_KHR")
]
instance Show CompositeAlphaFlagBitsKHR where
showsPrec :: Int -> CompositeAlphaFlagsKHR -> ShowS
showsPrec = String
-> [(CompositeAlphaFlagsKHR, String)]
-> String
-> (CompositeAlphaFlagsKHR -> "queueFamilyIndex" ::: Word32)
-> (("queueFamilyIndex" ::: Word32) -> ShowS)
-> Int
-> CompositeAlphaFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixCompositeAlphaFlagBitsKHR
[(CompositeAlphaFlagsKHR, String)]
showTableCompositeAlphaFlagBitsKHR
String
conNameCompositeAlphaFlagBitsKHR
(\(CompositeAlphaFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
(\x :: "queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("queueFamilyIndex" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)
instance Read CompositeAlphaFlagBitsKHR where
readPrec :: ReadPrec CompositeAlphaFlagsKHR
readPrec = String
-> [(CompositeAlphaFlagsKHR, String)]
-> String
-> (("queueFamilyIndex" ::: Word32) -> CompositeAlphaFlagsKHR)
-> ReadPrec CompositeAlphaFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixCompositeAlphaFlagBitsKHR
[(CompositeAlphaFlagsKHR, String)]
showTableCompositeAlphaFlagBitsKHR
String
conNameCompositeAlphaFlagBitsKHR
("queueFamilyIndex" ::: Word32) -> CompositeAlphaFlagsKHR
CompositeAlphaFlagBitsKHR
type SurfaceTransformFlagsKHR = SurfaceTransformFlagBitsKHR
newtype SurfaceTransformFlagBitsKHR = SurfaceTransformFlagBitsKHR Flags
deriving newtype (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
(SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> Eq SurfaceTransformFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c/= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
== :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c== :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
Eq, Eq SurfaceTransformFlagsKHR
Eq SurfaceTransformFlagsKHR =>
(SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Ordering)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> Ord SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Ordering
SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
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 :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$cmin :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
max :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$cmax :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
>= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c>= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
> :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c> :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
<= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c<= :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
< :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
$c< :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Bool
compare :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Ordering
$ccompare :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> Ordering
$cp1Ord :: Eq SurfaceTransformFlagsKHR
Ord, Ptr b -> Int -> IO SurfaceTransformFlagsKHR
Ptr b -> Int -> SurfaceTransformFlagsKHR -> IO ()
Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
Ptr SurfaceTransformFlagsKHR -> Int -> IO SurfaceTransformFlagsKHR
Ptr SurfaceTransformFlagsKHR
-> Int -> SurfaceTransformFlagsKHR -> IO ()
Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
SurfaceTransformFlagsKHR -> Int
(SurfaceTransformFlagsKHR -> Int)
-> (SurfaceTransformFlagsKHR -> Int)
-> (Ptr SurfaceTransformFlagsKHR
-> Int -> IO SurfaceTransformFlagsKHR)
-> (Ptr SurfaceTransformFlagsKHR
-> Int -> SurfaceTransformFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO SurfaceTransformFlagsKHR)
-> (forall b. Ptr b -> Int -> SurfaceTransformFlagsKHR -> IO ())
-> (Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR)
-> (Ptr SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> IO ())
-> Storable SurfaceTransformFlagsKHR
forall b. Ptr b -> Int -> IO SurfaceTransformFlagsKHR
forall b. Ptr b -> Int -> SurfaceTransformFlagsKHR -> 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 SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
$cpoke :: Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
peek :: Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
$cpeek :: Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
pokeByteOff :: Ptr b -> Int -> SurfaceTransformFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SurfaceTransformFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO SurfaceTransformFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SurfaceTransformFlagsKHR
pokeElemOff :: Ptr SurfaceTransformFlagsKHR
-> Int -> SurfaceTransformFlagsKHR -> IO ()
$cpokeElemOff :: Ptr SurfaceTransformFlagsKHR
-> Int -> SurfaceTransformFlagsKHR -> IO ()
peekElemOff :: Ptr SurfaceTransformFlagsKHR -> Int -> IO SurfaceTransformFlagsKHR
$cpeekElemOff :: Ptr SurfaceTransformFlagsKHR -> Int -> IO SurfaceTransformFlagsKHR
alignment :: SurfaceTransformFlagsKHR -> Int
$calignment :: SurfaceTransformFlagsKHR -> Int
sizeOf :: SurfaceTransformFlagsKHR -> Int
$csizeOf :: SurfaceTransformFlagsKHR -> Int
Storable, SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR -> Zero SurfaceTransformFlagsKHR
forall a. a -> Zero a
zero :: SurfaceTransformFlagsKHR
$czero :: SurfaceTransformFlagsKHR
Zero, Eq SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR
Eq SurfaceTransformFlagsKHR =>
(SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> SurfaceTransformFlagsKHR
-> (Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> Bool)
-> (SurfaceTransformFlagsKHR -> Maybe Int)
-> (SurfaceTransformFlagsKHR -> Int)
-> (SurfaceTransformFlagsKHR -> Bool)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR)
-> (SurfaceTransformFlagsKHR -> Int)
-> Bits SurfaceTransformFlagsKHR
Int -> SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR -> Bool
SurfaceTransformFlagsKHR -> Int
SurfaceTransformFlagsKHR -> Maybe Int
SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR -> Int -> Bool
SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
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 :: SurfaceTransformFlagsKHR -> Int
$cpopCount :: SurfaceTransformFlagsKHR -> Int
rotateR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$crotateR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
rotateL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$crotateL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
unsafeShiftR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cunsafeShiftR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
shiftR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cshiftR :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
unsafeShiftL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cunsafeShiftL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
shiftL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cshiftL :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
isSigned :: SurfaceTransformFlagsKHR -> Bool
$cisSigned :: SurfaceTransformFlagsKHR -> Bool
bitSize :: SurfaceTransformFlagsKHR -> Int
$cbitSize :: SurfaceTransformFlagsKHR -> Int
bitSizeMaybe :: SurfaceTransformFlagsKHR -> Maybe Int
$cbitSizeMaybe :: SurfaceTransformFlagsKHR -> Maybe Int
testBit :: SurfaceTransformFlagsKHR -> Int -> Bool
$ctestBit :: SurfaceTransformFlagsKHR -> Int -> Bool
complementBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$ccomplementBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
clearBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cclearBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
setBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$csetBit :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
bit :: Int -> SurfaceTransformFlagsKHR
$cbit :: Int -> SurfaceTransformFlagsKHR
zeroBits :: SurfaceTransformFlagsKHR
$czeroBits :: SurfaceTransformFlagsKHR
rotate :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$crotate :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
shift :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
$cshift :: SurfaceTransformFlagsKHR -> Int -> SurfaceTransformFlagsKHR
complement :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$ccomplement :: SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
xor :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$cxor :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
.|. :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$c.|. :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
.&. :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$c.&. :: SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR
$cp1Bits :: Eq SurfaceTransformFlagsKHR
Bits, Bits SurfaceTransformFlagsKHR
Bits SurfaceTransformFlagsKHR =>
(SurfaceTransformFlagsKHR -> Int)
-> (SurfaceTransformFlagsKHR -> Int)
-> (SurfaceTransformFlagsKHR -> Int)
-> FiniteBits SurfaceTransformFlagsKHR
SurfaceTransformFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SurfaceTransformFlagsKHR -> Int
$ccountTrailingZeros :: SurfaceTransformFlagsKHR -> Int
countLeadingZeros :: SurfaceTransformFlagsKHR -> Int
$ccountLeadingZeros :: SurfaceTransformFlagsKHR -> Int
finiteBitSize :: SurfaceTransformFlagsKHR -> Int
$cfiniteBitSize :: SurfaceTransformFlagsKHR -> Int
$cp1FiniteBits :: Bits SurfaceTransformFlagsKHR
FiniteBits)
pattern $bSURFACE_TRANSFORM_IDENTITY_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_IDENTITY_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_IDENTITY_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000001
pattern $bSURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000002
pattern $bSURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000004
pattern $bSURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000008
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000010
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000020
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000040
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000080
pattern $bSURFACE_TRANSFORM_INHERIT_BIT_KHR :: SurfaceTransformFlagsKHR
$mSURFACE_TRANSFORM_INHERIT_BIT_KHR :: forall r.
SurfaceTransformFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_INHERIT_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000100
conNameSurfaceTransformFlagBitsKHR :: String
conNameSurfaceTransformFlagBitsKHR :: String
conNameSurfaceTransformFlagBitsKHR = "SurfaceTransformFlagBitsKHR"
enumPrefixSurfaceTransformFlagBitsKHR :: String
enumPrefixSurfaceTransformFlagBitsKHR :: String
enumPrefixSurfaceTransformFlagBitsKHR = "SURFACE_TRANSFORM_"
showTableSurfaceTransformFlagBitsKHR :: [(SurfaceTransformFlagBitsKHR, String)]
showTableSurfaceTransformFlagBitsKHR :: [(SurfaceTransformFlagsKHR, String)]
showTableSurfaceTransformFlagBitsKHR =
[ (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_IDENTITY_BIT_KHR , "IDENTITY_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_ROTATE_90_BIT_KHR , "ROTATE_90_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_ROTATE_180_BIT_KHR , "ROTATE_180_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_ROTATE_270_BIT_KHR , "ROTATE_270_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR , "HORIZONTAL_MIRROR_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR , "HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR, "HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR, "HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR")
, (SurfaceTransformFlagsKHR
SURFACE_TRANSFORM_INHERIT_BIT_KHR , "INHERIT_BIT_KHR")
]
instance Show SurfaceTransformFlagBitsKHR where
showsPrec :: Int -> SurfaceTransformFlagsKHR -> ShowS
showsPrec = String
-> [(SurfaceTransformFlagsKHR, String)]
-> String
-> (SurfaceTransformFlagsKHR -> "queueFamilyIndex" ::: Word32)
-> (("queueFamilyIndex" ::: Word32) -> ShowS)
-> Int
-> SurfaceTransformFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSurfaceTransformFlagBitsKHR
[(SurfaceTransformFlagsKHR, String)]
showTableSurfaceTransformFlagBitsKHR
String
conNameSurfaceTransformFlagBitsKHR
(\(SurfaceTransformFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
(\x :: "queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("queueFamilyIndex" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)
instance Read SurfaceTransformFlagBitsKHR where
readPrec :: ReadPrec SurfaceTransformFlagsKHR
readPrec = String
-> [(SurfaceTransformFlagsKHR, String)]
-> String
-> (("queueFamilyIndex" ::: Word32) -> SurfaceTransformFlagsKHR)
-> ReadPrec SurfaceTransformFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSurfaceTransformFlagBitsKHR
[(SurfaceTransformFlagsKHR, String)]
showTableSurfaceTransformFlagBitsKHR
String
conNameSurfaceTransformFlagBitsKHR
("queueFamilyIndex" ::: Word32) -> SurfaceTransformFlagsKHR
SurfaceTransformFlagBitsKHR
type KHR_SURFACE_SPEC_VERSION = 25
pattern KHR_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_SURFACE_SPEC_VERSION :: a
$mKHR_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_SURFACE_SPEC_VERSION = 25
type KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"
pattern KHR_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_SURFACE_EXTENSION_NAME :: a
$mKHR_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"