{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_tooling_info ( getPhysicalDeviceToolPropertiesEXT
, PhysicalDeviceToolPropertiesEXT(..)
, ToolPurposeFlagsEXT
, ToolPurposeFlagBitsEXT( TOOL_PURPOSE_VALIDATION_BIT_EXT
, TOOL_PURPOSE_PROFILING_BIT_EXT
, TOOL_PURPOSE_TRACING_BIT_EXT
, TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT
, TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT
, TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT
, TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT
, ..
)
, EXT_TOOLING_INFO_SPEC_VERSION
, pattern EXT_TOOLING_INFO_SPEC_VERSION
, EXT_TOOLING_INFO_EXTENSION_NAME
, pattern EXT_TOOLING_INFO_EXTENSION_NAME
) where
import Vulkan.CStruct.Utils (FixedArray)
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 (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.Show (showString)
import Numeric (showHex)
import Data.ByteString (packCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
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.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceToolPropertiesEXT))
import Vulkan.Core10.APIConstants (MAX_DESCRIPTION_SIZE)
import Vulkan.Core10.APIConstants (MAX_EXTENSION_NAME_SIZE)
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.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_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceToolPropertiesEXT
:: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceToolPropertiesEXT -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceToolPropertiesEXT -> IO Result
getPhysicalDeviceToolPropertiesEXT :: forall io
. (MonadIO io)
=>
PhysicalDevice
-> io (Result, ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
getPhysicalDeviceToolPropertiesEXT :: PhysicalDevice
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
getPhysicalDeviceToolPropertiesEXT physicalDevice :: PhysicalDevice
physicalDevice = IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> (ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> io
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceToolPropertiesEXTPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
vkGetPhysicalDeviceToolPropertiesEXTPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
pVkGetPhysicalDeviceToolPropertiesEXT (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
())
-> IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
vkGetPhysicalDeviceToolPropertiesEXTPtr FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> 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 vkGetPhysicalDeviceToolPropertiesEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceToolPropertiesEXT' :: Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result
vkGetPhysicalDeviceToolPropertiesEXT' = FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result
mkVkGetPhysicalDeviceToolPropertiesEXT FunPtr
(Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result)
vkGetPhysicalDeviceToolPropertiesEXTPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pToolCount" ::: Ptr Word32
pPToolCount <- ((("pToolCount" ::: Ptr Word32)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolCount" ::: Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pToolCount" ::: Ptr Word32)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolCount" ::: Ptr Word32))
-> ((("pToolCount" ::: Ptr Word32)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolCount" ::: Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO ("pToolCount" ::: Ptr Word32)
-> (("pToolCount" ::: Ptr Word32) -> IO ())
-> (("pToolCount" ::: Ptr Word32)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pToolCount" ::: Ptr Word32)
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pToolCount" ::: Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result)
-> IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceToolPropertiesEXT" (Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result
vkGetPhysicalDeviceToolPropertiesEXT' Ptr PhysicalDevice_T
physicalDevice' ("pToolCount" ::: Ptr Word32
pPToolCount) ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
forall a. Ptr a
nullPtr))
IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
())
-> IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
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))
Word32
pToolCount <- IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32)
-> IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pToolCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pToolCount" ::: Ptr Word32
pPToolCount
"pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
pPToolProperties <- ((("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT))
-> ((("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ IO ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO ())
-> (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
forall a. Int -> IO (Ptr a)
callocBytes @PhysicalDeviceToolPropertiesEXT ((Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pToolCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 1048)) ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO ()
forall a. Ptr a -> IO ()
free
[()]
_ <- (Int
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
())
-> [Int]
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
[()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\i :: Int
i -> ((()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
())
-> ((()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall a b. (a -> b) -> a -> b
$ ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
pPToolProperties ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* 1048) :: Ptr PhysicalDeviceToolPropertiesEXT) (IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ((()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> (()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> ()
-> IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ ())) [0..(Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pToolCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- 1]
Result
r' <- IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result)
-> IO Result
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceToolPropertiesEXT" (Ptr PhysicalDevice_T
-> ("pToolCount" ::: Ptr Word32)
-> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO Result
vkGetPhysicalDeviceToolPropertiesEXT' Ptr PhysicalDevice_T
physicalDevice' ("pToolCount" ::: Ptr Word32
pPToolCount) (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
pPToolProperties)))
IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
())
-> IO ()
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
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'))
Word32
pToolCount' <- IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32)
-> IO Word32
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pToolCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pToolCount" ::: Ptr Word32
pPToolCount
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT
pToolProperties' <- IO ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> IO ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PhysicalDeviceToolPropertiesEXT)
-> IO ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pToolCount')) (\i :: Int
i -> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO PhysicalDeviceToolPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PhysicalDeviceToolPropertiesEXT ((("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
pPToolProperties) ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (1048 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PhysicalDeviceToolPropertiesEXT)))
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))
-> (Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
-> ContT
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
IO
(Result,
"toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT
pToolProperties')
data PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolPropertiesEXT
{
PhysicalDeviceToolPropertiesEXT -> ByteString
name :: ByteString
,
PhysicalDeviceToolPropertiesEXT -> ByteString
version :: ByteString
,
PhysicalDeviceToolPropertiesEXT -> ToolPurposeFlagsEXT
purposes :: ToolPurposeFlagsEXT
,
PhysicalDeviceToolPropertiesEXT -> ByteString
description :: ByteString
,
PhysicalDeviceToolPropertiesEXT -> ByteString
layer :: ByteString
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceToolPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceToolPropertiesEXT
instance ToCStruct PhysicalDeviceToolPropertiesEXT where
withCStruct :: PhysicalDeviceToolPropertiesEXT
-> (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO b)
-> IO b
withCStruct x :: PhysicalDeviceToolPropertiesEXT
x f :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT) -> IO b
f = Int
-> Int
-> (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 1048 8 ((("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO b)
-> IO b)
-> (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p -> ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> PhysicalDeviceToolPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p PhysicalDeviceToolPropertiesEXT
x (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT) -> IO b
f "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p)
pokeCStruct :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> PhysicalDeviceToolPropertiesEXT -> IO b -> IO b
pokeCStruct p :: "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p PhysicalDeviceToolPropertiesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
name)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 272 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
version)
Ptr ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr ToolPurposeFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 528 :: Ptr ToolPurposeFlagsEXT)) (ToolPurposeFlagsEXT
purposes)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 788 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
layer)
IO b
f
cStructSize :: Int
cStructSize = 1048
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO b -> IO b
pokeZeroCStruct p :: "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 272 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
Ptr ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr ToolPurposeFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 528 :: Ptr ToolPurposeFlagsEXT)) (ToolPurposeFlagsEXT
forall a. Zero a => a
zero)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
-> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 788 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
IO b
f
instance FromCStruct PhysicalDeviceToolPropertiesEXT where
peekCStruct :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO PhysicalDeviceToolPropertiesEXT
peekCStruct p :: "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p = do
ByteString
name <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))))
ByteString
version <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 272 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))))
ToolPurposeFlagsEXT
purposes <- Ptr ToolPurposeFlagsEXT -> IO ToolPurposeFlagsEXT
forall a. Storable a => Ptr a -> IO a
peek @ToolPurposeFlagsEXT (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr ToolPurposeFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 528 :: Ptr ToolPurposeFlagsEXT))
ByteString
description <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
ByteString
layer <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
p ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> Int -> Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 788 :: Ptr (FixedArray MAX_EXTENSION_NAME_SIZE CChar))))
PhysicalDeviceToolPropertiesEXT
-> IO PhysicalDeviceToolPropertiesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceToolPropertiesEXT
-> IO PhysicalDeviceToolPropertiesEXT)
-> PhysicalDeviceToolPropertiesEXT
-> IO PhysicalDeviceToolPropertiesEXT
forall a b. (a -> b) -> a -> b
$ ByteString
-> ByteString
-> ToolPurposeFlagsEXT
-> ByteString
-> ByteString
-> PhysicalDeviceToolPropertiesEXT
PhysicalDeviceToolPropertiesEXT
ByteString
name ByteString
version ToolPurposeFlagsEXT
purposes ByteString
description ByteString
layer
instance Storable PhysicalDeviceToolPropertiesEXT where
sizeOf :: PhysicalDeviceToolPropertiesEXT -> Int
sizeOf ~PhysicalDeviceToolPropertiesEXT
_ = 1048
alignment :: PhysicalDeviceToolPropertiesEXT -> Int
alignment ~PhysicalDeviceToolPropertiesEXT
_ = 8
peek :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO PhysicalDeviceToolPropertiesEXT
peek = ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> IO PhysicalDeviceToolPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> PhysicalDeviceToolPropertiesEXT -> IO ()
poke ptr :: "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
ptr poked :: PhysicalDeviceToolPropertiesEXT
poked = ("pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT)
-> PhysicalDeviceToolPropertiesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pToolProperties" ::: Ptr PhysicalDeviceToolPropertiesEXT
ptr PhysicalDeviceToolPropertiesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceToolPropertiesEXT where
zero :: PhysicalDeviceToolPropertiesEXT
zero = ByteString
-> ByteString
-> ToolPurposeFlagsEXT
-> ByteString
-> ByteString
-> PhysicalDeviceToolPropertiesEXT
PhysicalDeviceToolPropertiesEXT
ByteString
forall a. Monoid a => a
mempty
ByteString
forall a. Monoid a => a
mempty
ToolPurposeFlagsEXT
forall a. Zero a => a
zero
ByteString
forall a. Monoid a => a
mempty
ByteString
forall a. Monoid a => a
mempty
type ToolPurposeFlagsEXT = ToolPurposeFlagBitsEXT
newtype ToolPurposeFlagBitsEXT = ToolPurposeFlagBitsEXT Flags
deriving newtype (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
(ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> Eq ToolPurposeFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c/= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
== :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c== :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
Eq, Eq ToolPurposeFlagsEXT
Eq ToolPurposeFlagsEXT =>
(ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Ordering)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT
-> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT
-> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> Ord ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Ordering
ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
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 :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$cmin :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
max :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$cmax :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
>= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c>= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
> :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c> :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
<= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c<= :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
< :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
$c< :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Bool
compare :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Ordering
$ccompare :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> Ordering
$cp1Ord :: Eq ToolPurposeFlagsEXT
Ord, Ptr b -> Int -> IO ToolPurposeFlagsEXT
Ptr b -> Int -> ToolPurposeFlagsEXT -> IO ()
Ptr ToolPurposeFlagsEXT -> IO ToolPurposeFlagsEXT
Ptr ToolPurposeFlagsEXT -> Int -> IO ToolPurposeFlagsEXT
Ptr ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT -> IO ()
Ptr ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ()
ToolPurposeFlagsEXT -> Int
(ToolPurposeFlagsEXT -> Int)
-> (ToolPurposeFlagsEXT -> Int)
-> (Ptr ToolPurposeFlagsEXT -> Int -> IO ToolPurposeFlagsEXT)
-> (Ptr ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO ToolPurposeFlagsEXT)
-> (forall b. Ptr b -> Int -> ToolPurposeFlagsEXT -> IO ())
-> (Ptr ToolPurposeFlagsEXT -> IO ToolPurposeFlagsEXT)
-> (Ptr ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ())
-> Storable ToolPurposeFlagsEXT
forall b. Ptr b -> Int -> IO ToolPurposeFlagsEXT
forall b. Ptr b -> Int -> ToolPurposeFlagsEXT -> 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 ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ()
$cpoke :: Ptr ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> IO ()
peek :: Ptr ToolPurposeFlagsEXT -> IO ToolPurposeFlagsEXT
$cpeek :: Ptr ToolPurposeFlagsEXT -> IO ToolPurposeFlagsEXT
pokeByteOff :: Ptr b -> Int -> ToolPurposeFlagsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ToolPurposeFlagsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO ToolPurposeFlagsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ToolPurposeFlagsEXT
pokeElemOff :: Ptr ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT -> IO ()
$cpokeElemOff :: Ptr ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT -> IO ()
peekElemOff :: Ptr ToolPurposeFlagsEXT -> Int -> IO ToolPurposeFlagsEXT
$cpeekElemOff :: Ptr ToolPurposeFlagsEXT -> Int -> IO ToolPurposeFlagsEXT
alignment :: ToolPurposeFlagsEXT -> Int
$calignment :: ToolPurposeFlagsEXT -> Int
sizeOf :: ToolPurposeFlagsEXT -> Int
$csizeOf :: ToolPurposeFlagsEXT -> Int
Storable, ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> Zero ToolPurposeFlagsEXT
forall a. a -> Zero a
zero :: ToolPurposeFlagsEXT
$czero :: ToolPurposeFlagsEXT
Zero, Eq ToolPurposeFlagsEXT
ToolPurposeFlagsEXT
Eq ToolPurposeFlagsEXT =>
(ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT
-> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT
-> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> ToolPurposeFlagsEXT
-> (Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> Bool)
-> (ToolPurposeFlagsEXT -> Maybe Int)
-> (ToolPurposeFlagsEXT -> Int)
-> (ToolPurposeFlagsEXT -> Bool)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT)
-> (ToolPurposeFlagsEXT -> Int)
-> Bits ToolPurposeFlagsEXT
Int -> ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> Bool
ToolPurposeFlagsEXT -> Int
ToolPurposeFlagsEXT -> Maybe Int
ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> Int -> Bool
ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
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 :: ToolPurposeFlagsEXT -> Int
$cpopCount :: ToolPurposeFlagsEXT -> Int
rotateR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$crotateR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
rotateL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$crotateL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
unsafeShiftR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cunsafeShiftR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
shiftR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cshiftR :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
unsafeShiftL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cunsafeShiftL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
shiftL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cshiftL :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
isSigned :: ToolPurposeFlagsEXT -> Bool
$cisSigned :: ToolPurposeFlagsEXT -> Bool
bitSize :: ToolPurposeFlagsEXT -> Int
$cbitSize :: ToolPurposeFlagsEXT -> Int
bitSizeMaybe :: ToolPurposeFlagsEXT -> Maybe Int
$cbitSizeMaybe :: ToolPurposeFlagsEXT -> Maybe Int
testBit :: ToolPurposeFlagsEXT -> Int -> Bool
$ctestBit :: ToolPurposeFlagsEXT -> Int -> Bool
complementBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$ccomplementBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
clearBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cclearBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
setBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$csetBit :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
bit :: Int -> ToolPurposeFlagsEXT
$cbit :: Int -> ToolPurposeFlagsEXT
zeroBits :: ToolPurposeFlagsEXT
$czeroBits :: ToolPurposeFlagsEXT
rotate :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$crotate :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
shift :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
$cshift :: ToolPurposeFlagsEXT -> Int -> ToolPurposeFlagsEXT
complement :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$ccomplement :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
xor :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$cxor :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
.|. :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$c.|. :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
.&. :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$c.&. :: ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT -> ToolPurposeFlagsEXT
$cp1Bits :: Eq ToolPurposeFlagsEXT
Bits, Bits ToolPurposeFlagsEXT
Bits ToolPurposeFlagsEXT =>
(ToolPurposeFlagsEXT -> Int)
-> (ToolPurposeFlagsEXT -> Int)
-> (ToolPurposeFlagsEXT -> Int)
-> FiniteBits ToolPurposeFlagsEXT
ToolPurposeFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ToolPurposeFlagsEXT -> Int
$ccountTrailingZeros :: ToolPurposeFlagsEXT -> Int
countLeadingZeros :: ToolPurposeFlagsEXT -> Int
$ccountLeadingZeros :: ToolPurposeFlagsEXT -> Int
finiteBitSize :: ToolPurposeFlagsEXT -> Int
$cfiniteBitSize :: ToolPurposeFlagsEXT -> Int
$cp1FiniteBits :: Bits ToolPurposeFlagsEXT
FiniteBits)
pattern $bTOOL_PURPOSE_VALIDATION_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_VALIDATION_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_VALIDATION_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000001
pattern $bTOOL_PURPOSE_PROFILING_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_PROFILING_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_PROFILING_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000002
pattern $bTOOL_PURPOSE_TRACING_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_TRACING_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_TRACING_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000004
pattern $bTOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000008
pattern $bTOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000010
pattern $bTOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000040
pattern $bTOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT :: ToolPurposeFlagsEXT
$mTOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT :: forall r. ToolPurposeFlagsEXT -> (Void# -> r) -> (Void# -> r) -> r
TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = ToolPurposeFlagBitsEXT 0x00000020
conNameToolPurposeFlagBitsEXT :: String
conNameToolPurposeFlagBitsEXT :: String
conNameToolPurposeFlagBitsEXT = "ToolPurposeFlagBitsEXT"
enumPrefixToolPurposeFlagBitsEXT :: String
enumPrefixToolPurposeFlagBitsEXT :: String
enumPrefixToolPurposeFlagBitsEXT = "TOOL_PURPOSE_"
showTableToolPurposeFlagBitsEXT :: [(ToolPurposeFlagBitsEXT, String)]
showTableToolPurposeFlagBitsEXT :: [(ToolPurposeFlagsEXT, String)]
showTableToolPurposeFlagBitsEXT =
[ (ToolPurposeFlagsEXT
TOOL_PURPOSE_VALIDATION_BIT_EXT , "VALIDATION_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_PROFILING_BIT_EXT , "PROFILING_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_TRACING_BIT_EXT , "TRACING_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT, "ADDITIONAL_FEATURES_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT , "MODIFYING_FEATURES_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT , "DEBUG_MARKERS_BIT_EXT")
, (ToolPurposeFlagsEXT
TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT , "DEBUG_REPORTING_BIT_EXT")
]
instance Show ToolPurposeFlagBitsEXT where
showsPrec :: Int -> ToolPurposeFlagsEXT -> ShowS
showsPrec = String
-> [(ToolPurposeFlagsEXT, String)]
-> String
-> (ToolPurposeFlagsEXT -> Word32)
-> (Word32 -> ShowS)
-> Int
-> ToolPurposeFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixToolPurposeFlagBitsEXT
[(ToolPurposeFlagsEXT, String)]
showTableToolPurposeFlagBitsEXT
String
conNameToolPurposeFlagBitsEXT
(\(ToolPurposeFlagBitsEXT x :: Word32
x) -> Word32
x)
(\x :: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)
instance Read ToolPurposeFlagBitsEXT where
readPrec :: ReadPrec ToolPurposeFlagsEXT
readPrec = String
-> [(ToolPurposeFlagsEXT, String)]
-> String
-> (Word32 -> ToolPurposeFlagsEXT)
-> ReadPrec ToolPurposeFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixToolPurposeFlagBitsEXT
[(ToolPurposeFlagsEXT, String)]
showTableToolPurposeFlagBitsEXT
String
conNameToolPurposeFlagBitsEXT
Word32 -> ToolPurposeFlagsEXT
ToolPurposeFlagBitsEXT
type EXT_TOOLING_INFO_SPEC_VERSION = 1
pattern EXT_TOOLING_INFO_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_TOOLING_INFO_SPEC_VERSION :: a
$mEXT_TOOLING_INFO_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_TOOLING_INFO_SPEC_VERSION = 1
type EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"
pattern EXT_TOOLING_INFO_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_TOOLING_INFO_EXTENSION_NAME :: a
$mEXT_TOOLING_INFO_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"