{-# language CPP #-}
-- | = Name
--
-- VK_EXT_display_surface_counter - instance extension
--
-- == VK_EXT_display_surface_counter
--
-- [__Name String__]
--     @VK_EXT_display_surface_counter@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     91
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
--     -   Requires @VK_KHR_display@
--
-- [__Contact__]
--
--     -   James Jones
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_EXT_display_surface_counter:%20&body=@cubanismo%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2016-12-13
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Pierre Boudier, NVIDIA
--
--     -   James Jones, NVIDIA
--
--     -   Damien Leone, NVIDIA
--
--     -   Pierre-Loup Griffais, Valve
--
--     -   Daniel Vetter, Intel
--
-- == Description
--
-- This extension defines a vertical blanking period counter associated
-- with display surfaces. It provides a mechanism to query support for such
-- a counter from a 'Vulkan.Extensions.Handles.SurfaceKHR' object.
--
-- == New Commands
--
-- -   'getPhysicalDeviceSurfaceCapabilities2EXT'
--
-- == New Structures
--
-- -   'SurfaceCapabilities2EXT'
--
-- == New Enums
--
-- -   'SurfaceCounterFlagBitsEXT'
--
-- == New Bitmasks
--
-- -   'SurfaceCounterFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME'
--
-- -   'EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT'
--
-- == Version History
--
-- -   Revision 1, 2016-12-13 (James Jones)
--
--     -   Initial draft
--
-- = See Also
--
-- 'SurfaceCapabilities2EXT', 'SurfaceCounterFlagBitsEXT',
-- 'SurfaceCounterFlagsEXT', 'getPhysicalDeviceSurfaceCapabilities2EXT'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_display_surface_counter Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_display_surface_counter  ( getPhysicalDeviceSurfaceCapabilities2EXT
                                                         , pattern STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT
                                                         , pattern SURFACE_COUNTER_VBLANK_EXT
                                                         , SurfaceCapabilities2EXT(..)
                                                         , SurfaceCounterFlagsEXT
                                                         , SurfaceCounterFlagBitsEXT( SURFACE_COUNTER_VBLANK_BIT_EXT
                                                                                    , ..
                                                                                    )
                                                         , EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION
                                                         , pattern EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION
                                                         , EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME
                                                         , pattern EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME
                                                         , SurfaceKHR(..)
                                                         , CompositeAlphaFlagBitsKHR(..)
                                                         , CompositeAlphaFlagsKHR
                                                         , SurfaceTransformFlagBitsKHR(..)
                                                         , SurfaceTransformFlagsKHR
                                                         ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
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 Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagsKHR)
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceCapabilities2EXT))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Extensions.Handles (SurfaceKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagsKHR)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (CompositeAlphaFlagsKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagsKHR)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceSurfaceCapabilities2EXT
  :: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilities2EXT -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilities2EXT -> IO Result

-- | vkGetPhysicalDeviceSurfaceCapabilities2EXT - Query surface capabilities
--
-- = Description
--
-- 'getPhysicalDeviceSurfaceCapabilities2EXT' behaves similarly to
-- 'Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfaceCapabilitiesKHR',
-- with the ability to return extended information by adding extending
-- structures to the @pNext@ chain of its @pSurfaceCapabilities@ parameter.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter#
--     @surface@ /must/ be a valid 'Vulkan.Extensions.Handles.SurfaceKHR'
--     handle
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-pSurfaceCapabilities-parameter#
--     @pSurfaceCapabilities@ /must/ be a valid pointer to a
--     'SurfaceCapabilities2EXT' structure
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent# Both
--     of @physicalDevice@, and @surface@ /must/ have been created,
--     allocated, or retrieved from the same
--     'Vulkan.Core10.Handles.Instance'
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_SURFACE_LOST_KHR'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.PhysicalDevice', 'SurfaceCapabilities2EXT',
-- 'Vulkan.Extensions.Handles.SurfaceKHR'
getPhysicalDeviceSurfaceCapabilities2EXT :: forall io
                                          . (MonadIO io)
                                         => -- | @physicalDevice@ is the physical device that will be associated with the
                                            -- swapchain to be created, as described for
                                            -- 'Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'.
                                            PhysicalDevice
                                         -> -- | @surface@ is the surface that will be associated with the swapchain.
                                            SurfaceKHR
                                         -> io (SurfaceCapabilities2EXT)
