{-# 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
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_display VK_KHR_display>
--
-- [__Contact__]
--
--     -   James Jones
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_display_surface_counter] @cubanismo%0A*Here describe the issue or question you have about the VK_EXT_display_surface_counter extension* >
--
-- == 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':
--
--     -   'STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT'
--
--     -   '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://registry.khronos.org/vulkan/specs/1.3-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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 (allocaBytes)
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 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 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.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceCapabilities2EXT))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(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.Exception (VulkanException(..))
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
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-06523#
--     @surface@ /must/ be a valid 'Vulkan.Extensions.Handles.SurfaceKHR'
--     handle
--
-- -   #VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-06211#
--     @surface@ /must/ be supported by @physicalDevice@, as reported by
--     'Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfaceSupportKHR'
--     or an equivalent platform-specific mechanism
--
-- == 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
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_display_surface_counter VK_EXT_display_surface_counter>,
-- '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 :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilities2EXT
getPhysicalDeviceSurfaceCapabilities2EXT PhysicalDevice
physicalDevice
                                           SurfaceKHR
surface = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> SurfaceKHR
      -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
      -> IO Result)
pVkGetPhysicalDeviceSurfaceCapabilities2EXT (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> SurfaceKHR
   -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
   -> IO Result)
vkGetPhysicalDeviceSurfaceCapabilities2EXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceSurfaceCapabilities2EXT is null" forall a. Maybe a
Nothing 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 <- 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 @SurfaceCapabilities2EXT)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfaceCapabilities2EXT" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilities2EXT'
                                                                               (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
                                                                               (SurfaceKHR
surface)
                                                                               ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
pPSurfaceCapabilities))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  SurfaceCapabilities2EXT
pSurfaceCapabilities <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceCapabilities2EXT "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
pPSurfaceCapabilities
  forall (f :: * -> *) a. Applicative f => a -> f a
pure 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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> r) -> r
SURFACE_COUNTER_VBLANK_EXT = SURFACE_COUNTER_VBLANK_BIT_EXT


-- | VkSurfaceCapabilities2EXT - Structure describing capabilities of a
-- surface
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_display_surface_counter VK_EXT_display_surface_counter>,
-- '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
  { -- | @minImageCount@ is the minimum number of images the specified device
    -- supports for a swapchain created for the surface, and will be at least
    -- one.
    SurfaceCapabilities2EXT -> Flags
minImageCount :: Word32
  , -- | @maxImageCount@ is the maximum number of images the specified device
    -- supports for a swapchain created for the surface, and will be either 0,
    -- or greater than or equal to @minImageCount@. A value of 0 means that
    -- there is no limit on the number of images, though there /may/ be limits
    -- related to the total amount of memory used by presentable images.
    SurfaceCapabilities2EXT -> Flags
maxImageCount :: Word32
  , -- | @currentExtent@ is the current width and height of the surface, or the
    -- special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size
    -- will be determined by the extent of a swapchain targeting the surface.
    SurfaceCapabilities2EXT -> Extent2D
currentExtent :: Extent2D
  , -- | @minImageExtent@ contains the smallest valid swapchain extent for the
    -- surface on the specified device. The @width@ and @height@ of the extent
    -- will each be less than or equal to the corresponding @width@ and
    -- @height@ of @currentExtent@, unless @currentExtent@ has the special
    -- value described above.
    SurfaceCapabilities2EXT -> Extent2D
minImageExtent :: Extent2D
  , -- | @maxImageExtent@ contains the largest valid swapchain extent for the
    -- surface on the specified device. The @width@ and @height@ of the extent
    -- will each be greater than or equal to the corresponding @width@ and
    -- @height@ of @minImageExtent@. The @width@ and @height@ of the extent
    -- will each be greater than or equal to the corresponding @width@ and
    -- @height@ of @currentExtent@, unless @currentExtent@ has the special
    -- value described above.
    SurfaceCapabilities2EXT -> Extent2D
maxImageExtent :: Extent2D
  , -- | @maxImageArrayLayers@ is the maximum number of layers presentable images
    -- /can/ have for a swapchain created for this device and surface, and will
    -- be at least one.
    SurfaceCapabilities2EXT -> Flags
maxImageArrayLayers :: Word32
  , -- | @supportedTransforms@ is a bitmask of
    -- 'Vulkan.Extensions.VK_KHR_surface.SurfaceTransformFlagBitsKHR'
    -- indicating the presentation transforms supported for the surface on the
    -- specified device. At least one bit will be set.
    SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
supportedTransforms :: SurfaceTransformFlagsKHR
  , -- | @currentTransform@ is
    -- 'Vulkan.Extensions.VK_KHR_surface.SurfaceTransformFlagBitsKHR' value
    -- indicating the surface’s current transform relative to the presentation
    -- engine’s natural orientation.
    SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
currentTransform :: SurfaceTransformFlagBitsKHR
  , -- | @supportedCompositeAlpha@ is a bitmask of
    -- 'Vulkan.Extensions.VK_KHR_surface.CompositeAlphaFlagBitsKHR',
    -- representing the alpha compositing modes supported by the presentation
    -- engine for the surface on the specified device, and at least one bit
    -- will be set. Opaque composition /can/ be achieved in any alpha
    -- compositing mode by either using an image format that has no alpha
    -- component, or by ensuring that all pixels in the presentable images have
    -- an alpha value of 1.0.
    SurfaceCapabilities2EXT -> CompositeAlphaFlagsKHR
supportedCompositeAlpha :: CompositeAlphaFlagsKHR
  , -- | @supportedUsageFlags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits' representing
    -- the ways the application /can/ use the presentable images of a swapchain
    -- created with 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR' set to
    -- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_IMMEDIATE_KHR',
    -- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_MAILBOX_KHR',
    -- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_FIFO_KHR' or
    -- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_FIFO_RELAXED_KHR' for the
    -- surface on the specified device.
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT'
    -- /must/ be included in the set. Implementations /may/ support additional
    -- usages.
    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://registry.khronos.org/vulkan/specs/1.3-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 :: forall b.
SurfaceCapabilities2EXT
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
    -> IO b)
