{-# language CPP #-}
-- | = Name
--
-- VK_EXT_tooling_info - device extension
--
-- == VK_EXT_tooling_info
--
-- [__Name String__]
--     @VK_EXT_tooling_info@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     246
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
-- [__Contact__]
--
--     -   Tobias Hector
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_EXT_tooling_info:%20&body=@tobski%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2018-11-05
--
-- [__Contributors__]
--
--     -   Rolando Caloca
--
--     -   Matthaeus Chajdas
--
--     -   Baldur Karlsson
--
--     -   Daniel Rakos
--
-- == Description
--
-- When an error occurs during application development, a common question
-- is \"What tools are actually running right now?\" This extension adds
-- the ability to query that information directly from the Vulkan
-- implementation.
--
-- Outdated versions of one tool might not play nicely with another, or
-- perhaps a tool is not actually running when it should have been. Trying
-- to figure that out can cause headaches as it is necessary to consult
-- each known tool to figure out what is going on — in some cases the tool
-- might not even be known.
--
-- Typically, the expectation is that developers will simply print out this
-- information for visual inspection when an issue occurs, however a small
-- amount of semantic information about what the tool is doing is provided
-- to help identify it programmatically. For example, if the advertised
-- limits or features of an implementation are unexpected, is there a tool
-- active which modifies these limits? Or if an application is providing
-- debug markers, but the implementation is not actually doing anything
-- with that information, this can quickly point that out.
--
-- == New Commands
--
-- -   'getPhysicalDeviceToolPropertiesEXT'
--
-- == New Structures
--
-- -   'PhysicalDeviceToolPropertiesEXT'
--
-- == New Enums
--
-- -   'ToolPurposeFlagBitsEXT'
--
-- == New Bitmasks
--
-- -   'ToolPurposeFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_TOOLING_INFO_EXTENSION_NAME'
--
-- -   'EXT_TOOLING_INFO_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_debug_marker VK_EXT_debug_marker>
-- is supported:
--
-- -   Extending 'ToolPurposeFlagBitsEXT':
--
--     -   'TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_debug_report VK_EXT_debug_report>
-- is supported:
--
-- -   Extending 'ToolPurposeFlagBitsEXT':
--
--     -   'TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_debug_utils VK_EXT_debug_utils>
-- is supported:
--
-- -   Extending 'ToolPurposeFlagBitsEXT':
--
--     -   'TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT'
--
--     -   'TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT'
--
-- == Examples
--
-- __Printing Tool Information__
--
-- > uint32_t num_tools;
-- > VkPhysicalDeviceToolPropertiesEXT *pToolProperties;
-- > vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, NULL);
-- >
-- > pToolProperties = (VkPhysicalDeviceToolPropertiesEXT*)malloc(sizeof(VkPhysicalDeviceToolPropertiesEXT) * num_tools);
-- >
-- > vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, pToolProperties);
-- >
-- > for (int i = 0; i < num_tools; ++i) {
-- >     printf("%s:\n", pToolProperties[i].name);
-- >     printf("Version:\n");
-- >     printf("%s:\n", pToolProperties[i].version);
-- >     printf("Description:\n");
-- >     printf("\t%s\n", pToolProperties[i].description);
-- >     printf("Purposes:\n");
-- >     printf("\t%s\n", VkToolPurposeFlagBitsEXT_to_string(pToolProperties[i].purposes));
-- >     if (strnlen_s(pToolProperties[i].layer,VK_MAX_EXTENSION_NAME_SIZE) > 0) {
-- >         printf("Corresponding Layer:\n");
-- >         printf("\t%s\n", pToolProperties[i].layer);
-- >     }
-- > }
--
-- == Issues
--
-- 1) Why is this information separate from the layer mechanism?
--
-- Some tooling may be built into a driver, or be part of the Vulkan loader
-- etc. - and so tying this information directly to layers would’ve been
-- awkward at best.
--
-- == Version History
--
-- -   Revision 1, 2018-11-05 (Tobias Hector)
--
--     -   Initial draft
--
-- = See Also
--
-- 'PhysicalDeviceToolPropertiesEXT', 'ToolPurposeFlagBitsEXT',
-- 'ToolPurposeFlagsEXT', 'getPhysicalDeviceToolPropertiesEXT'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_tooling_info Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_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