getPhysicalDeviceSurfaceCapabilities2EXT :: PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilities2EXT
getPhysicalDeviceSurfaceCapabilities2EXT physicalDevice :: PhysicalDevice
physicalDevice surface :: SurfaceKHR
surface = IO SurfaceCapabilities2EXT -> io SurfaceCapabilities2EXT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceCapabilities2EXT -> io SurfaceCapabilities2EXT)
-> (ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
    -> IO SurfaceCapabilities2EXT)
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
-> io SurfaceCapabilities2EXT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
-> IO SurfaceCapabilities2EXT
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
 -> io SurfaceCapabilities2EXT)
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
-> io SurfaceCapabilities2EXT
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> SurfaceKHR
      -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
      -> IO Result)
pVkGetPhysicalDeviceSurfaceCapabilities2EXT (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
  IO () -> ContT SurfaceCapabilities2EXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilities2EXT IO ())
-> IO () -> ContT SurfaceCapabilities2EXT IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> SurfaceKHR
      -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceSurfaceCapabilities2EXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceSurfaceCapabilities2EXT' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilities2EXT' = FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO Result
mkVkGetPhysicalDeviceSurfaceCapabilities2EXT FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr
  "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
pPSurfaceCapabilities <- ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
  -> IO SurfaceCapabilities2EXT)
 -> IO SurfaceCapabilities2EXT)
-> ContT
     SurfaceCapabilities2EXT
     IO
     ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct SurfaceCapabilities2EXT =>
(("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT) -> IO b)
-> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @SurfaceCapabilities2EXT)
  Result
r <- IO Result -> ContT SurfaceCapabilities2EXT IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceCapabilities2EXT IO Result)
-> IO Result -> ContT SurfaceCapabilities2EXT IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceSurfaceCapabilities2EXT" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilities2EXT' (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)) (SurfaceKHR
surface) ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
pPSurfaceCapabilities))
  IO () -> ContT SurfaceCapabilities2EXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilities2EXT IO ())
-> IO () -> ContT SurfaceCapabilities2EXT IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  SurfaceCapabilities2EXT
pSurfaceCapabilities <- IO SurfaceCapabilities2EXT
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO SurfaceCapabilities2EXT
 -> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT)
-> IO SurfaceCapabilities2EXT
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
forall a b. (a -> b) -> a -> b
$ ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO SurfaceCapabilities2EXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceCapabilities2EXT "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
pPSurfaceCapabilities
  SurfaceCapabilities2EXT
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilities2EXT
 -> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT
-> ContT SurfaceCapabilities2EXT IO SurfaceCapabilities2EXT
forall a b. (a -> b) -> a -> b
$ (SurfaceCapabilities2EXT
pSurfaceCapabilities)


-- No documentation found for TopLevel "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT"
pattern $bSTRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT :: StructureType
$mSTRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT


-- No documentation found for TopLevel "VK_SURFACE_COUNTER_VBLANK_EXT"
pattern $bSURFACE_COUNTER_VBLANK_EXT :: SurfaceCounterFlagBitsEXT
$mSURFACE_COUNTER_VBLANK_EXT :: forall r.
SurfaceCounterFlagBitsEXT -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_COUNTER_VBLANK_EXT = SURFACE_COUNTER_VBLANK_BIT_EXT


