{-# language CPP #-}
module Vulkan.Extensions.VK_NN_vi_surface  ( createViSurfaceNN
                                           , ViSurfaceCreateInfoNN(..)
                                           , ViSurfaceCreateFlagsNN(..)
                                           , NN_VI_SURFACE_SPEC_VERSION
                                           , pattern NN_VI_SURFACE_SPEC_VERSION
                                           , NN_VI_SURFACE_EXTENSION_NAME
                                           , pattern NN_VI_SURFACE_EXTENSION_NAME
                                           , SurfaceKHR(..)
                                           ) where

import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
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 Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Dynamic (InstanceCmds(pVkCreateViSurfaceNN))
import Vulkan.Core10.Handles (Instance_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.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_VI_SURFACE_CREATE_INFO_NN))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateViSurfaceNN
  :: FunPtr (Ptr Instance_T -> Ptr ViSurfaceCreateInfoNN -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr ViSurfaceCreateInfoNN -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result

-- | vkCreateViSurfaceNN - Create a 'Vulkan.Extensions.Handles.SurfaceKHR'
-- object for a VI layer
--
-- = Description
--
-- During the lifetime of a surface created using a particular
-- @nn@::@vi@::@NativeWindowHandle@, applications /must/ not attempt to
-- create another surface for the same @nn@::@vi@::@Layer@ or attempt to
-- connect to the same @nn@::@vi@::@Layer@ through other platform
-- mechanisms.
--
-- If the native window is created with a specified size, @currentExtent@
-- will reflect that size. In this case, applications should use the same
-- size for the swapchain’s @imageExtent@. Otherwise, the @currentExtent@
-- will have the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that
-- applications are expected to choose an appropriate size for the
-- swapchain’s @imageExtent@ (e.g., by matching the result of a call to
-- @nn@::@vi@::@GetDisplayResolution@).
--
-- == Valid Usage (Implicit)
--
-- -   @instance@ /must/ be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   @pCreateInfo@ /must/ be a valid pointer to a valid
--     'ViSurfaceCreateInfoNN' structure
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @pSurface@ /must/ be a valid pointer to a
--     'Vulkan.Extensions.Handles.SurfaceKHR' handle
--
-- == 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_NATIVE_WINDOW_IN_USE_KHR'
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Instance',
-- 'Vulkan.Extensions.Handles.SurfaceKHR', 'ViSurfaceCreateInfoNN'
createViSurfaceNN :: forall io
                   . (MonadIO io)
                  => -- | @instance@ is the instance with which to associate the surface.
                     Instance
                  -> -- | @pCreateInfo@ is a pointer to a 'ViSurfaceCreateInfoNN' structure
                     -- containing parameters affecting the creation of the surface object.
                     ViSurfaceCreateInfoNN
                  -> -- | @pAllocator@ is the allocator used for host memory allocated for the
                     -- surface object when there is no more specific allocator available (see
                     -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>).
                     ("allocator" ::: Maybe AllocationCallbacks)
                  -> io (SurfaceKHR)
createViSurfaceNN :: Instance
-> ViSurfaceCreateInfoNN
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createViSurfaceNN instance' :: Instance
instance' createInfo :: ViSurfaceCreateInfoNN
createInfo allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO SurfaceKHR -> io SurfaceKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceKHR -> io SurfaceKHR)
-> (ContT SurfaceKHR IO SurfaceKHR -> IO SurfaceKHR)
-> ContT SurfaceKHR IO SurfaceKHR
-> io SurfaceKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT SurfaceKHR IO SurfaceKHR -> IO SurfaceKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT SurfaceKHR IO SurfaceKHR -> io SurfaceKHR)
-> ContT SurfaceKHR IO SurfaceKHR -> io SurfaceKHR
forall a b. (a -> b) -> a -> b
$ do
  let vkCreateViSurfaceNNPtr :: FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
pVkCreateViSurfaceNN (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO () -> ContT SurfaceKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceKHR IO ())
-> IO () -> ContT SurfaceKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> 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 vkCreateViSurfaceNN is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateViSurfaceNN' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateViSurfaceNN' = FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateViSurfaceNN FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr
  "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