-> IO b
withCStruct SurfaceCapabilities2EXT
x ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
72 forall a b. (a -> b) -> a -> b
$ \"pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p -> 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 :: forall b.
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> SurfaceCapabilities2EXT -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p SurfaceCapabilities2EXT{Flags
ImageUsageFlags
Extent2D
SurfaceCounterFlagBitsEXT
SurfaceTransformFlagsKHR
CompositeAlphaFlagsKHR
supportedSurfaceCounters :: SurfaceCounterFlagBitsEXT
supportedUsageFlags :: ImageUsageFlags
supportedCompositeAlpha :: CompositeAlphaFlagsKHR
currentTransform :: SurfaceTransformFlagsKHR
supportedTransforms :: SurfaceTransformFlagsKHR
maxImageArrayLayers :: Flags
maxImageExtent :: Extent2D
minImageExtent :: Extent2D
currentExtent :: Extent2D
maxImageCount :: Flags
minImageCount :: Flags
$sel:supportedSurfaceCounters:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> SurfaceCounterFlagBitsEXT
$sel:supportedUsageFlags:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> ImageUsageFlags
$sel:supportedCompositeAlpha:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> CompositeAlphaFlagsKHR
$sel:currentTransform:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
$sel:supportedTransforms:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> SurfaceTransformFlagsKHR
$sel:maxImageArrayLayers:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Flags
$sel:maxImageExtent:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Extent2D
$sel:minImageExtent:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Extent2D
$sel:currentExtent:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Extent2D
$sel:maxImageCount:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Flags
$sel:minImageCount:SurfaceCapabilities2EXT :: SurfaceCapabilities2EXT -> Flags
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
minImageCount)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
maxImageCount)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (Extent2D
currentExtent)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Extent2D)) (Extent2D
minImageExtent)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Extent2D)) (Extent2D
maxImageExtent)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
maxImageArrayLayers)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr SurfaceTransformFlagsKHR)) (SurfaceTransformFlagsKHR
supportedTransforms)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagsKHR
currentTransform)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr CompositeAlphaFlagsKHR)) (CompositeAlphaFlagsKHR
supportedCompositeAlpha)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr ImageUsageFlags)) (ImageUsageFlags
supportedUsageFlags)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr SurfaceCounterFlagsEXT)) (SurfaceCounterFlagBitsEXT
supportedSurfaceCounters)
    IO b
f
  cStructSize :: Int
cStructSize = Int
72
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT)
-> IO b -> IO b
pokeZeroCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr SurfaceTransformFlagsKHR)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr SurfaceTransformFlagBitsKHR)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr CompositeAlphaFlagsKHR)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilities2EXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr ImageUsageFlags)) (forall a. Zero a => a
zero)
    IO b
f

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

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

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


type SurfaceCounterFlagsEXT = SurfaceCounterFlagBitsEXT

-- | VkSurfaceCounterFlagBitsEXT - Surface-relative counter types
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_display_surface_counter VK_EXT_display_surface_counter>,
-- 'SurfaceCounterFlagsEXT',
-- 'Vulkan.Extensions.VK_EXT_display_control.getSwapchainCounterEXT'
newtype SurfaceCounterFlagBitsEXT = SurfaceCounterFlagBitsEXT Flags
  deriving newtype (SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> Bool
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
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
Ord, Ptr SurfaceCounterFlagBitsEXT -> IO SurfaceCounterFlagBitsEXT
Ptr SurfaceCounterFlagBitsEXT
-> Int -> IO SurfaceCounterFlagBitsEXT
Ptr SurfaceCounterFlagBitsEXT
-> Int -> SurfaceCounterFlagBitsEXT -> IO ()
Ptr SurfaceCounterFlagBitsEXT -> SurfaceCounterFlagBitsEXT -> IO ()
SurfaceCounterFlagBitsEXT -> Int
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 :: forall b. Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SurfaceCounterFlagBitsEXT -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: SurfaceCounterFlagBitsEXT
$czero :: SurfaceCounterFlagBitsEXT
Zero, Eq SurfaceCounterFlagBitsEXT
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
Bits, Bits 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
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 -> ((# #) -> r) -> ((# #) -> r) -> r
SURFACE_COUNTER_VBLANK_BIT_EXT = SurfaceCounterFlagBitsEXT 0x00000001

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

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

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

instance Show SurfaceCounterFlagBitsEXT where
  showsPrec :: Int -> SurfaceCounterFlagBitsEXT -> ShowS
showsPrec =
    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 Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read SurfaceCounterFlagBitsEXT where
  readPrec :: ReadPrec SurfaceCounterFlagBitsEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixSurfaceCounterFlagBitsEXT
      [(SurfaceCounterFlagBitsEXT, String)]
showTableSurfaceCounterFlagBitsEXT
      String
conNameSurfaceCounterFlagBitsEXT
      Flags -> 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 :: forall a. Integral a => a
$mEXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> 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 :: forall a. (Eq a, IsString a) => a
$mEXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"