-- | vkGetPhysicalDeviceToolPropertiesEXT - Reports properties of tools
-- active on the specified physical device
--
-- = Description
--
-- If @pToolProperties@ is @NULL@, then the number of tools currently
-- active on @physicalDevice@ is returned in @pToolCount@. Otherwise,
-- @pToolCount@ /must/ point to a variable set by the user to the number of
-- elements in the @pToolProperties@ array, and on return the variable is
-- overwritten with the number of structures actually written to
-- @pToolProperties@. If @pToolCount@ is less than the number of currently
-- active tools, at most @pToolCount@ structures will be written.
--
-- The count and properties of active tools /may/ change in response to
-- events outside the scope of the specification. An application /should/
-- assume these properties might change at any given time.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceToolPropertiesEXT-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceToolPropertiesEXT-pToolCount-parameter#
--     @pToolCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceToolPropertiesEXT-pToolProperties-parameter#
--     If the value referenced by @pToolCount@ is not @0@, and
--     @pToolProperties@ is not @NULL@, @pToolProperties@ /must/ be a valid
--     pointer to an array of @pToolCount@
--     'PhysicalDeviceToolPropertiesEXT' structures
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
-- [<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'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.PhysicalDevice',
-- 'PhysicalDeviceToolPropertiesEXT'
getPhysicalDeviceToolPropertiesEXT :: forall io
                                    . (MonadIO io)
                                   => -- | @physicalDevice@ is the handle to the physical device to query for
                                      -- active tools.
                                      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')


-- | VkPhysicalDeviceToolPropertiesEXT - Structure providing information
-- about an active tool
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'ToolPurposeFlagsEXT', 'getPhysicalDeviceToolPropertiesEXT'
data PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolPropertiesEXT
  { -- | @name@ is a null-terminated UTF-8 string containing the name of the
    -- tool.
    PhysicalDeviceToolPropertiesEXT -> ByteString
name :: ByteString
  , -- | @version@ is a null-terminated UTF-8 string containing the version of
    -- the tool.
    PhysicalDeviceToolPropertiesEXT -> ByteString
version :: ByteString
  , -- | @purposes@ is a bitmask of 'ToolPurposeFlagBitsEXT' which is populated
    -- with purposes supported by the tool.
    PhysicalDeviceToolPropertiesEXT -> ToolPurposeFlagsEXT
purposes :: ToolPurposeFlagsEXT
  , -- | @description@ is a null-terminated UTF-8 string containing a description
    -- of the tool.
    PhysicalDeviceToolPropertiesEXT -> ByteString
description :: ByteString
  , -- | @layer@ is a null-terminated UTF-8 string that contains the name of the
    -- layer implementing the tool, if the tool is implemented in a layer -
    -- otherwise it /may/ be an empty string.
    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

-- | VkToolPurposeFlagBitsEXT - Bitmask specifying the purposes of an active
-- tool
--
-- = See Also
--
-- 'ToolPurposeFlagsEXT'
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)

-- | 'TOOL_PURPOSE_VALIDATION_BIT_EXT' specifies that the tool provides
-- validation of API usage.
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
-- | 'TOOL_PURPOSE_PROFILING_BIT_EXT' specifies that the tool provides
-- profiling of API usage.
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
-- | 'TOOL_PURPOSE_TRACING_BIT_EXT' specifies that the tool is capturing data
-- about the application’s API usage, including anything from simple
-- logging to capturing data for later replay.
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
-- | 'TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT' specifies that the tool
-- provides additional API features\/extensions on top of the underlying
-- implementation.
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
-- | 'TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT' specifies that the tool
-- modifies the API features\/limits\/extensions presented to the
-- application.
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
-- | 'TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT' specifies that the tool consumes
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-debug-markers debug markers>
-- or
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-object-debug-annotation object debug annotation>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-queue-labels queue labels>,
-- or
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-command-buffer-labels command buffer labels>
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
-- | 'TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT' specifies that the tool reports
-- additional information to the application via callbacks specified by
-- 'Vulkan.Extensions.VK_EXT_debug_report.createDebugReportCallbackEXT' or
-- 'Vulkan.Extensions.VK_EXT_debug_utils.createDebugUtilsMessengerEXT'
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

-- No documentation found for TopLevel "VK_EXT_TOOLING_INFO_SPEC_VERSION"
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"

-- No documentation found for TopLevel "VK_EXT_TOOLING_INFO_EXTENSION_NAME"
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"