pCreateInfo <- ((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT
      SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN))
-> ((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
     -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
forall a b. (a -> b) -> a -> b
$ ViSurfaceCreateInfoNN
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ViSurfaceCreateInfoNN
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pSurface" ::: Ptr SurfaceKHR
pPSurface <- ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR))
-> ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pSurface" ::: Ptr SurfaceKHR)
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO ())
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSurface" ::: Ptr SurfaceKHR)
forall a. Int -> IO (Ptr a)
callocBytes @SurfaceKHR 8) ("pSurface" ::: Ptr SurfaceKHR) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT SurfaceKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceKHR IO Result)
-> IO Result -> ContT SurfaceKHR IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateViSurfaceNN' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
pCreateInfo "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pSurface" ::: Ptr SurfaceKHR
pPSurface)
  IO () -> ContT SurfaceKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceKHR IO ())
-> IO () -> ContT SurfaceKHR 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))
  SurfaceKHR
pSurface <- IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR)
-> IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall a b. (a -> b) -> a -> b
$ ("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceKHR "pSurface" ::: Ptr SurfaceKHR
pPSurface
  SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR)
-> SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall a b. (a -> b) -> a -> b
$ (SurfaceKHR
pSurface)


-- | VkViSurfaceCreateInfoNN - Structure specifying parameters of a newly
-- created VI surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'ViSurfaceCreateFlagsNN', 'createViSurfaceNN'
data ViSurfaceCreateInfoNN = ViSurfaceCreateInfoNN
  { -- | @flags@ is reserved for future use.
    --
    -- @flags@ /must/ be @0@
    ViSurfaceCreateInfoNN -> ViSurfaceCreateFlagsNN
flags :: ViSurfaceCreateFlagsNN
  , -- | @window@ is the @nn@::@vi@::@NativeWindowHandle@ for the
    -- @nn@::@vi@::@Layer@ with which to associate the surface.
    --
    -- @window@ /must/ be a valid @nn@::@vi@::@NativeWindowHandle@
    ViSurfaceCreateInfoNN -> Ptr ()
window :: Ptr ()
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ViSurfaceCreateInfoNN)
#endif
deriving instance Show ViSurfaceCreateInfoNN

instance ToCStruct ViSurfaceCreateInfoNN where
  withCStruct :: ViSurfaceCreateInfoNN
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b) -> IO b
withCStruct x :: ViSurfaceCreateInfoNN
x f :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b) -> IO b)
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ViSurfaceCreateInfoNN -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ViSurfaceCreateInfoNN
x (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b
f "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p)
  pokeCStruct :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ViSurfaceCreateInfoNN -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ViSurfaceCreateInfoNN{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr ViSurfaceCreateFlagsNN
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ViSurfaceCreateFlagsNN)) (ViSurfaceCreateFlagsNN
flags)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ()))) (Ptr ()
window)
    IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ()))) (Ptr ()
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ViSurfaceCreateInfoNN where
  peekCStruct :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> IO ViSurfaceCreateInfoNN
peekCStruct p :: "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p = do
    ViSurfaceCreateFlagsNN
flags <- Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN
forall a. Storable a => Ptr a -> IO a
peek @ViSurfaceCreateFlagsNN (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr ViSurfaceCreateFlagsNN
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ViSurfaceCreateFlagsNN))
    Ptr ()
window <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ())))
    ViSurfaceCreateInfoNN -> IO ViSurfaceCreateInfoNN
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ViSurfaceCreateInfoNN -> IO ViSurfaceCreateInfoNN)
-> ViSurfaceCreateInfoNN -> IO ViSurfaceCreateInfoNN
forall a b. (a -> b) -> a -> b
$ ViSurfaceCreateFlagsNN -> Ptr () -> ViSurfaceCreateInfoNN
ViSurfaceCreateInfoNN
             ViSurfaceCreateFlagsNN
flags Ptr ()
window

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