-- | VkSurfaceCapabilities2EXT - Structure describing capabilities of a
-- surface
--
-- = Members
--
-- All members of 'SurfaceCapabilities2EXT' are identical to the
-- corresponding members of
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR' where one
-- exists. The remaining members are:
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Extensions.VK_KHR_surface.CompositeAlphaFlagsKHR',
-- 'Vulkan.Core10.FundamentalTypes.Extent2D',
-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'SurfaceCounterFlagsEXT',
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceTransformFlagBitsKHR',
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceTransformFlagsKHR',
-- 'getPhysicalDeviceSurfaceCapabilities2EXT'
data SurfaceCapabilities2EXT = SurfaceCapabilities2EXT
  { -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "minImageCount"
    SurfaceCapabilities2EXT -> Word32
minImageCount :: Word32
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "maxImageCount"
    SurfaceCapabilities2EXT -> Word32
maxImageCount :: Word32
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "currentExtent"
    SurfaceCapabilities2EXT -> Extent2D
currentExtent :: Extent2D
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "minImageExtent"
    SurfaceCapabilities2EXT -> Extent2D
minImageExtent :: Extent2D
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "maxImageExtent"
    SurfaceCapabilities2EXT -> Extent2D
maxImageExtent :: Extent2D
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "maxImageArrayLayers"
    SurfaceCapabilities2EXT -> Word32
maxImageArrayLayers :: Word32
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "supportedTransforms"
    SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
supportedTransforms :: SurfaceTransformFlagsKHR
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "currentTransform"
    SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
currentTransform :: SurfaceTransformFlagBitsKHR
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "supportedCompositeAlpha"
    SurfaceCapabilities2EXT -> CompositeAlphaFlagsKHR
supportedCompositeAlpha :: CompositeAlphaFlagsKHR
  , -- No documentation found for Nested "VkSurfaceCapabilities2EXT" "supportedUsageFlags"
    SurfaceCapabilities2EXT -> ImageUsageFlags
supportedUsageFlags :: ImageUsageFlags
  , -- | @supportedSurfaceCounters@ is a bitmask of 'SurfaceCounterFlagBitsEXT'
    -- indicating the supported surface counter types.
    --
    -- #VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246#
    -- @supportedSurfaceCounters@ /must/ not include
    -- 'SURFACE_COUNTER_VBLANK_BIT_EXT' unless the surface queried is a
    -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#wsi-display-surfaces display surface>
    SurfaceCapabilities2EXT -> SurfaceCounterFlagBitsEXT
supportedSurfaceCounters :: SurfaceCounterFlagsEXT
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfaceCapabilities2EXT)
#endif
deriving instance Show SurfaceCapabilities2EXT

instance ToCStruct SurfaceCapabilities2EXT where
  withCStruct :: SurfaceCapabilities2EXT
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
    -> IO b)
-> IO b
withCStruct x :: SurfaceCapabilities2EXT
x f :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT) -> IO b
f = Int
-> Int
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 72 8 ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT) -> IO b)
 -> IO b)
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p SurfaceCapabilities2EXT
x (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT) -> IO b
f "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p)
  pokeCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO b -> IO b
pokeCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p SurfaceCapabilities2EXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
minImageCount)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
maxImageCount)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) (Extent2D
currentExtent)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Extent2D)) (Extent2D
minImageExtent)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Extent2D)) (Extent2D
maxImageExtent)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) (Word32
maxImageArrayLayers)
    Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr SurfaceTransformFlagsKHR)) (SurfaceTransformFlagsKHR
supportedTransforms)
    Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagsKHR
currentTransform)
    Ptr CompositeAlphaFlagsKHR -> CompositeAlphaFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr CompositeAlphaFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr CompositeAlphaFlagsKHR)) (CompositeAlphaFlagsKHR
supportedCompositeAlpha)
    Ptr ImageUsageFlags -> ImageUsageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr ImageUsageFlags)) (ImageUsageFlags
supportedUsageFlags)
    Ptr SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceCounterFlagBitsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr SurfaceCounterFlagsEXT)) (SurfaceCounterFlagBitsEXT
supportedSurfaceCounters)
    IO b
f
  cStructSize :: Int
cStructSize = 72
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO b -> IO b
pokeZeroCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
    Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr SurfaceTransformFlagsKHR -> SurfaceTransformFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagsKHR
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct SurfaceCapabilities2EXT where
  peekCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO SurfaceCapabilities2EXT
peekCStruct p :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p = do
    Word32
minImageCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    Word32
maxImageCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    Extent2D
currentExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D))
    Extent2D
minImageExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Extent2D))
    Extent2D
maxImageExtent <- Ptr Extent2D -> IO Extent2D
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Extent2D))
    Word32
maxImageArrayLayers <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
    SurfaceTransformFlagsKHR
supportedTransforms <- Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr SurfaceTransformFlagsKHR))
    SurfaceTransformFlagsKHR
currentTransform <- Ptr SurfaceTransformFlagsKHR -> IO SurfaceTransformFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagBitsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceTransformFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr SurfaceTransformFlagBitsKHR))
    CompositeAlphaFlagsKHR
supportedCompositeAlpha <- Ptr CompositeAlphaFlagsKHR -> IO CompositeAlphaFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @CompositeAlphaFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr CompositeAlphaFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr CompositeAlphaFlagsKHR))
    ImageUsageFlags
