{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_present_timing ( setSwapchainPresentTimingQueueSizeEXT
, getSwapchainTimingPropertiesEXT
, getSwapchainTimeDomainPropertiesEXT
, getPastPresentationTimingEXT
, PhysicalDevicePresentTimingFeaturesEXT(..)
, PresentTimingSurfaceCapabilitiesEXT(..)
, SwapchainTimingPropertiesEXT(..)
, SwapchainTimeDomainPropertiesEXT(..)
, PresentStageTimeEXT(..)
, PastPresentationTimingInfoEXT(..)
, PastPresentationTimingPropertiesEXT(..)
, PastPresentationTimingEXT(..)
, PresentTimingsInfoEXT(..)
, PresentTimingInfoEXT(..)
, SwapchainCalibratedTimestampInfoEXT(..)
, TimeDomainKHR( TIME_DOMAIN_DEVICE_KHR
, TIME_DOMAIN_CLOCK_MONOTONIC_KHR
, TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR
, TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR
, TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT
, TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT
, ..
)
, PresentStageFlagsEXT
, PresentStageFlagBitsEXT( PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT
, PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT
, PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT
, PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT
, ..
)
, PastPresentationTimingFlagsEXT
, PastPresentationTimingFlagBitsEXT( PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT
, PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT
, ..
)
, PresentTimingInfoFlagsEXT
, PresentTimingInfoFlagBitsEXT( PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT
, PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT
, ..
)
, EXT_PRESENT_TIMING_SPEC_VERSION
, pattern EXT_PRESENT_TIMING_SPEC_VERSION
, EXT_PRESENT_TIMING_EXTENSION_NAME
, pattern EXT_PRESENT_TIMING_EXTENSION_NAME
, SwapchainKHR(..)
, SwapchainCreateFlagBitsKHR(..)
, SwapchainCreateFlagsKHR
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 (allocaBytes)
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 qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import qualified Data.Vector (null)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.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.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkGetPastPresentationTimingEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetSwapchainTimeDomainPropertiesEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetSwapchainTimingPropertiesEXT))
import Vulkan.Dynamic (DeviceCmds(pVkSetSwapchainPresentTimingQueueSizeEXT))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Extensions.Handles (SwapchainKHR)
import Vulkan.Extensions.Handles (SwapchainKHR(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_swapchain (SwapchainCreateFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_swapchain (SwapchainCreateFlagsKHR)
import Vulkan.Extensions.Handles (SwapchainKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkSetSwapchainPresentTimingQueueSizeEXT
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result
setSwapchainPresentTimingQueueSizeEXT :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
->
("size" ::: Word32)
-> io (Result)
setSwapchainPresentTimingQueueSizeEXT :: forall (io :: * -> *).
MonadIO io =>
Device -> SwapchainKHR -> Word32 -> io Result
setSwapchainPresentTimingQueueSizeEXT Device
device SwapchainKHR
swapchain Word32
size = IO Result -> io Result
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result) -> IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkSetSwapchainPresentTimingQueueSizeEXTPtr :: FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
vkSetSwapchainPresentTimingQueueSizeEXTPtr = DeviceCmds
-> FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
pVkSetSwapchainPresentTimingQueueSizeEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
vkSetSwapchainPresentTimingQueueSizeEXTPtr FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
-> FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkSetSwapchainPresentTimingQueueSizeEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkSetSwapchainPresentTimingQueueSizeEXT' :: Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result
vkSetSwapchainPresentTimingQueueSizeEXT' = FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
-> Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result
mkVkSetSwapchainPresentTimingQueueSizeEXT FunPtr (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result)
vkSetSwapchainPresentTimingQueueSizeEXTPtr
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkSetSwapchainPresentTimingQueueSizeEXT" (Ptr Device_T -> SwapchainKHR -> Word32 -> IO Result
vkSetSwapchainPresentTimingQueueSizeEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(SwapchainKHR
swapchain)
(Word32
size))
when (r < SUCCESS) (throwIO (VulkanException r))
pure $ (r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetSwapchainTimingPropertiesEXT
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Ptr SwapchainTimingPropertiesEXT -> Ptr Word64 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Ptr SwapchainTimingPropertiesEXT -> Ptr Word64 -> IO Result
getSwapchainTimingPropertiesEXT :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
-> io (Result, SwapchainTimingPropertiesEXT, ("swapchainTimingPropertiesCounter" ::: Word64))
getSwapchainTimingPropertiesEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
getSwapchainTimingPropertiesEXT Device
device SwapchainKHR
swapchain = IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> (ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall a b. (a -> b) -> a -> b
$ do
let vkGetSwapchainTimingPropertiesEXTPtr :: FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimingPropertiesEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
pVkGetSwapchainTimingPropertiesEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO ()
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
m
a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
())
-> IO ()
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimingPropertiesEXTPtr FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetSwapchainTimingPropertiesEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetSwapchainTimingPropertiesEXT' :: Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result
vkGetSwapchainTimingPropertiesEXT' = FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result
mkVkGetSwapchainTimingPropertiesEXT FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimingPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimingPropertiesEXTPtr
pPSwapchainTimingProperties <- ((Ptr SwapchainTimingPropertiesEXT
-> IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> IO
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimingPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Ptr SwapchainTimingPropertiesEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @SwapchainTimingPropertiesEXT)
pPSwapchainTimingPropertiesCounter <- ContT $ bracket (callocBytes @Word64 8) free
r <- lift $ traceAroundEvent "vkGetSwapchainTimingPropertiesEXT" (vkGetSwapchainTimingPropertiesEXT'
(deviceHandle (device))
(swapchain)
(pPSwapchainTimingProperties)
(pPSwapchainTimingPropertiesCounter))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pSwapchainTimingProperties <- lift $ peekCStruct @SwapchainTimingPropertiesEXT pPSwapchainTimingProperties
pSwapchainTimingPropertiesCounter <- lift $ peek @Word64 pPSwapchainTimingPropertiesCounter
pure $ (r, pSwapchainTimingProperties, pSwapchainTimingPropertiesCounter)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetSwapchainTimeDomainPropertiesEXT
:: FunPtr (Ptr Device_T -> SwapchainKHR -> Ptr SwapchainTimeDomainPropertiesEXT -> Ptr Word64 -> IO Result) -> Ptr Device_T -> SwapchainKHR -> Ptr SwapchainTimeDomainPropertiesEXT -> Ptr Word64 -> IO Result
getSwapchainTimeDomainPropertiesEXT :: forall io
. (MonadIO io)
=>
Device
->
SwapchainKHR
-> io (Result, SwapchainTimeDomainPropertiesEXT, ("timeDomainsCounter" ::: Word64))
getSwapchainTimeDomainPropertiesEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> SwapchainKHR
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
getSwapchainTimeDomainPropertiesEXT Device
device SwapchainKHR
swapchain = IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> (ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
-> io
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
forall a b. (a -> b) -> a -> b
$ do
let vkGetSwapchainTimeDomainPropertiesEXTPtr :: FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimeDomainPropertiesEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
pVkGetSwapchainTimeDomainPropertiesEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO ()
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
m
a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
())
-> IO ()
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimeDomainPropertiesEXTPtr FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetSwapchainTimeDomainPropertiesEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetSwapchainTimeDomainPropertiesEXT' :: Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result
vkGetSwapchainTimeDomainPropertiesEXT' = FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
-> Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result
mkVkGetSwapchainTimeDomainPropertiesEXT FunPtr
(Ptr Device_T
-> SwapchainKHR
-> Ptr SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> IO Result)
vkGetSwapchainTimeDomainPropertiesEXTPtr
pPSwapchainTimeDomainProperties <- ((Ptr SwapchainTimeDomainPropertiesEXT
-> IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> IO
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64))
-> ContT
(Result, SwapchainTimeDomainPropertiesEXT,
"swapchainTimingPropertiesCounter" ::: Word64)
IO
(Ptr SwapchainTimeDomainPropertiesEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @SwapchainTimeDomainPropertiesEXT)
pPTimeDomainsCounter <- ContT $ bracket (callocBytes @Word64 8) free
r <- lift $ traceAroundEvent "vkGetSwapchainTimeDomainPropertiesEXT" (vkGetSwapchainTimeDomainPropertiesEXT'
(deviceHandle (device))
(swapchain)
(pPSwapchainTimeDomainProperties)
(pPTimeDomainsCounter))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pSwapchainTimeDomainProperties <- lift $ peekCStruct @SwapchainTimeDomainPropertiesEXT pPSwapchainTimeDomainProperties
pTimeDomainsCounter <- lift $ peek @Word64 pPTimeDomainsCounter
pure $ (r, pSwapchainTimeDomainProperties, pTimeDomainsCounter)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPastPresentationTimingEXT
:: FunPtr (Ptr Device_T -> Ptr PastPresentationTimingInfoEXT -> Ptr PastPresentationTimingPropertiesEXT -> IO Result) -> Ptr Device_T -> Ptr PastPresentationTimingInfoEXT -> Ptr PastPresentationTimingPropertiesEXT -> IO Result
getPastPresentationTimingEXT :: forall io
. (MonadIO io)
=>
Device
->
PastPresentationTimingInfoEXT
-> io (Result, PastPresentationTimingPropertiesEXT)
getPastPresentationTimingEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> PastPresentationTimingInfoEXT
-> io (Result, PastPresentationTimingPropertiesEXT)
getPastPresentationTimingEXT Device
device
PastPresentationTimingInfoEXT
pastPresentationTimingInfo = IO (Result, PastPresentationTimingPropertiesEXT)
-> io (Result, PastPresentationTimingPropertiesEXT)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, PastPresentationTimingPropertiesEXT)
-> io (Result, PastPresentationTimingPropertiesEXT))
-> (ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Result, PastPresentationTimingPropertiesEXT)
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Result, PastPresentationTimingPropertiesEXT)
-> io (Result, PastPresentationTimingPropertiesEXT)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Result, PastPresentationTimingPropertiesEXT)
-> IO (Result, PastPresentationTimingPropertiesEXT)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Result, PastPresentationTimingPropertiesEXT)
-> io (Result, PastPresentationTimingPropertiesEXT))
-> ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Result, PastPresentationTimingPropertiesEXT)
-> io (Result, PastPresentationTimingPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPastPresentationTimingEXTPtr :: FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
vkGetPastPresentationTimingEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
pVkGetPastPresentationTimingEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT (Result, PastPresentationTimingPropertiesEXT) IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT (Result, PastPresentationTimingPropertiesEXT) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, PastPresentationTimingPropertiesEXT) IO ())
-> IO ()
-> ContT (Result, PastPresentationTimingPropertiesEXT) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
vkGetPastPresentationTimingEXTPtr FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPastPresentationTimingEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPastPresentationTimingEXT' :: Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result
vkGetPastPresentationTimingEXT' = FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
-> Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result
mkVkGetPastPresentationTimingEXT FunPtr
(Ptr Device_T
-> Ptr PastPresentationTimingInfoEXT
-> Ptr PastPresentationTimingPropertiesEXT
-> IO Result)
vkGetPastPresentationTimingEXTPtr
pPastPresentationTimingInfo <- ((Ptr PastPresentationTimingInfoEXT
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Ptr PastPresentationTimingInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PastPresentationTimingInfoEXT
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Ptr PastPresentationTimingInfoEXT))
-> ((Ptr PastPresentationTimingInfoEXT
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> ContT
(Result, PastPresentationTimingPropertiesEXT)
IO
(Ptr PastPresentationTimingInfoEXT)
forall a b. (a -> b) -> a -> b
$ PastPresentationTimingInfoEXT
-> (Ptr PastPresentationTimingInfoEXT
-> IO (Result, PastPresentationTimingPropertiesEXT))
-> IO (Result, PastPresentationTimingPropertiesEXT)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
PastPresentationTimingInfoEXT
-> (Ptr PastPresentationTimingInfoEXT -> IO b) -> IO b
withCStruct (PastPresentationTimingInfoEXT
pastPresentationTimingInfo)
pPPastPresentationTimingProperties <- ContT (withZeroCStruct @PastPresentationTimingPropertiesEXT)
r <- lift $ traceAroundEvent "vkGetPastPresentationTimingEXT" (vkGetPastPresentationTimingEXT'
(deviceHandle (device))
pPastPresentationTimingInfo
(pPPastPresentationTimingProperties))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pPastPresentationTimingProperties <- lift $ peekCStruct @PastPresentationTimingPropertiesEXT pPPastPresentationTimingProperties
pure $ (r, pPastPresentationTimingProperties)
data PhysicalDevicePresentTimingFeaturesEXT = PhysicalDevicePresentTimingFeaturesEXT
{
PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentTiming :: Bool
,
PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentAtAbsoluteTime :: Bool
,
PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentAtRelativeTime :: Bool
}
deriving (Typeable, PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool
(PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool)
-> (PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool)
-> Eq PhysicalDevicePresentTimingFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool
== :: PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool
$c/= :: PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool
/= :: PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePresentTimingFeaturesEXT)
#endif
deriving instance Show PhysicalDevicePresentTimingFeaturesEXT
instance ToCStruct PhysicalDevicePresentTimingFeaturesEXT where
withCStruct :: forall b.
PhysicalDevicePresentTimingFeaturesEXT
-> (Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDevicePresentTimingFeaturesEXT
x Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b
f = Int -> (Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePresentTimingFeaturesEXT
p -> Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO b -> IO b
forall b.
Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePresentTimingFeaturesEXT
p PhysicalDevicePresentTimingFeaturesEXT
x (Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b
f Ptr PhysicalDevicePresentTimingFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePresentTimingFeaturesEXT
p PhysicalDevicePresentTimingFeaturesEXT{Bool
presentTiming :: PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentAtAbsoluteTime :: PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentAtRelativeTime :: PhysicalDevicePresentTimingFeaturesEXT -> Bool
presentTiming :: Bool
presentAtAbsoluteTime :: Bool
presentAtRelativeTime :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentTiming))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentAtAbsoluteTime))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentAtRelativeTime))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePresentTimingFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePresentTimingFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDevicePresentTimingFeaturesEXT where
peekCStruct :: Ptr PhysicalDevicePresentTimingFeaturesEXT
-> IO PhysicalDevicePresentTimingFeaturesEXT
peekCStruct Ptr PhysicalDevicePresentTimingFeaturesEXT
p = do
presentTiming <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePresentTimingFeaturesEXT
p Ptr PhysicalDevicePresentTimingFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
presentAtAbsoluteTime <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
presentAtRelativeTime <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
pure $ PhysicalDevicePresentTimingFeaturesEXT
(bool32ToBool presentTiming)
(bool32ToBool presentAtAbsoluteTime)
(bool32ToBool presentAtRelativeTime)
instance Storable PhysicalDevicePresentTimingFeaturesEXT where
sizeOf :: PhysicalDevicePresentTimingFeaturesEXT -> Int
sizeOf ~PhysicalDevicePresentTimingFeaturesEXT
_ = Int
32
alignment :: PhysicalDevicePresentTimingFeaturesEXT -> Int
alignment ~PhysicalDevicePresentTimingFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDevicePresentTimingFeaturesEXT
-> IO PhysicalDevicePresentTimingFeaturesEXT
peek = Ptr PhysicalDevicePresentTimingFeaturesEXT
-> IO PhysicalDevicePresentTimingFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO ()
poke Ptr PhysicalDevicePresentTimingFeaturesEXT
ptr PhysicalDevicePresentTimingFeaturesEXT
poked = Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO () -> IO ()
forall b.
Ptr PhysicalDevicePresentTimingFeaturesEXT
-> PhysicalDevicePresentTimingFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePresentTimingFeaturesEXT
ptr PhysicalDevicePresentTimingFeaturesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePresentTimingFeaturesEXT where
zero :: PhysicalDevicePresentTimingFeaturesEXT
zero = Bool -> Bool -> Bool -> PhysicalDevicePresentTimingFeaturesEXT
PhysicalDevicePresentTimingFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PresentTimingSurfaceCapabilitiesEXT = PresentTimingSurfaceCapabilitiesEXT
{
PresentTimingSurfaceCapabilitiesEXT -> Bool
presentTimingSupported :: Bool
,
PresentTimingSurfaceCapabilitiesEXT -> Bool
presentAtAbsoluteTimeSupported :: Bool
,
PresentTimingSurfaceCapabilitiesEXT -> Bool
presentAtRelativeTimeSupported :: Bool
,
PresentTimingSurfaceCapabilitiesEXT -> PresentStageFlagsEXT
presentStageQueries :: PresentStageFlagsEXT
}
deriving (Typeable, PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool
(PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool)
-> (PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool)
-> Eq PresentTimingSurfaceCapabilitiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool
== :: PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool
$c/= :: PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool
/= :: PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PresentTimingSurfaceCapabilitiesEXT)
#endif
deriving instance Show PresentTimingSurfaceCapabilitiesEXT
instance ToCStruct PresentTimingSurfaceCapabilitiesEXT where
withCStruct :: forall b.
PresentTimingSurfaceCapabilitiesEXT
-> (Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b) -> IO b
withCStruct PresentTimingSurfaceCapabilitiesEXT
x Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b
f = Int -> (Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b) -> IO b)
-> (Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PresentTimingSurfaceCapabilitiesEXT
p -> Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO b -> IO b
forall b.
Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentTimingSurfaceCapabilitiesEXT
p PresentTimingSurfaceCapabilitiesEXT
x (Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b
f Ptr PresentTimingSurfaceCapabilitiesEXT
p)
pokeCStruct :: forall b.
Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO b -> IO b
pokeCStruct Ptr PresentTimingSurfaceCapabilitiesEXT
p PresentTimingSurfaceCapabilitiesEXT{Bool
PresentStageFlagsEXT
presentTimingSupported :: PresentTimingSurfaceCapabilitiesEXT -> Bool
presentAtAbsoluteTimeSupported :: PresentTimingSurfaceCapabilitiesEXT -> Bool
presentAtRelativeTimeSupported :: PresentTimingSurfaceCapabilitiesEXT -> Bool
presentStageQueries :: PresentTimingSurfaceCapabilitiesEXT -> PresentStageFlagsEXT
presentTimingSupported :: Bool
presentAtAbsoluteTimeSupported :: Bool
presentAtRelativeTimeSupported :: Bool
presentStageQueries :: PresentStageFlagsEXT
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentTimingSupported))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentAtAbsoluteTimeSupported))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
presentAtRelativeTimeSupported))
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT
-> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
presentStageQueries)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PresentTimingSurfaceCapabilitiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PresentTimingSurfaceCapabilitiesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT
-> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PresentTimingSurfaceCapabilitiesEXT where
peekCStruct :: Ptr PresentTimingSurfaceCapabilitiesEXT
-> IO PresentTimingSurfaceCapabilitiesEXT
peekCStruct Ptr PresentTimingSurfaceCapabilitiesEXT
p = do
presentTimingSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PresentTimingSurfaceCapabilitiesEXT
p Ptr PresentTimingSurfaceCapabilitiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
presentAtAbsoluteTimeSupported <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
presentAtRelativeTimeSupported <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
presentStageQueries <- peek @PresentStageFlagsEXT ((p `plusPtr` 28 :: Ptr PresentStageFlagsEXT))
pure $ PresentTimingSurfaceCapabilitiesEXT
(bool32ToBool presentTimingSupported)
(bool32ToBool presentAtAbsoluteTimeSupported)
(bool32ToBool presentAtRelativeTimeSupported)
presentStageQueries
instance Storable PresentTimingSurfaceCapabilitiesEXT where
sizeOf :: PresentTimingSurfaceCapabilitiesEXT -> Int
sizeOf ~PresentTimingSurfaceCapabilitiesEXT
_ = Int
32
alignment :: PresentTimingSurfaceCapabilitiesEXT -> Int
alignment ~PresentTimingSurfaceCapabilitiesEXT
_ = Int
8
peek :: Ptr PresentTimingSurfaceCapabilitiesEXT
-> IO PresentTimingSurfaceCapabilitiesEXT
peek = Ptr PresentTimingSurfaceCapabilitiesEXT
-> IO PresentTimingSurfaceCapabilitiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO ()
poke Ptr PresentTimingSurfaceCapabilitiesEXT
ptr PresentTimingSurfaceCapabilitiesEXT
poked = Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO () -> IO ()
forall b.
Ptr PresentTimingSurfaceCapabilitiesEXT
-> PresentTimingSurfaceCapabilitiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentTimingSurfaceCapabilitiesEXT
ptr PresentTimingSurfaceCapabilitiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PresentTimingSurfaceCapabilitiesEXT where
zero :: PresentTimingSurfaceCapabilitiesEXT
zero = Bool
-> Bool
-> Bool
-> PresentStageFlagsEXT
-> PresentTimingSurfaceCapabilitiesEXT
PresentTimingSurfaceCapabilitiesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
PresentStageFlagsEXT
forall a. Zero a => a
zero
data SwapchainTimingPropertiesEXT = SwapchainTimingPropertiesEXT
{
SwapchainTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
refreshDuration :: Word64
,
SwapchainTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
refreshInterval :: Word64
}
deriving (Typeable, SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool
(SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool)
-> (SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool)
-> Eq SwapchainTimingPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool
== :: SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool
$c/= :: SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool
/= :: SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SwapchainTimingPropertiesEXT)
#endif
deriving instance Show SwapchainTimingPropertiesEXT
instance ToCStruct SwapchainTimingPropertiesEXT where
withCStruct :: forall b.
SwapchainTimingPropertiesEXT
-> (Ptr SwapchainTimingPropertiesEXT -> IO b) -> IO b
withCStruct SwapchainTimingPropertiesEXT
x Ptr SwapchainTimingPropertiesEXT -> IO b
f = Int -> (Ptr SwapchainTimingPropertiesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr SwapchainTimingPropertiesEXT -> IO b) -> IO b)
-> (Ptr SwapchainTimingPropertiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SwapchainTimingPropertiesEXT
p -> Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO b -> IO b
forall b.
Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainTimingPropertiesEXT
p SwapchainTimingPropertiesEXT
x (Ptr SwapchainTimingPropertiesEXT -> IO b
f Ptr SwapchainTimingPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr SwapchainTimingPropertiesEXT
p SwapchainTimingPropertiesEXT{"swapchainTimingPropertiesCounter" ::: Word64
refreshDuration :: SwapchainTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
refreshInterval :: SwapchainTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
refreshDuration :: "swapchainTimingPropertiesCounter" ::: Word64
refreshInterval :: "swapchainTimingPropertiesCounter" ::: Word64
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
refreshDuration)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
refreshInterval)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr SwapchainTimingPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr SwapchainTimingPropertiesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SwapchainTimingPropertiesEXT where
peekCStruct :: Ptr SwapchainTimingPropertiesEXT -> IO SwapchainTimingPropertiesEXT
peekCStruct Ptr SwapchainTimingPropertiesEXT
p = do
refreshDuration <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr SwapchainTimingPropertiesEXT
p Ptr SwapchainTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64))
refreshInterval <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64))
pure $ SwapchainTimingPropertiesEXT
refreshDuration refreshInterval
instance Storable SwapchainTimingPropertiesEXT where
sizeOf :: SwapchainTimingPropertiesEXT -> Int
sizeOf ~SwapchainTimingPropertiesEXT
_ = Int
32
alignment :: SwapchainTimingPropertiesEXT -> Int
alignment ~SwapchainTimingPropertiesEXT
_ = Int
8
peek :: Ptr SwapchainTimingPropertiesEXT -> IO SwapchainTimingPropertiesEXT
peek = Ptr SwapchainTimingPropertiesEXT -> IO SwapchainTimingPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO ()
poke Ptr SwapchainTimingPropertiesEXT
ptr SwapchainTimingPropertiesEXT
poked = Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO () -> IO ()
forall b.
Ptr SwapchainTimingPropertiesEXT
-> SwapchainTimingPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainTimingPropertiesEXT
ptr SwapchainTimingPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SwapchainTimingPropertiesEXT where
zero :: SwapchainTimingPropertiesEXT
zero = ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> SwapchainTimingPropertiesEXT
SwapchainTimingPropertiesEXT
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
data SwapchainTimeDomainPropertiesEXT = SwapchainTimeDomainPropertiesEXT
{
SwapchainTimeDomainPropertiesEXT -> Word32
timeDomainCount :: Word32
,
SwapchainTimeDomainPropertiesEXT -> Ptr TimeDomainKHR
timeDomains :: Ptr TimeDomainKHR
,
SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
timeDomainIds :: Ptr Word64
}
deriving (Typeable, SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool
(SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool)
-> (SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool)
-> Eq SwapchainTimeDomainPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool
== :: SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool
$c/= :: SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool
/= :: SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SwapchainTimeDomainPropertiesEXT)
#endif
deriving instance Show SwapchainTimeDomainPropertiesEXT
instance ToCStruct SwapchainTimeDomainPropertiesEXT where
withCStruct :: forall b.
SwapchainTimeDomainPropertiesEXT
-> (Ptr SwapchainTimeDomainPropertiesEXT -> IO b) -> IO b
withCStruct SwapchainTimeDomainPropertiesEXT
x Ptr SwapchainTimeDomainPropertiesEXT -> IO b
f = Int -> (Ptr SwapchainTimeDomainPropertiesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr SwapchainTimeDomainPropertiesEXT -> IO b) -> IO b)
-> (Ptr SwapchainTimeDomainPropertiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SwapchainTimeDomainPropertiesEXT
p -> Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO b -> IO b
forall b.
Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainTimeDomainPropertiesEXT
p SwapchainTimeDomainPropertiesEXT
x (Ptr SwapchainTimeDomainPropertiesEXT -> IO b
f Ptr SwapchainTimeDomainPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr SwapchainTimeDomainPropertiesEXT
p SwapchainTimeDomainPropertiesEXT{Word32
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
Ptr TimeDomainKHR
timeDomainCount :: SwapchainTimeDomainPropertiesEXT -> Word32
timeDomains :: SwapchainTimeDomainPropertiesEXT -> Ptr TimeDomainKHR
timeDomainIds :: SwapchainTimeDomainPropertiesEXT
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
timeDomainCount :: Word32
timeDomains :: Ptr TimeDomainKHR
timeDomainIds :: Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
timeDomainCount)
Ptr (Ptr TimeDomainKHR) -> Ptr TimeDomainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT
-> Int -> Ptr (Ptr TimeDomainKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr TimeDomainKHR))) (Ptr TimeDomainKHR
timeDomains)
Ptr (Ptr ("swapchainTimingPropertiesCounter" ::: Word64))
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT
-> Int -> Ptr (Ptr ("swapchainTimingPropertiesCounter" ::: Word64))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Word64))) (Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
timeDomainIds)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr SwapchainTimeDomainPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr SwapchainTimeDomainPropertiesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SwapchainTimeDomainPropertiesEXT where
peekCStruct :: Ptr SwapchainTimeDomainPropertiesEXT
-> IO SwapchainTimeDomainPropertiesEXT
peekCStruct Ptr SwapchainTimeDomainPropertiesEXT
p = do
timeDomainCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SwapchainTimeDomainPropertiesEXT
p Ptr SwapchainTimeDomainPropertiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pTimeDomains <- peek @(Ptr TimeDomainKHR) ((p `plusPtr` 24 :: Ptr (Ptr TimeDomainKHR)))
pTimeDomainIds <- peek @(Ptr Word64) ((p `plusPtr` 32 :: Ptr (Ptr Word64)))
pure $ SwapchainTimeDomainPropertiesEXT
timeDomainCount pTimeDomains pTimeDomainIds
instance Storable SwapchainTimeDomainPropertiesEXT where
sizeOf :: SwapchainTimeDomainPropertiesEXT -> Int
sizeOf ~SwapchainTimeDomainPropertiesEXT
_ = Int
40
alignment :: SwapchainTimeDomainPropertiesEXT -> Int
alignment ~SwapchainTimeDomainPropertiesEXT
_ = Int
8
peek :: Ptr SwapchainTimeDomainPropertiesEXT
-> IO SwapchainTimeDomainPropertiesEXT
peek = Ptr SwapchainTimeDomainPropertiesEXT
-> IO SwapchainTimeDomainPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO ()
poke Ptr SwapchainTimeDomainPropertiesEXT
ptr SwapchainTimeDomainPropertiesEXT
poked = Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO () -> IO ()
forall b.
Ptr SwapchainTimeDomainPropertiesEXT
-> SwapchainTimeDomainPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainTimeDomainPropertiesEXT
ptr SwapchainTimeDomainPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SwapchainTimeDomainPropertiesEXT where
zero :: SwapchainTimeDomainPropertiesEXT
zero = Word32
-> Ptr TimeDomainKHR
-> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> SwapchainTimeDomainPropertiesEXT
SwapchainTimeDomainPropertiesEXT
Word32
forall a. Zero a => a
zero
Ptr TimeDomainKHR
forall a. Zero a => a
zero
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a. Zero a => a
zero
data PresentStageTimeEXT = PresentStageTimeEXT
{
PresentStageTimeEXT -> PresentStageFlagsEXT
stage :: PresentStageFlagsEXT
,
PresentStageTimeEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
time :: Word64
}
deriving (Typeable, PresentStageTimeEXT -> PresentStageTimeEXT -> Bool
(PresentStageTimeEXT -> PresentStageTimeEXT -> Bool)
-> (PresentStageTimeEXT -> PresentStageTimeEXT -> Bool)
-> Eq PresentStageTimeEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PresentStageTimeEXT -> PresentStageTimeEXT -> Bool
== :: PresentStageTimeEXT -> PresentStageTimeEXT -> Bool
$c/= :: PresentStageTimeEXT -> PresentStageTimeEXT -> Bool
/= :: PresentStageTimeEXT -> PresentStageTimeEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PresentStageTimeEXT)
#endif
deriving instance Show PresentStageTimeEXT
instance ToCStruct PresentStageTimeEXT where
withCStruct :: forall b.
PresentStageTimeEXT -> (Ptr PresentStageTimeEXT -> IO b) -> IO b
withCStruct PresentStageTimeEXT
x Ptr PresentStageTimeEXT -> IO b
f = Int -> (Ptr PresentStageTimeEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr PresentStageTimeEXT -> IO b) -> IO b)
-> (Ptr PresentStageTimeEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PresentStageTimeEXT
p -> Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO b -> IO b
forall b.
Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentStageTimeEXT
p PresentStageTimeEXT
x (Ptr PresentStageTimeEXT -> IO b
f Ptr PresentStageTimeEXT
p)
pokeCStruct :: forall b.
Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO b -> IO b
pokeCStruct Ptr PresentStageTimeEXT
p PresentStageTimeEXT{"swapchainTimingPropertiesCounter" ::: Word64
PresentStageFlagsEXT
stage :: PresentStageTimeEXT -> PresentStageFlagsEXT
time :: PresentStageTimeEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
stage :: PresentStageFlagsEXT
time :: "swapchainTimingPropertiesCounter" ::: Word64
..} IO b
f = do
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentStageTimeEXT
p Ptr PresentStageTimeEXT -> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
stage)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentStageTimeEXT
p Ptr PresentStageTimeEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
time)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PresentStageTimeEXT -> IO b -> IO b
pokeZeroCStruct Ptr PresentStageTimeEXT
p IO b
f = do
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentStageTimeEXT
p Ptr PresentStageTimeEXT -> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentStageTimeEXT
p Ptr PresentStageTimeEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PresentStageTimeEXT where
peekCStruct :: Ptr PresentStageTimeEXT -> IO PresentStageTimeEXT
peekCStruct Ptr PresentStageTimeEXT
p = do
stage <- forall a. Storable a => Ptr a -> IO a
peek @PresentStageFlagsEXT ((Ptr PresentStageTimeEXT
p Ptr PresentStageTimeEXT -> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr PresentStageFlagsEXT))
time <- peek @Word64 ((p `plusPtr` 8 :: Ptr Word64))
pure $ PresentStageTimeEXT
stage time
instance Storable PresentStageTimeEXT where
sizeOf :: PresentStageTimeEXT -> Int
sizeOf ~PresentStageTimeEXT
_ = Int
16
alignment :: PresentStageTimeEXT -> Int
alignment ~PresentStageTimeEXT
_ = Int
8
peek :: Ptr PresentStageTimeEXT -> IO PresentStageTimeEXT
peek = Ptr PresentStageTimeEXT -> IO PresentStageTimeEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO ()
poke Ptr PresentStageTimeEXT
ptr PresentStageTimeEXT
poked = Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO () -> IO ()
forall b.
Ptr PresentStageTimeEXT -> PresentStageTimeEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentStageTimeEXT
ptr PresentStageTimeEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PresentStageTimeEXT where
zero :: PresentStageTimeEXT
zero = PresentStageFlagsEXT
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> PresentStageTimeEXT
PresentStageTimeEXT
PresentStageFlagsEXT
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
data PastPresentationTimingInfoEXT = PastPresentationTimingInfoEXT
{
PastPresentationTimingInfoEXT -> PastPresentationTimingFlagsEXT
flags :: PastPresentationTimingFlagsEXT
,
PastPresentationTimingInfoEXT -> SwapchainKHR
swapchain :: SwapchainKHR
}
deriving (Typeable, PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool
(PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool)
-> (PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool)
-> Eq PastPresentationTimingInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool
== :: PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool
$c/= :: PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool
/= :: PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PastPresentationTimingInfoEXT)
#endif
deriving instance Show PastPresentationTimingInfoEXT
instance ToCStruct PastPresentationTimingInfoEXT where
withCStruct :: forall b.
PastPresentationTimingInfoEXT
-> (Ptr PastPresentationTimingInfoEXT -> IO b) -> IO b
withCStruct PastPresentationTimingInfoEXT
x Ptr PastPresentationTimingInfoEXT -> IO b
f = Int -> (Ptr PastPresentationTimingInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PastPresentationTimingInfoEXT -> IO b) -> IO b)
-> (Ptr PastPresentationTimingInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PastPresentationTimingInfoEXT
p -> Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO b -> IO b
forall b.
Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingInfoEXT
p PastPresentationTimingInfoEXT
x (Ptr PastPresentationTimingInfoEXT -> IO b
f Ptr PastPresentationTimingInfoEXT
p)
pokeCStruct :: forall b.
Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingInfoEXT
p PastPresentationTimingInfoEXT{SwapchainKHR
PastPresentationTimingFlagsEXT
flags :: PastPresentationTimingInfoEXT -> PastPresentationTimingFlagsEXT
swapchain :: PastPresentationTimingInfoEXT -> SwapchainKHR
flags :: PastPresentationTimingFlagsEXT
swapchain :: SwapchainKHR
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT
-> Int -> Ptr PastPresentationTimingFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PastPresentationTimingFlagsEXT)) (PastPresentationTimingFlagsEXT
flags)
Ptr SwapchainKHR -> SwapchainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr SwapchainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr SwapchainKHR)) (SwapchainKHR
swapchain)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PastPresentationTimingInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PastPresentationTimingInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SwapchainKHR -> SwapchainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT -> Int -> Ptr SwapchainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr SwapchainKHR)) (SwapchainKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PastPresentationTimingInfoEXT where
peekCStruct :: Ptr PastPresentationTimingInfoEXT
-> IO PastPresentationTimingInfoEXT
peekCStruct Ptr PastPresentationTimingInfoEXT
p = do
flags <- forall a. Storable a => Ptr a -> IO a
peek @PastPresentationTimingFlagsEXT ((Ptr PastPresentationTimingInfoEXT
p Ptr PastPresentationTimingInfoEXT
-> Int -> Ptr PastPresentationTimingFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PastPresentationTimingFlagsEXT))
swapchain <- peek @SwapchainKHR ((p `plusPtr` 24 :: Ptr SwapchainKHR))
pure $ PastPresentationTimingInfoEXT
flags swapchain
instance Storable PastPresentationTimingInfoEXT where
sizeOf :: PastPresentationTimingInfoEXT -> Int
sizeOf ~PastPresentationTimingInfoEXT
_ = Int
32
alignment :: PastPresentationTimingInfoEXT -> Int
alignment ~PastPresentationTimingInfoEXT
_ = Int
8
peek :: Ptr PastPresentationTimingInfoEXT
-> IO PastPresentationTimingInfoEXT
peek = Ptr PastPresentationTimingInfoEXT
-> IO PastPresentationTimingInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO ()
poke Ptr PastPresentationTimingInfoEXT
ptr PastPresentationTimingInfoEXT
poked = Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO () -> IO ()
forall b.
Ptr PastPresentationTimingInfoEXT
-> PastPresentationTimingInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingInfoEXT
ptr PastPresentationTimingInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PastPresentationTimingInfoEXT where
zero :: PastPresentationTimingInfoEXT
zero = PastPresentationTimingFlagsEXT
-> SwapchainKHR -> PastPresentationTimingInfoEXT
PastPresentationTimingInfoEXT
PastPresentationTimingFlagsEXT
forall a. Zero a => a
zero
SwapchainKHR
forall a. Zero a => a
zero
data PastPresentationTimingPropertiesEXT = PastPresentationTimingPropertiesEXT
{
PastPresentationTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timingPropertiesCounter :: Word64
,
PastPresentationTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainsCounter :: Word64
,
PastPresentationTimingPropertiesEXT -> Word32
presentationTimingCount :: Word32
,
PastPresentationTimingPropertiesEXT
-> Ptr PastPresentationTimingEXT
presentationTimings :: Ptr PastPresentationTimingEXT
}
deriving (Typeable, PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool
(PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool)
-> (PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool)
-> Eq PastPresentationTimingPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool
== :: PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool
$c/= :: PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool
/= :: PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PastPresentationTimingPropertiesEXT)
#endif
deriving instance Show PastPresentationTimingPropertiesEXT
instance ToCStruct PastPresentationTimingPropertiesEXT where
withCStruct :: forall b.
PastPresentationTimingPropertiesEXT
-> (Ptr PastPresentationTimingPropertiesEXT -> IO b) -> IO b
withCStruct PastPresentationTimingPropertiesEXT
x Ptr PastPresentationTimingPropertiesEXT -> IO b
f = Int -> (Ptr PastPresentationTimingPropertiesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr PastPresentationTimingPropertiesEXT -> IO b) -> IO b)
-> (Ptr PastPresentationTimingPropertiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PastPresentationTimingPropertiesEXT
p -> Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO b -> IO b
forall b.
Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingPropertiesEXT
p PastPresentationTimingPropertiesEXT
x (Ptr PastPresentationTimingPropertiesEXT -> IO b
f Ptr PastPresentationTimingPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingPropertiesEXT
p PastPresentationTimingPropertiesEXT{Word32
"swapchainTimingPropertiesCounter" ::: Word64
Ptr PastPresentationTimingEXT
timingPropertiesCounter :: PastPresentationTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainsCounter :: PastPresentationTimingPropertiesEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
presentationTimingCount :: PastPresentationTimingPropertiesEXT -> Word32
presentationTimings :: PastPresentationTimingPropertiesEXT
-> Ptr PastPresentationTimingEXT
timingPropertiesCounter :: "swapchainTimingPropertiesCounter" ::: Word64
timeDomainsCounter :: "swapchainTimingPropertiesCounter" ::: Word64
presentationTimingCount :: Word32
presentationTimings :: Ptr PastPresentationTimingEXT
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
timingPropertiesCounter)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
timeDomainsCounter)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
presentationTimingCount)
Ptr (Ptr PastPresentationTimingEXT)
-> Ptr PastPresentationTimingEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr (Ptr PastPresentationTimingEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PastPresentationTimingEXT))) (Ptr PastPresentationTimingEXT
presentationTimings)
IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PastPresentationTimingPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PastPresentationTimingPropertiesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr (Ptr PastPresentationTimingEXT)
-> Ptr PastPresentationTimingEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr (Ptr PastPresentationTimingEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PastPresentationTimingEXT))) (Ptr PastPresentationTimingEXT
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PastPresentationTimingPropertiesEXT where
peekCStruct :: Ptr PastPresentationTimingPropertiesEXT
-> IO PastPresentationTimingPropertiesEXT
peekCStruct Ptr PastPresentationTimingPropertiesEXT
p = do
timingPropertiesCounter <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PastPresentationTimingPropertiesEXT
p Ptr PastPresentationTimingPropertiesEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64))
timeDomainsCounter <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64))
presentationTimingCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pPresentationTimings <- peek @(Ptr PastPresentationTimingEXT) ((p `plusPtr` 40 :: Ptr (Ptr PastPresentationTimingEXT)))
pure $ PastPresentationTimingPropertiesEXT
timingPropertiesCounter
timeDomainsCounter
presentationTimingCount
pPresentationTimings
instance Storable PastPresentationTimingPropertiesEXT where
sizeOf :: PastPresentationTimingPropertiesEXT -> Int
sizeOf ~PastPresentationTimingPropertiesEXT
_ = Int
48
alignment :: PastPresentationTimingPropertiesEXT -> Int
alignment ~PastPresentationTimingPropertiesEXT
_ = Int
8
peek :: Ptr PastPresentationTimingPropertiesEXT
-> IO PastPresentationTimingPropertiesEXT
peek = Ptr PastPresentationTimingPropertiesEXT
-> IO PastPresentationTimingPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO ()
poke Ptr PastPresentationTimingPropertiesEXT
ptr PastPresentationTimingPropertiesEXT
poked = Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO () -> IO ()
forall b.
Ptr PastPresentationTimingPropertiesEXT
-> PastPresentationTimingPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingPropertiesEXT
ptr PastPresentationTimingPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PastPresentationTimingPropertiesEXT where
zero :: PastPresentationTimingPropertiesEXT
zero = ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> Word32
-> Ptr PastPresentationTimingEXT
-> PastPresentationTimingPropertiesEXT
PastPresentationTimingPropertiesEXT
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Ptr PastPresentationTimingEXT
forall a. Zero a => a
zero
data PastPresentationTimingEXT = PastPresentationTimingEXT
{
PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
presentId :: Word64
,
PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
targetTime :: Word64
,
PastPresentationTimingEXT -> Word32
presentStageCount :: Word32
,
PastPresentationTimingEXT -> Ptr PresentStageTimeEXT
presentStages :: Ptr PresentStageTimeEXT
,
PastPresentationTimingEXT -> TimeDomainKHR
timeDomain :: TimeDomainKHR
,
PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainId :: Word64
,
PastPresentationTimingEXT -> Bool
reportComplete :: Bool
}
deriving (Typeable, PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool
(PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool)
-> (PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool)
-> Eq PastPresentationTimingEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool
== :: PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool
$c/= :: PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool
/= :: PastPresentationTimingEXT -> PastPresentationTimingEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PastPresentationTimingEXT)
#endif
deriving instance Show PastPresentationTimingEXT
instance ToCStruct PastPresentationTimingEXT where
withCStruct :: forall b.
PastPresentationTimingEXT
-> (Ptr PastPresentationTimingEXT -> IO b) -> IO b
withCStruct PastPresentationTimingEXT
x Ptr PastPresentationTimingEXT -> IO b
f = Int -> (Ptr PastPresentationTimingEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
72 ((Ptr PastPresentationTimingEXT -> IO b) -> IO b)
-> (Ptr PastPresentationTimingEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PastPresentationTimingEXT
p -> Ptr PastPresentationTimingEXT
-> PastPresentationTimingEXT -> IO b -> IO b
forall b.
Ptr PastPresentationTimingEXT
-> PastPresentationTimingEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingEXT
p PastPresentationTimingEXT
x (Ptr PastPresentationTimingEXT -> IO b
f Ptr PastPresentationTimingEXT
p)
pokeCStruct :: forall b.
Ptr PastPresentationTimingEXT
-> PastPresentationTimingEXT -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingEXT
p PastPresentationTimingEXT{Bool
Word32
"swapchainTimingPropertiesCounter" ::: Word64
Ptr PresentStageTimeEXT
TimeDomainKHR
presentId :: PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
targetTime :: PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
presentStageCount :: PastPresentationTimingEXT -> Word32
presentStages :: PastPresentationTimingEXT -> Ptr PresentStageTimeEXT
timeDomain :: PastPresentationTimingEXT -> TimeDomainKHR
timeDomainId :: PastPresentationTimingEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
reportComplete :: PastPresentationTimingEXT -> Bool
presentId :: "swapchainTimingPropertiesCounter" ::: Word64
targetTime :: "swapchainTimingPropertiesCounter" ::: Word64
presentStageCount :: Word32
presentStages :: Ptr PresentStageTimeEXT
timeDomain :: TimeDomainKHR
timeDomainId :: "swapchainTimingPropertiesCounter" ::: Word64
reportComplete :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
presentId)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
targetTime)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
presentStageCount)
Ptr (Ptr PresentStageTimeEXT) -> Ptr PresentStageTimeEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr (Ptr PresentStageTimeEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PresentStageTimeEXT))) (Ptr PresentStageTimeEXT
presentStages)
Ptr TimeDomainKHR -> TimeDomainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr TimeDomainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr TimeDomainKHR)) (TimeDomainKHR
timeDomain)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
timeDomainId)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
reportComplete))
IO b
f
cStructSize :: Int
cStructSize = Int
72
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PastPresentationTimingEXT -> IO b -> IO b
pokeZeroCStruct Ptr PastPresentationTimingEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr (Ptr PresentStageTimeEXT) -> Ptr PresentStageTimeEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr (Ptr PresentStageTimeEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PresentStageTimeEXT))) (Ptr PresentStageTimeEXT
forall a. Zero a => a
zero)
Ptr TimeDomainKHR -> TimeDomainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr TimeDomainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr TimeDomainKHR)) (TimeDomainKHR
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PastPresentationTimingEXT where
peekCStruct :: Ptr PastPresentationTimingEXT -> IO PastPresentationTimingEXT
peekCStruct Ptr PastPresentationTimingEXT
p = do
presentId <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PastPresentationTimingEXT
p Ptr PastPresentationTimingEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64))
targetTime <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64))
presentStageCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pPresentStages <- peek @(Ptr PresentStageTimeEXT) ((p `plusPtr` 40 :: Ptr (Ptr PresentStageTimeEXT)))
timeDomain <- peek @TimeDomainKHR ((p `plusPtr` 48 :: Ptr TimeDomainKHR))
timeDomainId <- peek @Word64 ((p `plusPtr` 56 :: Ptr Word64))
reportComplete <- peek @Bool32 ((p `plusPtr` 64 :: Ptr Bool32))
pure $ PastPresentationTimingEXT
presentId
targetTime
presentStageCount
pPresentStages
timeDomain
timeDomainId
(bool32ToBool reportComplete)
instance Storable PastPresentationTimingEXT where
sizeOf :: PastPresentationTimingEXT -> Int
sizeOf ~PastPresentationTimingEXT
_ = Int
72
alignment :: PastPresentationTimingEXT -> Int
alignment ~PastPresentationTimingEXT
_ = Int
8
peek :: Ptr PastPresentationTimingEXT -> IO PastPresentationTimingEXT
peek = Ptr PastPresentationTimingEXT -> IO PastPresentationTimingEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PastPresentationTimingEXT -> PastPresentationTimingEXT -> IO ()
poke Ptr PastPresentationTimingEXT
ptr PastPresentationTimingEXT
poked = Ptr PastPresentationTimingEXT
-> PastPresentationTimingEXT -> IO () -> IO ()
forall b.
Ptr PastPresentationTimingEXT
-> PastPresentationTimingEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PastPresentationTimingEXT
ptr PastPresentationTimingEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PastPresentationTimingEXT where
zero :: PastPresentationTimingEXT
zero = ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> Word32
-> Ptr PresentStageTimeEXT
-> TimeDomainKHR
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> Bool
-> PastPresentationTimingEXT
PastPresentationTimingEXT
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Ptr PresentStageTimeEXT
forall a. Zero a => a
zero
TimeDomainKHR
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PresentTimingsInfoEXT = PresentTimingsInfoEXT
{
PresentTimingsInfoEXT -> Word32
swapchainCount :: Word32
,
PresentTimingsInfoEXT -> Vector PresentTimingInfoEXT
timingInfos :: Vector PresentTimingInfoEXT
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PresentTimingsInfoEXT)
#endif
deriving instance Show PresentTimingsInfoEXT
instance ToCStruct PresentTimingsInfoEXT where
withCStruct :: forall b.
PresentTimingsInfoEXT
-> (Ptr PresentTimingsInfoEXT -> IO b) -> IO b
withCStruct PresentTimingsInfoEXT
x Ptr PresentTimingsInfoEXT -> IO b
f = Int -> (Ptr PresentTimingsInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PresentTimingsInfoEXT -> IO b) -> IO b)
-> (Ptr PresentTimingsInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PresentTimingsInfoEXT
p -> Ptr PresentTimingsInfoEXT -> PresentTimingsInfoEXT -> IO b -> IO b
forall b.
Ptr PresentTimingsInfoEXT -> PresentTimingsInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentTimingsInfoEXT
p PresentTimingsInfoEXT
x (Ptr PresentTimingsInfoEXT -> IO b
f Ptr PresentTimingsInfoEXT
p)
pokeCStruct :: forall b.
Ptr PresentTimingsInfoEXT -> PresentTimingsInfoEXT -> IO b -> IO b
pokeCStruct Ptr PresentTimingsInfoEXT
p PresentTimingsInfoEXT{Word32
Vector PresentTimingInfoEXT
swapchainCount :: PresentTimingsInfoEXT -> Word32
timingInfos :: PresentTimingsInfoEXT -> Vector PresentTimingInfoEXT
swapchainCount :: Word32
timingInfos :: Vector PresentTimingInfoEXT
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingsInfoEXT
p Ptr PresentTimingsInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingsInfoEXT
p Ptr PresentTimingsInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
let pTimingInfosLength :: Int
pTimingInfosLength = Vector PresentTimingInfoEXT -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector PresentTimingInfoEXT -> Int)
-> Vector PresentTimingInfoEXT -> Int
forall a b. (a -> b) -> a -> b
$ (Vector PresentTimingInfoEXT
timingInfos)
swapchainCount'' <- IO Word32 -> ContT b IO Word32
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32 -> ContT b IO Word32) -> IO Word32 -> ContT b IO Word32
forall a b. (a -> b) -> a -> b
$ if (Word32
swapchainCount) Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== Word32
0
then Word32 -> IO Word32
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32 -> IO Word32) -> Word32 -> IO Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pTimingInfosLength
else do
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pTimingInfosLength Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== (Word32
swapchainCount) Bool -> Bool -> Bool
|| Int
pTimingInfosLength Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
0) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pTimingInfos must be empty or have 'swapchainCount' elements" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
Word32 -> IO Word32
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32
swapchainCount)
lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (swapchainCount'')
pTimingInfos'' <- if Data.Vector.null (timingInfos)
then pure nullPtr
else do
pPTimingInfos <- ContT $ allocaBytes @PresentTimingInfoEXT (((Data.Vector.length (timingInfos))) * 48)
lift $ Data.Vector.imapM_ (\Int
i PresentTimingInfoEXT
e -> Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PresentTimingInfoEXT
pPTimingInfos Ptr PresentTimingInfoEXT -> Int -> Ptr PresentTimingInfoEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PresentTimingInfoEXT) (PresentTimingInfoEXT
e)) ((timingInfos))
pure $ pPTimingInfos
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr PresentTimingInfoEXT))) pTimingInfos''
lift $ f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PresentTimingsInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PresentTimingsInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingsInfoEXT
p Ptr PresentTimingsInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingsInfoEXT
p Ptr PresentTimingsInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct PresentTimingsInfoEXT where
peekCStruct :: Ptr PresentTimingsInfoEXT -> IO PresentTimingsInfoEXT
peekCStruct Ptr PresentTimingsInfoEXT
p = do
swapchainCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PresentTimingsInfoEXT
p Ptr PresentTimingsInfoEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pTimingInfos <- peek @(Ptr PresentTimingInfoEXT) ((p `plusPtr` 24 :: Ptr (Ptr PresentTimingInfoEXT)))
let pTimingInfosLength = if Ptr PresentTimingInfoEXT
pTimingInfos Ptr PresentTimingInfoEXT -> Ptr PresentTimingInfoEXT -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr PresentTimingInfoEXT
forall a. Ptr a
nullPtr then Int
0 else (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
swapchainCount)
pTimingInfos' <- generateM pTimingInfosLength (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PresentTimingInfoEXT ((Ptr PresentTimingInfoEXT
pTimingInfos Ptr PresentTimingInfoEXT -> Int -> Ptr PresentTimingInfoEXT
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PresentTimingInfoEXT)))
pure $ PresentTimingsInfoEXT
swapchainCount pTimingInfos'
instance Zero PresentTimingsInfoEXT where
zero :: PresentTimingsInfoEXT
zero = Word32 -> Vector PresentTimingInfoEXT -> PresentTimingsInfoEXT
PresentTimingsInfoEXT
Word32
forall a. Zero a => a
zero
Vector PresentTimingInfoEXT
forall a. Monoid a => a
mempty
data PresentTimingInfoEXT = PresentTimingInfoEXT
{
PresentTimingInfoEXT -> PresentTimingInfoFlagsEXT
flags :: PresentTimingInfoFlagsEXT
,
PresentTimingInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
targetTime :: Word64
,
PresentTimingInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainId :: Word64
,
PresentTimingInfoEXT -> PresentStageFlagsEXT
presentStageQueries :: PresentStageFlagsEXT
,
PresentTimingInfoEXT -> PresentStageFlagsEXT
targetTimeDomainPresentStage :: PresentStageFlagsEXT
}
deriving (Typeable, PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool
(PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool)
-> (PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool)
-> Eq PresentTimingInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool
== :: PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool
$c/= :: PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool
/= :: PresentTimingInfoEXT -> PresentTimingInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PresentTimingInfoEXT)
#endif
deriving instance Show PresentTimingInfoEXT
instance ToCStruct PresentTimingInfoEXT where
withCStruct :: forall b.
PresentTimingInfoEXT -> (Ptr PresentTimingInfoEXT -> IO b) -> IO b
withCStruct PresentTimingInfoEXT
x Ptr PresentTimingInfoEXT -> IO b
f = Int -> (Ptr PresentTimingInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr PresentTimingInfoEXT -> IO b) -> IO b)
-> (Ptr PresentTimingInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PresentTimingInfoEXT
p -> Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO b -> IO b
forall b.
Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentTimingInfoEXT
p PresentTimingInfoEXT
x (Ptr PresentTimingInfoEXT -> IO b
f Ptr PresentTimingInfoEXT
p)
pokeCStruct :: forall b.
Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO b -> IO b
pokeCStruct Ptr PresentTimingInfoEXT
p PresentTimingInfoEXT{"swapchainTimingPropertiesCounter" ::: Word64
PresentTimingInfoFlagsEXT
PresentStageFlagsEXT
flags :: PresentTimingInfoEXT -> PresentTimingInfoFlagsEXT
targetTime :: PresentTimingInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainId :: PresentTimingInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
presentStageQueries :: PresentTimingInfoEXT -> PresentStageFlagsEXT
targetTimeDomainPresentStage :: PresentTimingInfoEXT -> PresentStageFlagsEXT
flags :: PresentTimingInfoFlagsEXT
targetTime :: "swapchainTimingPropertiesCounter" ::: Word64
timeDomainId :: "swapchainTimingPropertiesCounter" ::: Word64
presentStageQueries :: PresentStageFlagsEXT
targetTimeDomainPresentStage :: PresentStageFlagsEXT
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr PresentTimingInfoFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentTimingInfoFlagsEXT)) (PresentTimingInfoFlagsEXT
flags)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
targetTime)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
timeDomainId)
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
presentStageQueries)
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
targetTimeDomainPresentStage)
IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PresentTimingInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PresentTimingInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PresentTimingInfoEXT where
peekCStruct :: Ptr PresentTimingInfoEXT -> IO PresentTimingInfoEXT
peekCStruct Ptr PresentTimingInfoEXT
p = do
flags <- forall a. Storable a => Ptr a -> IO a
peek @PresentTimingInfoFlagsEXT ((Ptr PresentTimingInfoEXT
p Ptr PresentTimingInfoEXT -> Int -> Ptr PresentTimingInfoFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentTimingInfoFlagsEXT))
targetTime <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64))
timeDomainId <- peek @Word64 ((p `plusPtr` 32 :: Ptr Word64))
presentStageQueries <- peek @PresentStageFlagsEXT ((p `plusPtr` 40 :: Ptr PresentStageFlagsEXT))
targetTimeDomainPresentStage <- peek @PresentStageFlagsEXT ((p `plusPtr` 44 :: Ptr PresentStageFlagsEXT))
pure $ PresentTimingInfoEXT
flags
targetTime
timeDomainId
presentStageQueries
targetTimeDomainPresentStage
instance Storable PresentTimingInfoEXT where
sizeOf :: PresentTimingInfoEXT -> Int
sizeOf ~PresentTimingInfoEXT
_ = Int
48
alignment :: PresentTimingInfoEXT -> Int
alignment ~PresentTimingInfoEXT
_ = Int
8
peek :: Ptr PresentTimingInfoEXT -> IO PresentTimingInfoEXT
peek = Ptr PresentTimingInfoEXT -> IO PresentTimingInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO ()
poke Ptr PresentTimingInfoEXT
ptr PresentTimingInfoEXT
poked = Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO () -> IO ()
forall b.
Ptr PresentTimingInfoEXT -> PresentTimingInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PresentTimingInfoEXT
ptr PresentTimingInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PresentTimingInfoEXT where
zero :: PresentTimingInfoEXT
zero = PresentTimingInfoFlagsEXT
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> PresentStageFlagsEXT
-> PresentStageFlagsEXT
-> PresentTimingInfoEXT
PresentTimingInfoEXT
PresentTimingInfoFlagsEXT
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
PresentStageFlagsEXT
forall a. Zero a => a
zero
PresentStageFlagsEXT
forall a. Zero a => a
zero
data SwapchainCalibratedTimestampInfoEXT = SwapchainCalibratedTimestampInfoEXT
{
SwapchainCalibratedTimestampInfoEXT -> SwapchainKHR
swapchain :: SwapchainKHR
,
SwapchainCalibratedTimestampInfoEXT -> PresentStageFlagsEXT
presentStage :: PresentStageFlagsEXT
,
SwapchainCalibratedTimestampInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
timeDomainId :: Word64
}
deriving (Typeable, SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool
(SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool)
-> (SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool)
-> Eq SwapchainCalibratedTimestampInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool
== :: SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool
$c/= :: SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool
/= :: SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SwapchainCalibratedTimestampInfoEXT)
#endif
deriving instance Show SwapchainCalibratedTimestampInfoEXT
instance ToCStruct SwapchainCalibratedTimestampInfoEXT where
withCStruct :: forall b.
SwapchainCalibratedTimestampInfoEXT
-> (Ptr SwapchainCalibratedTimestampInfoEXT -> IO b) -> IO b
withCStruct SwapchainCalibratedTimestampInfoEXT
x Ptr SwapchainCalibratedTimestampInfoEXT -> IO b
f = Int -> (Ptr SwapchainCalibratedTimestampInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr SwapchainCalibratedTimestampInfoEXT -> IO b) -> IO b)
-> (Ptr SwapchainCalibratedTimestampInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SwapchainCalibratedTimestampInfoEXT
p -> Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO b -> IO b
forall b.
Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainCalibratedTimestampInfoEXT
p SwapchainCalibratedTimestampInfoEXT
x (Ptr SwapchainCalibratedTimestampInfoEXT -> IO b
f Ptr SwapchainCalibratedTimestampInfoEXT
p)
pokeCStruct :: forall b.
Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO b -> IO b
pokeCStruct Ptr SwapchainCalibratedTimestampInfoEXT
p SwapchainCalibratedTimestampInfoEXT{"swapchainTimingPropertiesCounter" ::: Word64
SwapchainKHR
PresentStageFlagsEXT
swapchain :: SwapchainCalibratedTimestampInfoEXT -> SwapchainKHR
presentStage :: SwapchainCalibratedTimestampInfoEXT -> PresentStageFlagsEXT
timeDomainId :: SwapchainCalibratedTimestampInfoEXT
-> "swapchainTimingPropertiesCounter" ::: Word64
swapchain :: SwapchainKHR
presentStage :: PresentStageFlagsEXT
timeDomainId :: "swapchainTimingPropertiesCounter" ::: Word64
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SwapchainKHR -> SwapchainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr SwapchainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (SwapchainKHR
swapchain)
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT
-> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
presentStage)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
timeDomainId)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr SwapchainCalibratedTimestampInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr SwapchainCalibratedTimestampInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SwapchainKHR -> SwapchainKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr SwapchainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR)) (SwapchainKHR
forall a. Zero a => a
zero)
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT
-> Int -> Ptr PresentStageFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr PresentStageFlagsEXT)) (PresentStageFlagsEXT
forall a. Zero a => a
zero)
Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
-> ("swapchainTimingPropertiesCounter" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT
-> Int -> Ptr ("swapchainTimingPropertiesCounter" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SwapchainCalibratedTimestampInfoEXT where
peekCStruct :: Ptr SwapchainCalibratedTimestampInfoEXT
-> IO SwapchainCalibratedTimestampInfoEXT
peekCStruct Ptr SwapchainCalibratedTimestampInfoEXT
p = do
swapchain <- forall a. Storable a => Ptr a -> IO a
peek @SwapchainKHR ((Ptr SwapchainCalibratedTimestampInfoEXT
p Ptr SwapchainCalibratedTimestampInfoEXT -> Int -> Ptr SwapchainKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SwapchainKHR))
presentStage <- peek @PresentStageFlagsEXT ((p `plusPtr` 24 :: Ptr PresentStageFlagsEXT))
timeDomainId <- peek @Word64 ((p `plusPtr` 32 :: Ptr Word64))
pure $ SwapchainCalibratedTimestampInfoEXT
swapchain presentStage timeDomainId
instance Storable SwapchainCalibratedTimestampInfoEXT where
sizeOf :: SwapchainCalibratedTimestampInfoEXT -> Int
sizeOf ~SwapchainCalibratedTimestampInfoEXT
_ = Int
40
alignment :: SwapchainCalibratedTimestampInfoEXT -> Int
alignment ~SwapchainCalibratedTimestampInfoEXT
_ = Int
8
peek :: Ptr SwapchainCalibratedTimestampInfoEXT
-> IO SwapchainCalibratedTimestampInfoEXT
peek = Ptr SwapchainCalibratedTimestampInfoEXT
-> IO SwapchainCalibratedTimestampInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO ()
poke Ptr SwapchainCalibratedTimestampInfoEXT
ptr SwapchainCalibratedTimestampInfoEXT
poked = Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO () -> IO ()
forall b.
Ptr SwapchainCalibratedTimestampInfoEXT
-> SwapchainCalibratedTimestampInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SwapchainCalibratedTimestampInfoEXT
ptr SwapchainCalibratedTimestampInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SwapchainCalibratedTimestampInfoEXT where
zero :: SwapchainCalibratedTimestampInfoEXT
zero = SwapchainKHR
-> PresentStageFlagsEXT
-> ("swapchainTimingPropertiesCounter" ::: Word64)
-> SwapchainCalibratedTimestampInfoEXT
SwapchainCalibratedTimestampInfoEXT
SwapchainKHR
forall a. Zero a => a
zero
PresentStageFlagsEXT
forall a. Zero a => a
zero
"swapchainTimingPropertiesCounter" ::: Word64
forall a. Zero a => a
zero
newtype TimeDomainKHR = TimeDomainKHR Int32
deriving newtype (TimeDomainKHR -> TimeDomainKHR -> Bool
(TimeDomainKHR -> TimeDomainKHR -> Bool)
-> (TimeDomainKHR -> TimeDomainKHR -> Bool) -> Eq TimeDomainKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeDomainKHR -> TimeDomainKHR -> Bool
== :: TimeDomainKHR -> TimeDomainKHR -> Bool
$c/= :: TimeDomainKHR -> TimeDomainKHR -> Bool
/= :: TimeDomainKHR -> TimeDomainKHR -> Bool
Eq, Eq TimeDomainKHR
Eq TimeDomainKHR =>
(TimeDomainKHR -> TimeDomainKHR -> Ordering)
-> (TimeDomainKHR -> TimeDomainKHR -> Bool)
-> (TimeDomainKHR -> TimeDomainKHR -> Bool)
-> (TimeDomainKHR -> TimeDomainKHR -> Bool)
-> (TimeDomainKHR -> TimeDomainKHR -> Bool)
-> (TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR)
-> (TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR)
-> Ord TimeDomainKHR
TimeDomainKHR -> TimeDomainKHR -> Bool
TimeDomainKHR -> TimeDomainKHR -> Ordering
TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR
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
$ccompare :: TimeDomainKHR -> TimeDomainKHR -> Ordering
compare :: TimeDomainKHR -> TimeDomainKHR -> Ordering
$c< :: TimeDomainKHR -> TimeDomainKHR -> Bool
< :: TimeDomainKHR -> TimeDomainKHR -> Bool
$c<= :: TimeDomainKHR -> TimeDomainKHR -> Bool
<= :: TimeDomainKHR -> TimeDomainKHR -> Bool
$c> :: TimeDomainKHR -> TimeDomainKHR -> Bool
> :: TimeDomainKHR -> TimeDomainKHR -> Bool
$c>= :: TimeDomainKHR -> TimeDomainKHR -> Bool
>= :: TimeDomainKHR -> TimeDomainKHR -> Bool
$cmax :: TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR
max :: TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR
$cmin :: TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR
min :: TimeDomainKHR -> TimeDomainKHR -> TimeDomainKHR
Ord, Ptr TimeDomainKHR -> IO TimeDomainKHR
Ptr TimeDomainKHR -> Int -> IO TimeDomainKHR
Ptr TimeDomainKHR -> Int -> TimeDomainKHR -> IO ()
Ptr TimeDomainKHR -> TimeDomainKHR -> IO ()
TimeDomainKHR -> Int
(TimeDomainKHR -> Int)
-> (TimeDomainKHR -> Int)
-> (Ptr TimeDomainKHR -> Int -> IO TimeDomainKHR)
-> (Ptr TimeDomainKHR -> Int -> TimeDomainKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO TimeDomainKHR)
-> (forall b. Ptr b -> Int -> TimeDomainKHR -> IO ())
-> (Ptr TimeDomainKHR -> IO TimeDomainKHR)
-> (Ptr TimeDomainKHR -> TimeDomainKHR -> IO ())
-> Storable TimeDomainKHR
forall b. Ptr b -> Int -> IO TimeDomainKHR
forall b. Ptr b -> Int -> TimeDomainKHR -> 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
$csizeOf :: TimeDomainKHR -> Int
sizeOf :: TimeDomainKHR -> Int
$calignment :: TimeDomainKHR -> Int
alignment :: TimeDomainKHR -> Int
$cpeekElemOff :: Ptr TimeDomainKHR -> Int -> IO TimeDomainKHR
peekElemOff :: Ptr TimeDomainKHR -> Int -> IO TimeDomainKHR
$cpokeElemOff :: Ptr TimeDomainKHR -> Int -> TimeDomainKHR -> IO ()
pokeElemOff :: Ptr TimeDomainKHR -> Int -> TimeDomainKHR -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO TimeDomainKHR
peekByteOff :: forall b. Ptr b -> Int -> IO TimeDomainKHR
$cpokeByteOff :: forall b. Ptr b -> Int -> TimeDomainKHR -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> TimeDomainKHR -> IO ()
$cpeek :: Ptr TimeDomainKHR -> IO TimeDomainKHR
peek :: Ptr TimeDomainKHR -> IO TimeDomainKHR
$cpoke :: Ptr TimeDomainKHR -> TimeDomainKHR -> IO ()
poke :: Ptr TimeDomainKHR -> TimeDomainKHR -> IO ()
Storable, TimeDomainKHR
TimeDomainKHR -> Zero TimeDomainKHR
forall a. a -> Zero a
$czero :: TimeDomainKHR
zero :: TimeDomainKHR
Zero)
pattern $mTIME_DOMAIN_DEVICE_KHR :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_DEVICE_KHR :: TimeDomainKHR
TIME_DOMAIN_DEVICE_KHR = TimeDomainKHR 0
pattern $mTIME_DOMAIN_CLOCK_MONOTONIC_KHR :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_CLOCK_MONOTONIC_KHR :: TimeDomainKHR
TIME_DOMAIN_CLOCK_MONOTONIC_KHR = TimeDomainKHR 1
pattern $mTIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR :: TimeDomainKHR
TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = TimeDomainKHR 2
pattern $mTIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR :: TimeDomainKHR
TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = TimeDomainKHR 3
pattern $mTIME_DOMAIN_SWAPCHAIN_LOCAL_EXT :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_SWAPCHAIN_LOCAL_EXT :: TimeDomainKHR
TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT = TimeDomainKHR 1000208001
pattern $mTIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT :: forall {r}. TimeDomainKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bTIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT :: TimeDomainKHR
TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT = TimeDomainKHR 1000208000
{-# COMPLETE
TIME_DOMAIN_DEVICE_KHR
, TIME_DOMAIN_CLOCK_MONOTONIC_KHR
, TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR
, TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR
, TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT
, TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT ::
TimeDomainKHR
#-}
conNameTimeDomainKHR :: String
conNameTimeDomainKHR :: String
conNameTimeDomainKHR = String
"TimeDomainKHR"
enumPrefixTimeDomainKHR :: String
enumPrefixTimeDomainKHR :: String
enumPrefixTimeDomainKHR = String
"TIME_DOMAIN_"
showTableTimeDomainKHR :: [(TimeDomainKHR, String)]
showTableTimeDomainKHR :: [(TimeDomainKHR, String)]
showTableTimeDomainKHR =
[ (TimeDomainKHR
TIME_DOMAIN_DEVICE_KHR, String
"DEVICE_KHR")
,
( TimeDomainKHR
TIME_DOMAIN_CLOCK_MONOTONIC_KHR
, String
"CLOCK_MONOTONIC_KHR"
)
,
( TimeDomainKHR
TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR
, String
"CLOCK_MONOTONIC_RAW_KHR"
)
,
( TimeDomainKHR
TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR
, String
"QUERY_PERFORMANCE_COUNTER_KHR"
)
,
( TimeDomainKHR
TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT
, String
"SWAPCHAIN_LOCAL_EXT"
)
,
( TimeDomainKHR
TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT
, String
"PRESENT_STAGE_LOCAL_EXT"
)
]
instance Show TimeDomainKHR where
showsPrec :: Int -> TimeDomainKHR -> ShowS
showsPrec =
String
-> [(TimeDomainKHR, String)]
-> String
-> (TimeDomainKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> TimeDomainKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixTimeDomainKHR
[(TimeDomainKHR, String)]
showTableTimeDomainKHR
String
conNameTimeDomainKHR
(\(TimeDomainKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read TimeDomainKHR where
readPrec :: ReadPrec TimeDomainKHR
readPrec =
String
-> [(TimeDomainKHR, String)]
-> String
-> (Int32 -> TimeDomainKHR)
-> ReadPrec TimeDomainKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixTimeDomainKHR
[(TimeDomainKHR, String)]
showTableTimeDomainKHR
String
conNameTimeDomainKHR
Int32 -> TimeDomainKHR
TimeDomainKHR
type PresentStageFlagsEXT = PresentStageFlagBitsEXT
newtype PresentStageFlagBitsEXT = PresentStageFlagBitsEXT Flags
deriving newtype (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
(PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> Eq PresentStageFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
== :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
$c/= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
/= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
Eq, Eq PresentStageFlagsEXT
Eq PresentStageFlagsEXT =>
(PresentStageFlagsEXT -> PresentStageFlagsEXT -> Ordering)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> Ord PresentStageFlagsEXT
PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
PresentStageFlagsEXT -> PresentStageFlagsEXT -> Ordering
PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
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
$ccompare :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Ordering
compare :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Ordering
$c< :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
< :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
$c<= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
<= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
$c> :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
> :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
$c>= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
>= :: PresentStageFlagsEXT -> PresentStageFlagsEXT -> Bool
$cmax :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
max :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
$cmin :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
min :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
Ord, Ptr PresentStageFlagsEXT -> IO PresentStageFlagsEXT
Ptr PresentStageFlagsEXT -> Int -> IO PresentStageFlagsEXT
Ptr PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT -> IO ()
Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
PresentStageFlagsEXT -> Int
(PresentStageFlagsEXT -> Int)
-> (PresentStageFlagsEXT -> Int)
-> (Ptr PresentStageFlagsEXT -> Int -> IO PresentStageFlagsEXT)
-> (Ptr PresentStageFlagsEXT
-> Int -> PresentStageFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO PresentStageFlagsEXT)
-> (forall b. Ptr b -> Int -> PresentStageFlagsEXT -> IO ())
-> (Ptr PresentStageFlagsEXT -> IO PresentStageFlagsEXT)
-> (Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ())
-> Storable PresentStageFlagsEXT
forall b. Ptr b -> Int -> IO PresentStageFlagsEXT
forall b. Ptr b -> Int -> PresentStageFlagsEXT -> 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
$csizeOf :: PresentStageFlagsEXT -> Int
sizeOf :: PresentStageFlagsEXT -> Int
$calignment :: PresentStageFlagsEXT -> Int
alignment :: PresentStageFlagsEXT -> Int
$cpeekElemOff :: Ptr PresentStageFlagsEXT -> Int -> IO PresentStageFlagsEXT
peekElemOff :: Ptr PresentStageFlagsEXT -> Int -> IO PresentStageFlagsEXT
$cpokeElemOff :: Ptr PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT -> IO ()
pokeElemOff :: Ptr PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentStageFlagsEXT
peekByteOff :: forall b. Ptr b -> Int -> IO PresentStageFlagsEXT
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentStageFlagsEXT -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> PresentStageFlagsEXT -> IO ()
$cpeek :: Ptr PresentStageFlagsEXT -> IO PresentStageFlagsEXT
peek :: Ptr PresentStageFlagsEXT -> IO PresentStageFlagsEXT
$cpoke :: Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
poke :: Ptr PresentStageFlagsEXT -> PresentStageFlagsEXT -> IO ()
Storable, PresentStageFlagsEXT
PresentStageFlagsEXT -> Zero PresentStageFlagsEXT
forall a. a -> Zero a
$czero :: PresentStageFlagsEXT
zero :: PresentStageFlagsEXT
Zero, Eq PresentStageFlagsEXT
PresentStageFlagsEXT
Eq PresentStageFlagsEXT =>
(PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> PresentStageFlagsEXT
-> (Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> Bool)
-> (PresentStageFlagsEXT -> Maybe Int)
-> (PresentStageFlagsEXT -> Int)
-> (PresentStageFlagsEXT -> Bool)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT)
-> (PresentStageFlagsEXT -> Int)
-> Bits PresentStageFlagsEXT
Int -> PresentStageFlagsEXT
PresentStageFlagsEXT -> Bool
PresentStageFlagsEXT -> Int
PresentStageFlagsEXT -> Maybe Int
PresentStageFlagsEXT -> PresentStageFlagsEXT
PresentStageFlagsEXT -> Int -> Bool
PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
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
$c.&. :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
.&. :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
$c.|. :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
.|. :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
$cxor :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
xor :: PresentStageFlagsEXT
-> PresentStageFlagsEXT -> PresentStageFlagsEXT
$ccomplement :: PresentStageFlagsEXT -> PresentStageFlagsEXT
complement :: PresentStageFlagsEXT -> PresentStageFlagsEXT
$cshift :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
shift :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$crotate :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
rotate :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$czeroBits :: PresentStageFlagsEXT
zeroBits :: PresentStageFlagsEXT
$cbit :: Int -> PresentStageFlagsEXT
bit :: Int -> PresentStageFlagsEXT
$csetBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
setBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$cclearBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
clearBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$ccomplementBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
complementBit :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$ctestBit :: PresentStageFlagsEXT -> Int -> Bool
testBit :: PresentStageFlagsEXT -> Int -> Bool
$cbitSizeMaybe :: PresentStageFlagsEXT -> Maybe Int
bitSizeMaybe :: PresentStageFlagsEXT -> Maybe Int
$cbitSize :: PresentStageFlagsEXT -> Int
bitSize :: PresentStageFlagsEXT -> Int
$cisSigned :: PresentStageFlagsEXT -> Bool
isSigned :: PresentStageFlagsEXT -> Bool
$cshiftL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
shiftL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$cunsafeShiftL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
unsafeShiftL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$cshiftR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
shiftR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$cunsafeShiftR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
unsafeShiftR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$crotateL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
rotateL :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$crotateR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
rotateR :: PresentStageFlagsEXT -> Int -> PresentStageFlagsEXT
$cpopCount :: PresentStageFlagsEXT -> Int
popCount :: PresentStageFlagsEXT -> Int
Bits, Bits PresentStageFlagsEXT
Bits PresentStageFlagsEXT =>
(PresentStageFlagsEXT -> Int)
-> (PresentStageFlagsEXT -> Int)
-> (PresentStageFlagsEXT -> Int)
-> FiniteBits PresentStageFlagsEXT
PresentStageFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
$cfiniteBitSize :: PresentStageFlagsEXT -> Int
finiteBitSize :: PresentStageFlagsEXT -> Int
$ccountLeadingZeros :: PresentStageFlagsEXT -> Int
countLeadingZeros :: PresentStageFlagsEXT -> Int
$ccountTrailingZeros :: PresentStageFlagsEXT -> Int
countTrailingZeros :: PresentStageFlagsEXT -> Int
FiniteBits)
pattern $mPRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT :: forall {r}.
PresentStageFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT :: PresentStageFlagsEXT
PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT = PresentStageFlagBitsEXT 0x00000001
pattern $mPRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT :: forall {r}.
PresentStageFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT :: PresentStageFlagsEXT
PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT = PresentStageFlagBitsEXT 0x00000002
pattern $mPRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT :: forall {r}.
PresentStageFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT :: PresentStageFlagsEXT
PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT = PresentStageFlagBitsEXT 0x00000004
pattern $mPRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT :: forall {r}.
PresentStageFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT :: PresentStageFlagsEXT
PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT = PresentStageFlagBitsEXT 0x00000008
conNamePresentStageFlagBitsEXT :: String
conNamePresentStageFlagBitsEXT :: String
conNamePresentStageFlagBitsEXT = String
"PresentStageFlagBitsEXT"
enumPrefixPresentStageFlagBitsEXT :: String
enumPrefixPresentStageFlagBitsEXT :: String
enumPrefixPresentStageFlagBitsEXT = String
"PRESENT_STAGE_"
showTablePresentStageFlagBitsEXT :: [(PresentStageFlagBitsEXT, String)]
showTablePresentStageFlagBitsEXT :: [(PresentStageFlagsEXT, String)]
showTablePresentStageFlagBitsEXT =
[
( PresentStageFlagsEXT
PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT
, String
"QUEUE_OPERATIONS_END_BIT_EXT"
)
,
( PresentStageFlagsEXT
PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT
, String
"REQUEST_DEQUEUED_BIT_EXT"
)
,
( PresentStageFlagsEXT
PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT
, String
"IMAGE_FIRST_PIXEL_OUT_BIT_EXT"
)
,
( PresentStageFlagsEXT
PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT
, String
"IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT"
)
]
instance Show PresentStageFlagBitsEXT where
showsPrec :: Int -> PresentStageFlagsEXT -> ShowS
showsPrec =
String
-> [(PresentStageFlagsEXT, String)]
-> String
-> (PresentStageFlagsEXT -> Word32)
-> (Word32 -> ShowS)
-> Int
-> PresentStageFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPresentStageFlagBitsEXT
[(PresentStageFlagsEXT, String)]
showTablePresentStageFlagBitsEXT
String
conNamePresentStageFlagBitsEXT
(\(PresentStageFlagBitsEXT Word32
x) -> Word32
x)
(\Word32
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. Integral a => a -> ShowS
showHex Word32
x)
instance Read PresentStageFlagBitsEXT where
readPrec :: ReadPrec PresentStageFlagsEXT
readPrec =
String
-> [(PresentStageFlagsEXT, String)]
-> String
-> (Word32 -> PresentStageFlagsEXT)
-> ReadPrec PresentStageFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPresentStageFlagBitsEXT
[(PresentStageFlagsEXT, String)]
showTablePresentStageFlagBitsEXT
String
conNamePresentStageFlagBitsEXT
Word32 -> PresentStageFlagsEXT
PresentStageFlagBitsEXT
type PastPresentationTimingFlagsEXT = PastPresentationTimingFlagBitsEXT
newtype PastPresentationTimingFlagBitsEXT = PastPresentationTimingFlagBitsEXT Flags
deriving newtype (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
(PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> Eq PastPresentationTimingFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
== :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
$c/= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
/= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
Eq, Eq PastPresentationTimingFlagsEXT
Eq PastPresentationTimingFlagsEXT =>
(PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Ordering)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> Ord PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Ordering
PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
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
$ccompare :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Ordering
compare :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Ordering
$c< :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
< :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
$c<= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
<= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
$c> :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
> :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
$c>= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
>= :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> Bool
$cmax :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
max :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
$cmin :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
min :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
Ord, Ptr PastPresentationTimingFlagsEXT
-> IO PastPresentationTimingFlagsEXT
Ptr PastPresentationTimingFlagsEXT
-> Int -> IO PastPresentationTimingFlagsEXT
Ptr PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT -> IO ()
Ptr PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> IO ()
PastPresentationTimingFlagsEXT -> Int
(PastPresentationTimingFlagsEXT -> Int)
-> (PastPresentationTimingFlagsEXT -> Int)
-> (Ptr PastPresentationTimingFlagsEXT
-> Int -> IO PastPresentationTimingFlagsEXT)
-> (Ptr PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO PastPresentationTimingFlagsEXT)
-> (forall b.
Ptr b -> Int -> PastPresentationTimingFlagsEXT -> IO ())
-> (Ptr PastPresentationTimingFlagsEXT
-> IO PastPresentationTimingFlagsEXT)
-> (Ptr PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> IO ())
-> Storable PastPresentationTimingFlagsEXT
forall b. Ptr b -> Int -> IO PastPresentationTimingFlagsEXT
forall b. Ptr b -> Int -> PastPresentationTimingFlagsEXT -> 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
$csizeOf :: PastPresentationTimingFlagsEXT -> Int
sizeOf :: PastPresentationTimingFlagsEXT -> Int
$calignment :: PastPresentationTimingFlagsEXT -> Int
alignment :: PastPresentationTimingFlagsEXT -> Int
$cpeekElemOff :: Ptr PastPresentationTimingFlagsEXT
-> Int -> IO PastPresentationTimingFlagsEXT
peekElemOff :: Ptr PastPresentationTimingFlagsEXT
-> Int -> IO PastPresentationTimingFlagsEXT
$cpokeElemOff :: Ptr PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT -> IO ()
pokeElemOff :: Ptr PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PastPresentationTimingFlagsEXT
peekByteOff :: forall b. Ptr b -> Int -> IO PastPresentationTimingFlagsEXT
$cpokeByteOff :: forall b. Ptr b -> Int -> PastPresentationTimingFlagsEXT -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> PastPresentationTimingFlagsEXT -> IO ()
$cpeek :: Ptr PastPresentationTimingFlagsEXT
-> IO PastPresentationTimingFlagsEXT
peek :: Ptr PastPresentationTimingFlagsEXT
-> IO PastPresentationTimingFlagsEXT
$cpoke :: Ptr PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> IO ()
poke :: Ptr PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> IO ()
Storable, PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT
-> Zero PastPresentationTimingFlagsEXT
forall a. a -> Zero a
$czero :: PastPresentationTimingFlagsEXT
zero :: PastPresentationTimingFlagsEXT
Zero, Eq PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT
Eq PastPresentationTimingFlagsEXT =>
(PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> PastPresentationTimingFlagsEXT
-> (Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT -> Int -> Bool)
-> (PastPresentationTimingFlagsEXT -> Maybe Int)
-> (PastPresentationTimingFlagsEXT -> Int)
-> (PastPresentationTimingFlagsEXT -> Bool)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT)
-> (PastPresentationTimingFlagsEXT -> Int)
-> Bits PastPresentationTimingFlagsEXT
Int -> PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT -> Bool
PastPresentationTimingFlagsEXT -> Int
PastPresentationTimingFlagsEXT -> Maybe Int
PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT -> Int -> Bool
PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
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
$c.&. :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
.&. :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
$c.|. :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
.|. :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
$cxor :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
xor :: PastPresentationTimingFlagsEXT
-> PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
$ccomplement :: PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
complement :: PastPresentationTimingFlagsEXT -> PastPresentationTimingFlagsEXT
$cshift :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
shift :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$crotate :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
rotate :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$czeroBits :: PastPresentationTimingFlagsEXT
zeroBits :: PastPresentationTimingFlagsEXT
$cbit :: Int -> PastPresentationTimingFlagsEXT
bit :: Int -> PastPresentationTimingFlagsEXT
$csetBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
setBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$cclearBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
clearBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$ccomplementBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
complementBit :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$ctestBit :: PastPresentationTimingFlagsEXT -> Int -> Bool
testBit :: PastPresentationTimingFlagsEXT -> Int -> Bool
$cbitSizeMaybe :: PastPresentationTimingFlagsEXT -> Maybe Int
bitSizeMaybe :: PastPresentationTimingFlagsEXT -> Maybe Int
$cbitSize :: PastPresentationTimingFlagsEXT -> Int
bitSize :: PastPresentationTimingFlagsEXT -> Int
$cisSigned :: PastPresentationTimingFlagsEXT -> Bool
isSigned :: PastPresentationTimingFlagsEXT -> Bool
$cshiftL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
shiftL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$cunsafeShiftL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
unsafeShiftL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$cshiftR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
shiftR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$cunsafeShiftR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
unsafeShiftR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$crotateL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
rotateL :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$crotateR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
rotateR :: PastPresentationTimingFlagsEXT
-> Int -> PastPresentationTimingFlagsEXT
$cpopCount :: PastPresentationTimingFlagsEXT -> Int
popCount :: PastPresentationTimingFlagsEXT -> Int
Bits, Bits PastPresentationTimingFlagsEXT
Bits PastPresentationTimingFlagsEXT =>
(PastPresentationTimingFlagsEXT -> Int)
-> (PastPresentationTimingFlagsEXT -> Int)
-> (PastPresentationTimingFlagsEXT -> Int)
-> FiniteBits PastPresentationTimingFlagsEXT
PastPresentationTimingFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
$cfiniteBitSize :: PastPresentationTimingFlagsEXT -> Int
finiteBitSize :: PastPresentationTimingFlagsEXT -> Int
$ccountLeadingZeros :: PastPresentationTimingFlagsEXT -> Int
countLeadingZeros :: PastPresentationTimingFlagsEXT -> Int
$ccountTrailingZeros :: PastPresentationTimingFlagsEXT -> Int
countTrailingZeros :: PastPresentationTimingFlagsEXT -> Int
FiniteBits)
pattern $mPAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT :: forall {r}.
PastPresentationTimingFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT :: PastPresentationTimingFlagsEXT
PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT = PastPresentationTimingFlagBitsEXT 0x00000001
pattern $mPAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT :: forall {r}.
PastPresentationTimingFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT :: PastPresentationTimingFlagsEXT
PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT = PastPresentationTimingFlagBitsEXT 0x00000002
conNamePastPresentationTimingFlagBitsEXT :: String
conNamePastPresentationTimingFlagBitsEXT :: String
conNamePastPresentationTimingFlagBitsEXT = String
"PastPresentationTimingFlagBitsEXT"
enumPrefixPastPresentationTimingFlagBitsEXT :: String
enumPrefixPastPresentationTimingFlagBitsEXT :: String
enumPrefixPastPresentationTimingFlagBitsEXT = String
"PAST_PRESENTATION_TIMING_ALLOW_"
showTablePastPresentationTimingFlagBitsEXT :: [(PastPresentationTimingFlagBitsEXT, String)]
showTablePastPresentationTimingFlagBitsEXT :: [(PastPresentationTimingFlagsEXT, String)]
showTablePastPresentationTimingFlagBitsEXT =
[
( PastPresentationTimingFlagsEXT
PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT
, String
"PARTIAL_RESULTS_BIT_EXT"
)
,
( PastPresentationTimingFlagsEXT
PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT
, String
"OUT_OF_ORDER_RESULTS_BIT_EXT"
)
]
instance Show PastPresentationTimingFlagBitsEXT where
showsPrec :: Int -> PastPresentationTimingFlagsEXT -> ShowS
showsPrec =
String
-> [(PastPresentationTimingFlagsEXT, String)]
-> String
-> (PastPresentationTimingFlagsEXT -> Word32)
-> (Word32 -> ShowS)
-> Int
-> PastPresentationTimingFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPastPresentationTimingFlagBitsEXT
[(PastPresentationTimingFlagsEXT, String)]
showTablePastPresentationTimingFlagBitsEXT
String
conNamePastPresentationTimingFlagBitsEXT
(\(PastPresentationTimingFlagBitsEXT Word32
x) -> Word32
x)
(\Word32
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. Integral a => a -> ShowS
showHex Word32
x)
instance Read PastPresentationTimingFlagBitsEXT where
readPrec :: ReadPrec PastPresentationTimingFlagsEXT
readPrec =
String
-> [(PastPresentationTimingFlagsEXT, String)]
-> String
-> (Word32 -> PastPresentationTimingFlagsEXT)
-> ReadPrec PastPresentationTimingFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPastPresentationTimingFlagBitsEXT
[(PastPresentationTimingFlagsEXT, String)]
showTablePastPresentationTimingFlagBitsEXT
String
conNamePastPresentationTimingFlagBitsEXT
Word32 -> PastPresentationTimingFlagsEXT
PastPresentationTimingFlagBitsEXT
type PresentTimingInfoFlagsEXT = PresentTimingInfoFlagBitsEXT
newtype PresentTimingInfoFlagBitsEXT = PresentTimingInfoFlagBitsEXT Flags
deriving newtype (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
(PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> Eq PresentTimingInfoFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
== :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
$c/= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
/= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
Eq, Eq PresentTimingInfoFlagsEXT
Eq PresentTimingInfoFlagsEXT =>
(PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> Ordering)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> Ord PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Ordering
PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
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
$ccompare :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Ordering
compare :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Ordering
$c< :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
< :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
$c<= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
<= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
$c> :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
> :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
$c>= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
>= :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> Bool
$cmax :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
max :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
$cmin :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
min :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
Ord, Ptr PresentTimingInfoFlagsEXT -> IO PresentTimingInfoFlagsEXT
Ptr PresentTimingInfoFlagsEXT
-> Int -> IO PresentTimingInfoFlagsEXT
Ptr PresentTimingInfoFlagsEXT
-> Int -> PresentTimingInfoFlagsEXT -> IO ()
Ptr PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> IO ()
PresentTimingInfoFlagsEXT -> Int
(PresentTimingInfoFlagsEXT -> Int)
-> (PresentTimingInfoFlagsEXT -> Int)
-> (Ptr PresentTimingInfoFlagsEXT
-> Int -> IO PresentTimingInfoFlagsEXT)
-> (Ptr PresentTimingInfoFlagsEXT
-> Int -> PresentTimingInfoFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO PresentTimingInfoFlagsEXT)
-> (forall b. Ptr b -> Int -> PresentTimingInfoFlagsEXT -> IO ())
-> (Ptr PresentTimingInfoFlagsEXT -> IO PresentTimingInfoFlagsEXT)
-> (Ptr PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> IO ())
-> Storable PresentTimingInfoFlagsEXT
forall b. Ptr b -> Int -> IO PresentTimingInfoFlagsEXT
forall b. Ptr b -> Int -> PresentTimingInfoFlagsEXT -> 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
$csizeOf :: PresentTimingInfoFlagsEXT -> Int
sizeOf :: PresentTimingInfoFlagsEXT -> Int
$calignment :: PresentTimingInfoFlagsEXT -> Int
alignment :: PresentTimingInfoFlagsEXT -> Int
$cpeekElemOff :: Ptr PresentTimingInfoFlagsEXT
-> Int -> IO PresentTimingInfoFlagsEXT
peekElemOff :: Ptr PresentTimingInfoFlagsEXT
-> Int -> IO PresentTimingInfoFlagsEXT
$cpokeElemOff :: Ptr PresentTimingInfoFlagsEXT
-> Int -> PresentTimingInfoFlagsEXT -> IO ()
pokeElemOff :: Ptr PresentTimingInfoFlagsEXT
-> Int -> PresentTimingInfoFlagsEXT -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentTimingInfoFlagsEXT
peekByteOff :: forall b. Ptr b -> Int -> IO PresentTimingInfoFlagsEXT
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentTimingInfoFlagsEXT -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> PresentTimingInfoFlagsEXT -> IO ()
$cpeek :: Ptr PresentTimingInfoFlagsEXT -> IO PresentTimingInfoFlagsEXT
peek :: Ptr PresentTimingInfoFlagsEXT -> IO PresentTimingInfoFlagsEXT
$cpoke :: Ptr PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> IO ()
poke :: Ptr PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT -> IO ()
Storable, PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT -> Zero PresentTimingInfoFlagsEXT
forall a. a -> Zero a
$czero :: PresentTimingInfoFlagsEXT
zero :: PresentTimingInfoFlagsEXT
Zero, Eq PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT
Eq PresentTimingInfoFlagsEXT =>
(PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> PresentTimingInfoFlagsEXT
-> (Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> Bool)
-> (PresentTimingInfoFlagsEXT -> Maybe Int)
-> (PresentTimingInfoFlagsEXT -> Int)
-> (PresentTimingInfoFlagsEXT -> Bool)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT)
-> (PresentTimingInfoFlagsEXT -> Int)
-> Bits PresentTimingInfoFlagsEXT
Int -> PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT -> Bool
PresentTimingInfoFlagsEXT -> Int
PresentTimingInfoFlagsEXT -> Maybe Int
PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT -> Int -> Bool
PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
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
$c.&. :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
.&. :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
$c.|. :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
.|. :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
$cxor :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
xor :: PresentTimingInfoFlagsEXT
-> PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
$ccomplement :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
complement :: PresentTimingInfoFlagsEXT -> PresentTimingInfoFlagsEXT
$cshift :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
shift :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$crotate :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
rotate :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$czeroBits :: PresentTimingInfoFlagsEXT
zeroBits :: PresentTimingInfoFlagsEXT
$cbit :: Int -> PresentTimingInfoFlagsEXT
bit :: Int -> PresentTimingInfoFlagsEXT
$csetBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
setBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$cclearBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
clearBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$ccomplementBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
complementBit :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$ctestBit :: PresentTimingInfoFlagsEXT -> Int -> Bool
testBit :: PresentTimingInfoFlagsEXT -> Int -> Bool
$cbitSizeMaybe :: PresentTimingInfoFlagsEXT -> Maybe Int
bitSizeMaybe :: PresentTimingInfoFlagsEXT -> Maybe Int
$cbitSize :: PresentTimingInfoFlagsEXT -> Int
bitSize :: PresentTimingInfoFlagsEXT -> Int
$cisSigned :: PresentTimingInfoFlagsEXT -> Bool
isSigned :: PresentTimingInfoFlagsEXT -> Bool
$cshiftL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
shiftL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$cunsafeShiftL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
unsafeShiftL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$cshiftR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
shiftR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$cunsafeShiftR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
unsafeShiftR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$crotateL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
rotateL :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$crotateR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
rotateR :: PresentTimingInfoFlagsEXT -> Int -> PresentTimingInfoFlagsEXT
$cpopCount :: PresentTimingInfoFlagsEXT -> Int
popCount :: PresentTimingInfoFlagsEXT -> Int
Bits, Bits PresentTimingInfoFlagsEXT
Bits PresentTimingInfoFlagsEXT =>
(PresentTimingInfoFlagsEXT -> Int)
-> (PresentTimingInfoFlagsEXT -> Int)
-> (PresentTimingInfoFlagsEXT -> Int)
-> FiniteBits PresentTimingInfoFlagsEXT
PresentTimingInfoFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
$cfiniteBitSize :: PresentTimingInfoFlagsEXT -> Int
finiteBitSize :: PresentTimingInfoFlagsEXT -> Int
$ccountLeadingZeros :: PresentTimingInfoFlagsEXT -> Int
countLeadingZeros :: PresentTimingInfoFlagsEXT -> Int
$ccountTrailingZeros :: PresentTimingInfoFlagsEXT -> Int
countTrailingZeros :: PresentTimingInfoFlagsEXT -> Int
FiniteBits)
pattern $mPRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT :: forall {r}.
PresentTimingInfoFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT :: PresentTimingInfoFlagsEXT
PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT = PresentTimingInfoFlagBitsEXT 0x00000001
pattern $mPRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT :: forall {r}.
PresentTimingInfoFlagsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
$bPRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT :: PresentTimingInfoFlagsEXT
PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT = PresentTimingInfoFlagBitsEXT 0x00000002
conNamePresentTimingInfoFlagBitsEXT :: String
conNamePresentTimingInfoFlagBitsEXT :: String
conNamePresentTimingInfoFlagBitsEXT = String
"PresentTimingInfoFlagBitsEXT"
enumPrefixPresentTimingInfoFlagBitsEXT :: String
enumPrefixPresentTimingInfoFlagBitsEXT :: String
enumPrefixPresentTimingInfoFlagBitsEXT = String
"PRESENT_TIMING_INFO_PRESENT_AT_"
showTablePresentTimingInfoFlagBitsEXT :: [(PresentTimingInfoFlagBitsEXT, String)]
showTablePresentTimingInfoFlagBitsEXT :: [(PresentTimingInfoFlagsEXT, String)]
showTablePresentTimingInfoFlagBitsEXT =
[
( PresentTimingInfoFlagsEXT
PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT
, String
"RELATIVE_TIME_BIT_EXT"
)
,
( PresentTimingInfoFlagsEXT
PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT
, String
"NEAREST_REFRESH_CYCLE_BIT_EXT"
)
]
instance Show PresentTimingInfoFlagBitsEXT where
showsPrec :: Int -> PresentTimingInfoFlagsEXT -> ShowS
showsPrec =
String
-> [(PresentTimingInfoFlagsEXT, String)]
-> String
-> (PresentTimingInfoFlagsEXT -> Word32)
-> (Word32 -> ShowS)
-> Int
-> PresentTimingInfoFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPresentTimingInfoFlagBitsEXT
[(PresentTimingInfoFlagsEXT, String)]
showTablePresentTimingInfoFlagBitsEXT
String
conNamePresentTimingInfoFlagBitsEXT
(\(PresentTimingInfoFlagBitsEXT Word32
x) -> Word32
x)
(\Word32
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. Integral a => a -> ShowS
showHex Word32
x)
instance Read PresentTimingInfoFlagBitsEXT where
readPrec :: ReadPrec PresentTimingInfoFlagsEXT
readPrec =
String
-> [(PresentTimingInfoFlagsEXT, String)]
-> String
-> (Word32 -> PresentTimingInfoFlagsEXT)
-> ReadPrec PresentTimingInfoFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPresentTimingInfoFlagBitsEXT
[(PresentTimingInfoFlagsEXT, String)]
showTablePresentTimingInfoFlagBitsEXT
String
conNamePresentTimingInfoFlagBitsEXT
Word32 -> PresentTimingInfoFlagsEXT
PresentTimingInfoFlagBitsEXT
type EXT_PRESENT_TIMING_SPEC_VERSION = 3
pattern EXT_PRESENT_TIMING_SPEC_VERSION :: forall a . Integral a => a
pattern $mEXT_PRESENT_TIMING_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_PRESENT_TIMING_SPEC_VERSION :: forall a. Integral a => a
EXT_PRESENT_TIMING_SPEC_VERSION = 3
type EXT_PRESENT_TIMING_EXTENSION_NAME = "VK_EXT_present_timing"
pattern EXT_PRESENT_TIMING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mEXT_PRESENT_TIMING_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_PRESENT_TIMING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
EXT_PRESENT_TIMING_EXTENSION_NAME = "VK_EXT_present_timing"