instance Zero ViSurfaceCreateInfoNN where
  zero :: ViSurfaceCreateInfoNN
zero = ViSurfaceCreateFlagsNN -> Ptr () -> ViSurfaceCreateInfoNN
ViSurfaceCreateInfoNN
           ViSurfaceCreateFlagsNN
forall a. Zero a => a
zero
           Ptr ()
forall a. Zero a => a
zero


-- | VkViSurfaceCreateFlagsNN - Reserved for future use
--
-- = Description
--
-- 'ViSurfaceCreateFlagsNN' is a bitmask type for setting a mask, but is
-- currently reserved for future use.
--
-- = See Also
--
-- 'ViSurfaceCreateInfoNN'
newtype ViSurfaceCreateFlagsNN = ViSurfaceCreateFlagsNN Flags
  deriving newtype (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
(ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> Eq ViSurfaceCreateFlagsNN
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c/= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
== :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c== :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
Eq, Eq ViSurfaceCreateFlagsNN
Eq ViSurfaceCreateFlagsNN =>
(ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Ordering)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN
    -> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN
    -> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> Ord ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Ordering
ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
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 :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$cmin :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
max :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$cmax :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
>= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c>= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
> :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c> :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
<= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c<= :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
< :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
$c< :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
compare :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Ordering
$ccompare :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Ordering
$cp1Ord :: Eq ViSurfaceCreateFlagsNN
Ord, Ptr b -> Int -> IO ViSurfaceCreateFlagsNN
Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ()
Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN
Ptr ViSurfaceCreateFlagsNN -> Int -> IO ViSurfaceCreateFlagsNN
Ptr ViSurfaceCreateFlagsNN
-> Int -> ViSurfaceCreateFlagsNN -> IO ()
Ptr ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ()
ViSurfaceCreateFlagsNN -> Int
(ViSurfaceCreateFlagsNN -> Int)
-> (ViSurfaceCreateFlagsNN -> Int)
-> (Ptr ViSurfaceCreateFlagsNN -> Int -> IO ViSurfaceCreateFlagsNN)
-> (Ptr ViSurfaceCreateFlagsNN
    -> Int -> ViSurfaceCreateFlagsNN -> IO ())
-> (forall b. Ptr b -> Int -> IO ViSurfaceCreateFlagsNN)
-> (forall b. Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ())
-> (Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN)
-> (Ptr ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ())
-> Storable ViSurfaceCreateFlagsNN
forall b. Ptr b -> Int -> IO ViSurfaceCreateFlagsNN
forall b. Ptr b -> Int -> ViSurfaceCreateFlagsNN -> 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 ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ()
$cpoke :: Ptr ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ()
peek :: Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN
$cpeek :: Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN
pokeByteOff :: Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ()
peekByteOff :: Ptr b -> Int -> IO ViSurfaceCreateFlagsNN
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ViSurfaceCreateFlagsNN
pokeElemOff :: Ptr ViSurfaceCreateFlagsNN
-> Int -> ViSurfaceCreateFlagsNN -> IO ()
$cpokeElemOff :: Ptr ViSurfaceCreateFlagsNN
-> Int -> ViSurfaceCreateFlagsNN -> IO ()
peekElemOff :: Ptr ViSurfaceCreateFlagsNN -> Int -> IO ViSurfaceCreateFlagsNN
$cpeekElemOff :: Ptr ViSurfaceCreateFlagsNN -> Int -> IO ViSurfaceCreateFlagsNN
alignment :: ViSurfaceCreateFlagsNN -> Int
$calignment :: ViSurfaceCreateFlagsNN -> Int
sizeOf :: ViSurfaceCreateFlagsNN -> Int
$csizeOf :: ViSurfaceCreateFlagsNN -> Int
Storable, ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN -> Zero ViSurfaceCreateFlagsNN
forall a. a -> Zero a
zero :: ViSurfaceCreateFlagsNN
$czero :: ViSurfaceCreateFlagsNN
Zero, Eq ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN
Eq ViSurfaceCreateFlagsNN =>
(ViSurfaceCreateFlagsNN
 -> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN
    -> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN
    -> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> ViSurfaceCreateFlagsNN
-> (Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> Bool)
-> (ViSurfaceCreateFlagsNN -> Maybe Int)
-> (ViSurfaceCreateFlagsNN -> Int)
-> (ViSurfaceCreateFlagsNN -> Bool)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN)
-> (ViSurfaceCreateFlagsNN -> Int)
-> Bits ViSurfaceCreateFlagsNN
Int -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN -> Bool
ViSurfaceCreateFlagsNN -> Int
ViSurfaceCreateFlagsNN -> Maybe Int
ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN -> Int -> Bool
ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
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 :: ViSurfaceCreateFlagsNN -> Int
$cpopCount :: ViSurfaceCreateFlagsNN -> Int
rotateR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$crotateR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
rotateL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$crotateL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
unsafeShiftR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cunsafeShiftR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
shiftR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cshiftR :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
unsafeShiftL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cunsafeShiftL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
shiftL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cshiftL :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
isSigned :: ViSurfaceCreateFlagsNN -> Bool
$cisSigned :: ViSurfaceCreateFlagsNN -> Bool
bitSize :: ViSurfaceCreateFlagsNN -> Int
$cbitSize :: ViSurfaceCreateFlagsNN -> Int
bitSizeMaybe :: ViSurfaceCreateFlagsNN -> Maybe Int
$cbitSizeMaybe :: ViSurfaceCreateFlagsNN -> Maybe Int
testBit :: ViSurfaceCreateFlagsNN -> Int -> Bool
$ctestBit :: ViSurfaceCreateFlagsNN -> Int -> Bool
complementBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$ccomplementBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
clearBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cclearBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
setBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$csetBit :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
bit :: Int -> ViSurfaceCreateFlagsNN
$cbit :: Int -> ViSurfaceCreateFlagsNN
zeroBits :: ViSurfaceCreateFlagsNN
$czeroBits :: ViSurfaceCreateFlagsNN
rotate :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$crotate :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
shift :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
$cshift :: ViSurfaceCreateFlagsNN -> Int -> ViSurfaceCreateFlagsNN
complement :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$ccomplement :: ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
xor :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$cxor :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
.|. :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$c.|. :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
.&. :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$c.&. :: ViSurfaceCreateFlagsNN
-> ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN
$cp1Bits :: Eq ViSurfaceCreateFlagsNN
Bits)



instance Show ViSurfaceCreateFlagsNN where
  showsPrec :: Int -> ViSurfaceCreateFlagsNN -> ShowS
showsPrec p :: Int
p = \case
    ViSurfaceCreateFlagsNN x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ViSurfaceCreateFlagsNN 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read ViSurfaceCreateFlagsNN where
  readPrec :: ReadPrec ViSurfaceCreateFlagsNN
readPrec = ReadPrec ViSurfaceCreateFlagsNN -> ReadPrec ViSurfaceCreateFlagsNN
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ViSurfaceCreateFlagsNN)]
-> ReadPrec ViSurfaceCreateFlagsNN
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec ViSurfaceCreateFlagsNN
-> ReadPrec ViSurfaceCreateFlagsNN
-> ReadPrec ViSurfaceCreateFlagsNN
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec ViSurfaceCreateFlagsNN
-> ReadPrec ViSurfaceCreateFlagsNN
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ViSurfaceCreateFlagsNN")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       ViSurfaceCreateFlagsNN -> ReadPrec ViSurfaceCreateFlagsNN
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN Flags
v)))


type NN_VI_SURFACE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NN_VI_SURFACE_SPEC_VERSION"
pattern NN_VI_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bNN_VI_SURFACE_SPEC_VERSION :: a
$mNN_VI_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
NN_VI_SURFACE_SPEC_VERSION = 1


type NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"

-- No documentation found for TopLevel "VK_NN_VI_SURFACE_EXTENSION_NAME"
pattern NN_VI_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNN_VI_SURFACE_EXTENSION_NAME :: a
$mNN_VI_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"