supportedUsageFlags <- Ptr ImageUsageFlags -> IO ImageUsageFlags
forall a. Storable a => Ptr a -> IO a
peek @ImageUsageFlags (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr ImageUsageFlags))
    SurfaceCounterFlagBitsEXT
supportedSurfaceCounters <- Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT
forall a. Storable a => Ptr a -> IO a
peek @SurfaceCounterFlagsEXT (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> Int -> Ptr SurfaceCounterFlagBitsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr SurfaceCounterFlagsEXT))
    SurfaceCapabilities2EXT -> IO SurfaceCapabilities2EXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilities2EXT -> IO SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO SurfaceCapabilities2EXT
forall a b. (a -> b) -> a -> b
$ Word32
-> Word32
-> Extent2D
-> Extent2D
-> Extent2D
-> Word32
-> SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR
-> CompositeAlphaFlagsKHR
-> ImageUsageFlags
-> SurfaceCounterFlagBitsEXT
-> SurfaceCapabilities2EXT
SurfaceCapabilities2EXT
             Word32
minImageCount Word32
maxImageCount Extent2D
currentExtent Extent2D
minImageExtent Extent2D
maxImageExtent Word32
maxImageArrayLayers SurfaceTransformFlagsKHR
supportedTransforms SurfaceTransformFlagsKHR
currentTransform CompositeAlphaFlagsKHR
supportedCompositeAlpha ImageUsageFlags
supportedUsageFlags SurfaceCounterFlagBitsEXT
supportedSurfaceCounters

instance Storable SurfaceCapabilities2EXT where
  sizeOf :: SurfaceCapabilities2EXT -> Int
sizeOf ~SurfaceCapabilities2EXT
_ = 72
  alignment :: SurfaceCapabilities2EXT -> Int
alignment ~SurfaceCapabilities2EXT
_ = 8
  peek :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO SurfaceCapabilities2EXT
peek = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO SurfaceCapabilities2EXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO ()
poke ptr :: "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
ptr poked :: SurfaceCapabilities2EXT
poked = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
ptr SurfaceCapabilities2EXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero SurfaceCapabilities2EXT where
  zero :: SurfaceCapabilities2EXT
zero = Word32
-> Word32
-> Extent2D
-> Extent2D
-> Extent2D
-> Word32
-> SurfaceTransformFlagsKHR
-> SurfaceTransformFlagsKHR
-> CompositeAlphaFlagsKHR
-> ImageUsageFlags
-> SurfaceCounterFlagBitsEXT
-> SurfaceCapabilities2EXT
SurfaceCapabilities2EXT
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Extent2D
forall a. Zero a => a
zero
           Extent2D
forall a. Zero a => a
zero
           Extent2D
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           SurfaceTransformFlagsKHR
forall a. Zero a => a
zero
           SurfaceTransformFlagsKHR
forall a. Zero a => a
zero
           CompositeAlphaFlagsKHR
forall a. Zero a => a
zero
           ImageUsageFlags
forall a. Zero a => a
zero
           SurfaceCounterFlagBitsEXT
forall a. Zero a => a
zero


type SurfaceCounterFlagsEXT = SurfaceCounterFlagBitsEXT

