{-# 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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import 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.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Handles (Instance(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.Exception (VulkanException(..))
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
createViSurfaceNN :: forall io
. (MonadIO io)
=>
Instance
->
ViSurfaceCreateInfoNN
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (SurfaceKHR)
createViSurfaceNN :: forall (io :: * -> *).
MonadIO io =>
Instance
-> ViSurfaceCreateInfoNN
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createViSurfaceNN Instance
instance' ViSurfaceCreateInfoNN
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = 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 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 (case Instance
instance' of Instance{InstanceCmds
$sel:instanceCmds:Instance :: Instance -> 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 Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateViSurfaceNNPtr 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 vkCreateViSurfaceNN is null" forall a. Maybe a
Nothing 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 <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pSurface" ::: Ptr SurfaceKHR
pPSurface <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @SurfaceKHR Int
8) forall a. Ptr a -> IO ()
free
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
"vkCreateViSurfaceNN" (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))
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))
SurfaceKHR
pSurface <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @SurfaceKHR "pSurface" ::: Ptr SurfaceKHR
pPSurface
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (SurfaceKHR
pSurface)
data ViSurfaceCreateInfoNN = ViSurfaceCreateInfoNN
{
ViSurfaceCreateInfoNN -> ViSurfaceCreateFlagsNN
flags :: ViSurfaceCreateFlagsNN
,
ViSurfaceCreateInfoNN -> Ptr ()
window :: Ptr ()
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ViSurfaceCreateInfoNN)
#endif
deriving instance Show ViSurfaceCreateInfoNN
instance ToCStruct ViSurfaceCreateInfoNN where
withCStruct :: forall b.
ViSurfaceCreateInfoNN
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b) -> IO b
withCStruct ViSurfaceCreateInfoNN
x ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p -> 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 :: forall b.
("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ViSurfaceCreateInfoNN -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p ViSurfaceCreateInfoNN{Ptr ()
ViSurfaceCreateFlagsNN
window :: Ptr ()
flags :: ViSurfaceCreateFlagsNN
$sel:window:ViSurfaceCreateInfoNN :: ViSurfaceCreateInfoNN -> Ptr ()
$sel:flags:ViSurfaceCreateInfoNN :: ViSurfaceCreateInfoNN -> ViSurfaceCreateFlagsNN
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
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 (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ViSurfaceCreateFlagsNN)) (ViSurfaceCreateFlagsNN
flags)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (Ptr ()
window)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO b -> IO b
pokeZeroCStruct "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
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 (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ViSurfaceCreateInfoNN where
peekCStruct :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> IO ViSurfaceCreateInfoNN
peekCStruct "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p = do
ViSurfaceCreateFlagsNN
flags <- forall a. Storable a => Ptr a -> IO a
peek @ViSurfaceCreateFlagsNN (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ViSurfaceCreateFlagsNN))
Ptr ()
window <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ())))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ViSurfaceCreateFlagsNN -> Ptr () -> ViSurfaceCreateInfoNN
ViSurfaceCreateInfoNN
ViSurfaceCreateFlagsNN
flags Ptr ()
window
instance Storable ViSurfaceCreateInfoNN where
sizeOf :: ViSurfaceCreateInfoNN -> Int
sizeOf ~ViSurfaceCreateInfoNN
_ = Int
32
alignment :: ViSurfaceCreateInfoNN -> Int
alignment ~ViSurfaceCreateInfoNN
_ = Int
8
peek :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> IO ViSurfaceCreateInfoNN
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ViSurfaceCreateInfoNN -> IO ()
poke "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
ptr ViSurfaceCreateInfoNN
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
ptr ViSurfaceCreateInfoNN
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ViSurfaceCreateInfoNN where
zero :: ViSurfaceCreateInfoNN
zero = ViSurfaceCreateFlagsNN -> Ptr () -> ViSurfaceCreateInfoNN
ViSurfaceCreateInfoNN
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype ViSurfaceCreateFlagsNN = ViSurfaceCreateFlagsNN Flags
deriving newtype (ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> Bool
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
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
Ord, Ptr ViSurfaceCreateFlagsNN -> IO ViSurfaceCreateFlagsNN
Ptr ViSurfaceCreateFlagsNN -> Int -> IO ViSurfaceCreateFlagsNN
Ptr ViSurfaceCreateFlagsNN
-> Int -> ViSurfaceCreateFlagsNN -> IO ()
Ptr ViSurfaceCreateFlagsNN -> ViSurfaceCreateFlagsNN -> IO ()
ViSurfaceCreateFlagsNN -> Int
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 :: forall b. Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ViSurfaceCreateFlagsNN -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: ViSurfaceCreateFlagsNN
$czero :: ViSurfaceCreateFlagsNN
Zero, Eq ViSurfaceCreateFlagsNN
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
Bits, Bits ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ViSurfaceCreateFlagsNN -> Int
$ccountTrailingZeros :: ViSurfaceCreateFlagsNN -> Int
countLeadingZeros :: ViSurfaceCreateFlagsNN -> Int
$ccountLeadingZeros :: ViSurfaceCreateFlagsNN -> Int
finiteBitSize :: ViSurfaceCreateFlagsNN -> Int
$cfiniteBitSize :: ViSurfaceCreateFlagsNN -> Int
FiniteBits)
conNameViSurfaceCreateFlagsNN :: String
conNameViSurfaceCreateFlagsNN :: String
conNameViSurfaceCreateFlagsNN = String
"ViSurfaceCreateFlagsNN"
enumPrefixViSurfaceCreateFlagsNN :: String
enumPrefixViSurfaceCreateFlagsNN :: String
enumPrefixViSurfaceCreateFlagsNN = String
""
showTableViSurfaceCreateFlagsNN :: [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN :: [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN = []
instance Show ViSurfaceCreateFlagsNN where
showsPrec :: Int -> ViSurfaceCreateFlagsNN -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixViSurfaceCreateFlagsNN
[(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN
String
conNameViSurfaceCreateFlagsNN
(\(ViSurfaceCreateFlagsNN 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 ViSurfaceCreateFlagsNN where
readPrec :: ReadPrec ViSurfaceCreateFlagsNN
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixViSurfaceCreateFlagsNN
[(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN
String
conNameViSurfaceCreateFlagsNN
Flags -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN
type NN_VI_SURFACE_SPEC_VERSION = 1
pattern NN_VI_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bNN_VI_SURFACE_SPEC_VERSION :: forall a. Integral a => a
$mNN_VI_SURFACE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NN_VI_SURFACE_SPEC_VERSION = 1
type NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"
pattern NN_VI_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNN_VI_SURFACE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNN_VI_SURFACE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"