-- | VkSurfaceCounterFlagBitsEXT - Surface-relative counter types
--
-- = See Also
--
-- 'SurfaceCounterFlagsEXT',
-- 'Vulkan.Extensions.VK_EXT_display_control.getSwapchainCounterEXT'
newtype SurfaceCounterFlagBitsEXT = SurfaceCounterFlagBitsEXT Flags
  deriving newtype (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
(SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> Eq SurfaceCounterFlagBitsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c/= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
== :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c== :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
Eq, Eq SurfaceCounterFlagBitsEXT
Eq SurfaceCounterFlagBitsEXT =>
(SurfaceCounterFlagBitsEXT
 -> SurfaceCounterFlagBitsEXT -> Ordering)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT
    -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT
    -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> Ord SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Ordering
SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$cmin :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
max :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$cmax :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
>= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c>= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
> :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c> :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
<= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c<= :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
< :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
$c< :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
compare :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Ordering
$ccompare :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Ordering
$cp1Ord :: Eq SurfaceCounterFlagBitsEXT
Ord, Ptr b -> Int -> IO SurfaceCounterFlagBitsEXT
Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT
Ptr SurfaceCounterFlagBitsEXT
-> Int -> IO SurfaceCounterFlagBitsEXT
Ptr SurfaceCounterFlagBitsEXT
-> Int -> SurfaceCounterFlagBitsEXT -> IO ()
Ptr SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> IO ()
SurfaceCounterFlagBitsEXT -> Int
(SurfaceCounterFlagBitsEXT -> Int)
-> (SurfaceCounterFlagBitsEXT -> Int)
-> (Ptr SurfaceCounterFlagBitsEXT
    -> Int -> IO SurfaceCounterFlagBitsEXT)
-> (Ptr SurfaceCounterFlagBitsEXT
    -> Int -> SurfaceCounterFlagBitsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO SurfaceCounterFlagBitsEXT)
-> (forall b. Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ())
-> (Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT)
-> (Ptr SurfaceCounterFlagBitsEXT
    -> SurfaceCounterFlagBitsEXT -> IO ())
-> Storable SurfaceCounterFlagBitsEXT
forall b. Ptr b -> Int -> IO SurfaceCounterFlagBitsEXT
forall b. Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> IO ()
$cpoke :: Ptr SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> IO ()
peek :: Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT
$cpeek :: Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT
pokeByteOff :: Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO SurfaceCounterFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SurfaceCounterFlagBitsEXT
pokeElemOff :: Ptr SurfaceCounterFlagBitsEXT
-> Int -> SurfaceCounterFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr SurfaceCounterFlagBitsEXT
-> Int -> SurfaceCounterFlagBitsEXT -> IO ()
peekElemOff :: Ptr SurfaceCounterFlagBitsEXT
-> Int -> IO SurfaceCounterFlagBitsEXT
$cpeekElemOff :: Ptr SurfaceCounterFlagBitsEXT
-> Int -> IO SurfaceCounterFlagBitsEXT
alignment :: SurfaceCounterFlagBitsEXT -> Int
$calignment :: SurfaceCounterFlagBitsEXT -> Int
sizeOf :: SurfaceCounterFlagBitsEXT -> Int
$csizeOf :: SurfaceCounterFlagBitsEXT -> Int
Storable, SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT -> Zero SurfaceCounterFlagBitsEXT
forall a. a -> Zero a
zero :: SurfaceCounterFlagBitsEXT
$czero :: SurfaceCounterFlagBitsEXT
Zero, Eq SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT
Eq SurfaceCounterFlagBitsEXT =>
(SurfaceCounterFlagBitsEXT
 -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT
    -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT
    -> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> SurfaceCounterFlagBitsEXT
-> (Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> Bool)
-> (SurfaceCounterFlagBitsEXT -> Maybe Int)
-> (SurfaceCounterFlagBitsEXT -> Int)
-> (SurfaceCounterFlagBitsEXT -> Bool)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT)
-> (SurfaceCounterFlagBitsEXT -> Int)
-> Bits SurfaceCounterFlagBitsEXT
Int -> SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT -> Bool
SurfaceCounterFlagBitsEXT -> Int
SurfaceCounterFlagBitsEXT -> Maybe Int
SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT -> Int -> Bool
SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: SurfaceCounterFlagBitsEXT -> Int
$cpopCount :: SurfaceCounterFlagBitsEXT -> Int
rotateR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$crotateR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
rotateL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$crotateL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
unsafeShiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cunsafeShiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
shiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cshiftR :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
unsafeShiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cunsafeShiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
shiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cshiftL :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
isSigned :: SurfaceCounterFlagBitsEXT -> Bool
$cisSigned :: SurfaceCounterFlagBitsEXT -> Bool
bitSize :: SurfaceCounterFlagBitsEXT -> Int
$cbitSize :: SurfaceCounterFlagBitsEXT -> Int
bitSizeMaybe :: SurfaceCounterFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: SurfaceCounterFlagBitsEXT -> Maybe Int
testBit :: SurfaceCounterFlagBitsEXT -> Int -> Bool
$ctestBit :: SurfaceCounterFlagBitsEXT -> Int -> Bool
complementBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$ccomplementBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
clearBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cclearBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
setBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$csetBit :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
bit :: Int -> SurfaceCounterFlagBitsEXT
$cbit :: Int -> SurfaceCounterFlagBitsEXT
zeroBits :: SurfaceCounterFlagBitsEXT
$czeroBits :: SurfaceCounterFlagBitsEXT
rotate :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$crotate :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
shift :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
$cshift :: SurfaceCounterFlagBitsEXT -> Int -> SurfaceCounterFlagBitsEXT
complement :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$ccomplement :: SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
xor :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$cxor :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
.|. :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$c.|. :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
.&. :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$c.&. :: SurfaceCounterFlagBitsEXT
-> SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT
$cp1Bits :: Eq SurfaceCounterFlagBitsEXT
Bits, Bits SurfaceCounterFlagBitsEXT
Bits SurfaceCounterFlagBitsEXT =>
(SurfaceCounterFlagBitsEXT -> Int)
-> (SurfaceCounterFlagBitsEXT -> Int)
-> (SurfaceCounterFlagBitsEXT -> Int)
-> FiniteBits SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SurfaceCounterFlagBitsEXT -> Int
$ccountTrailingZeros :: SurfaceCounterFlagBitsEXT -> Int
countLeadingZeros :: SurfaceCounterFlagBitsEXT -> Int
$ccountLeadingZeros :: SurfaceCounterFlagBitsEXT -> Int
finiteBitSize :: SurfaceCounterFlagBitsEXT -> Int
$cfiniteBitSize :: SurfaceCounterFlagBitsEXT -> Int
$cp1FiniteBits :: Bits SurfaceCounterFlagBitsEXT
FiniteBits)

-- | 'SURFACE_COUNTER_VBLANK_BIT_EXT' specifies a counter incrementing once
-- every time a vertical blanking period occurs on the display associated
-- with the surface.
pattern $bSURFACE_COUNTER_VBLANK_BIT_EXT :: SurfaceCounterFlagBitsEXT
$mSURFACE_COUNTER_VBLANK_BIT_EXT :: forall r.
SurfaceCounterFlagBitsEXT -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_COUNTER_VBLANK_BIT_EXT = SurfaceCounterFlagBitsEXT 0x00000001

conNameSurfaceCounterFlagBitsEXT :: String
conNameSurfaceCounterFlagBitsEXT :: String
conNameSurfaceCounterFlagBitsEXT = "SurfaceCounterFlagBitsEXT"

enumPrefixSurfaceCounterFlagBitsEXT :: String
enumPrefixSurfaceCounterFlagBitsEXT :: String
enumPrefixSurfaceCounterFlagBitsEXT = "SURFACE_COUNTER_VBLANK_BIT_EXT"

showTableSurfaceCounterFlagBitsEXT :: [(SurfaceCounterFlagBitsEXT, String)]
showTableSurfaceCounterFlagBitsEXT :: [(SurfaceCounterFlagBitsEXT, String)]
showTableSurfaceCounterFlagBitsEXT = [(SurfaceCounterFlagBitsEXT
SURFACE_COUNTER_VBLANK_BIT_EXT, "")]

instance Show SurfaceCounterFlagBitsEXT where
  showsPrec :: Int -> SurfaceCounterFlagBitsEXT -> ShowS
showsPrec = String
-> [(SurfaceCounterFlagBitsEXT, String)]
-> String
-> (SurfaceCounterFlagBitsEXT -> Word32)
-> (Word32 -> ShowS)
-> Int
-> SurfaceCounterFlagBitsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSurfaceCounterFlagBitsEXT
                            [(SurfaceCounterFlagBitsEXT, String)]
showTableSurfaceCounterFlagBitsEXT
                            String
conNameSurfaceCounterFlagBitsEXT
                            (\(SurfaceCounterFlagBitsEXT x :: Word32
x) -> Word32
x)
                            (\x :: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)

instance Read SurfaceCounterFlagBitsEXT where
  readPrec :: ReadPrec SurfaceCounterFlagBitsEXT
readPrec = String
-> [(SurfaceCounterFlagBitsEXT, String)]
-> String
-> (Word32 -> SurfaceCounterFlagBitsEXT)
-> ReadPrec SurfaceCounterFlagBitsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSurfaceCounterFlagBitsEXT
                          [(SurfaceCounterFlagBitsEXT, String)]
showTableSurfaceCounterFlagBitsEXT
                          String
conNameSurfaceCounterFlagBitsEXT
                          Word32 -> SurfaceCounterFlagBitsEXT
SurfaceCounterFlagBitsEXT


type EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION"
pattern EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION :: a
$mEXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION = 1


type EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"

-- No documentation found for TopLevel "VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME"
pattern EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME :: a
$mEXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"