{-# language CPP #-}
-- No documentation found for Chapter "DeviceInitialization"
module Vulkan.Core10.DeviceInitialization  ( createInstance
                                           , withInstance
                                           , destroyInstance
                                           , enumeratePhysicalDevices
                                           , getDeviceProcAddr
                                           , getInstanceProcAddr
                                           , getPhysicalDeviceProperties
                                           , getPhysicalDeviceQueueFamilyProperties
                                           , getPhysicalDeviceMemoryProperties
                                           , getPhysicalDeviceFeatures
                                           , getPhysicalDeviceFormatProperties
                                           , getPhysicalDeviceImageFormatProperties
                                           , PhysicalDeviceProperties(..)
                                           , ApplicationInfo(..)
                                           , InstanceCreateInfo(..)
                                           , QueueFamilyProperties(..)
                                           , PhysicalDeviceMemoryProperties(..)
                                           , MemoryType(..)
                                           , MemoryHeap(..)
                                           , FormatProperties(..)
                                           , ImageFormatProperties(..)
                                           , PhysicalDeviceFeatures(..)
                                           , PhysicalDeviceSparseProperties(..)
                                           , PhysicalDeviceLimits(..)
                                           , Instance(..)
                                           , PhysicalDevice(..)
                                           , AllocationCallbacks(..)
                                           , ImageType(..)
                                           , ImageTiling(..)
                                           , InternalAllocationType(..)
                                           , SystemAllocationScope(..)
                                           , PhysicalDeviceType(..)
                                           , Format(..)
                                           , QueueFlagBits(..)
                                           , QueueFlags
                                           , MemoryPropertyFlagBits(..)
                                           , MemoryPropertyFlags
                                           , MemoryHeapFlagBits(..)
                                           , MemoryHeapFlags
                                           , ImageUsageFlagBits(..)
                                           , ImageUsageFlags
                                           , ImageCreateFlagBits(..)
                                           , ImageCreateFlags
                                           , FormatFeatureFlagBits(..)
                                           , FormatFeatureFlags
                                           , SampleCountFlagBits(..)
                                           , SampleCountFlags
                                           , InstanceCreateFlagBits(..)
                                           , InstanceCreateFlags
                                           , FN_vkInternalAllocationNotification
                                           , PFN_vkInternalAllocationNotification
                                           , FN_vkInternalFreeNotification
                                           , PFN_vkInternalFreeNotification
                                           , FN_vkReallocationFunction
                                           , PFN_vkReallocationFunction
                                           , FN_vkAllocationFunction
                                           , PFN_vkAllocationFunction
                                           , FN_vkFreeFunction
                                           , PFN_vkFreeFunction
                                           , FN_vkVoidFunction
                                           , PFN_vkVoidFunction
                                           ) where

import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import Foreign.Ptr (castFunPtr)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Data.ByteString (packCString)
import Data.ByteString (useAsCString)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Foreign.C.Types (CChar(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(..))
import Foreign.C.Types (CSize(CSize))
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 Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Ptr (Ptr(Ptr))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
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.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Dynamic (getInstanceProcAddr')
import Vulkan.Dynamic (initInstanceCmds)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_debug_report (DebugReportCallbackCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_debug_utils (DebugUtilsMessengerCreateInfoEXT)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceProcAddr))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import {-# SOURCE #-} Vulkan.Extensions.VK_LUNARG_direct_driver_loading (DirectDriverLoadingListLUNARG)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_metal_objects (ExportMetalObjectCreateInfoEXT)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Extent3D)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.Format (Format(..))
import Vulkan.Core10.Enums.FormatFeatureFlagBits (FormatFeatureFlags)
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(..))
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)
import Vulkan.Core10.Enums.ImageTiling (ImageTiling)
import Vulkan.Core10.Enums.ImageTiling (ImageTiling(..))
import Vulkan.Core10.Enums.ImageType (ImageType)
import Vulkan.Core10.Enums.ImageType (ImageType(..))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(..))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Handles (Instance(Instance))
import Vulkan.Dynamic (InstanceCmds(pVkDestroyInstance))
import Vulkan.Dynamic (InstanceCmds(pVkEnumeratePhysicalDevices))
import Vulkan.Dynamic (InstanceCmds(pVkGetInstanceProcAddr))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceFeatures))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceFormatProperties))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceImageFormatProperties))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceMemoryProperties))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceProperties))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceQueueFamilyProperties))
import Vulkan.Core10.Enums.InstanceCreateFlagBits (InstanceCreateFlags)
import Vulkan.Core10.Handles (Instance_T)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_layer_settings (LayerSettingsCreateInfoEXT)
import Vulkan.Core10.APIConstants (MAX_MEMORY_HEAPS)
import Vulkan.Core10.APIConstants (MAX_MEMORY_TYPES)
import Vulkan.Core10.APIConstants (MAX_PHYSICAL_DEVICE_NAME_SIZE)
import Vulkan.Core10.Enums.MemoryHeapFlagBits (MemoryHeapFlags)
import Vulkan.Core10.Enums.MemoryPropertyFlagBits (MemoryPropertyFlags)
import Vulkan.Core10.FuncPointers (PFN_vkVoidFunction)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Enums.PhysicalDeviceType (PhysicalDeviceType)
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Enums.QueueFlagBits (QueueFlags)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.APIConstants (UUID_SIZE)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_validation_features (ValidationFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_validation_flags (ValidationFlagsEXT)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.APIConstants (pattern MAX_MEMORY_HEAPS)
import Vulkan.Core10.APIConstants (pattern MAX_MEMORY_TYPES)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_APPLICATION_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_INSTANCE_CREATE_INFO))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks(..))
import Vulkan.Core10.FuncPointers (FN_vkAllocationFunction)
import Vulkan.Core10.FuncPointers (FN_vkFreeFunction)
import Vulkan.Core10.FuncPointers (FN_vkInternalAllocationNotification)
import Vulkan.Core10.FuncPointers (FN_vkInternalFreeNotification)
import Vulkan.Core10.FuncPointers (FN_vkReallocationFunction)
import Vulkan.Core10.FuncPointers (FN_vkVoidFunction)
import Vulkan.Core10.Enums.Format (Format(..))
import Vulkan.Core10.Enums.FormatFeatureFlagBits (FormatFeatureFlagBits(..))
import Vulkan.Core10.Enums.FormatFeatureFlagBits (FormatFeatureFlags)
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(..))
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)
import Vulkan.Core10.Enums.ImageTiling (ImageTiling(..))
import Vulkan.Core10.Enums.ImageType (ImageType(..))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(..))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Enums.InstanceCreateFlagBits (InstanceCreateFlagBits(..))
import Vulkan.Core10.Enums.InstanceCreateFlagBits (InstanceCreateFlags)
import Vulkan.Core10.Enums.InternalAllocationType (InternalAllocationType(..))
import Vulkan.Core10.Enums.MemoryHeapFlagBits (MemoryHeapFlagBits(..))
import Vulkan.Core10.Enums.MemoryHeapFlagBits (MemoryHeapFlags)
import Vulkan.Core10.Enums.MemoryPropertyFlagBits (MemoryPropertyFlagBits(..))
import Vulkan.Core10.Enums.MemoryPropertyFlagBits (MemoryPropertyFlags)
import Vulkan.Core10.FuncPointers (PFN_vkAllocationFunction)
import Vulkan.Core10.FuncPointers (PFN_vkFreeFunction)
import Vulkan.Core10.FuncPointers (PFN_vkInternalAllocationNotification)
import Vulkan.Core10.FuncPointers (PFN_vkInternalFreeNotification)
import Vulkan.Core10.FuncPointers (PFN_vkReallocationFunction)
import Vulkan.Core10.FuncPointers (PFN_vkVoidFunction)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Enums.PhysicalDeviceType (PhysicalDeviceType(..))
import Vulkan.Core10.Enums.QueueFlagBits (QueueFlagBits(..))
import Vulkan.Core10.Enums.QueueFlagBits (QueueFlags)
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlags)
import Vulkan.Core10.Enums.SystemAllocationScope (SystemAllocationScope(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateInstance
  :: FunPtr (Ptr (SomeStruct InstanceCreateInfo) -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result) -> Ptr (SomeStruct InstanceCreateInfo) -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result

-- | vkCreateInstance - Create a new Vulkan instance
--
-- = Description
--
-- 'createInstance' verifies that the requested layers exist. If not,
-- 'createInstance' will return
-- 'Vulkan.Core10.Enums.Result.ERROR_LAYER_NOT_PRESENT'. Next
-- 'createInstance' verifies that the requested extensions are supported
-- (e.g. in the implementation or in any enabled instance layer) and if any
-- requested extension is not supported, 'createInstance' /must/ return
-- 'Vulkan.Core10.Enums.Result.ERROR_EXTENSION_NOT_PRESENT'. After
-- verifying and enabling the instance layers and extensions the
-- 'Vulkan.Core10.Handles.Instance' object is created and returned to the
-- application. If a requested extension is only supported by a layer, both
-- the layer and the extension need to be specified at 'createInstance'
-- time for the creation to succeed.
--
-- == Valid Usage
--
-- -   #VUID-vkCreateInstance-ppEnabledExtensionNames-01388# All
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#extendingvulkan-extensions-extensiondependencies required extensions>
--     for each extension in the
--     'InstanceCreateInfo'::@ppEnabledExtensionNames@ list /must/ also be
--     present in that list
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateInstance-pCreateInfo-parameter# @pCreateInfo@ /must/
--     be a valid pointer to a valid 'InstanceCreateInfo' structure
--
-- -   #VUID-vkCreateInstance-pAllocator-parameter# If @pAllocator@ is not
--     @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   #VUID-vkCreateInstance-pInstance-parameter# @pInstance@ /must/ be a
--     valid pointer to a 'Vulkan.Core10.Handles.Instance' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_EXTENSION_NOT_PRESENT'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INCOMPATIBLE_DRIVER'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_LAYER_NOT_PRESENT'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Instance', 'InstanceCreateInfo'
createInstance :: forall a io
                . (Extendss InstanceCreateInfo a, PokeChain a, MonadIO io)
               => -- | @pCreateInfo@ is a pointer to a 'InstanceCreateInfo' structure
                  -- controlling creation of the instance.
                  (InstanceCreateInfo a)
               -> -- | @pAllocator@ controls host memory allocation as described in the
                  -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-allocation Memory Allocation>
                  -- chapter.
                  ("allocator" ::: Maybe AllocationCallbacks)
               -> io (Instance)
createInstance :: forall (a :: [*]) (io :: * -> *).
(Extendss InstanceCreateInfo a, PokeChain a, MonadIO io) =>
InstanceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks) -> io Instance
createInstance InstanceCreateInfo a
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = IO Instance -> io Instance
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Instance -> io Instance)
-> (ContT Instance IO Instance -> IO Instance)
-> ContT Instance IO Instance
-> io Instance
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Instance IO Instance -> IO Instance
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Instance IO Instance -> io Instance)
-> ContT Instance IO Instance -> io Instance
forall a b. (a -> b) -> a -> b
$ do
  vkCreateInstancePtr <- IO
  (FunPtr
     (Ptr (SomeStruct InstanceCreateInfo)
      -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
-> ContT
     Instance
     IO
     (FunPtr
        (Ptr (SomeStruct InstanceCreateInfo)
         -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
forall (m :: * -> *) a. Monad m => m a -> ContT Instance m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO
   (FunPtr
      (Ptr (SomeStruct InstanceCreateInfo)
       -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
 -> ContT
      Instance
      IO
      (FunPtr
         (Ptr (SomeStruct InstanceCreateInfo)
          -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result)))
-> IO
     (FunPtr
        (Ptr (SomeStruct InstanceCreateInfo)
         -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
-> ContT
     Instance
     IO
     (FunPtr
        (Ptr (SomeStruct InstanceCreateInfo)
         -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
forall a b. (a -> b) -> a -> b
$ forall a b. FunPtr a -> FunPtr b
castFunPtr @_ @(("pCreateInfo" ::: Ptr (SomeStruct InstanceCreateInfo)) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pInstance" ::: Ptr (Ptr Instance_T)) -> IO Result) (FunPtr FN_vkVoidFunction
 -> FunPtr
      (Ptr (SomeStruct InstanceCreateInfo)
       -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
-> IO (FunPtr FN_vkVoidFunction)
-> IO
     (FunPtr
        (Ptr (SomeStruct InstanceCreateInfo)
         -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr Instance_T
-> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction)
getInstanceProcAddr' Ptr Instance_T
forall a. Ptr a
nullPtr (Addr# -> "pName" ::: Ptr CChar
forall a. Addr# -> Ptr a
Ptr Addr#
"vkCreateInstance"#)
  lift $ unless (vkCreateInstancePtr /= nullFunPtr) $
    throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkCreateInstance is null" Nothing Nothing
  let vkCreateInstance' = FunPtr
  (Ptr (SomeStruct InstanceCreateInfo)
   -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result)
-> Ptr (SomeStruct InstanceCreateInfo)
-> Ptr AllocationCallbacks
-> Ptr (Ptr Instance_T)
-> IO Result
mkVkCreateInstance FunPtr
  (Ptr (SomeStruct InstanceCreateInfo)
   -> Ptr AllocationCallbacks -> Ptr (Ptr Instance_T) -> IO Result)
vkCreateInstancePtr
  pCreateInfo <- ContT $ withCStruct (createInfo)
  pAllocator <- case (allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> Ptr AllocationCallbacks
-> ContT Instance IO (Ptr AllocationCallbacks)
forall a. a -> ContT Instance IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just AllocationCallbacks
j -> ((Ptr AllocationCallbacks -> IO Instance) -> IO Instance)
-> ContT Instance IO (Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AllocationCallbacks -> IO Instance) -> IO Instance)
 -> ContT Instance IO (Ptr AllocationCallbacks))
-> ((Ptr AllocationCallbacks -> IO Instance) -> IO Instance)
-> ContT Instance IO (Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (Ptr AllocationCallbacks -> IO Instance) -> IO Instance
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AllocationCallbacks -> (Ptr AllocationCallbacks -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  pPInstance <- ContT $ bracket (callocBytes @(Ptr Instance_T) 8) free
  r <- lift $ traceAroundEvent "vkCreateInstance" (vkCreateInstance'
                                                     (forgetExtensions pCreateInfo)
                                                     pAllocator
                                                     (pPInstance))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))
  pInstance <- lift $ peek @(Ptr Instance_T) pPInstance
  pInstance' <- lift $ (\Ptr Instance_T
h -> Ptr Instance_T -> InstanceCmds -> Instance
Instance Ptr Instance_T
h (InstanceCmds -> Instance) -> IO InstanceCmds -> IO Instance
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr Instance_T -> IO InstanceCmds
initInstanceCmds Ptr Instance_T
h) pInstance
  pure $ (pInstance')

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createInstance' and 'destroyInstance'
--
-- To ensure that 'destroyInstance' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the last argument.
-- To just extract the pair pass '(,)' as the last argument.
--
withInstance :: forall a io r . (Extendss InstanceCreateInfo a, PokeChain a, MonadIO io) => InstanceCreateInfo a -> Maybe AllocationCallbacks -> (io Instance -> (Instance -> io ()) -> r) -> r
withInstance :: forall (a :: [*]) (io :: * -> *) r.
(Extendss InstanceCreateInfo a, PokeChain a, MonadIO io) =>
InstanceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io Instance -> (Instance -> io ()) -> r)
-> r
withInstance InstanceCreateInfo a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io Instance -> (Instance -> io ()) -> r
b =
  io Instance -> (Instance -> io ()) -> r
b (InstanceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks) -> io Instance
forall (a :: [*]) (io :: * -> *).
(Extendss InstanceCreateInfo a, PokeChain a, MonadIO io) =>
InstanceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks) -> io Instance
createInstance InstanceCreateInfo a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
    (\(Instance
o0) -> Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
forall (io :: * -> *).
MonadIO io =>
Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyInstance Instance
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkDestroyInstance
  :: FunPtr (Ptr Instance_T -> Ptr AllocationCallbacks -> IO ()) -> Ptr Instance_T -> Ptr AllocationCallbacks -> IO ()

-- | vkDestroyInstance - Destroy an instance of Vulkan
--
-- = Description
--
-- Prior to destroying an instance, an application is responsible for
-- destroying\/freeing any Vulkan objects with explicit @vkDestroy*@ or
-- @vkFree*@ commands that were created using that instance, or any
-- 'Vulkan.Core10.Handles.PhysicalDevice' object retrieved from it, as the
-- first parameter of the corresponding @vkCreate*@ or @vkAllocate*@
-- command.
--
-- == Valid Usage
--
-- -   #VUID-vkDestroyInstance-instance-00629# All child objects that were
--     created with @instance@ or with a
--     'Vulkan.Core10.Handles.PhysicalDevice' retrieved from it, and that
--     /can/ be destroyed or freed, /must/ have been destroyed or freed
--     prior to destroying @instance@
--
-- -   #VUID-vkDestroyInstance-instance-00630# If
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' were
--     provided when @instance@ was created, a compatible set of callbacks
--     /must/ be provided here
--
-- -   #VUID-vkDestroyInstance-instance-00631# If no
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' were
--     provided when @instance@ was created, @pAllocator@ /must/ be @NULL@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkDestroyInstance-instance-parameter# If @instance@ is not
--     @NULL@, @instance@ /must/ be a valid
--     'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkDestroyInstance-pAllocator-parameter# If @pAllocator@ is not
--     @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- == Host Synchronization
--
-- -   Host access to @instance@ /must/ be externally synchronized
--
-- -   Host access to all 'Vulkan.Core10.Handles.PhysicalDevice' objects
--     enumerated from @instance@ /must/ be externally synchronized
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Instance'
destroyInstance :: forall io
                 . (MonadIO io)
                => -- | @instance@ is the handle of the instance to destroy.
                   Instance
                -> -- | @pAllocator@ controls host memory allocation as described in the
                   -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-allocation Memory Allocation>
                   -- chapter.
                   ("allocator" ::: Maybe AllocationCallbacks)
                -> io ()
destroyInstance :: forall (io :: * -> *).
MonadIO io =>
Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyInstance Instance
instance' "allocator" ::: Maybe AllocationCallbacks
allocator = FN_vkVoidFunction -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FN_vkVoidFunction -> io ())
-> (ContT () IO () -> FN_vkVoidFunction) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> FN_vkVoidFunction
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkDestroyInstancePtr :: FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
vkDestroyInstancePtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
pVkDestroyInstance (case Instance
instance' of Instance{InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds :: Instance -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT () IO ())
-> FN_vkVoidFunction -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
vkDestroyInstancePtr FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
-> FunPtr
     (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkDestroyInstance is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkDestroyInstance' :: Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction
vkDestroyInstance' = FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
-> Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction
mkVkDestroyInstance FunPtr
  (Ptr Instance_T -> Ptr AllocationCallbacks -> FN_vkVoidFunction)
vkDestroyInstancePtr
  pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> Ptr AllocationCallbacks -> ContT () IO (Ptr AllocationCallbacks)
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just AllocationCallbacks
j -> ((Ptr AllocationCallbacks -> FN_vkVoidFunction)
 -> FN_vkVoidFunction)
-> ContT () IO (Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AllocationCallbacks -> FN_vkVoidFunction)
  -> FN_vkVoidFunction)
 -> ContT () IO (Ptr AllocationCallbacks))
-> ((Ptr AllocationCallbacks -> FN_vkVoidFunction)
    -> FN_vkVoidFunction)
-> ContT () IO (Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (Ptr AllocationCallbacks -> FN_vkVoidFunction)
-> FN_vkVoidFunction
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AllocationCallbacks -> (Ptr AllocationCallbacks -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  lift $ traceAroundEvent "vkDestroyInstance" (vkDestroyInstance'
                                                 (instanceHandle (instance'))
                                                 pAllocator)
  pure $ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkEnumeratePhysicalDevices
  :: FunPtr (Ptr Instance_T -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result) -> Ptr Instance_T -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result

-- | vkEnumeratePhysicalDevices - Enumerates the physical devices accessible
-- to a Vulkan instance
--
-- = Description
--
-- If @pPhysicalDevices@ is @NULL@, then the number of physical devices
-- available is returned in @pPhysicalDeviceCount@. Otherwise,
-- @pPhysicalDeviceCount@ /must/ point to a variable set by the application
-- to the number of elements in the @pPhysicalDevices@ array, and on return
-- the variable is overwritten with the number of handles actually written
-- to @pPhysicalDevices@. If @pPhysicalDeviceCount@ is less than the number
-- of physical devices available, at most @pPhysicalDeviceCount@ structures
-- will be written, and 'Vulkan.Core10.Enums.Result.INCOMPLETE' will be
-- returned instead of 'Vulkan.Core10.Enums.Result.SUCCESS', to indicate
-- that not all the available physical devices were returned.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkEnumeratePhysicalDevices-instance-parameter# @instance@
--     /must/ be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter#
--     @pPhysicalDeviceCount@ /must/ be a valid pointer to a @uint32_t@
--     value
--
-- -   #VUID-vkEnumeratePhysicalDevices-pPhysicalDevices-parameter# If the
--     value referenced by @pPhysicalDeviceCount@ is not @0@, and
--     @pPhysicalDevices@ is not @NULL@, @pPhysicalDevices@ /must/ be a
--     valid pointer to an array of @pPhysicalDeviceCount@
--     'Vulkan.Core10.Handles.PhysicalDevice' handles
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.Instance', 'Vulkan.Core10.Handles.PhysicalDevice'
enumeratePhysicalDevices :: forall io
                          . (MonadIO io)
                         => -- | @instance@ is a handle to a Vulkan instance previously created with
                            -- 'createInstance'.
                            Instance
                         -> io (Result, ("physicalDevices" ::: Vector PhysicalDevice))
enumeratePhysicalDevices :: forall (io :: * -> *).
MonadIO io =>
Instance
-> io (Result, "physicalDevices" ::: Vector PhysicalDevice)
enumeratePhysicalDevices Instance
instance' = IO (Result, "physicalDevices" ::: Vector PhysicalDevice)
-> io (Result, "physicalDevices" ::: Vector PhysicalDevice)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "physicalDevices" ::: Vector PhysicalDevice)
 -> io (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> (ContT
      (Result, "physicalDevices" ::: Vector PhysicalDevice)
      IO
      (Result, "physicalDevices" ::: Vector PhysicalDevice)
    -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
     IO
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
-> io (Result, "physicalDevices" ::: Vector PhysicalDevice)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  (Result, "physicalDevices" ::: Vector PhysicalDevice)
  IO
  (Result, "physicalDevices" ::: Vector PhysicalDevice)
-> IO (Result, "physicalDevices" ::: Vector PhysicalDevice)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   (Result, "physicalDevices" ::: Vector PhysicalDevice)
   IO
   (Result, "physicalDevices" ::: Vector PhysicalDevice)
 -> io (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
     IO
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
-> io (Result, "physicalDevices" ::: Vector PhysicalDevice)
forall a b. (a -> b) -> a -> b
$ do
  let cmds :: InstanceCmds
cmds = case Instance
instance' of Instance{InstanceCmds
instanceCmds :: Instance -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds
  let vkEnumeratePhysicalDevicesPtr :: FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
vkEnumeratePhysicalDevicesPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
pVkEnumeratePhysicalDevices InstanceCmds
cmds
  FN_vkVoidFunction
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice) IO ()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT (Result, "physicalDevices" ::: Vector PhysicalDevice) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction
 -> ContT
      (Result, "physicalDevices" ::: Vector PhysicalDevice) IO ())
-> FN_vkVoidFunction
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
vkEnumeratePhysicalDevicesPtr FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkEnumeratePhysicalDevices is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkEnumeratePhysicalDevices' :: Ptr Instance_T
-> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result
vkEnumeratePhysicalDevices' = FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
-> Ptr Instance_T
-> Ptr Word32
-> Ptr (Ptr PhysicalDevice_T)
-> IO Result
mkVkEnumeratePhysicalDevices FunPtr
  (Ptr Instance_T
   -> Ptr Word32 -> Ptr (Ptr PhysicalDevice_T) -> IO Result)
vkEnumeratePhysicalDevicesPtr
  let instance'' :: Ptr Instance_T
instance'' = Instance -> Ptr Instance_T
instanceHandle (Instance
instance')
  pPPhysicalDeviceCount <- ((Ptr Word32
  -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
 -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
     IO
     (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32
   -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
  -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
 -> ContT
      (Result, "physicalDevices" ::: Vector PhysicalDevice)
      IO
      (Ptr Word32))
-> ((Ptr Word32
     -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
    -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> ContT
     (Result, "physicalDevices" ::: Vector PhysicalDevice)
     IO
     (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO (Ptr Word32)
-> (Ptr Word32 -> FN_vkVoidFunction)
-> (Ptr Word32
    -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice))
-> IO (Result, "physicalDevices" ::: Vector PhysicalDevice)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) Ptr Word32 -> FN_vkVoidFunction
forall a. Ptr a -> FN_vkVoidFunction
free
  r <- lift $ traceAroundEvent "vkEnumeratePhysicalDevices" (vkEnumeratePhysicalDevices'
                                                               instance''
                                                               (pPPhysicalDeviceCount)
                                                               (nullPtr))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))
  pPhysicalDeviceCount <- lift $ peek @Word32 pPPhysicalDeviceCount
  pPPhysicalDevices <- ContT $ bracket (callocBytes @(Ptr PhysicalDevice_T) ((fromIntegral (pPhysicalDeviceCount)) * 8)) free
  r' <- lift $ traceAroundEvent "vkEnumeratePhysicalDevices" (vkEnumeratePhysicalDevices'
                                                                instance''
                                                                (pPPhysicalDeviceCount)
                                                                (pPPhysicalDevices))
  lift $ when (r' < SUCCESS) (throwIO (VulkanException r'))
  pPhysicalDeviceCount' <- lift $ peek @Word32 pPPhysicalDeviceCount
  pPhysicalDevices' <- lift $ generateM (fromIntegral (pPhysicalDeviceCount')) (\Int
i -> do
    pPhysicalDevicesElem <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PhysicalDevice_T) ((Ptr (Ptr PhysicalDevice_T)
pPPhysicalDevices Ptr (Ptr PhysicalDevice_T) -> Int -> Ptr (Ptr PhysicalDevice_T)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr PhysicalDevice_T)))
    pure $ (\Ptr PhysicalDevice_T
h -> Ptr PhysicalDevice_T -> InstanceCmds -> PhysicalDevice
PhysicalDevice Ptr PhysicalDevice_T
h InstanceCmds
cmds ) pPhysicalDevicesElem)
  pure $ ((r'), pPhysicalDevices')


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetDeviceProcAddr
  :: FunPtr (Ptr Device_T -> Ptr CChar -> IO PFN_vkVoidFunction) -> Ptr Device_T -> Ptr CChar -> IO PFN_vkVoidFunction

-- | vkGetDeviceProcAddr - Return a function pointer for a command
--
-- = Description
--
-- The table below defines the various use cases for 'getDeviceProcAddr'
-- and expected return value (“fp” is “function pointer”) for each case. A
-- valid returned function pointer (“fp”) /must/ not be @NULL@.
--
-- The returned function pointer is of type
-- 'Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', and /must/ be cast to
-- the type of the command being queried before use. The function pointer
-- /must/ only be called with a dispatchable object (the first parameter)
-- that is @device@ or a child of @device@.
--
-- +------------------+------------------+------------------+
-- | @device@         | @pName@          | return value     |
-- +==================+==================+==================+
-- | @NULL@           | *1               | undefined        |
-- +------------------+------------------+------------------+
-- | invalid device   | *1               | undefined        |
-- +------------------+------------------+------------------+
-- | device           | @NULL@           | undefined        |
-- +------------------+------------------+------------------+
-- | device           | requested core   | fp4              |
-- |                  | version2         |                  |
-- |                  | device-level     |                  |
-- |                  | dispatchable     |                  |
-- |                  | command3         |                  |
-- +------------------+------------------+------------------+
-- | device           | enabled          | fp4              |
-- |                  | extension        |                  |
-- |                  | device-level     |                  |
-- |                  | dispatchable     |                  |
-- |                  | command3         |                  |
-- +------------------+------------------+------------------+
-- | any other case,  |                  | @NULL@           |
-- | not covered      |                  |                  |
-- | above            |                  |                  |
-- +------------------+------------------+------------------+
--
-- 'getDeviceProcAddr' behavior
--
-- [1]
--     \"*\" means any representable value for the parameter (including
--     valid values, invalid values, and @NULL@).
--
-- [2]
--     Device-level commands which are part of the core version specified
--     by 'ApplicationInfo'::@apiVersion@ when creating the instance will
--     always return a valid function pointer. If the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-maintenance5 maintenance5>
--     feature is enabled, core commands beyond that version which are
--     supported by the implementation will return @NULL@, otherwise the
--     implementation /may/ either return @NULL@ or a function pointer. If
--     a function pointer is returned, it /must/ not be called.
--
-- [3]
--     In this function, device-level excludes all physical-device-level
--     commands.
--
-- [4]
--     The returned function pointer /must/ only be called with a
--     dispatchable object (the first parameter) that is @device@ or a
--     child of @device@ e.g. 'Vulkan.Core10.Handles.Device',
--     'Vulkan.Core10.Handles.Queue', or
--     'Vulkan.Core10.Handles.CommandBuffer'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.FuncPointers.PFN_vkVoidFunction',
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.Device'
getDeviceProcAddr :: forall io
                   . (MonadIO io)
                  => -- | #VUID-vkGetDeviceProcAddr-device-parameter# @device@ /must/ be a valid
                     -- 'Vulkan.Core10.Handles.Device' handle
                     Device
                  -> -- | #VUID-vkGetDeviceProcAddr-pName-parameter# @pName@ /must/ be a
                     -- null-terminated UTF-8 string
                     ("name" ::: ByteString)
                  -> io (PFN_vkVoidFunction)
getDeviceProcAddr :: forall (io :: * -> *).
MonadIO io =>
Device -> ("name" ::: ByteString) -> io (FunPtr FN_vkVoidFunction)
getDeviceProcAddr Device
device "name" ::: ByteString
name = IO (FunPtr FN_vkVoidFunction) -> io (FunPtr FN_vkVoidFunction)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (FunPtr FN_vkVoidFunction) -> io (FunPtr FN_vkVoidFunction))
-> (ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
    -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> io (FunPtr FN_vkVoidFunction)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> IO (FunPtr FN_vkVoidFunction)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
 -> io (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> io (FunPtr FN_vkVoidFunction)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetDeviceProcAddrPtr :: FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetDeviceProcAddrPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
pVkGetDeviceProcAddr (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT (FunPtr FN_vkVoidFunction) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ())
-> FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetDeviceProcAddrPtr FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> FunPtr
     (Ptr Device_T
      -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetDeviceProcAddr is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetDeviceProcAddr' :: Ptr Device_T
-> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction)
vkGetDeviceProcAddr' = FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> Ptr Device_T
-> ("pName" ::: Ptr CChar)
-> IO (FunPtr FN_vkVoidFunction)
mkVkGetDeviceProcAddr FunPtr
  (Ptr Device_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetDeviceProcAddrPtr
  pName <- ((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
 -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
  -> IO (FunPtr FN_vkVoidFunction))
 -> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
    -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> IO (FunPtr FN_vkVoidFunction)
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
name)
  r <- lift $ traceAroundEvent "vkGetDeviceProcAddr" (vkGetDeviceProcAddr'
                                                        (deviceHandle (device))
                                                        pName)
  pure $ (r)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetInstanceProcAddr
  :: FunPtr (Ptr Instance_T -> Ptr CChar -> IO PFN_vkVoidFunction) -> Ptr Instance_T -> Ptr CChar -> IO PFN_vkVoidFunction

-- | vkGetInstanceProcAddr - Return a function pointer for a command
--
-- = Description
--
-- 'getInstanceProcAddr' itself is obtained in a platform- and loader-
-- specific manner. Typically, the loader library will export this command
-- as a function symbol, so applications /can/ link against the loader
-- library, or load it dynamically and look up the symbol using
-- platform-specific APIs.
--
-- The table below defines the various use cases for 'getInstanceProcAddr'
-- and expected return value (“fp” is “function pointer”) for each case. A
-- valid returned function pointer (“fp”) /must/ not be @NULL@.
--
-- The returned function pointer is of type
-- 'Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', and /must/ be cast to
-- the type of the command being queried before use.
--
-- +------------------+-----------------------+------------------+
-- | @instance@       | @pName@               | return value     |
-- +==================+=======================+==================+
-- | *1               | @NULL@                | undefined        |
-- +------------------+-----------------------+------------------+
-- | invalid          | *1                    | undefined        |
-- | non-@NULL@       |                       |                  |
-- | instance         |                       |                  |
-- +------------------+-----------------------+------------------+
-- | @NULL@           | /global command/2     | fp               |
-- +------------------+-----------------------+------------------+
-- | @NULL@           | 'getInstanceProcAddr' | fp5              |
-- +------------------+-----------------------+------------------+
-- | instance         | 'getInstanceProcAddr' | fp               |
-- +------------------+-----------------------+------------------+
-- | instance         | core /dispatchable    | fp3              |
-- |                  | command/              |                  |
-- +------------------+-----------------------+------------------+
-- | instance         | enabled instance      | fp3              |
-- |                  | extension             |                  |
-- |                  | dispatchable command  |                  |
-- |                  | for @instance@        |                  |
-- +------------------+-----------------------+------------------+
-- | instance         | available device      | fp3              |
-- |                  | extension4            |                  |
-- |                  | dispatchable command  |                  |
-- |                  | for @instance@        |                  |
-- +------------------+-----------------------+------------------+
-- | any other case,  |                       | @NULL@           |
-- | not covered      |                       |                  |
-- | above            |                       |                  |
-- +------------------+-----------------------+------------------+
--
-- 'getInstanceProcAddr' behavior
--
-- [1]
--     \"*\" means any representable value for the parameter (including
--     valid values, invalid values, and @NULL@).
--
-- [2]
--     The global commands are:
--     'Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion',
--     'Vulkan.Core10.ExtensionDiscovery.enumerateInstanceExtensionProperties',
--     'Vulkan.Core10.LayerDiscovery.enumerateInstanceLayerProperties', and
--     'createInstance'. Dispatchable commands are all other commands which
--     are not global.
--
-- [3]
--     The returned function pointer /must/ only be called with a
--     dispatchable object (the first parameter) that is @instance@ or a
--     child of @instance@, e.g. 'Vulkan.Core10.Handles.Instance',
--     'Vulkan.Core10.Handles.PhysicalDevice',
--     'Vulkan.Core10.Handles.Device', 'Vulkan.Core10.Handles.Queue', or
--     'Vulkan.Core10.Handles.CommandBuffer'.
--
-- [4]
--     An “available device extension” is a device extension supported by
--     any physical device enumerated by @instance@.
--
-- [5]
--     Starting with Vulkan 1.2, 'getInstanceProcAddr' can resolve itself
--     with a @NULL@ instance pointer.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetInstanceProcAddr-instance-parameter# If @instance@ is not
--     @NULL@, @instance@ /must/ be a valid
--     'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkGetInstanceProcAddr-pName-parameter# @pName@ /must/ be a
--     null-terminated UTF-8 string
--
-- = See Also
--
-- 'Vulkan.Core10.FuncPointers.PFN_vkVoidFunction',
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.Instance'
getInstanceProcAddr :: forall io
                     . (MonadIO io)
                    => -- | @instance@ is the instance that the function pointer will be compatible
                       -- with, or @NULL@ for commands not dependent on any instance.
                       Instance
                    -> -- | @pName@ is the name of the command to obtain.
                       ("name" ::: ByteString)
                    -> io (PFN_vkVoidFunction)
getInstanceProcAddr :: forall (io :: * -> *).
MonadIO io =>
Instance
-> ("name" ::: ByteString) -> io (FunPtr FN_vkVoidFunction)
getInstanceProcAddr Instance
instance' "name" ::: ByteString
name = IO (FunPtr FN_vkVoidFunction) -> io (FunPtr FN_vkVoidFunction)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (FunPtr FN_vkVoidFunction) -> io (FunPtr FN_vkVoidFunction))
-> (ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
    -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> io (FunPtr FN_vkVoidFunction)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> IO (FunPtr FN_vkVoidFunction)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
 -> io (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO (FunPtr FN_vkVoidFunction)
-> io (FunPtr FN_vkVoidFunction)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetInstanceProcAddrPtr :: FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetInstanceProcAddrPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
pVkGetInstanceProcAddr (case Instance
instance' of Instance{InstanceCmds
instanceCmds :: Instance -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT (FunPtr FN_vkVoidFunction) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ())
-> FN_vkVoidFunction -> ContT (FunPtr FN_vkVoidFunction) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetInstanceProcAddrPtr FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> FunPtr
     (Ptr Instance_T
      -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetInstanceProcAddr is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetInstanceProcAddr' :: Ptr Instance_T
-> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction)
vkGetInstanceProcAddr' = FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> Ptr Instance_T
-> ("pName" ::: Ptr CChar)
-> IO (FunPtr FN_vkVoidFunction)
mkVkGetInstanceProcAddr FunPtr
  (Ptr Instance_T
   -> ("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
vkGetInstanceProcAddrPtr
  pName <- ((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
 -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
  -> IO (FunPtr FN_vkVoidFunction))
 -> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
    -> IO (FunPtr FN_vkVoidFunction))
-> ContT (FunPtr FN_vkVoidFunction) IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO (FunPtr FN_vkVoidFunction))
-> IO (FunPtr FN_vkVoidFunction)
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
name)
  r <- lift $ traceAroundEvent "vkGetInstanceProcAddr" (vkGetInstanceProcAddr'
                                                          (instanceHandle (instance'))
                                                          pName)
  pure $ (r)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceProperties
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr PhysicalDeviceProperties -> IO ()) -> Ptr PhysicalDevice_T -> Ptr PhysicalDeviceProperties -> IO ()

-- | vkGetPhysicalDeviceProperties - Returns properties of a physical device
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.PhysicalDevice', 'PhysicalDeviceProperties'
getPhysicalDeviceProperties :: forall io
                             . (MonadIO io)
                            => -- | @physicalDevice@ is the handle to the physical device whose properties
                               -- will be queried.
                               --
                               -- #VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter#
                               -- @physicalDevice@ /must/ be a valid
                               -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                               PhysicalDevice
                            -> io (PhysicalDeviceProperties)
getPhysicalDeviceProperties :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> io PhysicalDeviceProperties
getPhysicalDeviceProperties PhysicalDevice
physicalDevice = IO PhysicalDeviceProperties -> io PhysicalDeviceProperties
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PhysicalDeviceProperties -> io PhysicalDeviceProperties)
-> (ContT PhysicalDeviceProperties IO PhysicalDeviceProperties
    -> IO PhysicalDeviceProperties)
-> ContT PhysicalDeviceProperties IO PhysicalDeviceProperties
-> io PhysicalDeviceProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT PhysicalDeviceProperties IO PhysicalDeviceProperties
-> IO PhysicalDeviceProperties
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT PhysicalDeviceProperties IO PhysicalDeviceProperties
 -> io PhysicalDeviceProperties)
-> ContT PhysicalDeviceProperties IO PhysicalDeviceProperties
-> io PhysicalDeviceProperties
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDevicePropertiesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
vkGetPhysicalDevicePropertiesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
pVkGetPhysicalDeviceProperties (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT PhysicalDeviceProperties IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT PhysicalDeviceProperties m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT PhysicalDeviceProperties IO ())
-> FN_vkVoidFunction -> ContT PhysicalDeviceProperties IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
vkGetPhysicalDevicePropertiesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceProperties is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceProperties' :: Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction
vkGetPhysicalDeviceProperties' = FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
-> Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceProperties
-> FN_vkVoidFunction
mkVkGetPhysicalDeviceProperties FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceProperties -> FN_vkVoidFunction)
vkGetPhysicalDevicePropertiesPtr
  pPProperties <- ((Ptr PhysicalDeviceProperties -> IO PhysicalDeviceProperties)
 -> IO PhysicalDeviceProperties)
-> ContT PhysicalDeviceProperties IO (Ptr PhysicalDeviceProperties)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PhysicalDeviceProperties)
  lift $ traceAroundEvent "vkGetPhysicalDeviceProperties" (vkGetPhysicalDeviceProperties'
                                                             (physicalDeviceHandle (physicalDevice))
                                                             (pPProperties))
  pProperties <- lift $ peekCStruct @PhysicalDeviceProperties pPProperties
  pure $ (pProperties)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceQueueFamilyProperties
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr QueueFamilyProperties -> IO ()) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr QueueFamilyProperties -> IO ()

-- | vkGetPhysicalDeviceQueueFamilyProperties - Reports properties of the
-- queues of the specified physical device
--
-- = Description
--
-- If @pQueueFamilyProperties@ is @NULL@, then the number of queue families
-- available is returned in @pQueueFamilyPropertyCount@. Implementations
-- /must/ support at least one queue family. Otherwise,
-- @pQueueFamilyPropertyCount@ /must/ point to a variable set by the
-- application to the number of elements in the @pQueueFamilyProperties@
-- array, and on return the variable is overwritten with the number of
-- structures actually written to @pQueueFamilyProperties@. If
-- @pQueueFamilyPropertyCount@ is less than the number of queue families
-- available, at most @pQueueFamilyPropertyCount@ structures will be
-- written.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyPropertyCount-parameter#
--     @pQueueFamilyPropertyCount@ /must/ be a valid pointer to a
--     @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyProperties-parameter#
--     If the value referenced by @pQueueFamilyPropertyCount@ is not @0@,
--     and @pQueueFamilyProperties@ is not @NULL@, @pQueueFamilyProperties@
--     /must/ be a valid pointer to an array of @pQueueFamilyPropertyCount@
--     'QueueFamilyProperties' structures
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.PhysicalDevice', 'QueueFamilyProperties'
getPhysicalDeviceQueueFamilyProperties :: forall io
                                        . (MonadIO io)
                                       => -- | @physicalDevice@ is the handle to the physical device whose properties
                                          -- will be queried.
                                          PhysicalDevice
                                       -> io (("queueFamilyProperties" ::: Vector QueueFamilyProperties))
getPhysicalDeviceQueueFamilyProperties :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
getPhysicalDeviceQueueFamilyProperties PhysicalDevice
physicalDevice = IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
-> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
 -> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> (ContT
      ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
      IO
      ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
     IO
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
-> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
  IO
  ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
   IO
   ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
 -> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
     IO
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
-> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceQueueFamilyPropertiesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceQueueFamilyPropertiesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
pVkGetPhysicalDeviceQueueFamilyProperties (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction
 -> ContT
      ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ())
-> FN_vkVoidFunction
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceQueueFamilyPropertiesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceQueueFamilyProperties is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceQueueFamilyProperties' :: Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction
vkGetPhysicalDeviceQueueFamilyProperties' = FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
-> Ptr PhysicalDevice_T
-> Ptr Word32
-> Ptr QueueFamilyProperties
-> FN_vkVoidFunction
mkVkGetPhysicalDeviceQueueFamilyProperties FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32 -> Ptr QueueFamilyProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceQueueFamilyPropertiesPtr
  let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
  pPQueueFamilyPropertyCount <- ((Ptr Word32
  -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
 -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
     IO
     (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32
   -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
  -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
 -> ContT
      ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
      IO
      (Ptr Word32))
-> ((Ptr Word32
     -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
     IO
     (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO (Ptr Word32)
-> (Ptr Word32 -> FN_vkVoidFunction)
-> (Ptr Word32
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) Ptr Word32 -> FN_vkVoidFunction
forall a. Ptr a -> FN_vkVoidFunction
free
  lift $ traceAroundEvent "vkGetPhysicalDeviceQueueFamilyProperties" (vkGetPhysicalDeviceQueueFamilyProperties'
                                                                        physicalDevice'
                                                                        (pPQueueFamilyPropertyCount)
                                                                        (nullPtr))
  pQueueFamilyPropertyCount <- lift $ peek @Word32 pPQueueFamilyPropertyCount
  pPQueueFamilyProperties <- ContT $ bracket (callocBytes @QueueFamilyProperties ((fromIntegral (pQueueFamilyPropertyCount)) * 24)) free
  _ <- traverse (\Int
i -> ((()
  -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
 -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
   -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
  -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
 -> ContT
      ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ())
-> ((()
     -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ContT
     ("queueFamilyProperties" ::: Vector QueueFamilyProperties) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr QueueFamilyProperties
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall b. Ptr QueueFamilyProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct (Ptr QueueFamilyProperties
pPQueueFamilyProperties Ptr QueueFamilyProperties -> Int -> Ptr QueueFamilyProperties
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
24) :: Ptr QueueFamilyProperties) (IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
 -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ((()
     -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> (()
    -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
 -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties))
-> ()
-> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
forall a b. (a -> b) -> a -> b
$ ())) [0..(fromIntegral (pQueueFamilyPropertyCount)) - 1]
  lift $ traceAroundEvent "vkGetPhysicalDeviceQueueFamilyProperties" (vkGetPhysicalDeviceQueueFamilyProperties'
                                                                        physicalDevice'
                                                                        (pPQueueFamilyPropertyCount)
                                                                        ((pPQueueFamilyProperties)))
  pQueueFamilyPropertyCount' <- lift $ peek @Word32 pPQueueFamilyPropertyCount
  pQueueFamilyProperties' <- lift $ generateM (fromIntegral (pQueueFamilyPropertyCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @QueueFamilyProperties (((Ptr QueueFamilyProperties
pPQueueFamilyProperties) Ptr QueueFamilyProperties -> Int -> Ptr QueueFamilyProperties
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
24 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr QueueFamilyProperties)))
  pure $ (pQueueFamilyProperties')


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceMemoryProperties
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr PhysicalDeviceMemoryProperties -> IO ()) -> Ptr PhysicalDevice_T -> Ptr PhysicalDeviceMemoryProperties -> IO ()

-- | vkGetPhysicalDeviceMemoryProperties - Reports memory information for the
-- specified physical device
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.PhysicalDevice', 'PhysicalDeviceMemoryProperties'
getPhysicalDeviceMemoryProperties :: forall io
                                   . (MonadIO io)
                                  => -- | @physicalDevice@ is the handle to the device to query.
                                     --
                                     -- #VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter#
                                     -- @physicalDevice@ /must/ be a valid
                                     -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                                     PhysicalDevice
                                  -> io (PhysicalDeviceMemoryProperties)
getPhysicalDeviceMemoryProperties :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> io PhysicalDeviceMemoryProperties
getPhysicalDeviceMemoryProperties PhysicalDevice
physicalDevice = IO PhysicalDeviceMemoryProperties
-> io PhysicalDeviceMemoryProperties
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PhysicalDeviceMemoryProperties
 -> io PhysicalDeviceMemoryProperties)
-> (ContT
      PhysicalDeviceMemoryProperties IO PhysicalDeviceMemoryProperties
    -> IO PhysicalDeviceMemoryProperties)
-> ContT
     PhysicalDeviceMemoryProperties IO PhysicalDeviceMemoryProperties
-> io PhysicalDeviceMemoryProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  PhysicalDeviceMemoryProperties IO PhysicalDeviceMemoryProperties
-> IO PhysicalDeviceMemoryProperties
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   PhysicalDeviceMemoryProperties IO PhysicalDeviceMemoryProperties
 -> io PhysicalDeviceMemoryProperties)
-> ContT
     PhysicalDeviceMemoryProperties IO PhysicalDeviceMemoryProperties
-> io PhysicalDeviceMemoryProperties
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceMemoryPropertiesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceMemoryPropertiesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
pVkGetPhysicalDeviceMemoryProperties (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT PhysicalDeviceMemoryProperties IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT PhysicalDeviceMemoryProperties m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT PhysicalDeviceMemoryProperties IO ())
-> FN_vkVoidFunction -> ContT PhysicalDeviceMemoryProperties IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceMemoryPropertiesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceMemoryProperties is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceMemoryProperties' :: Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction
vkGetPhysicalDeviceMemoryProperties' = FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
-> Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceMemoryProperties
-> FN_vkVoidFunction
mkVkGetPhysicalDeviceMemoryProperties FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceMemoryProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceMemoryPropertiesPtr
  pPMemoryProperties <- ((Ptr PhysicalDeviceMemoryProperties
  -> IO PhysicalDeviceMemoryProperties)
 -> IO PhysicalDeviceMemoryProperties)
-> ContT
     PhysicalDeviceMemoryProperties
     IO
     (Ptr PhysicalDeviceMemoryProperties)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PhysicalDeviceMemoryProperties)
  lift $ traceAroundEvent "vkGetPhysicalDeviceMemoryProperties" (vkGetPhysicalDeviceMemoryProperties'
                                                                   (physicalDeviceHandle (physicalDevice))
                                                                   (pPMemoryProperties))
  pMemoryProperties <- lift $ peekCStruct @PhysicalDeviceMemoryProperties pPMemoryProperties
  pure $ (pMemoryProperties)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceFeatures
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr PhysicalDeviceFeatures -> IO ()) -> Ptr PhysicalDevice_T -> Ptr PhysicalDeviceFeatures -> IO ()

-- | vkGetPhysicalDeviceFeatures - Reports capabilities of a physical device
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.PhysicalDevice', 'PhysicalDeviceFeatures'
getPhysicalDeviceFeatures :: forall io
                           . (MonadIO io)
                          => -- | @physicalDevice@ is the physical device from which to query the
                             -- supported features.
                             --
                             -- #VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter#
                             -- @physicalDevice@ /must/ be a valid
                             -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                             PhysicalDevice
                          -> io (PhysicalDeviceFeatures)
getPhysicalDeviceFeatures :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> io PhysicalDeviceFeatures
getPhysicalDeviceFeatures PhysicalDevice
physicalDevice = IO PhysicalDeviceFeatures -> io PhysicalDeviceFeatures
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PhysicalDeviceFeatures -> io PhysicalDeviceFeatures)
-> (ContT PhysicalDeviceFeatures IO PhysicalDeviceFeatures
    -> IO PhysicalDeviceFeatures)
-> ContT PhysicalDeviceFeatures IO PhysicalDeviceFeatures
-> io PhysicalDeviceFeatures
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT PhysicalDeviceFeatures IO PhysicalDeviceFeatures
-> IO PhysicalDeviceFeatures
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT PhysicalDeviceFeatures IO PhysicalDeviceFeatures
 -> io PhysicalDeviceFeatures)
-> ContT PhysicalDeviceFeatures IO PhysicalDeviceFeatures
-> io PhysicalDeviceFeatures
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceFeaturesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
vkGetPhysicalDeviceFeaturesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
pVkGetPhysicalDeviceFeatures (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT PhysicalDeviceFeatures IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT PhysicalDeviceFeatures m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT PhysicalDeviceFeatures IO ())
-> FN_vkVoidFunction -> ContT PhysicalDeviceFeatures IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
vkGetPhysicalDeviceFeaturesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceFeatures is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceFeatures' :: Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction
vkGetPhysicalDeviceFeatures' = FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
-> Ptr PhysicalDevice_T
-> Ptr PhysicalDeviceFeatures
-> FN_vkVoidFunction
mkVkGetPhysicalDeviceFeatures FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr PhysicalDeviceFeatures -> FN_vkVoidFunction)
vkGetPhysicalDeviceFeaturesPtr
  pPFeatures <- ((Ptr PhysicalDeviceFeatures -> IO PhysicalDeviceFeatures)
 -> IO PhysicalDeviceFeatures)
-> ContT PhysicalDeviceFeatures IO (Ptr PhysicalDeviceFeatures)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @PhysicalDeviceFeatures)
  lift $ traceAroundEvent "vkGetPhysicalDeviceFeatures" (vkGetPhysicalDeviceFeatures'
                                                           (physicalDeviceHandle (physicalDevice))
                                                           (pPFeatures))
  pFeatures <- lift $ peekCStruct @PhysicalDeviceFeatures pPFeatures
  pure $ (pFeatures)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceFormatProperties
  :: FunPtr (Ptr PhysicalDevice_T -> Format -> Ptr FormatProperties -> IO ()) -> Ptr PhysicalDevice_T -> Format -> Ptr FormatProperties -> IO ()

-- | vkGetPhysicalDeviceFormatProperties - Lists physical device’s format
-- capabilities
--
-- == Valid Usage
--
-- -   #VUID-vkGetPhysicalDeviceFormatProperties-None-12272# If Vulkan 1.3
--     is not supported, the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-maintenance5 maintenance5>
--     feature is not supported, and the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-ycbcr2plane444Formats ycbcr2plane444Formats>
--     feature is not supported, @format@ /must/ not be
--     'Vulkan.Core10.Enums.Format.FORMAT_G8_B8R8_2PLANE_444_UNORM',
--     'Vulkan.Core10.Enums.Format.FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16',
--     'Vulkan.Core10.Enums.Format.FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16',
--     or 'Vulkan.Core10.Enums.Format.FORMAT_G16_B16R16_2PLANE_444_UNORM'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceFormatProperties-format-parameter# @format@
--     /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-vkGetPhysicalDeviceFormatProperties-pFormatProperties-parameter#
--     @pFormatProperties@ /must/ be a valid pointer to a
--     'FormatProperties' structure
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.Format.Format', 'FormatProperties',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceFormatProperties :: forall io
                                   . (MonadIO io)
                                  => -- | @physicalDevice@ is the physical device from which to query the format
                                     -- properties.
                                     PhysicalDevice
                                  -> -- | @format@ is the format whose properties are queried.
                                     Format
                                  -> io (FormatProperties)
getPhysicalDeviceFormatProperties :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> Format -> io FormatProperties
getPhysicalDeviceFormatProperties PhysicalDevice
physicalDevice
                                    Format
format = IO FormatProperties -> io FormatProperties
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormatProperties -> io FormatProperties)
-> (ContT FormatProperties IO FormatProperties
    -> IO FormatProperties)
-> ContT FormatProperties IO FormatProperties
-> io FormatProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT FormatProperties IO FormatProperties -> IO FormatProperties
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT FormatProperties IO FormatProperties -> io FormatProperties)
-> ContT FormatProperties IO FormatProperties
-> io FormatProperties
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceFormatPropertiesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceFormatPropertiesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
pVkGetPhysicalDeviceFormatProperties (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT FormatProperties IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT FormatProperties m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT FormatProperties IO ())
-> FN_vkVoidFunction -> ContT FormatProperties IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceFormatPropertiesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceFormatProperties is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceFormatProperties' :: Ptr PhysicalDevice_T
-> Format -> Ptr FormatProperties -> FN_vkVoidFunction
vkGetPhysicalDeviceFormatProperties' = FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
-> Ptr PhysicalDevice_T
-> Format
-> Ptr FormatProperties
-> FN_vkVoidFunction
mkVkGetPhysicalDeviceFormatProperties FunPtr
  (Ptr PhysicalDevice_T
   -> Format -> Ptr FormatProperties -> FN_vkVoidFunction)
vkGetPhysicalDeviceFormatPropertiesPtr
  pPFormatProperties <- ((Ptr FormatProperties -> IO FormatProperties)
 -> IO FormatProperties)
-> ContT FormatProperties IO (Ptr FormatProperties)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @FormatProperties)
  lift $ traceAroundEvent "vkGetPhysicalDeviceFormatProperties" (vkGetPhysicalDeviceFormatProperties'
                                                                   (physicalDeviceHandle (physicalDevice))
                                                                   (format)
                                                                   (pPFormatProperties))
  pFormatProperties <- lift $ peekCStruct @FormatProperties pPFormatProperties
  pure $ (pFormatProperties)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceImageFormatProperties
  :: FunPtr (Ptr PhysicalDevice_T -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> Ptr ImageFormatProperties -> IO Result) -> Ptr PhysicalDevice_T -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> Ptr ImageFormatProperties -> IO Result

-- | vkGetPhysicalDeviceImageFormatProperties - Lists physical device’s image
-- format capabilities
--
-- = Description
--
-- The @format@, @type@, @tiling@, @usage@, and @flags@ parameters
-- correspond to parameters that would be consumed by
-- 'Vulkan.Core10.Image.createImage' (as members of
-- 'Vulkan.Core10.Image.ImageCreateInfo').
--
-- If @format@ is not a supported image format, or if the combination of
-- @format@, @type@, @tiling@, @usage@, and @flags@ is not supported for
-- images, then 'getPhysicalDeviceImageFormatProperties' returns
-- 'Vulkan.Core10.Enums.Result.ERROR_FORMAT_NOT_SUPPORTED'.
--
-- The limitations on an image format that are reported by
-- 'getPhysicalDeviceImageFormatProperties' have the following property: if
-- @usage1@ and @usage2@ of type
-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags' are such that
-- the bits set in @usage1@ are a subset of the bits set in @usage2@, and
-- @flags1@ and @flags2@ of type
-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlags' are such that
-- the bits set in @flags1@ are a subset of the bits set in @flags2@, then
-- the limitations for @usage1@ and @flags1@ /must/ be no more strict than
-- the limitations for @usage2@ and @flags2@, for all values of @format@,
-- @type@, and @tiling@.
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-hostImageCopy hostImageCopy>
-- feature is supported, and:
--
-- Then the result of calls to 'getPhysicalDeviceImageFormatProperties'
-- with identical parameters except for the inclusion of
-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_HOST_TRANSFER_BIT'
-- in @usage@ /must/ be identical.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_FORMAT_NOT_SUPPORTED'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.Format.Format',
-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlags',
-- 'ImageFormatProperties', 'Vulkan.Core10.Enums.ImageTiling.ImageTiling',
-- 'Vulkan.Core10.Enums.ImageType.ImageType',
-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceImageFormatProperties :: forall io
                                        . (MonadIO io)
                                       => -- | @physicalDevice@ is the physical device from which to query the image
                                          -- capabilities.
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter#
                                          -- @physicalDevice@ /must/ be a valid
                                          -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                                          PhysicalDevice
                                       -> -- | @format@ is a 'Vulkan.Core10.Enums.Format.Format' value specifying the
                                          -- image format, corresponding to
                                          -- 'Vulkan.Core10.Image.ImageCreateInfo'::@format@.
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-format-parameter#
                                          -- @format@ /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
                                          Format
                                       -> -- | @type@ is a 'Vulkan.Core10.Enums.ImageType.ImageType' value specifying
                                          -- the image type, corresponding to
                                          -- 'Vulkan.Core10.Image.ImageCreateInfo'::@imageType@.
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-type-parameter# @type@
                                          -- /must/ be a valid 'Vulkan.Core10.Enums.ImageType.ImageType' value
                                          ImageType
                                       -> -- | @tiling@ is a 'Vulkan.Core10.Enums.ImageTiling.ImageTiling' value
                                          -- specifying the image tiling, corresponding to
                                          -- 'Vulkan.Core10.Image.ImageCreateInfo'::@tiling@.
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-02248# @tiling@
                                          -- /must/ not be
                                          -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT'.
                                          -- (Use
                                          -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'
                                          -- instead)
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-parameter#
                                          -- @tiling@ /must/ be a valid 'Vulkan.Core10.Enums.ImageTiling.ImageTiling'
                                          -- value
                                          ImageTiling
                                       -> -- | @usage@ is a bitmask of
                                          -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits' specifying
                                          -- the intended usage of the image, corresponding to
                                          -- 'Vulkan.Core10.Image.ImageCreateInfo'::@usage@.
                                          --
                                          -- @usage@ includes
                                          -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT', and
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-usage-parameter# @usage@
                                          -- /must/ be a valid combination of
                                          -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits' values
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask#
                                          -- @usage@ /must/ not be @0@
                                          ImageUsageFlags
                                       -> -- | @flags@ is a bitmask of
                                          -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' specifying
                                          -- additional parameters of the image, corresponding to
                                          -- 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@.
                                          --
                                          -- @flags@ does not include any of
                                          -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT',
                                          -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT',
                                          -- or
                                          -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT'
                                          --
                                          -- #VUID-vkGetPhysicalDeviceImageFormatProperties-flags-parameter# @flags@
                                          -- /must/ be a valid combination of
                                          -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' values
                                          ImageCreateFlags
                                       -> io (ImageFormatProperties)
getPhysicalDeviceImageFormatProperties :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> io ImageFormatProperties
getPhysicalDeviceImageFormatProperties PhysicalDevice
physicalDevice
                                         Format
format
                                         ImageType
type'
                                         ImageTiling
tiling
                                         ImageUsageFlags
usage
                                         ImageCreateFlags
flags = IO ImageFormatProperties -> io ImageFormatProperties
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ImageFormatProperties -> io ImageFormatProperties)
-> (ContT ImageFormatProperties IO ImageFormatProperties
    -> IO ImageFormatProperties)
-> ContT ImageFormatProperties IO ImageFormatProperties
-> io ImageFormatProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ImageFormatProperties IO ImageFormatProperties
-> IO ImageFormatProperties
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ImageFormatProperties IO ImageFormatProperties
 -> io ImageFormatProperties)
-> ContT ImageFormatProperties IO ImageFormatProperties
-> io ImageFormatProperties
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceImageFormatPropertiesPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
vkGetPhysicalDeviceImageFormatPropertiesPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Format
      -> ImageType
      -> ImageTiling
      -> ImageUsageFlags
      -> ImageCreateFlags
      -> Ptr ImageFormatProperties
      -> IO Result)
pVkGetPhysicalDeviceImageFormatProperties (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  FN_vkVoidFunction -> ContT ImageFormatProperties IO ()
forall (m :: * -> *) a.
Monad m =>
m a -> ContT ImageFormatProperties m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT ImageFormatProperties IO ())
-> FN_vkVoidFunction -> ContT ImageFormatProperties IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
vkGetPhysicalDeviceImageFormatPropertiesPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Format
      -> ImageType
      -> ImageTiling
      -> ImageUsageFlags
      -> ImageCreateFlags
      -> Ptr ImageFormatProperties
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
    IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"The function pointer for vkGetPhysicalDeviceImageFormatProperties is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceImageFormatProperties' :: Ptr PhysicalDevice_T
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> Ptr ImageFormatProperties
-> IO Result
vkGetPhysicalDeviceImageFormatProperties' = FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
-> Ptr PhysicalDevice_T
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> Ptr ImageFormatProperties
-> IO Result
mkVkGetPhysicalDeviceImageFormatProperties FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> Ptr ImageFormatProperties
   -> IO Result)
vkGetPhysicalDeviceImageFormatPropertiesPtr
  pPImageFormatProperties <- ((Ptr ImageFormatProperties -> IO ImageFormatProperties)
 -> IO ImageFormatProperties)
-> ContT ImageFormatProperties IO (Ptr ImageFormatProperties)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @ImageFormatProperties)
  r <- lift $ traceAroundEvent "vkGetPhysicalDeviceImageFormatProperties" (vkGetPhysicalDeviceImageFormatProperties'
                                                                             (physicalDeviceHandle (physicalDevice))
                                                                             (format)
                                                                             (type')
                                                                             (tiling)
                                                                             (usage)
                                                                             (flags)
                                                                             (pPImageFormatProperties))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))
  pImageFormatProperties <- lift $ peekCStruct @ImageFormatProperties pPImageFormatProperties
  pure $ (pImageFormatProperties)


-- | VkPhysicalDeviceProperties - Structure specifying physical device
-- properties
--
-- = Description
--
-- The value of @apiVersion@ /may/ be different than the version returned
-- by 'Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion'; either
-- higher or lower. In such cases, the application /must/ not use
-- functionality that exceeds the version of Vulkan associated with a given
-- object. The @pApiVersion@ parameter returned by
-- 'Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion' is the
-- version associated with a 'Vulkan.Core10.Handles.Instance' and its
-- children, except for a 'Vulkan.Core10.Handles.PhysicalDevice' and its
-- children. 'PhysicalDeviceProperties'::@apiVersion@ is the version
-- associated with a 'Vulkan.Core10.Handles.PhysicalDevice' and its
-- children.
--
-- The encoding of @driverVersion@ is implementation-defined. It /may/ not
-- use the same encoding as @apiVersion@. Applications should follow
-- information from the /vendor/ on how to extract the version information
-- from @driverVersion@.
--
-- On implementations that claim support for the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#roadmap-2022 Roadmap 2022>
-- profile, the major and minor version expressed by @apiVersion@ /must/ be
-- at least Vulkan 1.3.
--
-- The @vendorID@ and @deviceID@ fields are provided to allow applications
-- to adapt to device characteristics that are not adequately exposed by
-- other Vulkan queries.
--
-- These /may/ include performance profiles, hardware errata, or other
-- characteristics.
--
-- The /vendor/ identified by @vendorID@ is the entity responsible for the
-- most salient characteristics of the underlying implementation of the
-- 'Vulkan.Core10.Handles.PhysicalDevice' being queried.
--
-- For example, in the case of a discrete GPU implementation, this /should/
-- be the GPU chipset vendor. In the case of a hardware accelerator
-- integrated into a system-on-chip (SoC), this /should/ be the supplier of
-- the silicon IP used to create the accelerator.
--
-- If the vendor has a
-- <https://pcisig.com/membership/member-companies PCI vendor ID>, the low
-- 16 bits of @vendorID@ /must/ contain that PCI vendor ID, and the
-- remaining bits /must/ be zero. Otherwise, the value returned /must/ be a
-- valid Khronos vendor ID, obtained as described in the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#vulkan-styleguide Vulkan Documentation and Extensions: Procedures and Conventions>
-- document in the section “Registering a Vendor ID with Khronos”. Khronos
-- vendor IDs are allocated starting at 0x10000, to distinguish them from
-- the PCI vendor ID namespace. Khronos vendor IDs are symbolically defined
-- in the 'Vulkan.Core10.Enums.VendorId.VendorId' type.
--
-- The vendor is also responsible for the value returned in @deviceID@. If
-- the implementation is driven primarily by a
-- <https://pcisig.com/ PCI device> with a
-- <https://pcisig.com/ PCI device ID>, the low 16 bits of @deviceID@
-- /must/ contain that PCI device ID, and the remaining bits /must/ be
-- zero. Otherwise, the choice of what values to return /may/ be dictated
-- by operating system or platform policies - but /should/ uniquely
-- identify both the device version and any major configuration options
-- (for example, core count in the case of multicore devices).
--
-- The same device ID /should/ be used for all physical implementations of
-- that device version and configuration. For example, all uses of a
-- specific silicon IP GPU version and configuration /should/ use the same
-- device ID, even if those uses occur in different SoCs.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'PhysicalDeviceLimits',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2',
-- 'PhysicalDeviceSparseProperties',
-- 'Vulkan.Core10.Enums.PhysicalDeviceType.PhysicalDeviceType',
-- 'getPhysicalDeviceProperties'
data PhysicalDeviceProperties = PhysicalDeviceProperties
  { -- | @apiVersion@ is the version of Vulkan supported by the device, encoded
    -- as described in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#extendingvulkan-coreversions-versionnumbers>.
    PhysicalDeviceProperties -> Word32
apiVersion :: Word32
  , -- | @driverVersion@ is the vendor-specified version of the driver.
    PhysicalDeviceProperties -> Word32
driverVersion :: Word32
  , -- | @vendorID@ is a unique identifier for the /vendor/ (see below) of the
    -- physical device.
    PhysicalDeviceProperties -> Word32
vendorID :: Word32
  , -- | @deviceID@ is a unique identifier for the physical device among devices
    -- available from the vendor.
    PhysicalDeviceProperties -> Word32
deviceID :: Word32
  , -- | @deviceType@ is a
    -- 'Vulkan.Core10.Enums.PhysicalDeviceType.PhysicalDeviceType' specifying
    -- the type of device.
    PhysicalDeviceProperties -> PhysicalDeviceType
deviceType :: PhysicalDeviceType
  , -- | @deviceName@ is an array of
    -- 'Vulkan.Core10.APIConstants.MAX_PHYSICAL_DEVICE_NAME_SIZE' @char@
    -- containing a null-terminated UTF-8 string which is the name of the
    -- device.
    PhysicalDeviceProperties -> "name" ::: ByteString
deviceName :: ByteString
  , -- | @pipelineCacheUUID@ is an array of
    -- 'Vulkan.Core10.APIConstants.UUID_SIZE' @uint8_t@ values representing a
    -- universally unique identifier for the device.
    PhysicalDeviceProperties -> "name" ::: ByteString
pipelineCacheUUID :: ByteString
  , -- | @limits@ is the 'PhysicalDeviceLimits' structure specifying
    -- device-specific limits of the physical device. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits Limits>
    -- for details.
    PhysicalDeviceProperties -> PhysicalDeviceLimits
limits :: PhysicalDeviceLimits
  , -- | @sparseProperties@ is the 'PhysicalDeviceSparseProperties' structure
    -- specifying various sparse related properties of the physical device. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-physicalprops Sparse Properties>
    -- for details.
    PhysicalDeviceProperties -> PhysicalDeviceSparseProperties
sparseProperties :: PhysicalDeviceSparseProperties
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceProperties)
#endif
deriving instance Show PhysicalDeviceProperties

instance ToCStruct PhysicalDeviceProperties where
  withCStruct :: forall b.
PhysicalDeviceProperties
-> (Ptr PhysicalDeviceProperties -> IO b) -> IO b
withCStruct PhysicalDeviceProperties
x Ptr PhysicalDeviceProperties -> IO b
f = Int -> (Ptr PhysicalDeviceProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
824 ((Ptr PhysicalDeviceProperties -> IO b) -> IO b)
-> (Ptr PhysicalDeviceProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceProperties
p -> Ptr PhysicalDeviceProperties
-> PhysicalDeviceProperties -> IO b -> IO b
forall b.
Ptr PhysicalDeviceProperties
-> PhysicalDeviceProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceProperties
p PhysicalDeviceProperties
x (Ptr PhysicalDeviceProperties -> IO b
f Ptr PhysicalDeviceProperties
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceProperties
-> PhysicalDeviceProperties -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceProperties
p PhysicalDeviceProperties{Word32
"name" ::: ByteString
PhysicalDeviceType
PhysicalDeviceSparseProperties
PhysicalDeviceLimits
apiVersion :: PhysicalDeviceProperties -> Word32
driverVersion :: PhysicalDeviceProperties -> Word32
vendorID :: PhysicalDeviceProperties -> Word32
deviceID :: PhysicalDeviceProperties -> Word32
deviceType :: PhysicalDeviceProperties -> PhysicalDeviceType
deviceName :: PhysicalDeviceProperties -> "name" ::: ByteString
pipelineCacheUUID :: PhysicalDeviceProperties -> "name" ::: ByteString
limits :: PhysicalDeviceProperties -> PhysicalDeviceLimits
sparseProperties :: PhysicalDeviceProperties -> PhysicalDeviceSparseProperties
apiVersion :: Word32
driverVersion :: Word32
vendorID :: Word32
deviceID :: Word32
deviceType :: PhysicalDeviceType
deviceName :: "name" ::: ByteString
pipelineCacheUUID :: "name" ::: ByteString
limits :: PhysicalDeviceLimits
sparseProperties :: PhysicalDeviceSparseProperties
..} IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
apiVersion)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
driverVersion)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
vendorID)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
deviceID)
    Ptr PhysicalDeviceType -> PhysicalDeviceType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr PhysicalDeviceType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PhysicalDeviceType)) (PhysicalDeviceType
deviceType)
    Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
pokeFixedLengthNullTerminatedByteString ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))) ("name" ::: ByteString
deviceName)
    Ptr (FixedArray UUID_SIZE Word8)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
pokeFixedLengthByteString ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
276 :: Ptr (FixedArray UUID_SIZE Word8))) ("name" ::: ByteString
pipelineCacheUUID)
    Ptr PhysicalDeviceLimits
-> PhysicalDeviceLimits -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr PhysicalDeviceLimits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
296 :: Ptr PhysicalDeviceLimits)) (PhysicalDeviceLimits
limits)
    Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr PhysicalDeviceSparseProperties
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
800 :: Ptr PhysicalDeviceSparseProperties)) (PhysicalDeviceSparseProperties
sparseProperties)
    IO b
f
  cStructSize :: Int
cStructSize = Int
824
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceProperties -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceProperties
p IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr PhysicalDeviceType -> PhysicalDeviceType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr PhysicalDeviceType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PhysicalDeviceType)) (PhysicalDeviceType
forall a. Zero a => a
zero)
    Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
pokeFixedLengthNullTerminatedByteString ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))) ("name" ::: ByteString
forall a. Monoid a => a
mempty)
    Ptr (FixedArray UUID_SIZE Word8)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8)
-> ("name" ::: ByteString) -> FN_vkVoidFunction
pokeFixedLengthByteString ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
276 :: Ptr (FixedArray UUID_SIZE Word8))) ("name" ::: ByteString
forall a. Monoid a => a
mempty)
    Ptr PhysicalDeviceLimits
-> PhysicalDeviceLimits -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr PhysicalDeviceLimits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
296 :: Ptr PhysicalDeviceLimits)) (PhysicalDeviceLimits
forall a. Zero a => a
zero)
    Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties
-> Int -> Ptr PhysicalDeviceSparseProperties
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
800 :: Ptr PhysicalDeviceSparseProperties)) (PhysicalDeviceSparseProperties
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceProperties where
  peekCStruct :: Ptr PhysicalDeviceProperties -> IO PhysicalDeviceProperties
peekCStruct Ptr PhysicalDeviceProperties
p = do
    apiVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceProperties
p Ptr PhysicalDeviceProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    driverVersion <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32))
    vendorID <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))
    deviceID <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))
    deviceType <- peek @PhysicalDeviceType ((p `plusPtr` 16 :: Ptr PhysicalDeviceType))
    deviceName <- packCString (lowerArrayPtr ((p `plusPtr` 20 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))))
    pipelineCacheUUID <- peekByteStringFromSizedVectorPtr ((p `plusPtr` 276 :: Ptr (FixedArray UUID_SIZE Word8)))
    limits <- peekCStruct @PhysicalDeviceLimits ((p `plusPtr` 296 :: Ptr PhysicalDeviceLimits))
    sparseProperties <- peekCStruct @PhysicalDeviceSparseProperties ((p `plusPtr` 800 :: Ptr PhysicalDeviceSparseProperties))
    pure $ PhysicalDeviceProperties
             apiVersion
             driverVersion
             vendorID
             deviceID
             deviceType
             deviceName
             pipelineCacheUUID
             limits
             sparseProperties

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

instance Zero PhysicalDeviceProperties where
  zero :: PhysicalDeviceProperties
zero = Word32
-> Word32
-> Word32
-> Word32
-> PhysicalDeviceType
-> ("name" ::: ByteString)
-> ("name" ::: ByteString)
-> PhysicalDeviceLimits
-> PhysicalDeviceSparseProperties
-> PhysicalDeviceProperties
PhysicalDeviceProperties
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           PhysicalDeviceType
forall a. Zero a => a
zero
           "name" ::: ByteString
forall a. Monoid a => a
mempty
           "name" ::: ByteString
forall a. Monoid a => a
mempty
           PhysicalDeviceLimits
forall a. Zero a => a
zero
           PhysicalDeviceSparseProperties
forall a. Zero a => a
zero


-- | VkApplicationInfo - Structure specifying application information
--
-- = Description
--
-- Vulkan 1.0 implementations were required to return
-- 'Vulkan.Core10.Enums.Result.ERROR_INCOMPATIBLE_DRIVER' if @apiVersion@
-- was larger than 1.0. Implementations that support Vulkan 1.1 or later
-- /must/ not return 'Vulkan.Core10.Enums.Result.ERROR_INCOMPATIBLE_DRIVER'
-- for any value of @apiVersion@ .
--
-- Because Vulkan 1.0 implementations /may/ fail with
-- 'Vulkan.Core10.Enums.Result.ERROR_INCOMPATIBLE_DRIVER', applications
-- /should/ determine the version of Vulkan available before calling
-- 'createInstance'. If the 'getInstanceProcAddr' returns @NULL@ for
-- 'Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion', it is a
-- Vulkan 1.0 implementation. Otherwise, the application /can/ call
-- 'Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion' to
-- determine the version of Vulkan.
--
-- As long as the instance supports at least Vulkan 1.1, an application
-- /can/ use different versions of Vulkan with an instance than it does
-- with a device or physical device.
--
-- The Khronos validation layers will treat @apiVersion@ as the highest API
-- version the application targets, and will validate API usage against the
-- minimum of that version and the implementation version (instance or
-- device, depending on context). If an application tries to use
-- functionality from a greater version than this, a validation error will
-- be triggered.
--
-- For example, if the instance supports Vulkan 1.1 and three physical
-- devices support Vulkan 1.0, Vulkan 1.1, and Vulkan 1.2, respectively,
-- and if the application sets @apiVersion@ to 1.2, the application /can/
-- use the following versions of Vulkan:
--
-- -   Vulkan 1.0 /can/ be used with the instance and with all physical
--     devices.
--
-- -   Vulkan 1.1 /can/ be used with the instance and with the physical
--     devices that support Vulkan 1.1 and Vulkan 1.2.
--
-- -   Vulkan 1.2 /can/ be used with the physical device that supports
--     Vulkan 1.2.
--
-- If we modify the above example so that the application sets @apiVersion@
-- to 1.1, then the application /must/ not use Vulkan 1.2 functionality on
-- the physical device that supports Vulkan 1.2.
--
-- Providing a @NULL@ 'InstanceCreateInfo'::@pApplicationInfo@ or providing
-- an @apiVersion@ of 0 is equivalent to providing an @apiVersion@ of
-- @VK_MAKE_API_VERSION(0,1,0,0)@.
--
-- == Valid Usage
--
-- -   #VUID-VkApplicationInfo-apiVersion-04010# If @apiVersion@ is not
--     @0@, then it /must/ be greater than or equal to
--     'Vulkan.Core10.API_VERSION_1_0'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkApplicationInfo-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_APPLICATION_INFO'
--
-- -   #VUID-VkApplicationInfo-pNext-pNext# @pNext@ /must/ be @NULL@
--
-- -   #VUID-VkApplicationInfo-pApplicationName-parameter# If
--     @pApplicationName@ is not @NULL@, @pApplicationName@ /must/ be a
--     null-terminated UTF-8 string
--
-- -   #VUID-VkApplicationInfo-pEngineName-parameter# If @pEngineName@ is
--     not @NULL@, @pEngineName@ /must/ be a null-terminated UTF-8 string
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'InstanceCreateInfo', 'Vulkan.Core10.Enums.StructureType.StructureType'
data ApplicationInfo = ApplicationInfo
  { -- | @pApplicationName@ is @NULL@ or is a pointer to a null-terminated UTF-8
    -- string containing the name of the application.
    ApplicationInfo -> Maybe ("name" ::: ByteString)
applicationName :: Maybe ByteString
  , -- | @applicationVersion@ is an unsigned integer variable containing the
    -- developer-supplied version number of the application.
    ApplicationInfo -> Word32
applicationVersion :: Word32
  , -- | @pEngineName@ is @NULL@ or is a pointer to a null-terminated UTF-8
    -- string containing the name of the engine (if any) used to create the
    -- application.
    ApplicationInfo -> Maybe ("name" ::: ByteString)
engineName :: Maybe ByteString
  , -- | @engineVersion@ is an unsigned integer variable containing the
    -- developer-supplied version number of the engine used to create the
    -- application.
    ApplicationInfo -> Word32
engineVersion :: Word32
  , -- | @apiVersion@ /must/ be the highest version of Vulkan that the
    -- application is designed to use, encoded as described in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#extendingvulkan-coreversions-versionnumbers>.
    -- The patch version number specified in @apiVersion@ is ignored when
    -- creating an instance object. The variant version of the instance /must/
    -- match that requested in @apiVersion@.
    ApplicationInfo -> Word32
apiVersion :: Word32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ApplicationInfo)
#endif
deriving instance Show ApplicationInfo

instance ToCStruct ApplicationInfo where
  withCStruct :: forall b. ApplicationInfo -> (Ptr ApplicationInfo -> IO b) -> IO b
withCStruct ApplicationInfo
x Ptr ApplicationInfo -> IO b
f = Int -> (Ptr ApplicationInfo -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr ApplicationInfo -> IO b) -> IO b)
-> (Ptr ApplicationInfo -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ApplicationInfo
p -> Ptr ApplicationInfo -> ApplicationInfo -> IO b -> IO b
forall b. Ptr ApplicationInfo -> ApplicationInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ApplicationInfo
p ApplicationInfo
x (Ptr ApplicationInfo -> IO b
f Ptr ApplicationInfo
p)
  pokeCStruct :: forall b. Ptr ApplicationInfo -> ApplicationInfo -> IO b -> IO b
pokeCStruct Ptr ApplicationInfo
p ApplicationInfo{Maybe ("name" ::: ByteString)
Word32
applicationName :: ApplicationInfo -> Maybe ("name" ::: ByteString)
applicationVersion :: ApplicationInfo -> Word32
engineName :: ApplicationInfo -> Maybe ("name" ::: ByteString)
engineVersion :: ApplicationInfo -> Word32
apiVersion :: ApplicationInfo -> Word32
applicationName :: Maybe ("name" ::: ByteString)
applicationVersion :: Word32
engineName :: Maybe ("name" ::: ByteString)
engineVersion :: Word32
apiVersion :: Word32
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    FN_vkVoidFunction -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT b IO ())
-> FN_vkVoidFunction -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_APPLICATION_INFO)
    FN_vkVoidFunction -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT b IO ())
-> FN_vkVoidFunction -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    pApplicationName'' <- case (Maybe ("name" ::: ByteString)
applicationName) of
      Maybe ("name" ::: ByteString)
Nothing -> ("pName" ::: Ptr CChar) -> ContT b IO ("pName" ::: Ptr CChar)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pName" ::: Ptr CChar
forall a. Ptr a
nullPtr
      Just "name" ::: ByteString
j -> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO b) -> IO b)
 -> ContT b IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO b) -> IO b
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
j)
    lift $ poke ((p `plusPtr` 16 :: Ptr (Ptr CChar))) pApplicationName''
    lift $ poke ((p `plusPtr` 24 :: Ptr Word32)) (applicationVersion)
    pEngineName'' <- case (engineName) of
      Maybe ("name" ::: ByteString)
Nothing -> ("pName" ::: Ptr CChar) -> ContT b IO ("pName" ::: Ptr CChar)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pName" ::: Ptr CChar
forall a. Ptr a
nullPtr
      Just "name" ::: ByteString
j -> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO b) -> IO b)
 -> ContT b IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO b) -> IO b
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
j)
    lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr CChar))) pEngineName''
    lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (engineVersion)
    lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (apiVersion)
    lift $ f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr ApplicationInfo -> IO b -> IO b
pokeZeroCStruct Ptr ApplicationInfo
p IO b
f = do
    Ptr StructureType -> StructureType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_APPLICATION_INFO)
    Ptr (Ptr ()) -> Ptr () -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ApplicationInfo where
  peekCStruct :: Ptr ApplicationInfo -> IO ApplicationInfo
peekCStruct Ptr ApplicationInfo
p = do
    pApplicationName <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr CChar) ((Ptr ApplicationInfo
p Ptr ApplicationInfo -> Int -> Ptr ("pName" ::: Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr CChar)))
    pApplicationName' <- maybePeek (\"pName" ::: Ptr CChar
j -> ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
packCString ("pName" ::: Ptr CChar
j)) pApplicationName
    applicationVersion <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
    pEngineName <- peek @(Ptr CChar) ((p `plusPtr` 32 :: Ptr (Ptr CChar)))
    pEngineName' <- maybePeek (\"pName" ::: Ptr CChar
j -> ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
packCString ("pName" ::: Ptr CChar
j)) pEngineName
    engineVersion <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32))
    apiVersion <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32))
    pure $ ApplicationInfo
             pApplicationName'
             applicationVersion
             pEngineName'
             engineVersion
             apiVersion

instance Zero ApplicationInfo where
  zero :: ApplicationInfo
zero = Maybe ("name" ::: ByteString)
-> Word32
-> Maybe ("name" ::: ByteString)
-> Word32
-> Word32
-> ApplicationInfo
ApplicationInfo
           Maybe ("name" ::: ByteString)
forall a. Maybe a
Nothing
           Word32
forall a. Zero a => a
zero
           Maybe ("name" ::: ByteString)
forall a. Maybe a
Nothing
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero


-- | VkInstanceCreateInfo - Structure specifying parameters of a newly
-- created instance
--
-- = Description
--
-- To capture events that occur while creating or destroying an instance,
-- an application /can/ link a
-- 'Vulkan.Extensions.VK_EXT_debug_report.DebugReportCallbackCreateInfoEXT'
-- structure or a
-- 'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCreateInfoEXT'
-- structure to the @pNext@ chain of the 'InstanceCreateInfo' structure
-- passed to 'createInstance'. This callback is only valid for the duration
-- of the 'createInstance' and the 'destroyInstance' call. Use
-- 'Vulkan.Extensions.VK_EXT_debug_report.createDebugReportCallbackEXT' or
-- 'Vulkan.Extensions.VK_EXT_debug_utils.createDebugUtilsMessengerEXT' to
-- create persistent callback objects.
--
-- An application can add additional drivers by including the
-- 'Vulkan.Extensions.VK_LUNARG_direct_driver_loading.DirectDriverLoadingListLUNARG'
-- structure in the @pNext@ chain of the 'InstanceCreateInfo' structure
-- passed to 'createInstance'.
--
-- 'Vulkan.Extensions.VK_LUNARG_direct_driver_loading.DirectDriverLoadingListLUNARG'
-- allows applications to ship drivers with themselves. Only drivers that
-- are designed to work with it should be used, such as drivers that
-- implement Vulkan in software or that implement Vulkan by translating it
-- to a different API. Any driver that requires installation should not be
-- used, such as hardware drivers.
--
-- == Valid Usage
--
-- -   #VUID-VkInstanceCreateInfo-pNext-04925# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_EXT_debug_report.DebugReportCallbackCreateInfoEXT'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain @VK_EXT_debug_report@
--
-- -   #VUID-VkInstanceCreateInfo-pNext-04926# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCreateInfoEXT'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain @VK_EXT_debug_utils@
--
-- -   #VUID-VkInstanceCreateInfo-pNext-06779# If the @pNext@ chain
--     includes a
--     'Vulkan.Extensions.VK_EXT_metal_objects.ExportMetalObjectCreateInfoEXT'
--     structure, its @exportObjectType@ member /must/ be either
--     'Vulkan.Extensions.VK_EXT_metal_objects.EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_metal_objects.EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT'
--
-- -   #VUID-VkInstanceCreateInfo-flags-06559# If @flags@ has the
--     'Vulkan.Core10.Enums.InstanceCreateFlagBits.INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR'
--     bit set, the list of enabled extensions in @ppEnabledExtensionNames@
--     /must/ contain @VK_KHR_portability_enumeration@
--
-- -   #VUID-VkInstanceCreateInfo-pNext-09400# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_LUNARG_direct_driver_loading.DirectDriverLoadingListLUNARG'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_LUNARG_direct_driver_loading VK_LUNARG_direct_driver_loading>
--
-- -   #VUID-VkInstanceCreateInfo-pNext-10242# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_EXT_layer_settings.LayerSettingsCreateInfoEXT'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_layer_settings VK_EXT_layer_settings>
--
-- -   #VUID-VkInstanceCreateInfo-pNext-10243# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_EXT_validation_features.ValidationFeaturesEXT'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_validation_features VK_EXT_validation_features>
--
-- -   #VUID-VkInstanceCreateInfo-pNext-10244# If the @pNext@ chain of
--     'InstanceCreateInfo' includes a
--     'Vulkan.Extensions.VK_EXT_validation_flags.ValidationFlagsEXT'
--     structure, the list of enabled extensions in
--     @ppEnabledExtensionNames@ /must/ contain
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_validation_flags VK_EXT_validation_flags>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkInstanceCreateInfo-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_INSTANCE_CREATE_INFO'
--
-- -   #VUID-VkInstanceCreateInfo-pNext-pNext# Each @pNext@ member of any
--     structure (including this one) in the @pNext@ chain /must/ be either
--     @NULL@ or a pointer to a valid instance of
--     'Vulkan.Extensions.VK_EXT_debug_report.DebugReportCallbackCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCreateInfoEXT',
--     'Vulkan.Extensions.VK_LUNARG_direct_driver_loading.DirectDriverLoadingListLUNARG',
--     'Vulkan.Extensions.VK_EXT_metal_objects.ExportMetalObjectCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_layer_settings.LayerSettingsCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_validation_features.ValidationFeaturesEXT',
--     or 'Vulkan.Extensions.VK_EXT_validation_flags.ValidationFlagsEXT'
--
-- -   #VUID-VkInstanceCreateInfo-sType-unique# The @sType@ value of each
--     structure in the @pNext@ chain /must/ be unique, with the exception
--     of structures of type
--     'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_metal_objects.ExportMetalObjectCreateInfoEXT',
--     or
--     'Vulkan.Extensions.VK_EXT_layer_settings.LayerSettingsCreateInfoEXT'
--
-- -   #VUID-VkInstanceCreateInfo-flags-parameter# @flags@ /must/ be a
--     valid combination of
--     'Vulkan.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlagBits'
--     values
--
-- -   #VUID-VkInstanceCreateInfo-pApplicationInfo-parameter# If
--     @pApplicationInfo@ is not @NULL@, @pApplicationInfo@ /must/ be a
--     valid pointer to a valid 'ApplicationInfo' structure
--
-- -   #VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter# If
--     @enabledLayerCount@ is not @0@, @ppEnabledLayerNames@ /must/ be a
--     valid pointer to an array of @enabledLayerCount@ null-terminated
--     UTF-8 strings
--
-- -   #VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter# If
--     @enabledExtensionCount@ is not @0@, @ppEnabledExtensionNames@ /must/
--     be a valid pointer to an array of @enabledExtensionCount@
--     null-terminated UTF-8 strings
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'ApplicationInfo',
-- 'Vulkan.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType', 'createInstance'
data InstanceCreateInfo (es :: [Type]) = InstanceCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). InstanceCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlagBits'
    -- indicating the behavior of the instance.
    forall (es :: [*]). InstanceCreateInfo es -> InstanceCreateFlags
flags :: InstanceCreateFlags
  , -- | @pApplicationInfo@ is @NULL@ or a pointer to a 'ApplicationInfo'
    -- structure. If not @NULL@, this information helps implementations
    -- recognize behavior inherent to classes of applications.
    -- 'ApplicationInfo' is defined in detail below.
    forall (es :: [*]). InstanceCreateInfo es -> Maybe ApplicationInfo
applicationInfo :: Maybe ApplicationInfo
  , -- | @ppEnabledLayerNames@ is a pointer to an array of @enabledLayerCount@
    -- null-terminated UTF-8 strings containing the names of layers to enable
    -- for the created instance. The layers are loaded in the order they are
    -- listed in this array, with the first array element being the closest to
    -- the application, and the last array element being the closest to the
    -- driver. See the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#extendingvulkan-layers>
    -- section for further details.
    forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
enabledLayerNames :: Vector ByteString
  , -- | @ppEnabledExtensionNames@ is a pointer to an array of
    -- @enabledExtensionCount@ null-terminated UTF-8 strings containing the
    -- names of extensions to enable.
    forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ByteString
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (InstanceCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (InstanceCreateInfo es)

instance Extensible InstanceCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"InstanceCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
InstanceCreateInfo ds -> Chain es -> InstanceCreateInfo es
setNext InstanceCreateInfo{Maybe ApplicationInfo
Vector ("name" ::: ByteString)
InstanceCreateFlags
Chain ds
next :: forall (es :: [*]). InstanceCreateInfo es -> Chain es
flags :: forall (es :: [*]). InstanceCreateInfo es -> InstanceCreateFlags
applicationInfo :: forall (es :: [*]). InstanceCreateInfo es -> Maybe ApplicationInfo
enabledLayerNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
enabledExtensionNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
next :: Chain ds
flags :: InstanceCreateFlags
applicationInfo :: Maybe ApplicationInfo
enabledLayerNames :: Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ("name" ::: ByteString)
..} Chain es
next' = InstanceCreateInfo{next :: Chain es
next = Chain es
next', Maybe ApplicationInfo
Vector ("name" ::: ByteString)
InstanceCreateFlags
flags :: InstanceCreateFlags
applicationInfo :: Maybe ApplicationInfo
enabledLayerNames :: Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ("name" ::: ByteString)
flags :: InstanceCreateFlags
applicationInfo :: Maybe ApplicationInfo
enabledLayerNames :: Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ("name" ::: ByteString)
..}
  getNext :: forall (es :: [*]). InstanceCreateInfo es -> Chain es
getNext InstanceCreateInfo{Maybe ApplicationInfo
Vector ("name" ::: ByteString)
InstanceCreateFlags
Chain es
next :: forall (es :: [*]). InstanceCreateInfo es -> Chain es
flags :: forall (es :: [*]). InstanceCreateInfo es -> InstanceCreateFlags
applicationInfo :: forall (es :: [*]). InstanceCreateInfo es -> Maybe ApplicationInfo
enabledLayerNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
enabledExtensionNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
next :: Chain es
flags :: InstanceCreateFlags
applicationInfo :: Maybe ApplicationInfo
enabledLayerNames :: Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ("name" ::: ByteString)
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends InstanceCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends InstanceCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends InstanceCreateInfo e => b
f
    | Just e :~: DirectDriverLoadingListLUNARG
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DirectDriverLoadingListLUNARG = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: ExportMetalObjectCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @ExportMetalObjectCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: DebugUtilsMessengerCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DebugUtilsMessengerCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: LayerSettingsCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @LayerSettingsCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: ValidationFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @ValidationFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: ValidationFlagsEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @ValidationFlagsEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Just e :~: DebugReportCallbackCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DebugReportCallbackCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends InstanceCreateInfo e => b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance ( Extendss InstanceCreateInfo es
         , PokeChain es ) => ToCStruct (InstanceCreateInfo es) where
  withCStruct :: forall b.
InstanceCreateInfo es
-> (Ptr (InstanceCreateInfo es) -> IO b) -> IO b
withCStruct InstanceCreateInfo es
x Ptr (InstanceCreateInfo es) -> IO b
f = Int -> (Ptr (InstanceCreateInfo es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr (InstanceCreateInfo es) -> IO b) -> IO b)
-> (Ptr (InstanceCreateInfo es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (InstanceCreateInfo es)
p -> Ptr (InstanceCreateInfo es)
-> InstanceCreateInfo es -> IO b -> IO b
forall b.
Ptr (InstanceCreateInfo es)
-> InstanceCreateInfo es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (InstanceCreateInfo es)
p InstanceCreateInfo es
x (Ptr (InstanceCreateInfo es) -> IO b
f Ptr (InstanceCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (InstanceCreateInfo es)
-> InstanceCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (InstanceCreateInfo es)
p InstanceCreateInfo{Maybe ApplicationInfo
Vector ("name" ::: ByteString)
InstanceCreateFlags
Chain es
next :: forall (es :: [*]). InstanceCreateInfo es -> Chain es
flags :: forall (es :: [*]). InstanceCreateInfo es -> InstanceCreateFlags
applicationInfo :: forall (es :: [*]). InstanceCreateInfo es -> Maybe ApplicationInfo
enabledLayerNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
enabledExtensionNames :: forall (es :: [*]).
InstanceCreateInfo es -> Vector ("name" ::: ByteString)
next :: Chain es
flags :: InstanceCreateFlags
applicationInfo :: Maybe ApplicationInfo
enabledLayerNames :: Vector ("name" ::: ByteString)
enabledExtensionNames :: Vector ("name" ::: ByteString)
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    FN_vkVoidFunction -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT b IO ())
-> FN_vkVoidFunction -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr (InstanceCreateInfo es)
p Ptr (InstanceCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
    pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
    lift $ poke ((p `plusPtr` 16 :: Ptr InstanceCreateFlags)) (flags)
    pApplicationInfo'' <- case (applicationInfo) of
      Maybe ApplicationInfo
Nothing -> Ptr ApplicationInfo -> ContT b IO (Ptr ApplicationInfo)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr ApplicationInfo
forall a. Ptr a
nullPtr
      Just ApplicationInfo
j -> ((Ptr ApplicationInfo -> IO b) -> IO b)
-> ContT b IO (Ptr ApplicationInfo)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ApplicationInfo -> IO b) -> IO b)
 -> ContT b IO (Ptr ApplicationInfo))
-> ((Ptr ApplicationInfo -> IO b) -> IO b)
-> ContT b IO (Ptr ApplicationInfo)
forall a b. (a -> b) -> a -> b
$ ApplicationInfo -> (Ptr ApplicationInfo -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b. ApplicationInfo -> (Ptr ApplicationInfo -> IO b) -> IO b
withCStruct (ApplicationInfo
j)
    lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr ApplicationInfo))) pApplicationInfo''
    lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (enabledLayerNames)) :: Word32))
    pPpEnabledLayerNames' <- ContT $ allocaBytes @(Ptr CChar) ((Data.Vector.length (enabledLayerNames)) * 8)
    Data.Vector.imapM_ (\Int
i "name" ::: ByteString
e -> do
      ppEnabledLayerNames'' <- ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO b) -> IO b)
 -> ContT b IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO b) -> IO b
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
e)
      lift $ poke (pPpEnabledLayerNames' `plusPtr` (8 * (i)) :: Ptr (Ptr CChar)) ppEnabledLayerNames'') (enabledLayerNames)
    lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr (Ptr CChar)))) (pPpEnabledLayerNames')
    lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (enabledExtensionNames)) :: Word32))
    pPpEnabledExtensionNames' <- ContT $ allocaBytes @(Ptr CChar) ((Data.Vector.length (enabledExtensionNames)) * 8)
    Data.Vector.imapM_ (\Int
i "name" ::: ByteString
e -> do
      ppEnabledExtensionNames'' <- ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pName" ::: Ptr CChar) -> IO b) -> IO b)
 -> ContT b IO ("pName" ::: Ptr CChar))
-> ((("pName" ::: Ptr CChar) -> IO b) -> IO b)
-> ContT b IO ("pName" ::: Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO b) -> IO b
forall a.
("name" ::: ByteString)
-> (("pName" ::: Ptr CChar) -> IO a) -> IO a
useAsCString ("name" ::: ByteString
e)
      lift $ poke (pPpEnabledExtensionNames' `plusPtr` (8 * (i)) :: Ptr (Ptr CChar)) ppEnabledExtensionNames'') (enabledExtensionNames)
    lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr (Ptr CChar)))) (pPpEnabledExtensionNames')
    lift $ f
  cStructSize :: Int
cStructSize = Int
64
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (InstanceCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (InstanceCreateInfo es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    FN_vkVoidFunction -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (FN_vkVoidFunction -> ContT b IO ())
-> FN_vkVoidFunction -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr (InstanceCreateInfo es)
p Ptr (InstanceCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INSTANCE_CREATE_INFO)
    pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
    lift $ f

instance ( Extendss InstanceCreateInfo es
         , PeekChain es ) => FromCStruct (InstanceCreateInfo es) where
  peekCStruct :: Ptr (InstanceCreateInfo es) -> IO (InstanceCreateInfo es)
peekCStruct Ptr (InstanceCreateInfo es)
p = do
    pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (InstanceCreateInfo es)
p Ptr (InstanceCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
    next <- peekChain (castPtr pNext)
    flags <- peek @InstanceCreateFlags ((p `plusPtr` 16 :: Ptr InstanceCreateFlags))
    pApplicationInfo <- peek @(Ptr ApplicationInfo) ((p `plusPtr` 24 :: Ptr (Ptr ApplicationInfo)))
    pApplicationInfo' <- maybePeek (\Ptr ApplicationInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @ApplicationInfo (Ptr ApplicationInfo
j)) pApplicationInfo
    enabledLayerCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
    ppEnabledLayerNames <- peek @(Ptr (Ptr CChar)) ((p `plusPtr` 40 :: Ptr (Ptr (Ptr CChar))))
    ppEnabledLayerNames' <- generateM (fromIntegral enabledLayerCount) (\Int
i -> ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
packCString (("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString))
-> IO ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr ("pName" ::: Ptr CChar) -> IO ("pName" ::: Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr ("pName" ::: Ptr CChar)
ppEnabledLayerNames Ptr ("pName" ::: Ptr CChar) -> Int -> Ptr ("pName" ::: Ptr CChar)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar))))
    enabledExtensionCount <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32))
    ppEnabledExtensionNames <- peek @(Ptr (Ptr CChar)) ((p `plusPtr` 56 :: Ptr (Ptr (Ptr CChar))))
    ppEnabledExtensionNames' <- generateM (fromIntegral enabledExtensionCount) (\Int
i -> ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
packCString (("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString))
-> IO ("pName" ::: Ptr CChar) -> IO ("name" ::: ByteString)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr ("pName" ::: Ptr CChar) -> IO ("pName" ::: Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr ("pName" ::: Ptr CChar)
ppEnabledExtensionNames Ptr ("pName" ::: Ptr CChar) -> Int -> Ptr ("pName" ::: Ptr CChar)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar))))
    pure $ InstanceCreateInfo
             next
             flags
             pApplicationInfo'
             ppEnabledLayerNames'
             ppEnabledExtensionNames'

instance es ~ '[] => Zero (InstanceCreateInfo es) where
  zero :: InstanceCreateInfo es
zero = Chain es
-> InstanceCreateFlags
-> Maybe ApplicationInfo
-> Vector ("name" ::: ByteString)
-> Vector ("name" ::: ByteString)
-> InstanceCreateInfo es
forall (es :: [*]).
Chain es
-> InstanceCreateFlags
-> Maybe ApplicationInfo
-> Vector ("name" ::: ByteString)
-> Vector ("name" ::: ByteString)
-> InstanceCreateInfo es
InstanceCreateInfo
           ()
           InstanceCreateFlags
forall a. Zero a => a
zero
           Maybe ApplicationInfo
forall a. Maybe a
Nothing
           Vector ("name" ::: ByteString)
forall a. Monoid a => a
mempty
           Vector ("name" ::: ByteString)
forall a. Monoid a => a
mempty


-- | VkQueueFamilyProperties - Structure providing information about a queue
-- family
--
-- = Description
--
-- The value returned in @minImageTransferGranularity@ has a unit of
-- compressed texel blocks for images having a block-compressed format, and
-- a unit of texels otherwise.
--
-- Possible values of @minImageTransferGranularity@ are:
--
-- -   (0,0,0) specifies that only whole mip levels /must/ be transferred
--     using the image transfer operations on the corresponding queues. In
--     this case, the following restrictions apply to all offset and extent
--     parameters of image transfer operations:
--
--     -   The @x@, @y@, and @z@ members of a
--         'Vulkan.Core10.FundamentalTypes.Offset3D' parameter /must/
--         always be zero.
--
--     -   The @width@, @height@, and @depth@ members of a
--         'Vulkan.Core10.FundamentalTypes.Extent3D' parameter /must/
--         always match the width, height, and depth of the image
--         subresource corresponding to the parameter, respectively.
--
-- -   (Ax, Ay, Az) where Ax, Ay, and Az are all integer powers of two. In
--     this case the following restrictions apply to all image transfer
--     operations:
--
--     -   @x@, @y@, and @z@ of a 'Vulkan.Core10.FundamentalTypes.Offset3D'
--         parameter /must/ be integer multiples of Ax, Ay, and Az,
--         respectively.
--
--     -   @width@ of a 'Vulkan.Core10.FundamentalTypes.Extent3D' parameter
--         /must/ be an integer multiple of Ax, or else @x@ + @width@
--         /must/ equal the width of the image subresource corresponding to
--         the parameter.
--
--     -   @height@ of a 'Vulkan.Core10.FundamentalTypes.Extent3D'
--         parameter /must/ be an integer multiple of Ay, or else @y@ +
--         @height@ /must/ equal the height of the image subresource
--         corresponding to the parameter.
--
--     -   @depth@ of a 'Vulkan.Core10.FundamentalTypes.Extent3D' parameter
--         /must/ be an integer multiple of Az, or else @z@ + @depth@
--         /must/ equal the depth of the image subresource corresponding to
--         the parameter.
--
--     -   If the format of the image corresponding to the parameters is
--         one of the block-compressed formats then for the purposes of the
--         above calculations the granularity /must/ be scaled up by the
--         compressed texel block dimensions.
--
-- Queues supporting graphics and\/or compute operations /must/ report
-- (1,1,1) in @minImageTransferGranularity@, meaning that there are no
-- additional restrictions on the granularity of image transfer operations
-- for these queues. Other queues supporting image transfer operations are
-- only /required/ to support whole mip level transfers, thus
-- @minImageTransferGranularity@ for queues belonging to such queue
-- families /may/ be (0,0,0).
--
-- The
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-device Device Memory>
-- section describes memory properties queried from the physical device.
--
-- For physical device feature queries see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features Features>
-- chapter.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Extent3D',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.QueueFamilyProperties2',
-- 'Vulkan.Core10.Enums.QueueFlagBits.QueueFlags',
-- 'getPhysicalDeviceQueueFamilyProperties'
data QueueFamilyProperties = QueueFamilyProperties
  { -- | @queueFlags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.QueueFlagBits.QueueFlagBits' indicating
    -- capabilities of the queues in this queue family.
    QueueFamilyProperties -> QueueFlags
queueFlags :: QueueFlags
  , -- | @queueCount@ is the unsigned integer count of queues in this queue
    -- family. Each queue family /must/ support at least one queue.
    QueueFamilyProperties -> Word32
queueCount :: Word32
  , -- | @timestampValidBits@ is the unsigned integer count of meaningful bits in
    -- the timestamps written via
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_synchronization2.cmdWriteTimestamp2'
    -- or 'Vulkan.Core10.CommandBufferBuilding.cmdWriteTimestamp'. The valid
    -- range for the count is 36 to 64 bits, or a value of 0, indicating no
    -- support for timestamps. Bits outside the valid range are guaranteed to
    -- be zeros.
    QueueFamilyProperties -> Word32
timestampValidBits :: Word32
  , -- | @minImageTransferGranularity@ is the minimum granularity supported for
    -- image transfer operations on the queues in this queue family.
    QueueFamilyProperties -> Extent3D
minImageTransferGranularity :: Extent3D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (QueueFamilyProperties)
#endif
deriving instance Show QueueFamilyProperties

instance ToCStruct QueueFamilyProperties where
  withCStruct :: forall b.
QueueFamilyProperties
-> (Ptr QueueFamilyProperties -> IO b) -> IO b
withCStruct QueueFamilyProperties
x Ptr QueueFamilyProperties -> IO b
f = Int -> (Ptr QueueFamilyProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr QueueFamilyProperties -> IO b) -> IO b)
-> (Ptr QueueFamilyProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr QueueFamilyProperties
p -> Ptr QueueFamilyProperties -> QueueFamilyProperties -> IO b -> IO b
forall b.
Ptr QueueFamilyProperties -> QueueFamilyProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr QueueFamilyProperties
p QueueFamilyProperties
x (Ptr QueueFamilyProperties -> IO b
f Ptr QueueFamilyProperties
p)
  pokeCStruct :: forall b.
Ptr QueueFamilyProperties -> QueueFamilyProperties -> IO b -> IO b
pokeCStruct Ptr QueueFamilyProperties
p QueueFamilyProperties{Word32
Extent3D
QueueFlags
queueFlags :: QueueFamilyProperties -> QueueFlags
queueCount :: QueueFamilyProperties -> Word32
timestampValidBits :: QueueFamilyProperties -> Word32
minImageTransferGranularity :: QueueFamilyProperties -> Extent3D
queueFlags :: QueueFlags
queueCount :: Word32
timestampValidBits :: Word32
minImageTransferGranularity :: Extent3D
..} IO b
f = do
    Ptr QueueFlags -> QueueFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr QueueFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr QueueFlags)) (QueueFlags
queueFlags)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
queueCount)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
timestampValidBits)
    Ptr Extent3D -> Extent3D -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Extent3D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Extent3D)) (Extent3D
minImageTransferGranularity)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr QueueFamilyProperties -> IO b -> IO b
pokeZeroCStruct Ptr QueueFamilyProperties
p IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Extent3D -> Extent3D -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr Extent3D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Extent3D)) (Extent3D
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct QueueFamilyProperties where
  peekCStruct :: Ptr QueueFamilyProperties -> IO QueueFamilyProperties
peekCStruct Ptr QueueFamilyProperties
p = do
    queueFlags <- forall a. Storable a => Ptr a -> IO a
peek @QueueFlags ((Ptr QueueFamilyProperties
p Ptr QueueFamilyProperties -> Int -> Ptr QueueFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr QueueFlags))
    queueCount <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32))
    timestampValidBits <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))
    minImageTransferGranularity <- peekCStruct @Extent3D ((p `plusPtr` 12 :: Ptr Extent3D))
    pure $ QueueFamilyProperties
             queueFlags
             queueCount
             timestampValidBits
             minImageTransferGranularity

instance Storable QueueFamilyProperties where
  sizeOf :: QueueFamilyProperties -> Int
sizeOf ~QueueFamilyProperties
_ = Int
24
  alignment :: QueueFamilyProperties -> Int
alignment ~QueueFamilyProperties
_ = Int
4
  peek :: Ptr QueueFamilyProperties -> IO QueueFamilyProperties
peek = Ptr QueueFamilyProperties -> IO QueueFamilyProperties
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr QueueFamilyProperties
-> QueueFamilyProperties -> FN_vkVoidFunction
poke Ptr QueueFamilyProperties
ptr QueueFamilyProperties
poked = Ptr QueueFamilyProperties
-> QueueFamilyProperties -> FN_vkVoidFunction -> FN_vkVoidFunction
forall b.
Ptr QueueFamilyProperties -> QueueFamilyProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr QueueFamilyProperties
ptr QueueFamilyProperties
poked (() -> FN_vkVoidFunction
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero QueueFamilyProperties where
  zero :: QueueFamilyProperties
zero = QueueFlags -> Word32 -> Word32 -> Extent3D -> QueueFamilyProperties
QueueFamilyProperties
           QueueFlags
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Extent3D
forall a. Zero a => a
zero


-- | VkPhysicalDeviceMemoryProperties - Structure specifying physical device
-- memory properties
--
-- = Description
--
-- The 'PhysicalDeviceMemoryProperties' structure describes a number of
-- /memory heaps/ as well as a number of /memory types/ that /can/ be used
-- to access memory allocated in those heaps. Each heap describes a memory
-- resource of a particular size, and each memory type describes a set of
-- memory properties (e.g. host cached vs. uncached) that /can/ be used
-- with a given memory heap. Allocations using a particular memory type
-- will consume resources from the heap indicated by that memory type’s
-- heap index. More than one memory type /may/ share each heap, and the
-- heaps and memory types provide a mechanism to advertise an accurate size
-- of the physical memory resources while allowing the memory to be used
-- with a variety of different properties.
--
-- The number of memory heaps is given by @memoryHeapCount@ and is less
-- than or equal to 'Vulkan.Core10.APIConstants.MAX_MEMORY_HEAPS'. Each
-- heap is described by an element of the @memoryHeaps@ array as a
-- 'MemoryHeap' structure. The number of memory types available across all
-- memory heaps is given by @memoryTypeCount@ and is less than or equal to
-- 'Vulkan.Core10.APIConstants.MAX_MEMORY_TYPES'. Each memory type is
-- described by an element of the @memoryTypes@ array as a 'MemoryType'
-- structure.
--
-- At least one heap /must/ include
-- 'Vulkan.Core10.Enums.MemoryHeapFlagBits.MEMORY_HEAP_DEVICE_LOCAL_BIT' in
-- 'MemoryHeap'::@flags@. If there are multiple heaps that all have similar
-- performance characteristics, they /may/ all include
-- 'Vulkan.Core10.Enums.MemoryHeapFlagBits.MEMORY_HEAP_DEVICE_LOCAL_BIT'.
-- In a unified memory architecture (UMA) system there is often only a
-- single memory heap which is considered to be equally “local” to the host
-- and to the device, and such an implementation /must/ advertise the heap
-- as device-local.
--
-- Memory contents within a tile memory heap, denoted by
-- 'Vulkan.Core10.Enums.MemoryHeapFlagBits.MEMORY_HEAP_TILE_MEMORY_BIT_QCOM',
-- are only visible across the command buffers executed in a single command
-- buffer submission batch within a 'Vulkan.Core10.Queue.queueSubmit' or
-- 'Vulkan.Core13.Promoted_From_VK_KHR_synchronization2.queueSubmit2' call.
-- If the
-- 'Vulkan.Extensions.VK_QCOM_tile_memory_heap.PhysicalDeviceTileMemoryHeapPropertiesQCOM'::@queueSubmitBoundary@
-- property is set, the visibility is extended across all batches in the
-- submit call. Memory contents are discarded and made undefined after the
-- respective submission batch or submit call. Tile memory /may/ have
-- different performance characteristics than non tile memory. Tile memory
-- /can/ be used simultaneously by command buffers in other queues without
-- invalidating each others contents. Collectively, these rules define the
-- /tile memory scope/.
--
-- Tile memory heaps work differently than most heaps as it is allowing
-- addressing on device cache memory. Therefore, the heap’s address space
-- is aliased across the different queues, with each queue retaining its
-- individual copy of the heap. The implementation takes care of any
-- required saving and restoring of the tile memory contents.
--
-- Effectively, this means that the same address in the heap in different
-- queues have simultaneously different defined contents and the contents
-- has a lifespan scoped to the submit or batch for that specific queues.
--
-- Each memory type returned by 'getPhysicalDeviceMemoryProperties' /must/
-- have its @propertyFlags@ set to one of the following values:
--
-- -   0
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_PROTECTED_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_PROTECTED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_CACHED_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--
-- -   'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
--     |
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV'
--
-- There /must/ be at least one memory type with both the
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
-- and
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT'
-- bits set in its @propertyFlags@. There /must/ be at least one memory
-- type with the
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
-- bit set in its @propertyFlags@. If the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-deviceCoherentMemory deviceCoherentMemory>
-- feature is enabled, there /must/ be at least one memory type with the
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
-- bit set in its @propertyFlags@.
--
-- For each pair of elements __X__ and __Y__ returned in @memoryTypes@,
-- __X__ /must/ be placed at a lower index position than __Y__ if:
--
-- -   the set of bit flags returned in the @propertyFlags@ member of __X__
--     is a strict subset of the set of bit flags returned in the
--     @propertyFlags@ member of __Y__; or
--
-- -   the @propertyFlags@ members of __X__ and __Y__ are equal, and __X__
--     belongs to a memory heap with greater performance (as determined in
--     an implementation-specific manner) ; or
--
-- -   the @propertyFlags@ members of __Y__ includes
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD'
--     or
--     'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD'
--     and __X__ does not
--
-- There is no ordering requirement between __X__ and __Y__ elements for
-- the case their @propertyFlags@ members are not in a subset relation.
-- That potentially allows more than one possible way to order the same set
-- of memory types. Notice that the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-device-bitmask-list list of all allowed memory property flag combinations>
-- is written in a valid order. But if instead
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_DEVICE_LOCAL_BIT'
-- was before
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_VISIBLE_BIT'
-- |
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_HOST_COHERENT_BIT',
-- the list would still be in a valid order.
--
-- There may be a performance penalty for using device coherent or uncached
-- device memory types, and using these accidentally is undesirable. In
-- order to avoid this, memory types with these properties always appear at
-- the end of the list; but are subject to the same rules otherwise.
--
-- This ordering requirement enables applications to use a simple search
-- loop to select the desired memory type along the lines of:
--
-- > // Find a memory in `memoryTypeBitsRequirement` that includes all of `requiredProperties`
-- > int32_t findProperties(const VkPhysicalDeviceMemoryProperties* pMemoryProperties,
-- >                        uint32_t memoryTypeBitsRequirement,
-- >                        VkMemoryPropertyFlags requiredProperties) {
-- >     const uint32_t memoryCount = pMemoryProperties->memoryTypeCount;
-- >     for (uint32_t memoryIndex = 0; memoryIndex < memoryCount; ++memoryIndex) {
-- >         const uint32_t memoryTypeBits = (1 << memoryIndex);
-- >         const bool isRequiredMemoryType = memoryTypeBitsRequirement & memoryTypeBits;
-- >
-- >         const VkMemoryPropertyFlags properties =
-- >             pMemoryProperties->memoryTypes[memoryIndex].propertyFlags;
-- >         const bool hasRequiredProperties =
-- >             (properties & requiredProperties) == requiredProperties;
-- >
-- >         if (isRequiredMemoryType && hasRequiredProperties)
-- >             return static_cast<int32_t>(memoryIndex);
-- >     }
-- >
-- >     // failed to find memory type
-- >     return -1;
-- > }
-- >
-- > // Try to find an optimal memory type, or if it does not exist try fallback memory type
-- > // `device` is the VkDevice
-- > // `image` is the VkImage that requires memory to be bound
-- > // `memoryProperties` properties as returned by vkGetPhysicalDeviceMemoryProperties
-- > // `requiredProperties` are the property flags that must be present
-- > // `optimalProperties` are the property flags that are preferred by the application
-- > VkMemoryRequirements memoryRequirements;
-- > vkGetImageMemoryRequirements(device, image, &memoryRequirements);
-- > int32_t memoryType =
-- >     findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, optimalProperties);
-- > if (memoryType == -1) // not found; try fallback properties
-- >     memoryType =
-- >         findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, requiredProperties);
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'MemoryHeap', 'MemoryType',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceMemoryProperties2',
-- 'getPhysicalDeviceMemoryProperties'
data PhysicalDeviceMemoryProperties = PhysicalDeviceMemoryProperties
  { -- | @memoryTypeCount@ is the number of valid elements in the @memoryTypes@
    -- array.
    PhysicalDeviceMemoryProperties -> Word32
memoryTypeCount :: Word32
  , -- | @memoryTypes@ is an array of
    -- 'Vulkan.Core10.APIConstants.MAX_MEMORY_TYPES' 'MemoryType' structures
    -- describing the /memory types/ that /can/ be used to access memory
    -- allocated from the heaps specified by @memoryHeaps@.
    PhysicalDeviceMemoryProperties -> Vector MemoryType
memoryTypes :: Vector MemoryType
  , -- | @memoryHeapCount@ is the number of valid elements in the @memoryHeaps@
    -- array.
    PhysicalDeviceMemoryProperties -> Word32
memoryHeapCount :: Word32
  , -- | @memoryHeaps@ is an array of
    -- 'Vulkan.Core10.APIConstants.MAX_MEMORY_HEAPS' 'MemoryHeap' structures
    -- describing the /memory heaps/ from which memory /can/ be allocated.
    PhysicalDeviceMemoryProperties -> Vector MemoryHeap
memoryHeaps :: Vector MemoryHeap
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMemoryProperties)
#endif
deriving instance Show PhysicalDeviceMemoryProperties

instance ToCStruct PhysicalDeviceMemoryProperties where
  withCStruct :: forall b.
PhysicalDeviceMemoryProperties
-> (Ptr PhysicalDeviceMemoryProperties -> IO b) -> IO b
withCStruct PhysicalDeviceMemoryProperties
x Ptr PhysicalDeviceMemoryProperties -> IO b
f = Int -> (Ptr PhysicalDeviceMemoryProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
520 ((Ptr PhysicalDeviceMemoryProperties -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMemoryProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMemoryProperties
p -> Ptr PhysicalDeviceMemoryProperties
-> PhysicalDeviceMemoryProperties -> IO b -> IO b
forall b.
Ptr PhysicalDeviceMemoryProperties
-> PhysicalDeviceMemoryProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryProperties
p PhysicalDeviceMemoryProperties
x (Ptr PhysicalDeviceMemoryProperties -> IO b
f Ptr PhysicalDeviceMemoryProperties
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceMemoryProperties
-> PhysicalDeviceMemoryProperties -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryProperties
p PhysicalDeviceMemoryProperties{Word32
Vector MemoryType
Vector MemoryHeap
memoryTypeCount :: PhysicalDeviceMemoryProperties -> Word32
memoryTypes :: PhysicalDeviceMemoryProperties -> Vector MemoryType
memoryHeapCount :: PhysicalDeviceMemoryProperties -> Word32
memoryHeaps :: PhysicalDeviceMemoryProperties -> Vector MemoryHeap
memoryTypeCount :: Word32
memoryTypes :: Vector MemoryType
memoryHeapCount :: Word32
memoryHeaps :: Vector MemoryHeap
..} IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
memoryTypeCount)
    Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((Vector MemoryType -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector MemoryType -> Int) -> Vector MemoryType -> Int
forall a b. (a -> b) -> a -> b
$ (Vector MemoryType
memoryTypes)) Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
<= Int
forall a. Integral a => a
MAX_MEMORY_TYPES) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
      IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"memoryTypes is too long, a maximum of MAX_MEMORY_TYPES elements are allowed" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
    (Int -> MemoryType -> FN_vkVoidFunction)
-> Vector MemoryType -> FN_vkVoidFunction
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i MemoryType
e -> Ptr MemoryType -> MemoryType -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr (FixedArray MAX_MEMORY_TYPES MemoryType) -> Ptr MemoryType
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties
-> Int -> Ptr (FixedArray MAX_MEMORY_TYPES MemoryType)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr (FixedArray MAX_MEMORY_TYPES MemoryType)))) Ptr MemoryType -> Int -> Ptr MemoryType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr MemoryType) (MemoryType
e)) (Vector MemoryType
memoryTypes)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (Word32
memoryHeapCount)
    Bool -> FN_vkVoidFunction -> FN_vkVoidFunction
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((Vector MemoryHeap -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector MemoryHeap -> Int) -> Vector MemoryHeap -> Int
forall a b. (a -> b) -> a -> b
$ (Vector MemoryHeap
memoryHeaps)) Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
<= Int
forall a. Integral a => a
MAX_MEMORY_HEAPS) (FN_vkVoidFunction -> FN_vkVoidFunction)
-> FN_vkVoidFunction -> FN_vkVoidFunction
forall a b. (a -> b) -> a -> b
$
      IOException -> FN_vkVoidFunction
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> FN_vkVoidFunction)
-> IOException -> FN_vkVoidFunction
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 String
"" String
"memoryHeaps is too long, a maximum of MAX_MEMORY_HEAPS elements are allowed" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
    (Int -> MemoryHeap -> FN_vkVoidFunction)
-> Vector MemoryHeap -> FN_vkVoidFunction
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i MemoryHeap
e -> Ptr MemoryHeap -> MemoryHeap -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr (FixedArray UUID_SIZE MemoryHeap) -> Ptr MemoryHeap
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties
-> Int -> Ptr (FixedArray UUID_SIZE MemoryHeap)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr (FixedArray MAX_MEMORY_HEAPS MemoryHeap)))) Ptr MemoryHeap -> Int -> Ptr MemoryHeap
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr MemoryHeap) (MemoryHeap
e)) (Vector MemoryHeap
memoryHeaps)
    IO b
f
  cStructSize :: Int
cStructSize = Int
520
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceMemoryProperties -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMemoryProperties
p IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceMemoryProperties where
  peekCStruct :: Ptr PhysicalDeviceMemoryProperties
-> IO PhysicalDeviceMemoryProperties
peekCStruct Ptr PhysicalDeviceMemoryProperties
p = do
    memoryTypeCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    memoryTypes <- generateM (MAX_MEMORY_TYPES) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @MemoryType (((forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @MemoryType ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties
-> Int -> Ptr (FixedArray MAX_MEMORY_TYPES MemoryType)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr (FixedArray MAX_MEMORY_TYPES MemoryType)))) Ptr MemoryType -> Int -> Ptr MemoryType
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr MemoryType)))
    memoryHeapCount <- peek @Word32 ((p `plusPtr` 260 :: Ptr Word32))
    memoryHeaps <- generateM (MAX_MEMORY_HEAPS) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @MemoryHeap (((forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @MemoryHeap ((Ptr PhysicalDeviceMemoryProperties
p Ptr PhysicalDeviceMemoryProperties
-> Int -> Ptr (FixedArray UUID_SIZE MemoryHeap)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr (FixedArray MAX_MEMORY_HEAPS MemoryHeap)))) Ptr MemoryHeap -> Int -> Ptr MemoryHeap
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr MemoryHeap)))
    pure $ PhysicalDeviceMemoryProperties
             memoryTypeCount memoryTypes memoryHeapCount memoryHeaps

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

instance Zero PhysicalDeviceMemoryProperties where
  zero :: PhysicalDeviceMemoryProperties
zero = Word32
-> Vector MemoryType
-> Word32
-> Vector MemoryHeap
-> PhysicalDeviceMemoryProperties
PhysicalDeviceMemoryProperties
           Word32
forall a. Zero a => a
zero
           Vector MemoryType
forall a. Monoid a => a
mempty
           Word32
forall a. Zero a => a
zero
           Vector MemoryHeap
forall a. Monoid a => a
mempty


-- | VkMemoryType - Structure specifying memory type
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MemoryPropertyFlags',
-- 'PhysicalDeviceMemoryProperties'
data MemoryType = MemoryType
  { -- | @propertyFlags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.MemoryPropertyFlagBits.MemoryPropertyFlagBits' of
    -- properties for this memory type.
    MemoryType -> MemoryPropertyFlags
propertyFlags :: MemoryPropertyFlags
  , -- | @heapIndex@ describes which memory heap this memory type corresponds to,
    -- and /must/ be less than @memoryHeapCount@ from the
    -- 'PhysicalDeviceMemoryProperties' structure.
    MemoryType -> Word32
heapIndex :: Word32
  }
  deriving (Typeable, MemoryType -> MemoryType -> Bool
(MemoryType -> MemoryType -> Bool)
-> (MemoryType -> MemoryType -> Bool) -> Eq MemoryType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryType -> MemoryType -> Bool
== :: MemoryType -> MemoryType -> Bool
$c/= :: MemoryType -> MemoryType -> Bool
/= :: MemoryType -> MemoryType -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (MemoryType)
#endif
deriving instance Show MemoryType

instance ToCStruct MemoryType where
  withCStruct :: forall b. MemoryType -> (Ptr MemoryType -> IO b) -> IO b
withCStruct MemoryType
x Ptr MemoryType -> IO b
f = Int -> (Ptr MemoryType -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 ((Ptr MemoryType -> IO b) -> IO b)
-> (Ptr MemoryType -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr MemoryType
p -> Ptr MemoryType -> MemoryType -> IO b -> IO b
forall b. Ptr MemoryType -> MemoryType -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryType
p MemoryType
x (Ptr MemoryType -> IO b
f Ptr MemoryType
p)
  pokeCStruct :: forall b. Ptr MemoryType -> MemoryType -> IO b -> IO b
pokeCStruct Ptr MemoryType
p MemoryType{Word32
MemoryPropertyFlags
propertyFlags :: MemoryType -> MemoryPropertyFlags
heapIndex :: MemoryType -> Word32
propertyFlags :: MemoryPropertyFlags
heapIndex :: Word32
..} IO b
f = do
    Ptr MemoryPropertyFlags -> MemoryPropertyFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryType
p Ptr MemoryType -> Int -> Ptr MemoryPropertyFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr MemoryPropertyFlags)) (MemoryPropertyFlags
propertyFlags)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryType
p Ptr MemoryType -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
heapIndex)
    IO b
f
  cStructSize :: Int
cStructSize = Int
8
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr MemoryType -> IO b -> IO b
pokeZeroCStruct Ptr MemoryType
p IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryType
p Ptr MemoryType -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct MemoryType where
  peekCStruct :: Ptr MemoryType -> IO MemoryType
peekCStruct Ptr MemoryType
p = do
    propertyFlags <- forall a. Storable a => Ptr a -> IO a
peek @MemoryPropertyFlags ((Ptr MemoryType
p Ptr MemoryType -> Int -> Ptr MemoryPropertyFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr MemoryPropertyFlags))
    heapIndex <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32))
    pure $ MemoryType
             propertyFlags heapIndex

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

instance Zero MemoryType where
  zero :: MemoryType
zero = MemoryPropertyFlags -> Word32 -> MemoryType
MemoryType
           MemoryPropertyFlags
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero


-- | VkMemoryHeap - Structure specifying a memory heap
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.MemoryHeapFlagBits.MemoryHeapFlags',
-- 'PhysicalDeviceMemoryProperties'
data MemoryHeap = MemoryHeap
  { -- | @size@ is the total memory size in bytes in the heap.
    MemoryHeap -> DeviceSize
size :: DeviceSize
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.MemoryHeapFlagBits.MemoryHeapFlagBits' specifying
    -- attribute flags for the heap.
    MemoryHeap -> MemoryHeapFlags
flags :: MemoryHeapFlags
  }
  deriving (Typeable, MemoryHeap -> MemoryHeap -> Bool
(MemoryHeap -> MemoryHeap -> Bool)
-> (MemoryHeap -> MemoryHeap -> Bool) -> Eq MemoryHeap
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryHeap -> MemoryHeap -> Bool
== :: MemoryHeap -> MemoryHeap -> Bool
$c/= :: MemoryHeap -> MemoryHeap -> Bool
/= :: MemoryHeap -> MemoryHeap -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (MemoryHeap)
#endif
deriving instance Show MemoryHeap

instance ToCStruct MemoryHeap where
  withCStruct :: forall b. MemoryHeap -> (Ptr MemoryHeap -> IO b) -> IO b
withCStruct MemoryHeap
x Ptr MemoryHeap -> IO b
f = Int -> (Ptr MemoryHeap -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr MemoryHeap -> IO b) -> IO b)
-> (Ptr MemoryHeap -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr MemoryHeap
p -> Ptr MemoryHeap -> MemoryHeap -> IO b -> IO b
forall b. Ptr MemoryHeap -> MemoryHeap -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryHeap
p MemoryHeap
x (Ptr MemoryHeap -> IO b
f Ptr MemoryHeap
p)
  pokeCStruct :: forall b. Ptr MemoryHeap -> MemoryHeap -> IO b -> IO b
pokeCStruct Ptr MemoryHeap
p MemoryHeap{DeviceSize
MemoryHeapFlags
size :: MemoryHeap -> DeviceSize
flags :: MemoryHeap -> MemoryHeapFlags
size :: DeviceSize
flags :: MemoryHeapFlags
..} IO b
f = do
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryHeap
p Ptr MemoryHeap -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceSize)) (DeviceSize
size)
    Ptr MemoryHeapFlags -> MemoryHeapFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryHeap
p Ptr MemoryHeap -> Int -> Ptr MemoryHeapFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr MemoryHeapFlags)) (MemoryHeapFlags
flags)
    IO b
f
  cStructSize :: Int
cStructSize = Int
16
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr MemoryHeap -> IO b -> IO b
pokeZeroCStruct Ptr MemoryHeap
p IO b
f = do
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr MemoryHeap
p Ptr MemoryHeap -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct MemoryHeap where
  peekCStruct :: Ptr MemoryHeap -> IO MemoryHeap
peekCStruct Ptr MemoryHeap
p = do
    size <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr MemoryHeap
p Ptr MemoryHeap -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceSize))
    flags <- peek @MemoryHeapFlags ((p `plusPtr` 8 :: Ptr MemoryHeapFlags))
    pure $ MemoryHeap
             size flags

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

instance Zero MemoryHeap where
  zero :: MemoryHeap
zero = DeviceSize -> MemoryHeapFlags -> MemoryHeap
MemoryHeap
           DeviceSize
forall a. Zero a => a
zero
           MemoryHeapFlags
forall a. Zero a => a
zero


-- | VkFormatProperties - Structure specifying image format properties
--
-- = Description
--
-- If no format feature flags are supported, the format itself is not
-- supported, and images of that format cannot be created.
--
-- If @format@ is block-compressed,
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion requires sampler Y′CBCR conversion>,
-- or is a depth\/stencil format then @bufferFeatures@ /must/ not support
-- any features for the format.
--
-- If @format@ is not a multi-plane format then @linearTilingFeatures@ and
-- @optimalTilingFeatures@ /must/ not contain
-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_DISJOINT_BIT'.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlags',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.FormatProperties2',
-- 'getPhysicalDeviceFormatProperties'
data FormatProperties = FormatProperties
  { -- | @linearTilingFeatures@ is a bitmask of
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlagBits'
    -- specifying features supported by images created with a @tiling@
    -- parameter of 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR'.
    FormatProperties -> FormatFeatureFlags
linearTilingFeatures :: FormatFeatureFlags
  , -- | @optimalTilingFeatures@ is a bitmask of
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlagBits'
    -- specifying features supported by images created with a @tiling@
    -- parameter of 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL'.
    FormatProperties -> FormatFeatureFlags
optimalTilingFeatures :: FormatFeatureFlags
  , -- | @bufferFeatures@ is a bitmask of
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlagBits'
    -- specifying features supported by buffers.
    FormatProperties -> FormatFeatureFlags
bufferFeatures :: FormatFeatureFlags
  }
  deriving (Typeable, FormatProperties -> FormatProperties -> Bool
(FormatProperties -> FormatProperties -> Bool)
-> (FormatProperties -> FormatProperties -> Bool)
-> Eq FormatProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FormatProperties -> FormatProperties -> Bool
== :: FormatProperties -> FormatProperties -> Bool
$c/= :: FormatProperties -> FormatProperties -> Bool
/= :: FormatProperties -> FormatProperties -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (FormatProperties)
#endif
deriving instance Show FormatProperties

instance ToCStruct FormatProperties where
  withCStruct :: forall b.
FormatProperties -> (Ptr FormatProperties -> IO b) -> IO b
withCStruct FormatProperties
x Ptr FormatProperties -> IO b
f = Int -> (Ptr FormatProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
12 ((Ptr FormatProperties -> IO b) -> IO b)
-> (Ptr FormatProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr FormatProperties
p -> Ptr FormatProperties -> FormatProperties -> IO b -> IO b
forall b. Ptr FormatProperties -> FormatProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr FormatProperties
p FormatProperties
x (Ptr FormatProperties -> IO b
f Ptr FormatProperties
p)
  pokeCStruct :: forall b. Ptr FormatProperties -> FormatProperties -> IO b -> IO b
pokeCStruct Ptr FormatProperties
p FormatProperties{FormatFeatureFlags
linearTilingFeatures :: FormatProperties -> FormatFeatureFlags
optimalTilingFeatures :: FormatProperties -> FormatFeatureFlags
bufferFeatures :: FormatProperties -> FormatFeatureFlags
linearTilingFeatures :: FormatFeatureFlags
optimalTilingFeatures :: FormatFeatureFlags
bufferFeatures :: FormatFeatureFlags
..} IO b
f = do
    Ptr FormatFeatureFlags -> FormatFeatureFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr FormatProperties
p Ptr FormatProperties -> Int -> Ptr FormatFeatureFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr FormatFeatureFlags)) (FormatFeatureFlags
linearTilingFeatures)
    Ptr FormatFeatureFlags -> FormatFeatureFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr FormatProperties
p Ptr FormatProperties -> Int -> Ptr FormatFeatureFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FormatFeatureFlags)) (FormatFeatureFlags
optimalTilingFeatures)
    Ptr FormatFeatureFlags -> FormatFeatureFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr FormatProperties
p Ptr FormatProperties -> Int -> Ptr FormatFeatureFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr FormatFeatureFlags)) (FormatFeatureFlags
bufferFeatures)
    IO b
f
  cStructSize :: Int
cStructSize = Int
12
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr FormatProperties -> IO b -> IO b
pokeZeroCStruct Ptr FormatProperties
_ IO b
f = IO b
f

instance FromCStruct FormatProperties where
  peekCStruct :: Ptr FormatProperties -> IO FormatProperties
peekCStruct Ptr FormatProperties
p = do
    linearTilingFeatures <- forall a. Storable a => Ptr a -> IO a
peek @FormatFeatureFlags ((Ptr FormatProperties
p Ptr FormatProperties -> Int -> Ptr FormatFeatureFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr FormatFeatureFlags))
    optimalTilingFeatures <- peek @FormatFeatureFlags ((p `plusPtr` 4 :: Ptr FormatFeatureFlags))
    bufferFeatures <- peek @FormatFeatureFlags ((p `plusPtr` 8 :: Ptr FormatFeatureFlags))
    pure $ FormatProperties
             linearTilingFeatures optimalTilingFeatures bufferFeatures

instance Storable FormatProperties where
  sizeOf :: FormatProperties -> Int
sizeOf ~FormatProperties
_ = Int
12
  alignment :: FormatProperties -> Int
alignment ~FormatProperties
_ = Int
4
  peek :: Ptr FormatProperties -> IO FormatProperties
peek = Ptr FormatProperties -> IO FormatProperties
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr FormatProperties -> FormatProperties -> FN_vkVoidFunction
poke Ptr FormatProperties
ptr FormatProperties
poked = Ptr FormatProperties
-> FormatProperties -> FN_vkVoidFunction -> FN_vkVoidFunction
forall b. Ptr FormatProperties -> FormatProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr FormatProperties
ptr FormatProperties
poked (() -> FN_vkVoidFunction
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero FormatProperties where
  zero :: FormatProperties
zero = FormatFeatureFlags
-> FormatFeatureFlags -> FormatFeatureFlags -> FormatProperties
FormatProperties
           FormatFeatureFlags
forall a. Zero a => a
zero
           FormatFeatureFlags
forall a. Zero a => a
zero
           FormatFeatureFlags
forall a. Zero a => a
zero


-- | VkImageFormatProperties - Structure specifying an image format
-- properties
--
-- = Members
--
-- -   @maxExtent@ are the maximum image dimensions. See the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-extentperimagetype Allowed Extent Values>
--     section below for how these values are constrained by @type@.
--
-- -   @maxMipLevels@ is the maximum number of mipmap levels.
--     @maxMipLevels@ /must/ be equal to the number of levels in the
--     complete mipmap chain based on the @maxExtent.width@,
--     @maxExtent.height@, and @maxExtent.depth@, except when one of the
--     following conditions is true, in which case it /may/ instead be @1@:
--
--     -   'getPhysicalDeviceImageFormatProperties'::@tiling@ was
--         'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR'
--
--     -   'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'::@tiling@
--         was
--         'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT'
--
--     -   the
--         'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'::@pNext@
--         chain included a
--         'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceExternalImageFormatInfo'
--         structure with a handle type included in the @handleTypes@
--         member for which mipmap image support is not required
--
--     -   image @format@ is one of the
--         <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion formats that require a sampler Y′CBCR conversion>
--
--     -   @flags@ contains
--         'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'
--
-- -   @maxArrayLayers@ is the maximum number of array layers.
--     @maxArrayLayers@ /must/ be no less than
--     'PhysicalDeviceLimits'::@maxImageArrayLayers@, except when one of
--     the following conditions is true, in which case it /may/ instead be
--     @1@:
--
--     -   @tiling@ is
--         'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR'
--
--     -   @tiling@ is
--         'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL' and
--         @type@ is 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D'
--
--     -   @format@ is one of the
--         <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion formats that require a sampler Y′CBCR conversion>
--
-- -   If @tiling@ is
--     'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT',
--     then @maxArrayLayers@ /must/ not be 0.
--
-- -   @sampleCounts@ is a bitmask of
--     'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'
--     specifying all the supported sample counts for this image as
--     described
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-supported-sample-counts below>.
--
-- -   @maxResourceSize@ is an upper bound on the total image size in
--     bytes, inclusive of all image subresources. Implementations /may/
--     have an address space limit on total size of a resource, which is
--     advertised by this property. @maxResourceSize@ /must/ be at least
--     231.
--
-- = Description
--
-- There is no mechanism to query the size of an image before creating it,
-- to compare that size against @maxResourceSize@. If an application
-- attempts to create an image that exceeds this limit, the creation will
-- fail and 'Vulkan.Core10.Image.createImage' will return
-- 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'. While the
-- advertised limit /must/ be at least 231, it /may/ not be possible to
-- create an image that approaches that size, particularly for
-- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D'.
--
-- If the combination of parameters to
-- 'getPhysicalDeviceImageFormatProperties' is not supported by the
-- implementation for use in 'Vulkan.Core10.Image.createImage', then all
-- members of 'ImageFormatProperties' will be filled with zero.
--
-- Filling 'ImageFormatProperties' with zero for unsupported formats is an
-- exception to the usual rule that output structures have undefined
-- contents on error. This exception was unintentional, but is preserved
-- for backwards compatibility.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.FundamentalTypes.Extent3D',
-- 'Vulkan.Extensions.VK_NV_external_memory_capabilities.ExternalImageFormatPropertiesNV',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.ImageFormatProperties2',
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlags',
-- 'getPhysicalDeviceImageFormatProperties'
data ImageFormatProperties = ImageFormatProperties
  { -- No documentation found for Nested "VkImageFormatProperties" "maxExtent"
    ImageFormatProperties -> Extent3D
maxExtent :: Extent3D
  , -- No documentation found for Nested "VkImageFormatProperties" "maxMipLevels"
    ImageFormatProperties -> Word32
maxMipLevels :: Word32
  , -- No documentation found for Nested "VkImageFormatProperties" "maxArrayLayers"
    ImageFormatProperties -> Word32
maxArrayLayers :: Word32
  , -- No documentation found for Nested "VkImageFormatProperties" "sampleCounts"
    ImageFormatProperties -> SampleCountFlags
sampleCounts :: SampleCountFlags
  , -- No documentation found for Nested "VkImageFormatProperties" "maxResourceSize"
    ImageFormatProperties -> DeviceSize
maxResourceSize :: DeviceSize
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImageFormatProperties)
#endif
deriving instance Show ImageFormatProperties

instance ToCStruct ImageFormatProperties where
  withCStruct :: forall b.
ImageFormatProperties
-> (Ptr ImageFormatProperties -> IO b) -> IO b
withCStruct ImageFormatProperties
x Ptr ImageFormatProperties -> IO b
f = Int -> (Ptr ImageFormatProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr ImageFormatProperties -> IO b) -> IO b)
-> (Ptr ImageFormatProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ImageFormatProperties
p -> Ptr ImageFormatProperties -> ImageFormatProperties -> IO b -> IO b
forall b.
Ptr ImageFormatProperties -> ImageFormatProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageFormatProperties
p ImageFormatProperties
x (Ptr ImageFormatProperties -> IO b
f Ptr ImageFormatProperties
p)
  pokeCStruct :: forall b.
Ptr ImageFormatProperties -> ImageFormatProperties -> IO b -> IO b
pokeCStruct Ptr ImageFormatProperties
p ImageFormatProperties{Word32
DeviceSize
Extent3D
SampleCountFlags
maxExtent :: ImageFormatProperties -> Extent3D
maxMipLevels :: ImageFormatProperties -> Word32
maxArrayLayers :: ImageFormatProperties -> Word32
sampleCounts :: ImageFormatProperties -> SampleCountFlags
maxResourceSize :: ImageFormatProperties -> DeviceSize
maxExtent :: Extent3D
maxMipLevels :: Word32
maxArrayLayers :: Word32
sampleCounts :: SampleCountFlags
maxResourceSize :: DeviceSize
..} IO b
f = do
    Ptr Extent3D -> Extent3D -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Extent3D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Extent3D)) (Extent3D
maxExtent)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
maxMipLevels)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxArrayLayers)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlags)) (SampleCountFlags
sampleCounts)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceSize
maxResourceSize)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr ImageFormatProperties -> IO b -> IO b
pokeZeroCStruct Ptr ImageFormatProperties
p IO b
f = do
    Ptr Extent3D -> Extent3D -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Extent3D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Extent3D)) (Extent3D
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ImageFormatProperties where
  peekCStruct :: Ptr ImageFormatProperties -> IO ImageFormatProperties
peekCStruct Ptr ImageFormatProperties
p = do
    maxExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent3D ((Ptr ImageFormatProperties
p Ptr ImageFormatProperties -> Int -> Ptr Extent3D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Extent3D))
    maxMipLevels <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))
    maxArrayLayers <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
    sampleCounts <- peek @SampleCountFlags ((p `plusPtr` 20 :: Ptr SampleCountFlags))
    maxResourceSize <- peek @DeviceSize ((p `plusPtr` 24 :: Ptr DeviceSize))
    pure $ ImageFormatProperties
             maxExtent maxMipLevels maxArrayLayers sampleCounts maxResourceSize

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

instance Zero ImageFormatProperties where
  zero :: ImageFormatProperties
zero = Extent3D
-> Word32
-> Word32
-> SampleCountFlags
-> DeviceSize
-> ImageFormatProperties
ImageFormatProperties
           Extent3D
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero


-- | VkPhysicalDeviceFeatures - Structure describing the fine-grained
-- features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Device.DeviceCreateInfo',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
-- 'getPhysicalDeviceFeatures'
data PhysicalDeviceFeatures = PhysicalDeviceFeatures
  { -- | #features-robustBufferAccess# @robustBufferAccess@ enables
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#shaders-robust-buffer-access>
    -- guarantees for shader buffer accesses.
    PhysicalDeviceFeatures -> Bool
robustBufferAccess :: Bool
  , -- | #features-fullDrawIndexUint32# @fullDrawIndexUint32@ specifies the full
    -- 32-bit range of indices is supported for indexed draw calls when using a
    -- 'Vulkan.Core10.Enums.IndexType.IndexType' of
    -- 'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32'.
    -- @maxDrawIndexedIndexValue@ is the maximum index value that /may/ be used
    -- (aside from the primitive restart index, which is always 232-1 when the
    -- 'Vulkan.Core10.Enums.IndexType.IndexType' is
    -- 'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32'). If this feature is
    -- supported, @maxDrawIndexedIndexValue@ /must/ be 232-1; otherwise it
    -- /must/ be no smaller than 224-1. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-maxDrawIndexedIndexValue maxDrawIndexedIndexValue>.
    PhysicalDeviceFeatures -> Bool
fullDrawIndexUint32 :: Bool
  , -- | #features-imageCubeArray# @imageCubeArray@ specifies whether image views
    -- with a 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' of
    -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY' /can/ be
    -- created, and that the corresponding @SampledCubeArray@ and
    -- @ImageCubeArray@ SPIR-V capabilities /can/ be used in shader code.
    PhysicalDeviceFeatures -> Bool
imageCubeArray :: Bool
  , -- | #features-independentBlend# @independentBlend@ specifies whether the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineColorBlendAttachmentState'
    -- settings are controlled independently per-attachment. If this feature is
    -- not enabled, the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineColorBlendAttachmentState'
    -- settings for all color attachments /must/ be identical. Otherwise, a
    -- different
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineColorBlendAttachmentState' /can/
    -- be provided for each bound color attachment.
    PhysicalDeviceFeatures -> Bool
independentBlend :: Bool
  , -- | #features-geometryShader# @geometryShader@ specifies whether geometry
    -- shaders are supported. If this feature is not enabled, the
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT' and
    -- 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'
    -- enum values /must/ not be used. This also specifies whether shader
    -- modules /can/ declare the @Geometry@ capability.
    PhysicalDeviceFeatures -> Bool
geometryShader :: Bool
  , -- | #features-tessellationShader# @tessellationShader@ specifies whether
    -- tessellation control and evaluation shaders are supported. If this
    -- feature is not enabled, the
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT',
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT',
    -- 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT',
    -- 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT',
    -- and
    -- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO'
    -- enum values /must/ not be used. This also specifies whether shader
    -- modules /can/ declare the @Tessellation@ capability.
    PhysicalDeviceFeatures -> Bool
tessellationShader :: Bool
  , -- | #features-sampleRateShading# @sampleRateShading@ specifies whether
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-sampleshading Sample Shading>
    -- and multisample interpolation are supported. If this feature is not
    -- enabled, the @sampleShadingEnable@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineMultisampleStateCreateInfo'
    -- structure /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE' and the
    -- @minSampleShading@ member is ignored. This also specifies whether shader
    -- modules /can/ declare the @SampleRateShading@ capability.
    PhysicalDeviceFeatures -> Bool
sampleRateShading :: Bool
  , -- | #features-dualSrcBlend# @dualSrcBlend@ specifies whether blend
    -- operations which take two sources are supported. If this feature is not
    -- enabled, the 'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_COLOR',
    -- 'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_COLOR',
    -- 'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_ALPHA', and
    -- 'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA' enum
    -- values /must/ not be used as source or destination blending factors. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#framebuffer-dsb>.
    PhysicalDeviceFeatures -> Bool
dualSrcBlend :: Bool
  , -- | #features-logicOp# @logicOp@ specifies whether logic operations are
    -- supported. If this feature is not enabled, the @logicOpEnable@ member of
    -- the 'Vulkan.Core10.GraphicsPipeline.PipelineColorBlendStateCreateInfo'
    -- structure /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE', and the
    -- @logicOp@ member is ignored.
    PhysicalDeviceFeatures -> Bool
logicOp :: Bool
  , -- | #features-multiDrawIndirect# @multiDrawIndirect@ specifies whether
    -- multiple draw indirect is supported. If this feature is not enabled, the
    -- @drawCount@ parameter to the
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdDrawIndirect' and
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexedIndirect' commands
    -- /must/ be 0 or 1. The @maxDrawIndirectCount@ member of the
    -- 'PhysicalDeviceLimits' structure /must/ also be 1 if this feature is not
    -- supported. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-maxDrawIndirectCount maxDrawIndirectCount>.
    PhysicalDeviceFeatures -> Bool
multiDrawIndirect :: Bool
  , -- | #features-drawIndirectFirstInstance# @drawIndirectFirstInstance@
    -- specifies whether indirect drawing calls support the @firstInstance@
    -- parameter. If this feature is not enabled, the @firstInstance@ member of
    -- all 'Vulkan.Core10.OtherTypes.DrawIndirectCommand' and
    -- 'Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand' structures that
    -- are provided to the
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdDrawIndirect' and
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexedIndirect' commands
    -- /must/ be 0.
    PhysicalDeviceFeatures -> Bool
drawIndirectFirstInstance :: Bool
  , -- | #features-depthClamp# @depthClamp@ specifies whether depth clamping is
    -- supported. If this feature is not enabled, the @depthClampEnable@ member
    -- of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineRasterizationStateCreateInfo'
    -- structure /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE'. Otherwise,
    -- setting @depthClampEnable@ to 'Vulkan.Core10.FundamentalTypes.TRUE' will
    -- enable depth clamping.
    PhysicalDeviceFeatures -> Bool
depthClamp :: Bool
  , -- | #features-depthBiasClamp# @depthBiasClamp@ specifies whether depth bias
    -- clamping is supported. If this feature is not enabled, the
    -- @depthBiasClamp@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineRasterizationStateCreateInfo'
    -- structure /must/ be 0.0 unless the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS' dynamic
    -- state is enabled, in which case the @depthBiasClamp@ parameter to
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdSetDepthBias' /must/ be 0.0.
    PhysicalDeviceFeatures -> Bool
depthBiasClamp :: Bool
  , -- | #features-fillModeNonSolid# @fillModeNonSolid@ specifies whether point
    -- and wireframe fill modes are supported. If this feature is not enabled,
    -- the 'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_POINT' and
    -- 'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_LINE' enum values /must/
    -- not be used.
    PhysicalDeviceFeatures -> Bool
fillModeNonSolid :: Bool
  , -- | #features-depthBounds# @depthBounds@ specifies whether depth bounds
    -- tests are supported. If this feature is not enabled, the
    -- @depthBoundsTestEnable@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineDepthStencilStateCreateInfo'
    -- structure /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE' unless the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE'
    -- dynamic state is enabled, in which case the @depthBoundsTestEnable@
    -- parameter to
    -- 'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetDepthBoundsTestEnable'
    -- /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE'. When
    -- @depthBoundsTestEnable@ is 'Vulkan.Core10.FundamentalTypes.FALSE', the
    -- @minDepthBounds@ and @maxDepthBounds@ members of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineDepthStencilStateCreateInfo'
    -- structure are ignored.
    PhysicalDeviceFeatures -> Bool
depthBounds :: Bool
  , -- | #features-wideLines# @wideLines@ specifies whether lines with width
    -- other than 1.0 are supported. If this feature is not enabled, the
    -- @lineWidth@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineRasterizationStateCreateInfo'
    -- structure /must/ be 1.0 unless the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_WIDTH' dynamic
    -- state is enabled, in which case the @lineWidth@ parameter to
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdSetLineWidth' /must/ be 1.0.
    -- When this feature is supported, the range and granularity of supported
    -- line widths are indicated by the @lineWidthRange@ and
    -- @lineWidthGranularity@ members of the 'PhysicalDeviceLimits' structure,
    -- respectively.
    PhysicalDeviceFeatures -> Bool
wideLines :: Bool
  , -- | #features-largePoints# @largePoints@ specifies whether points with size
    -- greater than 1.0 are supported. If this feature is not enabled, only a
    -- point size of 1.0 written by a shader is supported. The range and
    -- granularity of supported point sizes are indicated by the
    -- @pointSizeRange@ and @pointSizeGranularity@ members of the
    -- 'PhysicalDeviceLimits' structure, respectively.
    PhysicalDeviceFeatures -> Bool
largePoints :: Bool
  , -- | #features-alphaToOne# @alphaToOne@ specifies whether the implementation
    -- is able to replace the alpha value of the fragment shader color output
    -- in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fragops-covg Multisample Coverage>
    -- fragment operation. If this feature is not enabled, then the
    -- @alphaToOneEnable@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineMultisampleStateCreateInfo'
    -- structure /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE'. Otherwise
    -- setting @alphaToOneEnable@ to 'Vulkan.Core10.FundamentalTypes.TRUE' will
    -- enable alpha-to-one behavior.
    PhysicalDeviceFeatures -> Bool
alphaToOne :: Bool
  , -- | #features-multiViewport# @multiViewport@ specifies whether more than one
    -- viewport is supported. If this feature is not enabled:
    --
    -- -   The @viewportCount@ and @scissorCount@ members of the
    --     'Vulkan.Core10.GraphicsPipeline.PipelineViewportStateCreateInfo'
    --     structure /must/ be 1.
    --
    -- -   The @firstViewport@ and @viewportCount@ parameters to the
    --     'Vulkan.Core10.CommandBufferBuilding.cmdSetViewport' command /must/
    --     be 0 and 1, respectively.
    --
    -- -   The @firstScissor@ and @scissorCount@ parameters to the
    --     'Vulkan.Core10.CommandBufferBuilding.cmdSetScissor' command /must/
    --     be 0 and 1, respectively.
    --
    -- -   The @exclusiveScissorCount@ member of the
    --     'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV'
    --     structure /must/ be 0 or 1.
    --
    -- -   The @firstExclusiveScissor@ and @exclusiveScissorCount@ parameters
    --     to the
    --     'Vulkan.Extensions.VK_NV_scissor_exclusive.cmdSetExclusiveScissorNV'
    --     command /must/ be 0 and 1, respectively.
    PhysicalDeviceFeatures -> Bool
multiViewport :: Bool
  , -- | #features-samplerAnisotropy# @samplerAnisotropy@ specifies whether
    -- anisotropic filtering is supported. If this feature is not enabled, the
    -- @anisotropyEnable@ member of the
    -- 'Vulkan.Core10.Sampler.SamplerCreateInfo' structure /must/ be
    -- 'Vulkan.Core10.FundamentalTypes.FALSE'.
    PhysicalDeviceFeatures -> Bool
samplerAnisotropy :: Bool
  , -- | #features-textureCompressionETC2# @textureCompressionETC2@ specifies
    -- whether all of the ETC2 and EAC compressed texture formats are
    -- supported. If this feature is enabled, then the
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_BIT',
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_SRC_BIT'
    -- and
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'
    -- features /must/ be supported in @optimalTilingFeatures@ for the
    -- following formats:
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_EAC_R11_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_EAC_R11_SNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_EAC_R11G11_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_EAC_R11G11_SNORM_BLOCK'
    --
    --     To query for additional properties, or if the feature is not
    --     enabled, 'getPhysicalDeviceFormatProperties' and
    --     'getPhysicalDeviceImageFormatProperties' /can/ be used to check for
    --     supported properties of individual formats as normal.
    PhysicalDeviceFeatures -> Bool
textureCompressionETC2 :: Bool
  , -- | #features-textureCompressionASTC_LDR# @textureCompressionASTC_LDR@
    -- specifies whether all of the ASTC LDR compressed texture formats are
    -- supported. If this feature is enabled, then the
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_BIT',
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_SRC_BIT'
    -- and
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'
    -- features /must/ be supported in @optimalTilingFeatures@ for the
    -- following formats:
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_4x4_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_4x4_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_5x4_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_5x4_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_5x5_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_5x5_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_6x5_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_6x5_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_6x6_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_6x6_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x5_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x5_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x6_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x6_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x8_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_8x8_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x5_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x5_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x6_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x6_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x8_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x8_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x10_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_10x10_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_12x10_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_12x10_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_12x12_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_ASTC_12x12_SRGB_BLOCK'
    --
    --     To query for additional properties, or if the feature is not
    --     enabled, 'getPhysicalDeviceFormatProperties' and
    --     'getPhysicalDeviceImageFormatProperties' /can/ be used to check for
    --     supported properties of individual formats as normal.
    PhysicalDeviceFeatures -> Bool
textureCompressionASTC_LDR :: Bool
  , -- | #features-textureCompressionBC# @textureCompressionBC@ specifies whether
    -- all of the BC compressed texture formats are supported. If this feature
    -- is enabled, then the
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_BIT',
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_SRC_BIT'
    -- and
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'
    -- features /must/ be supported in @optimalTilingFeatures@ for the
    -- following formats:
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC1_RGB_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC1_RGB_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC1_RGBA_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC1_RGBA_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC2_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC2_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC3_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC3_SRGB_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC4_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC4_SNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC5_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC5_SNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC6H_UFLOAT_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC6H_SFLOAT_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC7_UNORM_BLOCK'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_BC7_SRGB_BLOCK'
    --
    --     To query for additional properties, or if the feature is not
    --     enabled, 'getPhysicalDeviceFormatProperties' and
    --     'getPhysicalDeviceImageFormatProperties' /can/ be used to check for
    --     supported properties of individual formats as normal.
    PhysicalDeviceFeatures -> Bool
textureCompressionBC :: Bool
  , -- | #features-occlusionQueryPrecise# @occlusionQueryPrecise@ specifies
    -- whether occlusion queries returning actual sample counts are supported.
    -- Occlusion queries are created in a 'Vulkan.Core10.Handles.QueryPool' by
    -- specifying the @queryType@ of
    -- 'Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' in the
    -- 'Vulkan.Core10.Query.QueryPoolCreateInfo' structure which is passed to
    -- 'Vulkan.Core10.Query.createQueryPool'. If this feature is enabled,
    -- queries of this type /can/ enable
    -- 'Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT' in
    -- the @flags@ parameter to
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdBeginQuery'. If this feature is
    -- not supported, the implementation supports only boolean occlusion
    -- queries. When any samples are passed, boolean queries will return a
    -- non-zero result value, otherwise a result value of zero is returned.
    -- When this feature is enabled and
    -- 'Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT' is
    -- set, occlusion queries will report the actual number of samples passed.
    PhysicalDeviceFeatures -> Bool
occlusionQueryPrecise :: Bool
  , -- | #features-pipelineStatisticsQuery# @pipelineStatisticsQuery@ specifies
    -- whether the pipeline statistics queries are supported. If this feature
    -- is not enabled, queries of type
    -- 'Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS' /cannot/
    -- be created, and none of the
    -- 'Vulkan.Core10.Enums.QueryPipelineStatisticFlagBits.QueryPipelineStatisticFlagBits'
    -- bits /can/ be set in the @pipelineStatistics@ member of the
    -- 'Vulkan.Core10.Query.QueryPoolCreateInfo' structure.
    PhysicalDeviceFeatures -> Bool
pipelineStatisticsQuery :: Bool
  , -- | #features-vertexPipelineStoresAndAtomics#
    -- @vertexPipelineStoresAndAtomics@ specifies whether storage buffers and
    -- images support stores and atomic operations in the vertex, tessellation,
    -- and geometry shader stages. If this feature is not enabled, all storage
    -- image, storage texel buffer, and storage buffer variables used by these
    -- stages in shader modules /must/ be decorated with the @NonWritable@
    -- decoration (or the @readonly@ memory qualifier in GLSL).
    PhysicalDeviceFeatures -> Bool
vertexPipelineStoresAndAtomics :: Bool
  , -- | #features-fragmentStoresAndAtomics# @fragmentStoresAndAtomics@ specifies
    -- whether storage buffers and images support stores and atomic operations
    -- in the fragment shader stage. If this feature is not enabled, all
    -- storage image, storage texel buffer, and storage buffer variables used
    -- by the fragment stage in shader modules /must/ be decorated with the
    -- @NonWritable@ decoration (or the @readonly@ memory qualifier in GLSL).
    PhysicalDeviceFeatures -> Bool
fragmentStoresAndAtomics :: Bool
  , -- | #features-shaderTessellationAndGeometryPointSize#
    -- @shaderTessellationAndGeometryPointSize@ specifies whether the
    -- @PointSize@ built-in decoration is available in the tessellation
    -- control, tessellation evaluation, and geometry shader stages. If this
    -- feature is not enabled, members decorated with the @PointSize@ built-in
    -- decoration /must/ not be read from or written to and all points written
    -- from a tessellation or geometry shader will have a size of 1.0. This
    -- also specifies whether shader modules /can/ declare the
    -- @TessellationPointSize@ capability for tessellation control and
    -- evaluation shaders, or if the shader modules /can/ declare the
    -- @GeometryPointSize@ capability for geometry shaders. An implementation
    -- supporting this feature /must/ also support one or both of the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-tessellationShader tessellationShader>
    -- or
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-geometryShader geometryShader>
    -- features.
    PhysicalDeviceFeatures -> Bool
shaderTessellationAndGeometryPointSize :: Bool
  , -- | #features-shaderImageGatherExtended# @shaderImageGatherExtended@
    -- specifies whether the extended set of image gather instructions are
    -- available in shader code. If this feature is not enabled, the
    -- @OpImage*Gather@ instructions do not support the @Offset@ and
    -- @ConstOffsets@ operands. This also specifies whether shader modules
    -- /can/ declare the @ImageGatherExtended@ capability.
    PhysicalDeviceFeatures -> Bool
shaderImageGatherExtended :: Bool
  , -- | #features-shaderStorageImageExtendedFormats#
    -- @shaderStorageImageExtendedFormats@ specifies whether all the “storage
    -- image extended formats” below are supported; if this feature is
    -- supported, then the
    -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_BIT'
    -- /must/ be supported in @optimalTilingFeatures@ for the following
    -- formats:
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_SFLOAT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_B10G11R11_UFLOAT_PACK32'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16_SFLOAT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16B16A16_UNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_A2B10G10R10_UNORM_PACK32'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_UNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8G8_UNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16_UNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8_UNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16B16A16_SNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_SNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8G8_SNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16_SNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8_SNORM'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_SINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8G8_SINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16_SINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8_SINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_A2B10G10R10_UINT_PACK32'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_UINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8G8_UINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R16_UINT'
    --
    -- -   'Vulkan.Core10.Enums.Format.FORMAT_R8_UINT'
    --
    --     @shaderStorageImageExtendedFormats@ feature only adds a guarantee of
    --     format support, which is specified for the whole physical device.
    --     Therefore enabling or disabling the feature via
    --     'Vulkan.Core10.Device.createDevice' has no practical effect.
    --
    --     To query for additional properties, or if the feature is not
    --     supported, 'getPhysicalDeviceFormatProperties' and
    --     'getPhysicalDeviceImageFormatProperties' /can/ be used to check for
    --     supported properties of individual formats, as usual rules allow.
    --
    --     'Vulkan.Core10.Enums.Format.FORMAT_R32G32_UINT',
    --     'Vulkan.Core10.Enums.Format.FORMAT_R32G32_SINT', and
    --     'Vulkan.Core10.Enums.Format.FORMAT_R32G32_SFLOAT' from
    --     @StorageImageExtendedFormats@ SPIR-V capability, are already covered
    --     by core Vulkan
    --     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-mandatory-features-32bit mandatory format support>.
    PhysicalDeviceFeatures -> Bool
shaderStorageImageExtendedFormats :: Bool
  , -- | #features-shaderStorageImageMultisample# @shaderStorageImageMultisample@
    -- specifies whether multisampled storage images are supported. If this
    -- feature is not enabled, images that are created with the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT' usage
    -- flag set /must/ be created with @samples@ equal to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'. This also
    -- specifies whether shader modules /can/ declare the
    -- @StorageImageMultisample@ and @ImageMSArray@ capabilities.
    PhysicalDeviceFeatures -> Bool
shaderStorageImageMultisample :: Bool
  , -- | #features-shaderStorageImageReadWithoutFormat#
    -- @shaderStorageImageReadWithoutFormat@ specifies whether storage images
    -- and storage texel buffers require a format qualifier to be specified
    -- when reading. @shaderStorageImageReadWithoutFormat@ applies only to
    -- formats listed in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-without-shader-storage-format storage without format>
    -- list.
    PhysicalDeviceFeatures -> Bool
shaderStorageImageReadWithoutFormat :: Bool
  , -- | #features-shaderStorageImageWriteWithoutFormat#
    -- @shaderStorageImageWriteWithoutFormat@ specifies whether storage images
    -- and storage texel buffers require a format qualifier to be specified
    -- when writing. @shaderStorageImageWriteWithoutFormat@ applies only to
    -- formats listed in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-without-shader-storage-format storage without format>
    -- list.
    PhysicalDeviceFeatures -> Bool
shaderStorageImageWriteWithoutFormat :: Bool
  , -- | #features-shaderUniformBufferArrayDynamicIndexing#
    -- @shaderUniformBufferArrayDynamicIndexing@ specifies whether arrays of
    -- uniform buffers /can/ be indexed by integer expressions that are
    -- dynamically uniform within either the subgroup or the invocation group
    -- in shader code. If this feature is not enabled, resources with a
    -- descriptor type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- /must/ be indexed only by constant integral expressions when aggregated
    -- into arrays in shader code. This also specifies whether shader modules
    -- /can/ declare the @UniformBufferArrayDynamicIndexing@ capability.
    PhysicalDeviceFeatures -> Bool
shaderUniformBufferArrayDynamicIndexing :: Bool
  , -- | #features-shaderSampledImageArrayDynamicIndexing#
    -- @shaderSampledImageArrayDynamicIndexing@ specifies whether arrays of
    -- samplers or sampled images /can/ be indexed by integer expressions that
    -- are dynamically uniform within either the subgroup or the invocation
    -- group in shader code. If this feature is not enabled, resources with a
    -- descriptor type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
    -- or 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE'
    -- /must/ be indexed only by constant integral expressions when aggregated
    -- into arrays in shader code. This also specifies whether shader modules
    -- /can/ declare the @SampledImageArrayDynamicIndexing@ capability.
    PhysicalDeviceFeatures -> Bool
shaderSampledImageArrayDynamicIndexing :: Bool
  , -- | #features-shaderStorageBufferArrayDynamicIndexing#
    -- @shaderStorageBufferArrayDynamicIndexing@ specifies whether arrays of
    -- storage buffers /can/ be indexed by integer expressions that are
    -- dynamically uniform within either the subgroup or the invocation group
    -- in shader code. If this feature is not enabled, resources with a
    -- descriptor type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- /must/ be indexed only by constant integral expressions when aggregated
    -- into arrays in shader code. This also specifies whether shader modules
    -- /can/ declare the @StorageBufferArrayDynamicIndexing@ capability.
    PhysicalDeviceFeatures -> Bool
shaderStorageBufferArrayDynamicIndexing :: Bool
  , -- | #features-shaderStorageImageArrayDynamicIndexing#
    -- @shaderStorageImageArrayDynamicIndexing@ specifies whether arrays of
    -- storage images /can/ be indexed by integer expressions that are
    -- dynamically uniform within either the subgroup or the invocation group
    -- in shader code. If this feature is not enabled, resources with a
    -- descriptor type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE'
    -- /must/ be indexed only by constant integral expressions when aggregated
    -- into arrays in shader code. This also specifies whether shader modules
    -- /can/ declare the @StorageImageArrayDynamicIndexing@ capability.
    PhysicalDeviceFeatures -> Bool
shaderStorageImageArrayDynamicIndexing :: Bool
  , -- | #features-shaderClipDistance# @shaderClipDistance@ specifies whether
    -- clip distances are supported in shader code. If this feature is not
    -- enabled, any members decorated with the @ClipDistance@ built-in
    -- decoration /must/ not be read from or written to in shader modules. This
    -- also specifies whether shader modules /can/ declare the @ClipDistance@
    -- capability.
    PhysicalDeviceFeatures -> Bool
shaderClipDistance :: Bool
  , -- | #features-shaderCullDistance# @shaderCullDistance@ specifies whether
    -- cull distances are supported in shader code. If this feature is not
    -- enabled, any members decorated with the @CullDistance@ built-in
    -- decoration /must/ not be read from or written to in shader modules. This
    -- also specifies whether shader modules /can/ declare the @CullDistance@
    -- capability.
    PhysicalDeviceFeatures -> Bool
shaderCullDistance :: Bool
  , -- | #features-shaderFloat64# @shaderFloat64@ specifies whether 64-bit floats
    -- (doubles) are supported in shader code. If this feature is not enabled,
    -- 64-bit floating-point types /must/ not be used in shader code. This also
    -- specifies whether shader modules /can/ declare the @Float64@ capability.
    -- Declaring and using 64-bit floats is enabled for all storage classes
    -- that SPIR-V allows with the @Float64@ capability.
    PhysicalDeviceFeatures -> Bool
shaderFloat64 :: Bool
  , -- | #features-shaderInt64# @shaderInt64@ specifies whether 64-bit integers
    -- (signed and unsigned) are supported in shader code. If this feature is
    -- not enabled, 64-bit integer types /must/ not be used in shader code.
    -- This also specifies whether shader modules /can/ declare the @Int64@
    -- capability. Declaring and using 64-bit integers is enabled for all
    -- storage classes that SPIR-V allows with the @Int64@ capability.
    PhysicalDeviceFeatures -> Bool
shaderInt64 :: Bool
  , -- | #features-shaderInt16# @shaderInt16@ specifies whether 16-bit integers
    -- (signed and unsigned) are supported in shader code. If this feature is
    -- not enabled, 16-bit integer types /must/ not be used in shader code.
    -- This also specifies whether shader modules /can/ declare the @Int16@
    -- capability. However, this only enables a subset of the storage classes
    -- that SPIR-V allows for the @Int16@ SPIR-V capability: Declaring and
    -- using 16-bit integers in the @Private@, @Workgroup@ (for non-Block
    -- variables), and @Function@ storage classes is enabled, while declaring
    -- them in the interface storage classes (e.g., @UniformConstant@,
    -- @Uniform@, @StorageBuffer@, @Input@, @Output@, and @PushConstant@) is
    -- not enabled.
    PhysicalDeviceFeatures -> Bool
shaderInt16 :: Bool
  , -- | #features-shaderResourceResidency# @shaderResourceResidency@ specifies
    -- whether image operations that return resource residency information are
    -- supported in shader code. If this feature is not enabled, the
    -- @OpImageSparse*@ instructions /must/ not be used in shader code. This
    -- also specifies whether shader modules /can/ declare the
    -- @SparseResidency@ capability. The feature requires at least one of the
    -- @sparseResidency*@ features to be supported.
    PhysicalDeviceFeatures -> Bool
shaderResourceResidency :: Bool
  , -- | #features-shaderResourceMinLod# @shaderResourceMinLod@ specifies whether
    -- image operations specifying the minimum resource LOD are supported in
    -- shader code. If this feature is not enabled, the @MinLod@ image operand
    -- /must/ not be used in shader code. This also specifies whether shader
    -- modules /can/ declare the @MinLod@ capability.
    PhysicalDeviceFeatures -> Bool
shaderResourceMinLod :: Bool
  , -- | #features-sparseBinding# @sparseBinding@ specifies whether resource
    -- memory /can/ be managed at opaque sparse block level instead of at the
    -- object level. If this feature is not enabled, resource memory /must/ be
    -- bound only on a per-object basis using the
    -- 'Vulkan.Core10.MemoryManagement.bindBufferMemory' and
    -- 'Vulkan.Core10.MemoryManagement.bindImageMemory' commands. In this case,
    -- buffers and images /must/ not be created with
    -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT'
    -- and
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Buffer.BufferCreateInfo'
    -- and 'Vulkan.Core10.Image.ImageCreateInfo' structures, respectively.
    -- Otherwise resource memory /can/ be managed as described in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-sparseresourcefeatures Sparse Resource Features>.
    PhysicalDeviceFeatures -> Bool
sparseBinding :: Bool
  , -- | #features-sparseResidencyBuffer# @sparseResidencyBuffer@ specifies
    -- whether the device /can/ access partially resident buffers. If this
    -- feature is not enabled, buffers /must/ not be created with
    -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Buffer.BufferCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidencyBuffer :: Bool
  , -- | #features-sparseResidencyImage2D# @sparseResidencyImage2D@ specifies
    -- whether the device /can/ access partially resident 2D images with 1
    -- sample per pixel. If this feature is not enabled, images with an
    -- @imageType@ of 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and
    -- @samples@ set to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' /must/ not
    -- be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidencyImage2D :: Bool
  , -- | #features-sparseResidencyImage3D# @sparseResidencyImage3D@ specifies
    -- whether the device /can/ access partially resident 3D images. If this
    -- feature is not enabled, images with an @imageType@ of
    -- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' /must/ not be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidencyImage3D :: Bool
  , -- | #features-sparseResidency2Samples# @sparseResidency2Samples@ specifies
    -- whether the physical device /can/ access partially resident 2D images
    -- with 2 samples per pixel. If this feature is not enabled, images with an
    -- @imageType@ of 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and
    -- @samples@ set to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_2_BIT' /must/ not
    -- be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidency2Samples :: Bool
  , -- | #features-sparseResidency4Samples# @sparseResidency4Samples@ specifies
    -- whether the physical device /can/ access partially resident 2D images
    -- with 4 samples per pixel. If this feature is not enabled, images with an
    -- @imageType@ of 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and
    -- @samples@ set to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_4_BIT' /must/ not
    -- be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidency4Samples :: Bool
  , -- | #features-sparseResidency8Samples# @sparseResidency8Samples@ specifies
    -- whether the physical device /can/ access partially resident 2D images
    -- with 8 samples per pixel. If this feature is not enabled, images with an
    -- @imageType@ of 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and
    -- @samples@ set to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_8_BIT' /must/ not
    -- be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidency8Samples :: Bool
  , -- | #features-sparseResidency16Samples# @sparseResidency16Samples@ specifies
    -- whether the physical device /can/ access partially resident 2D images
    -- with 16 samples per pixel. If this feature is not enabled, images with
    -- an @imageType@ of 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and
    -- @samples@ set to
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_16_BIT' /must/ not
    -- be created with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'
    -- set in the @flags@ member of the 'Vulkan.Core10.Image.ImageCreateInfo'
    -- structure.
    PhysicalDeviceFeatures -> Bool
sparseResidency16Samples :: Bool
  , -- | #features-sparseResidencyAliased# @sparseResidencyAliased@ specifies
    -- whether the physical device /can/ correctly access data aliased into
    -- multiple locations. If this feature is not enabled, the
    -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_ALIASED_BIT'
    -- and
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT'
    -- enum values /must/ not be used in @flags@ members of the
    -- 'Vulkan.Core10.Buffer.BufferCreateInfo' and
    -- 'Vulkan.Core10.Image.ImageCreateInfo' structures, respectively.
    PhysicalDeviceFeatures -> Bool
sparseResidencyAliased :: Bool
  , -- | #features-variableMultisampleRate# @variableMultisampleRate@ specifies
    -- whether all pipelines that will be bound to a command buffer during a
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#renderpass-noattachments subpass which uses no attachments>
    -- /must/ have the same value for
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@.
    -- If set to 'Vulkan.Core10.FundamentalTypes.TRUE', the implementation
    -- supports variable multisample rates in a subpass which uses no
    -- attachments. If set to 'Vulkan.Core10.FundamentalTypes.FALSE', then all
    -- pipelines bound in such a subpass /must/ have the same multisample rate.
    -- This has no effect in situations where a subpass uses any attachments.
    PhysicalDeviceFeatures -> Bool
variableMultisampleRate :: Bool
  , -- | #features-inheritedQueries# @inheritedQueries@ specifies whether a
    -- secondary command buffer /may/ be executed while a query is active.
    PhysicalDeviceFeatures -> Bool
inheritedQueries :: Bool
  }
  deriving (Typeable, PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool
(PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool)
-> (PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool)
-> Eq PhysicalDeviceFeatures
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool
== :: PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool
$c/= :: PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool
/= :: PhysicalDeviceFeatures -> PhysicalDeviceFeatures -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFeatures)
#endif
deriving instance Show PhysicalDeviceFeatures

instance ToCStruct PhysicalDeviceFeatures where
  withCStruct :: forall b.
PhysicalDeviceFeatures
-> (Ptr PhysicalDeviceFeatures -> IO b) -> IO b
withCStruct PhysicalDeviceFeatures
x Ptr PhysicalDeviceFeatures -> IO b
f = Int -> (Ptr PhysicalDeviceFeatures -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
220 ((Ptr PhysicalDeviceFeatures -> IO b) -> IO b)
-> (Ptr PhysicalDeviceFeatures -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFeatures
p -> Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> IO b -> IO b
forall b.
Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFeatures
p PhysicalDeviceFeatures
x (Ptr PhysicalDeviceFeatures -> IO b
f Ptr PhysicalDeviceFeatures
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFeatures
p PhysicalDeviceFeatures{Bool
robustBufferAccess :: PhysicalDeviceFeatures -> Bool
fullDrawIndexUint32 :: PhysicalDeviceFeatures -> Bool
imageCubeArray :: PhysicalDeviceFeatures -> Bool
independentBlend :: PhysicalDeviceFeatures -> Bool
geometryShader :: PhysicalDeviceFeatures -> Bool
tessellationShader :: PhysicalDeviceFeatures -> Bool
sampleRateShading :: PhysicalDeviceFeatures -> Bool
dualSrcBlend :: PhysicalDeviceFeatures -> Bool
logicOp :: PhysicalDeviceFeatures -> Bool
multiDrawIndirect :: PhysicalDeviceFeatures -> Bool
drawIndirectFirstInstance :: PhysicalDeviceFeatures -> Bool
depthClamp :: PhysicalDeviceFeatures -> Bool
depthBiasClamp :: PhysicalDeviceFeatures -> Bool
fillModeNonSolid :: PhysicalDeviceFeatures -> Bool
depthBounds :: PhysicalDeviceFeatures -> Bool
wideLines :: PhysicalDeviceFeatures -> Bool
largePoints :: PhysicalDeviceFeatures -> Bool
alphaToOne :: PhysicalDeviceFeatures -> Bool
multiViewport :: PhysicalDeviceFeatures -> Bool
samplerAnisotropy :: PhysicalDeviceFeatures -> Bool
textureCompressionETC2 :: PhysicalDeviceFeatures -> Bool
textureCompressionASTC_LDR :: PhysicalDeviceFeatures -> Bool
textureCompressionBC :: PhysicalDeviceFeatures -> Bool
occlusionQueryPrecise :: PhysicalDeviceFeatures -> Bool
pipelineStatisticsQuery :: PhysicalDeviceFeatures -> Bool
vertexPipelineStoresAndAtomics :: PhysicalDeviceFeatures -> Bool
fragmentStoresAndAtomics :: PhysicalDeviceFeatures -> Bool
shaderTessellationAndGeometryPointSize :: PhysicalDeviceFeatures -> Bool
shaderImageGatherExtended :: PhysicalDeviceFeatures -> Bool
shaderStorageImageExtendedFormats :: PhysicalDeviceFeatures -> Bool
shaderStorageImageMultisample :: PhysicalDeviceFeatures -> Bool
shaderStorageImageReadWithoutFormat :: PhysicalDeviceFeatures -> Bool
shaderStorageImageWriteWithoutFormat :: PhysicalDeviceFeatures -> Bool
shaderUniformBufferArrayDynamicIndexing :: PhysicalDeviceFeatures -> Bool
shaderSampledImageArrayDynamicIndexing :: PhysicalDeviceFeatures -> Bool
shaderStorageBufferArrayDynamicIndexing :: PhysicalDeviceFeatures -> Bool
shaderStorageImageArrayDynamicIndexing :: PhysicalDeviceFeatures -> Bool
shaderClipDistance :: PhysicalDeviceFeatures -> Bool
shaderCullDistance :: PhysicalDeviceFeatures -> Bool
shaderFloat64 :: PhysicalDeviceFeatures -> Bool
shaderInt64 :: PhysicalDeviceFeatures -> Bool
shaderInt16 :: PhysicalDeviceFeatures -> Bool
shaderResourceResidency :: PhysicalDeviceFeatures -> Bool
shaderResourceMinLod :: PhysicalDeviceFeatures -> Bool
sparseBinding :: PhysicalDeviceFeatures -> Bool
sparseResidencyBuffer :: PhysicalDeviceFeatures -> Bool
sparseResidencyImage2D :: PhysicalDeviceFeatures -> Bool
sparseResidencyImage3D :: PhysicalDeviceFeatures -> Bool
sparseResidency2Samples :: PhysicalDeviceFeatures -> Bool
sparseResidency4Samples :: PhysicalDeviceFeatures -> Bool
sparseResidency8Samples :: PhysicalDeviceFeatures -> Bool
sparseResidency16Samples :: PhysicalDeviceFeatures -> Bool
sparseResidencyAliased :: PhysicalDeviceFeatures -> Bool
variableMultisampleRate :: PhysicalDeviceFeatures -> Bool
inheritedQueries :: PhysicalDeviceFeatures -> Bool
robustBufferAccess :: Bool
fullDrawIndexUint32 :: Bool
imageCubeArray :: Bool
independentBlend :: Bool
geometryShader :: Bool
tessellationShader :: Bool
sampleRateShading :: Bool
dualSrcBlend :: Bool
logicOp :: Bool
multiDrawIndirect :: Bool
drawIndirectFirstInstance :: Bool
depthClamp :: Bool
depthBiasClamp :: Bool
fillModeNonSolid :: Bool
depthBounds :: Bool
wideLines :: Bool
largePoints :: Bool
alphaToOne :: Bool
multiViewport :: Bool
samplerAnisotropy :: Bool
textureCompressionETC2 :: Bool
textureCompressionASTC_LDR :: Bool
textureCompressionBC :: Bool
occlusionQueryPrecise :: Bool
pipelineStatisticsQuery :: Bool
vertexPipelineStoresAndAtomics :: Bool
fragmentStoresAndAtomics :: Bool
shaderTessellationAndGeometryPointSize :: Bool
shaderImageGatherExtended :: Bool
shaderStorageImageExtendedFormats :: Bool
shaderStorageImageMultisample :: Bool
shaderStorageImageReadWithoutFormat :: Bool
shaderStorageImageWriteWithoutFormat :: Bool
shaderUniformBufferArrayDynamicIndexing :: Bool
shaderSampledImageArrayDynamicIndexing :: Bool
shaderStorageBufferArrayDynamicIndexing :: Bool
shaderStorageImageArrayDynamicIndexing :: Bool
shaderClipDistance :: Bool
shaderCullDistance :: Bool
shaderFloat64 :: Bool
shaderInt64 :: Bool
shaderInt16 :: Bool
shaderResourceResidency :: Bool
shaderResourceMinLod :: Bool
sparseBinding :: Bool
sparseResidencyBuffer :: Bool
sparseResidencyImage2D :: Bool
sparseResidencyImage3D :: Bool
sparseResidency2Samples :: Bool
sparseResidency4Samples :: Bool
sparseResidency8Samples :: Bool
sparseResidency16Samples :: Bool
sparseResidencyAliased :: Bool
variableMultisampleRate :: Bool
inheritedQueries :: Bool
..} IO b
f = do
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
robustBufferAccess))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fullDrawIndexUint32))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
imageCubeArray))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
independentBlend))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
geometryShader))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
tessellationShader))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sampleRateShading))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
dualSrcBlend))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
logicOp))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multiDrawIndirect))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
drawIndirectFirstInstance))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthClamp))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthBiasClamp))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fillModeNonSolid))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthBounds))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
wideLines))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
largePoints))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
alphaToOne))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multiViewport))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
samplerAnisotropy))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
textureCompressionETC2))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
textureCompressionASTC_LDR))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
textureCompressionBC))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
occlusionQueryPrecise))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineStatisticsQuery))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
vertexPipelineStoresAndAtomics))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentStoresAndAtomics))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
108 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderTessellationAndGeometryPointSize))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderImageGatherExtended))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
116 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageImageExtendedFormats))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageImageMultisample))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
124 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageImageReadWithoutFormat))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageImageWriteWithoutFormat))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderUniformBufferArrayDynamicIndexing))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSampledImageArrayDynamicIndexing))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
140 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageBufferArrayDynamicIndexing))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderStorageImageArrayDynamicIndexing))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
148 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderClipDistance))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderCullDistance))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
156 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderFloat64))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderInt64))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
164 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderInt16))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderResourceResidency))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
172 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderResourceMinLod))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseBinding))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
180 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidencyBuffer))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidencyImage2D))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
188 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidencyImage3D))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidency2Samples))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
196 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidency4Samples))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidency8Samples))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
204 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidency16Samples))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sparseResidencyAliased))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
212 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
variableMultisampleRate))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
inheritedQueries))
    IO b
f
  cStructSize :: Int
cStructSize = Int
220
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceFeatures -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFeatures
p IO b
f = do
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
108 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
116 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
124 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
140 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
148 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
156 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
164 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
172 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
180 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
188 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
196 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
204 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
212 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceFeatures where
  peekCStruct :: Ptr PhysicalDeviceFeatures -> IO PhysicalDeviceFeatures
peekCStruct Ptr PhysicalDeviceFeatures
p = do
    robustBufferAccess <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFeatures
p Ptr PhysicalDeviceFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32))
    fullDrawIndexUint32 <- peek @Bool32 ((p `plusPtr` 4 :: Ptr Bool32))
    imageCubeArray <- peek @Bool32 ((p `plusPtr` 8 :: Ptr Bool32))
    independentBlend <- peek @Bool32 ((p `plusPtr` 12 :: Ptr Bool32))
    geometryShader <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32))
    tessellationShader <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
    sampleRateShading <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
    dualSrcBlend <- peek @Bool32 ((p `plusPtr` 28 :: Ptr Bool32))
    logicOp <- peek @Bool32 ((p `plusPtr` 32 :: Ptr Bool32))
    multiDrawIndirect <- peek @Bool32 ((p `plusPtr` 36 :: Ptr Bool32))
    drawIndirectFirstInstance <- peek @Bool32 ((p `plusPtr` 40 :: Ptr Bool32))
    depthClamp <- peek @Bool32 ((p `plusPtr` 44 :: Ptr Bool32))
    depthBiasClamp <- peek @Bool32 ((p `plusPtr` 48 :: Ptr Bool32))
    fillModeNonSolid <- peek @Bool32 ((p `plusPtr` 52 :: Ptr Bool32))
    depthBounds <- peek @Bool32 ((p `plusPtr` 56 :: Ptr Bool32))
    wideLines <- peek @Bool32 ((p `plusPtr` 60 :: Ptr Bool32))
    largePoints <- peek @Bool32 ((p `plusPtr` 64 :: Ptr Bool32))
    alphaToOne <- peek @Bool32 ((p `plusPtr` 68 :: Ptr Bool32))
    multiViewport <- peek @Bool32 ((p `plusPtr` 72 :: Ptr Bool32))
    samplerAnisotropy <- peek @Bool32 ((p `plusPtr` 76 :: Ptr Bool32))
    textureCompressionETC2 <- peek @Bool32 ((p `plusPtr` 80 :: Ptr Bool32))
    textureCompressionASTC_LDR <- peek @Bool32 ((p `plusPtr` 84 :: Ptr Bool32))
    textureCompressionBC <- peek @Bool32 ((p `plusPtr` 88 :: Ptr Bool32))
    occlusionQueryPrecise <- peek @Bool32 ((p `plusPtr` 92 :: Ptr Bool32))
    pipelineStatisticsQuery <- peek @Bool32 ((p `plusPtr` 96 :: Ptr Bool32))
    vertexPipelineStoresAndAtomics <- peek @Bool32 ((p `plusPtr` 100 :: Ptr Bool32))
    fragmentStoresAndAtomics <- peek @Bool32 ((p `plusPtr` 104 :: Ptr Bool32))
    shaderTessellationAndGeometryPointSize <- peek @Bool32 ((p `plusPtr` 108 :: Ptr Bool32))
    shaderImageGatherExtended <- peek @Bool32 ((p `plusPtr` 112 :: Ptr Bool32))
    shaderStorageImageExtendedFormats <- peek @Bool32 ((p `plusPtr` 116 :: Ptr Bool32))
    shaderStorageImageMultisample <- peek @Bool32 ((p `plusPtr` 120 :: Ptr Bool32))
    shaderStorageImageReadWithoutFormat <- peek @Bool32 ((p `plusPtr` 124 :: Ptr Bool32))
    shaderStorageImageWriteWithoutFormat <- peek @Bool32 ((p `plusPtr` 128 :: Ptr Bool32))
    shaderUniformBufferArrayDynamicIndexing <- peek @Bool32 ((p `plusPtr` 132 :: Ptr Bool32))
    shaderSampledImageArrayDynamicIndexing <- peek @Bool32 ((p `plusPtr` 136 :: Ptr Bool32))
    shaderStorageBufferArrayDynamicIndexing <- peek @Bool32 ((p `plusPtr` 140 :: Ptr Bool32))
    shaderStorageImageArrayDynamicIndexing <- peek @Bool32 ((p `plusPtr` 144 :: Ptr Bool32))
    shaderClipDistance <- peek @Bool32 ((p `plusPtr` 148 :: Ptr Bool32))
    shaderCullDistance <- peek @Bool32 ((p `plusPtr` 152 :: Ptr Bool32))
    shaderFloat64 <- peek @Bool32 ((p `plusPtr` 156 :: Ptr Bool32))
    shaderInt64 <- peek @Bool32 ((p `plusPtr` 160 :: Ptr Bool32))
    shaderInt16 <- peek @Bool32 ((p `plusPtr` 164 :: Ptr Bool32))
    shaderResourceResidency <- peek @Bool32 ((p `plusPtr` 168 :: Ptr Bool32))
    shaderResourceMinLod <- peek @Bool32 ((p `plusPtr` 172 :: Ptr Bool32))
    sparseBinding <- peek @Bool32 ((p `plusPtr` 176 :: Ptr Bool32))
    sparseResidencyBuffer <- peek @Bool32 ((p `plusPtr` 180 :: Ptr Bool32))
    sparseResidencyImage2D <- peek @Bool32 ((p `plusPtr` 184 :: Ptr Bool32))
    sparseResidencyImage3D <- peek @Bool32 ((p `plusPtr` 188 :: Ptr Bool32))
    sparseResidency2Samples <- peek @Bool32 ((p `plusPtr` 192 :: Ptr Bool32))
    sparseResidency4Samples <- peek @Bool32 ((p `plusPtr` 196 :: Ptr Bool32))
    sparseResidency8Samples <- peek @Bool32 ((p `plusPtr` 200 :: Ptr Bool32))
    sparseResidency16Samples <- peek @Bool32 ((p `plusPtr` 204 :: Ptr Bool32))
    sparseResidencyAliased <- peek @Bool32 ((p `plusPtr` 208 :: Ptr Bool32))
    variableMultisampleRate <- peek @Bool32 ((p `plusPtr` 212 :: Ptr Bool32))
    inheritedQueries <- peek @Bool32 ((p `plusPtr` 216 :: Ptr Bool32))
    pure $ PhysicalDeviceFeatures
             (bool32ToBool robustBufferAccess)
             (bool32ToBool fullDrawIndexUint32)
             (bool32ToBool imageCubeArray)
             (bool32ToBool independentBlend)
             (bool32ToBool geometryShader)
             (bool32ToBool tessellationShader)
             (bool32ToBool sampleRateShading)
             (bool32ToBool dualSrcBlend)
             (bool32ToBool logicOp)
             (bool32ToBool multiDrawIndirect)
             (bool32ToBool drawIndirectFirstInstance)
             (bool32ToBool depthClamp)
             (bool32ToBool depthBiasClamp)
             (bool32ToBool fillModeNonSolid)
             (bool32ToBool depthBounds)
             (bool32ToBool wideLines)
             (bool32ToBool largePoints)
             (bool32ToBool alphaToOne)
             (bool32ToBool multiViewport)
             (bool32ToBool samplerAnisotropy)
             (bool32ToBool textureCompressionETC2)
             (bool32ToBool textureCompressionASTC_LDR)
             (bool32ToBool textureCompressionBC)
             (bool32ToBool occlusionQueryPrecise)
             (bool32ToBool pipelineStatisticsQuery)
             (bool32ToBool vertexPipelineStoresAndAtomics)
             (bool32ToBool fragmentStoresAndAtomics)
             (bool32ToBool shaderTessellationAndGeometryPointSize)
             (bool32ToBool shaderImageGatherExtended)
             (bool32ToBool shaderStorageImageExtendedFormats)
             (bool32ToBool shaderStorageImageMultisample)
             (bool32ToBool shaderStorageImageReadWithoutFormat)
             (bool32ToBool shaderStorageImageWriteWithoutFormat)
             (bool32ToBool shaderUniformBufferArrayDynamicIndexing)
             (bool32ToBool shaderSampledImageArrayDynamicIndexing)
             (bool32ToBool shaderStorageBufferArrayDynamicIndexing)
             (bool32ToBool shaderStorageImageArrayDynamicIndexing)
             (bool32ToBool shaderClipDistance)
             (bool32ToBool shaderCullDistance)
             (bool32ToBool shaderFloat64)
             (bool32ToBool shaderInt64)
             (bool32ToBool shaderInt16)
             (bool32ToBool shaderResourceResidency)
             (bool32ToBool shaderResourceMinLod)
             (bool32ToBool sparseBinding)
             (bool32ToBool sparseResidencyBuffer)
             (bool32ToBool sparseResidencyImage2D)
             (bool32ToBool sparseResidencyImage3D)
             (bool32ToBool sparseResidency2Samples)
             (bool32ToBool sparseResidency4Samples)
             (bool32ToBool sparseResidency8Samples)
             (bool32ToBool sparseResidency16Samples)
             (bool32ToBool sparseResidencyAliased)
             (bool32ToBool variableMultisampleRate)
             (bool32ToBool inheritedQueries)

instance Storable PhysicalDeviceFeatures where
  sizeOf :: PhysicalDeviceFeatures -> Int
sizeOf ~PhysicalDeviceFeatures
_ = Int
220
  alignment :: PhysicalDeviceFeatures -> Int
alignment ~PhysicalDeviceFeatures
_ = Int
4
  peek :: Ptr PhysicalDeviceFeatures -> IO PhysicalDeviceFeatures
peek = Ptr PhysicalDeviceFeatures -> IO PhysicalDeviceFeatures
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> FN_vkVoidFunction
poke Ptr PhysicalDeviceFeatures
ptr PhysicalDeviceFeatures
poked = Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> FN_vkVoidFunction -> FN_vkVoidFunction
forall b.
Ptr PhysicalDeviceFeatures
-> PhysicalDeviceFeatures -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFeatures
ptr PhysicalDeviceFeatures
poked (() -> FN_vkVoidFunction
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceFeatures where
  zero :: PhysicalDeviceFeatures
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFeatures
PhysicalDeviceFeatures
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero


-- | VkPhysicalDeviceSparseProperties - Structure specifying physical device
-- sparse memory properties
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'PhysicalDeviceProperties'
data PhysicalDeviceSparseProperties = PhysicalDeviceSparseProperties
  { -- | @residencyStandard2DBlockShape@ is 'Vulkan.Core10.FundamentalTypes.TRUE'
    -- if the physical device will access all single-sample 2D sparse resources
    -- using the standard sparse image block shapes (based on image format), as
    -- described in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-sparseblockshapessingle Standard Sparse Image Block Shapes (Single Sample)>
    -- table. If this property is not supported the value returned in the
    -- @imageGranularity@ member of the
    -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties'
    -- structure for single-sample 2D images is not /required/ to match the
    -- standard sparse image block dimensions listed in the table.
    PhysicalDeviceSparseProperties -> Bool
residencyStandard2DBlockShape :: Bool
  , -- | @residencyStandard2DMultisampleBlockShape@ is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE' if the physical device will access
    -- all multisample 2D sparse resources using the standard sparse image
    -- block shapes (based on image format), as described in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-sparseblockshapesmsaa Standard Sparse Image Block Shapes (MSAA)>
    -- table. If this property is not supported, the value returned in the
    -- @imageGranularity@ member of the
    -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties'
    -- structure for multisample 2D images is not /required/ to match the
    -- standard sparse image block dimensions listed in the table.
    PhysicalDeviceSparseProperties -> Bool
residencyStandard2DMultisampleBlockShape :: Bool
  , -- | @residencyStandard3DBlockShape@ is 'Vulkan.Core10.FundamentalTypes.TRUE'
    -- if the physical device will access all 3D sparse resources using the
    -- standard sparse image block shapes (based on image format), as described
    -- in the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-sparseblockshapessingle Standard Sparse Image Block Shapes (Single Sample)>
    -- table. If this property is not supported, the value returned in the
    -- @imageGranularity@ member of the
    -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties'
    -- structure for 3D images is not /required/ to match the standard sparse
    -- image block dimensions listed in the table.
    PhysicalDeviceSparseProperties -> Bool
residencyStandard3DBlockShape :: Bool
  , -- | @residencyAlignedMipSize@ is 'Vulkan.Core10.FundamentalTypes.TRUE' if
    -- images with mip level dimensions that are not integer multiples of the
    -- corresponding dimensions of the sparse image block /may/ be placed in
    -- the mip tail. If this property is not reported, only mip levels with
    -- dimensions smaller than the @imageGranularity@ member of the
    -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties'
    -- structure will be placed in the mip tail. If this property is reported
    -- the implementation is allowed to return
    -- 'Vulkan.Core10.Enums.SparseImageFormatFlagBits.SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT'
    -- in the @flags@ member of
    -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties',
    -- indicating that mip level dimensions that are not integer multiples of
    -- the corresponding dimensions of the sparse image block will be placed in
    -- the mip tail.
    PhysicalDeviceSparseProperties -> Bool
residencyAlignedMipSize :: Bool
  , -- | @residencyNonResidentStrict@ specifies whether the physical device /can/
    -- consistently access non-resident regions of a resource. If this property
    -- is 'Vulkan.Core10.FundamentalTypes.TRUE', access to non-resident regions
    -- of resources will be guaranteed to return values as if the resource was
    -- populated with 0; writes to non-resident regions will be discarded.
    PhysicalDeviceSparseProperties -> Bool
residencyNonResidentStrict :: Bool
  }
  deriving (Typeable, PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> Bool
(PhysicalDeviceSparseProperties
 -> PhysicalDeviceSparseProperties -> Bool)
-> (PhysicalDeviceSparseProperties
    -> PhysicalDeviceSparseProperties -> Bool)
-> Eq PhysicalDeviceSparseProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> Bool
== :: PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> Bool
$c/= :: PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> Bool
/= :: PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceSparseProperties)
#endif
deriving instance Show PhysicalDeviceSparseProperties

instance ToCStruct PhysicalDeviceSparseProperties where
  withCStruct :: forall b.
PhysicalDeviceSparseProperties
-> (Ptr PhysicalDeviceSparseProperties -> IO b) -> IO b
withCStruct PhysicalDeviceSparseProperties
x Ptr PhysicalDeviceSparseProperties -> IO b
f = Int -> (Ptr PhysicalDeviceSparseProperties -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
20 ((Ptr PhysicalDeviceSparseProperties -> IO b) -> IO b)
-> (Ptr PhysicalDeviceSparseProperties -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceSparseProperties
p -> Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> IO b -> IO b
forall b.
Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceSparseProperties
p PhysicalDeviceSparseProperties
x (Ptr PhysicalDeviceSparseProperties -> IO b
f Ptr PhysicalDeviceSparseProperties
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceSparseProperties
p PhysicalDeviceSparseProperties{Bool
residencyStandard2DBlockShape :: PhysicalDeviceSparseProperties -> Bool
residencyStandard2DMultisampleBlockShape :: PhysicalDeviceSparseProperties -> Bool
residencyStandard3DBlockShape :: PhysicalDeviceSparseProperties -> Bool
residencyAlignedMipSize :: PhysicalDeviceSparseProperties -> Bool
residencyNonResidentStrict :: PhysicalDeviceSparseProperties -> Bool
residencyStandard2DBlockShape :: Bool
residencyStandard2DMultisampleBlockShape :: Bool
residencyStandard3DBlockShape :: Bool
residencyAlignedMipSize :: Bool
residencyNonResidentStrict :: Bool
..} IO b
f = do
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
residencyStandard2DBlockShape))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
residencyStandard2DMultisampleBlockShape))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
residencyStandard3DBlockShape))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
residencyAlignedMipSize))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
residencyNonResidentStrict))
    IO b
f
  cStructSize :: Int
cStructSize = Int
20
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceSparseProperties -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceSparseProperties
p IO b
f = do
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceSparseProperties where
  peekCStruct :: Ptr PhysicalDeviceSparseProperties
-> IO PhysicalDeviceSparseProperties
peekCStruct Ptr PhysicalDeviceSparseProperties
p = do
    residencyStandard2DBlockShape <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceSparseProperties
p Ptr PhysicalDeviceSparseProperties -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32))
    residencyStandard2DMultisampleBlockShape <- peek @Bool32 ((p `plusPtr` 4 :: Ptr Bool32))
    residencyStandard3DBlockShape <- peek @Bool32 ((p `plusPtr` 8 :: Ptr Bool32))
    residencyAlignedMipSize <- peek @Bool32 ((p `plusPtr` 12 :: Ptr Bool32))
    residencyNonResidentStrict <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32))
    pure $ PhysicalDeviceSparseProperties
             (bool32ToBool residencyStandard2DBlockShape)
             (bool32ToBool residencyStandard2DMultisampleBlockShape)
             (bool32ToBool residencyStandard3DBlockShape)
             (bool32ToBool residencyAlignedMipSize)
             (bool32ToBool residencyNonResidentStrict)

instance Storable PhysicalDeviceSparseProperties where
  sizeOf :: PhysicalDeviceSparseProperties -> Int
sizeOf ~PhysicalDeviceSparseProperties
_ = Int
20
  alignment :: PhysicalDeviceSparseProperties -> Int
alignment ~PhysicalDeviceSparseProperties
_ = Int
4
  peek :: Ptr PhysicalDeviceSparseProperties
-> IO PhysicalDeviceSparseProperties
peek = Ptr PhysicalDeviceSparseProperties
-> IO PhysicalDeviceSparseProperties
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> FN_vkVoidFunction
poke Ptr PhysicalDeviceSparseProperties
ptr PhysicalDeviceSparseProperties
poked = Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties
-> FN_vkVoidFunction
-> FN_vkVoidFunction
forall b.
Ptr PhysicalDeviceSparseProperties
-> PhysicalDeviceSparseProperties -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceSparseProperties
ptr PhysicalDeviceSparseProperties
poked (() -> FN_vkVoidFunction
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceSparseProperties where
  zero :: PhysicalDeviceSparseProperties
zero = Bool
-> Bool -> Bool -> Bool -> Bool -> PhysicalDeviceSparseProperties
PhysicalDeviceSparseProperties
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero


-- | VkPhysicalDeviceLimits - Structure reporting implementation-dependent
-- physical device limits
--
-- = Members
--
-- The 'PhysicalDeviceLimits' are properties of the physical device. These
-- are available in the @limits@ member of the 'PhysicalDeviceProperties'
-- structure which is returned from 'getPhysicalDeviceProperties'.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize', 'PhysicalDeviceProperties',
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlags'
data PhysicalDeviceLimits = PhysicalDeviceLimits
  { -- | #limits-maxImageDimension1D# @maxImageDimension1D@ is the largest
    -- dimension (@width@) that is guaranteed to be supported for all images
    -- created with an @imageType@ of
    -- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D'. Some combinations of
    -- image parameters (format, usage, etc.) /may/ allow support for larger
    -- dimensions, which /can/ be queried using
    -- 'getPhysicalDeviceImageFormatProperties'.
    PhysicalDeviceLimits -> Word32
maxImageDimension1D :: Word32
  , -- | #limits-maxImageDimension2D# @maxImageDimension2D@ is the largest
    -- dimension (@width@ or @height@) that is guaranteed to be supported for
    -- all images created with an @imageType@ of
    -- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and without
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT'
    -- set in @flags@. Some combinations of image parameters (format, usage,
    -- etc.) /may/ allow support for larger dimensions, which /can/ be queried
    -- using 'getPhysicalDeviceImageFormatProperties'.
    PhysicalDeviceLimits -> Word32
maxImageDimension2D :: Word32
  , -- | #limits-maxImageDimension3D# @maxImageDimension3D@ is the largest
    -- dimension (@width@, @height@, or @depth@) that is guaranteed to be
    -- supported for all images created with an @imageType@ of
    -- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D'. Some combinations of
    -- image parameters (format, usage, etc.) /may/ allow support for larger
    -- dimensions, which /can/ be queried using
    -- 'getPhysicalDeviceImageFormatProperties'.
    PhysicalDeviceLimits -> Word32
maxImageDimension3D :: Word32
  , -- | #limits-maxImageDimensionCube# @maxImageDimensionCube@ is the largest
    -- dimension (@width@ or @height@) that is guaranteed to be supported for
    -- all images created with an @imageType@ of
    -- 'Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and with
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT'
    -- set in @flags@. Some combinations of image parameters (format, usage,
    -- etc.) /may/ allow support for larger dimensions, which /can/ be queried
    -- using 'getPhysicalDeviceImageFormatProperties'.
    PhysicalDeviceLimits -> Word32
maxImageDimensionCube :: Word32
  , -- | #limits-maxImageArrayLayers# @maxImageArrayLayers@ is the maximum number
    -- of layers (@arrayLayers@) for an image.
    PhysicalDeviceLimits -> Word32
maxImageArrayLayers :: Word32
  , -- | #limits-maxTexelBufferElements# @maxTexelBufferElements@ is the maximum
    -- number of addressable texels for a buffer view created on a buffer which
    -- was created with the
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT'
    -- or
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT'
    -- usage flag set.
    PhysicalDeviceLimits -> Word32
maxTexelBufferElements :: Word32
  , -- | #limits-maxUniformBufferRange# @maxUniformBufferRange@ is the maximum
    -- value that /can/ be specified in the @range@ member of a
    -- 'Vulkan.Core10.DescriptorSet.DescriptorBufferInfo' structure passed to
    -- 'Vulkan.Core10.DescriptorSet.updateDescriptorSets' for descriptors of
    -- type 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER'
    -- or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'.
    PhysicalDeviceLimits -> Word32
maxUniformBufferRange :: Word32
  , -- | #limits-maxStorageBufferRange# @maxStorageBufferRange@ is the maximum
    -- value that /can/ be specified in the @range@ member of a
    -- 'Vulkan.Core10.DescriptorSet.DescriptorBufferInfo' structure passed to
    -- 'Vulkan.Core10.DescriptorSet.updateDescriptorSets' for descriptors of
    -- type 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER'
    -- or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'.
    -- If the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-shader64BitIndexing shader64BitIndexing>
    -- feature is enabled, this limit does not apply.
    PhysicalDeviceLimits -> Word32
maxStorageBufferRange :: Word32
  , -- | #limits-maxPushConstantsSize# @maxPushConstantsSize@ is the maximum
    -- size, in bytes, of the pool of push constant memory. For each of the
    -- push constant ranges indicated by the @pPushConstantRanges@ member of
    -- the 'Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo' structure,
    -- (@offset@ + @size@) /must/ be less than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxPushConstantsSize :: Word32
  , -- | #limits-maxMemoryAllocationCount# @maxMemoryAllocationCount@ is the
    -- maximum number of device memory allocations, as created by
    -- 'Vulkan.Core10.Memory.allocateMemory', which /can/ simultaneously exist.
    PhysicalDeviceLimits -> Word32
maxMemoryAllocationCount :: Word32
  , -- | #limits-maxSamplerAllocationCount# @maxSamplerAllocationCount@ is the
    -- maximum number of sampler objects, as created by
    -- 'Vulkan.Core10.Sampler.createSampler', which /can/ simultaneously exist
    -- on a device. If the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorHeap descriptorHeap>
    -- feature is enabled and the application intends to use embedded samplers,
    -- the number advertised here is effectively reduced by the quotient of
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-minSamplerHeapReservedRangeWithEmbedded minSamplerHeapReservedRangeWithEmbedded>
    -- divided by
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-samplerDescriptorSize samplerDescriptorSize>,
    -- to provide storage for embedded samplers when switching to heaps. If
    -- embedded samplers are not used, this can be ignored.
    PhysicalDeviceLimits -> Word32
maxSamplerAllocationCount :: Word32
  , -- | #limits-bufferImageGranularity# @bufferImageGranularity@ is the
    -- granularity, in bytes, at which buffer or linear image resources, linear
    -- or optimal tensor resources, and optimal image resources /can/ be bound
    -- to adjacent offsets in the same 'Vulkan.Core10.Handles.DeviceMemory'
    -- object without aliasing. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#resources-bufferimagegranularity Buffer-Image Granularity>
    -- for more details.
    PhysicalDeviceLimits -> DeviceSize
bufferImageGranularity :: DeviceSize
  , -- | #limits-sparseAddressSpaceSize# @sparseAddressSpaceSize@ is the total
    -- amount of address space available, in bytes, for sparse memory
    -- resources. This is an upper bound on the sum of the sizes of all sparse
    -- resources, regardless of whether any memory is bound to them. If the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-extendedSparseAddressSpace extendedSparseAddressSpace>
    -- feature is enabled, then the difference between
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-extendedSparseAddressSpaceSize extendedSparseAddressSpaceSize>
    -- and @sparseAddressSpaceSize@ can also be used, by
    -- 'Vulkan.Core10.Handles.Image' created with the @usage@ member of
    -- 'Vulkan.Core10.Image.ImageCreateInfo' only containing bits in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-extendedSparseImageUsageFlags extendedSparseImageUsageFlags>
    -- and 'Vulkan.Core10.Handles.Buffer' created with the @usage@ member of
    -- 'Vulkan.Core10.Buffer.BufferCreateInfo' only containing bits in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-extendedSparseBufferUsageFlags extendedSparseBufferUsageFlags>.
    PhysicalDeviceLimits -> DeviceSize
sparseAddressSpaceSize :: DeviceSize
  , -- | #limits-maxBoundDescriptorSets# @maxBoundDescriptorSets@ is the maximum
    -- number of descriptor sets that /can/ be simultaneously used by a
    -- pipeline. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-sets>.
    PhysicalDeviceLimits -> Word32
maxBoundDescriptorSets :: Word32
  , -- | #limits-maxPerStageDescriptorSamplers# @maxPerStageDescriptorSamplers@
    -- is the maximum number of samplers that /can/ be accessible to a single
    -- shader stage in a pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a shader
    -- stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-sampler>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-combinedimagesampler>.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorSamplers :: Word32
  , -- | #limits-maxPerStageDescriptorUniformBuffers#
    -- @maxPerStageDescriptorUniformBuffers@ is the maximum number of uniform
    -- buffers that /can/ be accessible to a single shader stage in a pipeline
    -- layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a shader
    -- stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbuffer>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorUniformBuffers :: Word32
  , -- | #limits-maxPerStageDescriptorStorageBuffers#
    -- @maxPerStageDescriptorStorageBuffers@ is the maximum number of storage
    -- buffers that /can/ be accessible to a single shader stage in a pipeline
    -- layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a
    -- pipeline shader stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebuffer>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorStorageBuffers :: Word32
  , -- | #limits-maxPerStageDescriptorSampledImages#
    -- @maxPerStageDescriptorSampledImages@ is the maximum number of sampled
    -- images that /can/ be accessible to a single shader stage in a pipeline
    -- layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a
    -- pipeline shader stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-combinedimagesampler>,
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-sampledimage>,
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformtexelbuffer>.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorSampledImages :: Word32
  , -- | #limits-maxPerStageDescriptorStorageImages#
    -- @maxPerStageDescriptorStorageImages@ is the maximum number of storage
    -- images that /can/ be accessible to a single shader stage in a pipeline
    -- layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a
    -- pipeline shader stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storageimage>,
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagetexelbuffer>.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorStorageImages :: Word32
  , -- | #limits-maxPerStageDescriptorInputAttachments#
    -- @maxPerStageDescriptorInputAttachments@ is the maximum number of input
    -- attachments that /can/ be accessible to a single shader stage in a
    -- pipeline layout, as well as the maximum usable input attachment index.
    -- Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. A descriptor is accessible to a
    -- pipeline shader stage when the @stageFlags@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorSetLayoutBinding' structure has
    -- the bit for that shader stage set. These are only supported for the
    -- fragment stage. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-inputattachment>.
    --
    -- @maxPerStageDescriptorInputAttachments@ was originally only intended to
    -- limit the number of attachments per stage, not the number of available
    -- input indices across all shaders in a render pass. The input indices
    -- were allowed to be semi arbitrary for render pass objects, or fully
    -- arbitrary for dynamic rendering, however some implementations have fixed
    -- limits for them. Applications already exist that exceed this limit, and
    -- they will continue to work where they already did, but will fail to
    -- render on some platforms. For forward looking applications, this can be
    -- worked around by either making careful use of index remapping with
    -- 'Vulkan.Core14.Promoted_From_VK_KHR_dynamic_rendering_local_readRoadmap.RenderingInputAttachmentIndexInfo'
    -- for dynamic rendering, or splitting a subpass with too many input
    -- attachments into multiple subpasses.
    PhysicalDeviceLimits -> Word32
maxPerStageDescriptorInputAttachments :: Word32
  , -- | #limits-maxPerStageResources# @maxPerStageResources@ is the maximum
    -- number of resources that /can/ be accessible to a single shader stage in
    -- a pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC',
    -- or 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. For the fragment shader stage the
    -- framebuffer color attachments also count against this limit.
    PhysicalDeviceLimits -> Word32
maxPerStageResources :: Word32
  , -- | #limits-maxDescriptorSetSamplers# @maxDescriptorSetSamplers@ is the
    -- maximum number of samplers that /can/ be included in a pipeline layout.
    -- Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-sampler>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-combinedimagesampler>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetSamplers :: Word32
  , -- | #limits-maxDescriptorSetUniformBuffers# @maxDescriptorSetUniformBuffers@
    -- is the maximum number of uniform buffers that /can/ be included in a
    -- pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbuffer>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetUniformBuffers :: Word32
  , -- | #limits-maxDescriptorSetUniformBuffersDynamic#
    -- @maxDescriptorSetUniformBuffersDynamic@ is the maximum number of dynamic
    -- uniform buffers that /can/ be included in a pipeline layout. Descriptors
    -- with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetUniformBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetStorageBuffers# @maxDescriptorSetStorageBuffers@
    -- is the maximum number of storage buffers that /can/ be included in a
    -- pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebuffer>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageBuffers :: Word32
  , -- | #limits-maxDescriptorSetStorageBuffersDynamic#
    -- @maxDescriptorSetStorageBuffersDynamic@ is the maximum number of dynamic
    -- storage buffers that /can/ be included in a pipeline layout. Descriptors
    -- with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebufferdynamic>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetSampledImages# @maxDescriptorSetSampledImages@
    -- is the maximum number of sampled images that /can/ be included in a
    -- pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-combinedimagesampler>,
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-sampledimage>,
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformtexelbuffer>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetSampledImages :: Word32
  , -- | #limits-maxDescriptorSetStorageImages# @maxDescriptorSetStorageImages@
    -- is the maximum number of storage images that /can/ be included in a
    -- pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storageimage>,
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagetexelbuffer>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageImages :: Word32
  , -- | #limits-maxDescriptorSetInputAttachments#
    -- @maxDescriptorSetInputAttachments@ is the maximum number of input
    -- attachments that /can/ be included in a pipeline layout. Descriptors
    -- with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-inputattachment>.
    PhysicalDeviceLimits -> Word32
maxDescriptorSetInputAttachments :: Word32
  , -- | #limits-maxVertexInputAttributes# @maxVertexInputAttributes@ is the
    -- maximum number of vertex input attributes that /can/ be specified for a
    -- graphics pipeline. These are described in the array of
    -- 'Vulkan.Core10.GraphicsPipeline.VertexInputAttributeDescription'
    -- structures that are provided at graphics pipeline creation time via the
    -- @pVertexAttributeDescriptions@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineVertexInputStateCreateInfo'
    -- structure. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fxvertex-attrib>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fxvertex-input>.
    PhysicalDeviceLimits -> Word32
maxVertexInputAttributes :: Word32
  , -- | #limits-maxVertexInputBindings# @maxVertexInputBindings@ is the maximum
    -- number of vertex buffers that /can/ be specified for providing vertex
    -- attributes to a graphics pipeline. These are described in the array of
    -- 'Vulkan.Core10.GraphicsPipeline.VertexInputBindingDescription'
    -- structures that are provided at graphics pipeline creation time via the
    -- @pVertexBindingDescriptions@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineVertexInputStateCreateInfo'
    -- structure. The @binding@ member of
    -- 'Vulkan.Core10.GraphicsPipeline.VertexInputBindingDescription' /must/ be
    -- less than this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fxvertex-input>.
    PhysicalDeviceLimits -> Word32
maxVertexInputBindings :: Word32
  , -- | #limits-maxVertexInputAttributeOffset# @maxVertexInputAttributeOffset@
    -- is the maximum vertex input attribute offset that /can/ be added to the
    -- vertex input binding stride. The @offset@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.VertexInputAttributeDescription'
    -- structure /must/ be less than or equal to this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fxvertex-input>.
    PhysicalDeviceLimits -> Word32
maxVertexInputAttributeOffset :: Word32
  , -- | #limits-maxVertexInputBindingStride# @maxVertexInputBindingStride@ is
    -- the maximum vertex input binding stride that /can/ be specified in a
    -- vertex input binding. The @stride@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.VertexInputBindingDescription' structure
    -- /must/ be less than or equal to this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#fxvertex-input>.
    PhysicalDeviceLimits -> Word32
maxVertexInputBindingStride :: Word32
  , -- | #limits-maxVertexOutputComponents# @maxVertexOutputComponents@ is the
    -- maximum number of components of output variables which /can/ be output
    -- by a vertex shader. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#shaders-vertex>.
    PhysicalDeviceLimits -> Word32
maxVertexOutputComponents :: Word32
  , -- | #limits-maxTessellationGenerationLevel# @maxTessellationGenerationLevel@
    -- is the maximum tessellation generation level supported by the
    -- fixed-function tessellation primitive generator. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#tessellation>.
    PhysicalDeviceLimits -> Word32
maxTessellationGenerationLevel :: Word32
  , -- | #limits-maxTessellationPatchSize# @maxTessellationPatchSize@ is the
    -- maximum patch size, in vertices, of patches that /can/ be processed by
    -- the tessellation control shader and tessellation primitive generator.
    -- The @patchControlPoints@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineTessellationStateCreateInfo'
    -- structure specified at pipeline creation time and the value provided in
    -- the @OutputVertices@ execution mode of shader modules /must/ be less
    -- than or equal to this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#tessellation>.
    PhysicalDeviceLimits -> Word32
maxTessellationPatchSize :: Word32
  , -- | #limits-maxTessellationControlPerVertexInputComponents#
    -- @maxTessellationControlPerVertexInputComponents@ is the maximum number
    -- of components of input variables which /can/ be provided as per-vertex
    -- inputs to the tessellation control shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationControlPerVertexInputComponents :: Word32
  , -- | #limits-maxTessellationControlPerVertexOutputComponents#
    -- @maxTessellationControlPerVertexOutputComponents@ is the maximum number
    -- of components of per-vertex output variables which /can/ be output from
    -- the tessellation control shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationControlPerVertexOutputComponents :: Word32
  , -- | #limits-maxTessellationControlPerPatchOutputComponents#
    -- @maxTessellationControlPerPatchOutputComponents@ is the maximum number
    -- of components of per-patch output variables which /can/ be output from
    -- the tessellation control shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationControlPerPatchOutputComponents :: Word32
  , -- | #limits-maxTessellationControlTotalOutputComponents#
    -- @maxTessellationControlTotalOutputComponents@ is the maximum total
    -- number of components of per-vertex and per-patch output variables which
    -- /can/ be output from the tessellation control shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationControlTotalOutputComponents :: Word32
  , -- | #limits-maxTessellationEvaluationInputComponents#
    -- @maxTessellationEvaluationInputComponents@ is the maximum number of
    -- components of input variables which /can/ be provided as per-vertex
    -- inputs to the tessellation evaluation shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationEvaluationInputComponents :: Word32
  , -- | #limits-maxTessellationEvaluationOutputComponents#
    -- @maxTessellationEvaluationOutputComponents@ is the maximum number of
    -- components of per-vertex output variables which /can/ be output from the
    -- tessellation evaluation shader stage.
    PhysicalDeviceLimits -> Word32
maxTessellationEvaluationOutputComponents :: Word32
  , -- | #limits-maxGeometryShaderInvocations# @maxGeometryShaderInvocations@ is
    -- the maximum invocation count supported for instanced geometry shaders.
    -- The value provided in the @Invocations@ execution mode of shader modules
    -- /must/ be less than or equal to this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#geometry>.
    PhysicalDeviceLimits -> Word32
maxGeometryShaderInvocations :: Word32
  , -- | #limits-maxGeometryInputComponents# @maxGeometryInputComponents@ is the
    -- maximum number of components of input variables which /can/ be provided
    -- as inputs to the geometry shader stage.
    PhysicalDeviceLimits -> Word32
maxGeometryInputComponents :: Word32
  , -- | #limits-maxGeometryOutputComponents# @maxGeometryOutputComponents@ is
    -- the maximum number of components of output variables which /can/ be
    -- output from the geometry shader stage.
    PhysicalDeviceLimits -> Word32
maxGeometryOutputComponents :: Word32
  , -- | #limits-maxGeometryOutputVertices# @maxGeometryOutputVertices@ is the
    -- maximum number of vertices which /can/ be emitted by any geometry
    -- shader.
    PhysicalDeviceLimits -> Word32
maxGeometryOutputVertices :: Word32
  , -- | #limits-maxGeometryTotalOutputComponents#
    -- @maxGeometryTotalOutputComponents@ is the maximum total number of
    -- components of output variables, across all emitted vertices, which /can/
    -- be output from the geometry shader stage.
    PhysicalDeviceLimits -> Word32
maxGeometryTotalOutputComponents :: Word32
  , -- | #limits-maxFragmentInputComponents# @maxFragmentInputComponents@ is the
    -- maximum number of components of input variables which /can/ be provided
    -- as inputs to the fragment shader stage.
    PhysicalDeviceLimits -> Word32
maxFragmentInputComponents :: Word32
  , -- | #limits-maxFragmentOutputAttachments# @maxFragmentOutputAttachments@ is
    -- the maximum number of output attachments which /can/ be written to by
    -- the fragment shader stage.
    PhysicalDeviceLimits -> Word32
maxFragmentOutputAttachments :: Word32
  , -- | #limits-maxFragmentDualSrcAttachments# @maxFragmentDualSrcAttachments@
    -- is the maximum number of output attachments which /can/ be written to by
    -- the fragment shader stage when blending is enabled and one of the dual
    -- source blend modes is in use. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#framebuffer-dsb>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-dualSrcBlend dualSrcBlend>.
    PhysicalDeviceLimits -> Word32
maxFragmentDualSrcAttachments :: Word32
  , -- | #limits-maxFragmentCombinedOutputResources#
    -- @maxFragmentCombinedOutputResources@ is the total number of storage
    -- buffers, storage images, and output @Location@ decorated color
    -- attachments (described in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#interfaces-fragmentoutput Fragment Output Interface>)
    -- which /can/ be used in the fragment shader stage.
    PhysicalDeviceLimits -> Word32
maxFragmentCombinedOutputResources :: Word32
  , -- | #limits-maxComputeSharedMemorySize# @maxComputeSharedMemorySize@ is the
    -- maximum total storage size, in bytes, available for variables declared
    -- with the @Workgroup@ storage class in shader modules (or with the
    -- @shared@ storage qualifier in GLSL) in the compute shader stage.
    PhysicalDeviceLimits -> Word32
maxComputeSharedMemorySize :: Word32
  , -- | #limits-maxComputeWorkGroupCount# @maxComputeWorkGroupCount@[3] is the
    -- maximum number of local workgroups that /can/ be dispatched by a single
    -- dispatching command. These three values represent the maximum number of
    -- local workgroups for the X, Y, and Z dimensions, respectively. The
    -- workgroup count parameters to the dispatching commands /must/ be less
    -- than or equal to the corresponding limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#dispatch>.
    PhysicalDeviceLimits -> (Word32, Word32, Word32)
maxComputeWorkGroupCount :: (Word32, Word32, Word32)
  , -- | #limits-maxComputeWorkGroupInvocations# @maxComputeWorkGroupInvocations@
    -- is the maximum total number of compute shader invocations in a single
    -- local workgroup. The product of the X, Y, and Z sizes, as specified by
    -- the @LocalSize@ or @LocalSizeId@ execution mode in shader modules or by
    -- the object decorated by the @WorkgroupSize@ decoration, /must/ be less
    -- than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxComputeWorkGroupInvocations :: Word32
  , -- | #limits-maxComputeWorkGroupSize# @maxComputeWorkGroupSize@[3] is the
    -- maximum size of a local compute workgroup, per dimension. These three
    -- values represent the maximum local workgroup size in the X, Y, and Z
    -- dimensions, respectively. The @x@, @y@, and @z@ sizes, as specified by
    -- the @LocalSize@ or @LocalSizeId@ execution mode or by the object
    -- decorated by the @WorkgroupSize@ decoration in shader modules, /must/ be
    -- less than or equal to the corresponding limit.
    PhysicalDeviceLimits -> (Word32, Word32, Word32)
maxComputeWorkGroupSize :: (Word32, Word32, Word32)
  , -- | #limits-subPixelPrecisionBits# @subPixelPrecisionBits@ is the number of
    -- bits of subpixel precision in framebuffer coordinates xf and yf. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast>.
    PhysicalDeviceLimits -> Word32
subPixelPrecisionBits :: Word32
  , -- | #limits-subTexelPrecisionBits# @subTexelPrecisionBits@ is the number of
    -- bits of precision in the division along an axis of an image used for
    -- minification and magnification filters. 2@subTexelPrecisionBits@ is the
    -- actual number of divisions along each axis of the image represented.
    -- Sub-texel values calculated during image sampling will snap to these
    -- locations when generating the filtered results.
    PhysicalDeviceLimits -> Word32
subTexelPrecisionBits :: Word32
  , -- | #limits-mipmapPrecisionBits# @mipmapPrecisionBits@ is the number of bits
    -- of division that the LOD calculation for mipmap fetching get snapped to
    -- when determining the contribution from each mip level to the mip
    -- filtered results. 2@mipmapPrecisionBits@ is the actual number of
    -- divisions.
    PhysicalDeviceLimits -> Word32
mipmapPrecisionBits :: Word32
  , -- | #limits-maxDrawIndexedIndexValue# @maxDrawIndexedIndexValue@ is the
    -- maximum index value that /can/ be used for indexed draw calls when using
    -- 32-bit indices. This excludes the primitive restart index value of
    -- 0xFFFFFFFF. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-fullDrawIndexUint32 fullDrawIndexUint32>.
    PhysicalDeviceLimits -> Word32
maxDrawIndexedIndexValue :: Word32
  , -- | #limits-maxDrawIndirectCount# @maxDrawIndirectCount@ is the maximum draw
    -- count that is supported for indirect drawing calls. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-multiDrawIndirect multiDrawIndirect>.
    PhysicalDeviceLimits -> Word32
maxDrawIndirectCount :: Word32
  , -- | #limits-maxSamplerLodBias# @maxSamplerLodBias@ is the maximum absolute
    -- sampler LOD bias. The sum of the @mipLodBias@ member of the
    -- 'Vulkan.Core10.Sampler.SamplerCreateInfo' structure and the @Bias@
    -- operand of image sampling operations in shader modules (or 0 if no
    -- @Bias@ operand is provided to an image sampling operation) are clamped
    -- to the range [-@maxSamplerLodBias@,+@maxSamplerLodBias@]. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#samplers-mipLodBias>.
    PhysicalDeviceLimits -> Float
maxSamplerLodBias :: Float
  , -- | #limits-maxSamplerAnisotropy# @maxSamplerAnisotropy@ is the maximum
    -- degree of sampler anisotropy. The maximum degree of anisotropic
    -- filtering used for an image sampling operation is the minimum of the
    -- @maxAnisotropy@ member of the 'Vulkan.Core10.Sampler.SamplerCreateInfo'
    -- structure and this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#samplers-maxAnisotropy>.
    PhysicalDeviceLimits -> Float
maxSamplerAnisotropy :: Float
  , -- | #limits-maxViewports# @maxViewports@ is the maximum number of active
    -- viewports. The @viewportCount@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineViewportStateCreateInfo'
    -- structure that is provided at pipeline creation /must/ be less than or
    -- equal to this limit.
    PhysicalDeviceLimits -> Word32
maxViewports :: Word32
  , -- | #limits-maxViewportDimensions# @maxViewportDimensions@[2] are the
    -- maximum viewport dimensions in the X (width) and Y (height) dimensions,
    -- respectively. The maximum viewport dimensions /must/ be greater than or
    -- equal to the largest image which /can/ be created and used as a
    -- framebuffer attachment. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#vertexpostproc-viewport Controlling the Viewport>.
    PhysicalDeviceLimits -> (Word32, Word32)
maxViewportDimensions :: (Word32, Word32)
  , -- | #limits-viewportboundsrange# @viewportBoundsRange@[2] is the [minimum,
    -- maximum] range that the corners of a viewport /must/ be contained in.
    -- This range /must/ be at least [-2 × @size@, 2 × @size@ - 1], where
    -- @size@ = max(@maxViewportDimensions@[0], @maxViewportDimensions@[1]).
    -- See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#vertexpostproc-viewport Controlling the Viewport>.
    --
    -- The intent of the @viewportBoundsRange@ limit is to allow a maximum
    -- sized viewport to be arbitrarily shifted relative to the output target
    -- as long as at least some portion intersects. This would give a bounds
    -- limit of [-@size@ + 1, 2 × @size@ - 1] which would allow all possible
    -- non-empty-set intersections of the output target and the viewport. Since
    -- these numbers are typically powers of two, picking the signed number
    -- range using the smallest possible number of bits ends up with the
    -- specified range.
    PhysicalDeviceLimits -> (Float, Float)
viewportBoundsRange :: (Float, Float)
  , -- | #limits-viewportSubPixelBits# @viewportSubPixelBits@ is the number of
    -- bits of subpixel precision for viewport bounds. The subpixel precision
    -- that floating-point viewport bounds are interpreted at is given by this
    -- limit.
    PhysicalDeviceLimits -> Word32
viewportSubPixelBits :: Word32
  , -- | #limits-minMemoryMapAlignment# @minMemoryMapAlignment@ is the minimum
    -- /required/ alignment, in bytes, of host visible memory allocations
    -- within the host address space. When mapping a memory allocation with
    -- 'Vulkan.Core10.Memory.mapMemory', subtracting @offset@ bytes from the
    -- returned pointer will always produce an integer multiple of this limit.
    -- See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-device-hostaccess>.
    -- The value /must/ be a power of two.
    PhysicalDeviceLimits -> DeviceSize
minMemoryMapAlignment :: Word64
  , -- | #limits-minTexelBufferOffsetAlignment# @minTexelBufferOffsetAlignment@
    -- is the minimum /required/ alignment, in bytes, for the @offset@ member
    -- of the 'Vulkan.Core10.BufferView.BufferViewCreateInfo' structure for
    -- texel buffers. The value /must/ be a power of two. This limit is
    -- equivalent to the maximum of the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-uniformTexelBufferOffsetAlignmentBytes uniformTexelBufferOffsetAlignmentBytes>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-storageTexelBufferOffsetAlignmentBytes storageTexelBufferOffsetAlignmentBytes>
    -- members of
    -- 'Vulkan.Core13.Promoted_From_VK_EXT_texel_buffer_alignment.PhysicalDeviceTexelBufferAlignmentProperties',
    -- but smaller alignment is /optionally/ allowed by
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-storageTexelBufferOffsetSingleTexelAlignment storageTexelBufferOffsetSingleTexelAlignment>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-uniformTexelBufferOffsetSingleTexelAlignment uniformTexelBufferOffsetSingleTexelAlignment>.
    -- For single texel alignment, a format has an alignment requirement which
    -- is the size of a single component if the size of the format is a
    -- multiple of three bytes, otherwise, it is the size of the format itself.
    -- The effective alignment requirement is the minimum of the per-format
    -- alignment and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-uniformTexelBufferOffsetAlignmentBytes uniformTexelBufferOffsetAlignmentBytes>
    -- or
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-storageTexelBufferOffsetAlignmentBytes storageTexelBufferOffsetAlignmentBytes>
    -- depending on the descriptor type. If the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-texelBufferAlignment texelBufferAlignment>
    -- feature is not enabled, the effective alignment requirement for any
    -- format is @minTexelBufferOffsetAlignment@.
    -- 'Vulkan.Core10.BufferView.BufferViewCreateInfo'::@offset@ /must/ be a
    -- multiple of this value.
    PhysicalDeviceLimits -> DeviceSize
minTexelBufferOffsetAlignment :: DeviceSize
  , -- | #limits-minUniformBufferOffsetAlignment#
    -- @minUniformBufferOffsetAlignment@ is the minimum /required/ alignment,
    -- in bytes, for the @offset@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorBufferInfo' structure for uniform
    -- buffers. When a descriptor of type
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- is updated, the @offset@ /must/ be an integer multiple of this limit.
    -- Similarly, dynamic offsets for uniform buffers /must/ be multiples of
    -- this limit. The value /must/ be a power of two.
    PhysicalDeviceLimits -> DeviceSize
minUniformBufferOffsetAlignment :: DeviceSize
  , -- | #limits-minStorageBufferOffsetAlignment#
    -- @minStorageBufferOffsetAlignment@ is the minimum /required/ alignment,
    -- in bytes, for the @offset@ member of the
    -- 'Vulkan.Core10.DescriptorSet.DescriptorBufferInfo' structure for storage
    -- buffers. When a descriptor of type
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- is updated, the @offset@ /must/ be an integer multiple of this limit.
    -- Similarly, dynamic offsets for storage buffers /must/ be multiples of
    -- this limit. The value /must/ be a power of two.
    PhysicalDeviceLimits -> DeviceSize
minStorageBufferOffsetAlignment :: DeviceSize
  , -- | #limits-minTexelOffset# @minTexelOffset@ is the minimum offset value for
    -- the @Offset@ or @ConstOffset@ image operand of any of the
    -- @OpImageSample*@ or @OpImageFetch*@ image instructions.
    PhysicalDeviceLimits -> Int32
minTexelOffset :: Int32
  , -- | #limits-maxTexelOffset# @maxTexelOffset@ is the maximum offset value for
    -- the @Offset@ or @ConstOffset@ image operand of any of the
    -- @OpImageSample*@ or @OpImageFetch*@ image instructions.
    PhysicalDeviceLimits -> Word32
maxTexelOffset :: Word32
  , -- | #limits-minTexelGatherOffset# @minTexelGatherOffset@ is the minimum
    -- offset value for the @Offset@, @ConstOffset@, or @ConstOffsets@ image
    -- operands of any of the @OpImage*Gather@ image instructions.
    PhysicalDeviceLimits -> Int32
minTexelGatherOffset :: Int32
  , -- | #limits-maxTexelGatherOffset# @maxTexelGatherOffset@ is the maximum
    -- offset value for the @Offset@, @ConstOffset@, or @ConstOffsets@ image
    -- operands of any of the @OpImage*Gather@ image instructions.
    PhysicalDeviceLimits -> Word32
maxTexelGatherOffset :: Word32
  , -- | #limits-minInterpolationOffset# @minInterpolationOffset@ is the base
    -- minimum (inclusive) negative offset value for the @Offset@ operand of
    -- the @InterpolateAtOffset@ extended instruction.
    PhysicalDeviceLimits -> Float
minInterpolationOffset :: Float
  , -- | #limits-maxInterpolationOffset# @maxInterpolationOffset@ is the base
    -- maximum (inclusive) positive offset value for the @Offset@ operand of
    -- the @InterpolateAtOffset@ extended instruction.
    PhysicalDeviceLimits -> Float
maxInterpolationOffset :: Float
  , -- | #limits-subPixelInterpolationOffsetBits#
    -- @subPixelInterpolationOffsetBits@ is the number of fractional bits that
    -- the @x@ and @y@ offsets to the @InterpolateAtOffset@ extended
    -- instruction /may/ be rounded to as fixed-point values.
    PhysicalDeviceLimits -> Word32
subPixelInterpolationOffsetBits :: Word32
  , -- | #limits-maxFramebufferWidth# @maxFramebufferWidth@ is the maximum width
    -- for a framebuffer. The @width@ member of the
    -- 'Vulkan.Core10.Pass.FramebufferCreateInfo' structure /must/ be less than
    -- or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxFramebufferWidth :: Word32
  , -- | #limits-maxFramebufferHeight# @maxFramebufferHeight@ is the maximum
    -- height for a framebuffer. The @height@ member of the
    -- 'Vulkan.Core10.Pass.FramebufferCreateInfo' structure /must/ be less than
    -- or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxFramebufferHeight :: Word32
  , -- | #limits-maxFramebufferLayers# @maxFramebufferLayers@ is the maximum
    -- layer count for a layered framebuffer. The @layers@ member of the
    -- 'Vulkan.Core10.Pass.FramebufferCreateInfo' structure /must/ be less than
    -- or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxFramebufferLayers :: Word32
  , -- | #limits-framebufferColorSampleCounts# @framebufferColorSampleCounts@ is
    -- a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the color sample counts that are supported for all framebuffer color
    -- attachments with floating- or fixed-point formats. For color attachments
    -- with integer formats, see
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-framebufferIntegerColorSampleCounts framebufferIntegerColorSampleCounts>.
    PhysicalDeviceLimits -> SampleCountFlags
framebufferColorSampleCounts :: SampleCountFlags
  , -- | #limits-framebufferDepthSampleCounts# @framebufferDepthSampleCounts@ is
    -- a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the supported depth sample counts for all framebuffer depth\/stencil
    -- attachments, when the format includes a depth component.
    PhysicalDeviceLimits -> SampleCountFlags
framebufferDepthSampleCounts :: SampleCountFlags
  , -- | #limits-framebufferStencilSampleCounts# @framebufferStencilSampleCounts@
    -- is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the supported stencil sample counts for all framebuffer depth\/stencil
    -- attachments, when the format includes a stencil component.
    PhysicalDeviceLimits -> SampleCountFlags
framebufferStencilSampleCounts :: SampleCountFlags
  , -- | #limits-framebufferNoAttachmentsSampleCounts#
    -- @framebufferNoAttachmentsSampleCounts@ is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the supported sample counts for a
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#renderpass-noattachments subpass which uses no attachments>.
    PhysicalDeviceLimits -> SampleCountFlags
framebufferNoAttachmentsSampleCounts :: SampleCountFlags
  , -- | #limits-maxColorAttachments# @maxColorAttachments@ is the maximum number
    -- of color attachments that /can/ be used by a subpass in a render pass.
    -- The @colorAttachmentCount@ member of the
    -- 'Vulkan.Core10.Pass.SubpassDescription' or
    -- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2'
    -- structure /must/ be less than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxColorAttachments :: Word32
  , -- | #limits-sampledImageColorSampleCounts# @sampledImageColorSampleCounts@
    -- is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the sample counts supported for all 2D images created with
    -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' usage
    -- flag set, and a non-integer color format.
    PhysicalDeviceLimits -> SampleCountFlags
sampledImageColorSampleCounts :: SampleCountFlags
  , -- | #limits-sampledImageIntegerSampleCounts#
    -- @sampledImageIntegerSampleCounts@ is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the sample counts supported for all 2D images created with
    -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' usage
    -- flag set, and an integer color format.
    PhysicalDeviceLimits -> SampleCountFlags
sampledImageIntegerSampleCounts :: SampleCountFlags
  , -- | #limits-sampledImageDepthSampleCounts# @sampledImageDepthSampleCounts@
    -- is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the sample counts supported for all 2D images created with
    -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' usage
    -- flag set, and a depth format.
    PhysicalDeviceLimits -> SampleCountFlags
sampledImageDepthSampleCounts :: SampleCountFlags
  , -- | #limits-sampledImageStencilSampleCounts#
    -- @sampledImageStencilSampleCounts@ is a bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the sample counts supported for all 2D images created with
    -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' usage
    -- flag set, and a stencil format.
    PhysicalDeviceLimits -> SampleCountFlags
sampledImageStencilSampleCounts :: SampleCountFlags
  , -- | #limits-storageImageSampleCounts# @storageImageSampleCounts@ is a
    -- bitmask1 of
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' indicating
    -- the sample counts supported for all 2D images created with
    -- 'Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', and the
    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT' usage
    -- flag set.
    PhysicalDeviceLimits -> SampleCountFlags
storageImageSampleCounts :: SampleCountFlags
  , -- | #limits-maxSampleMaskWords# @maxSampleMaskWords@ is the maximum number
    -- of array elements of a variable decorated with the
    -- 'Vulkan.Core10.FundamentalTypes.SampleMask' built-in decoration.
    PhysicalDeviceLimits -> Word32
maxSampleMaskWords :: Word32
  , -- | #limits-timestampComputeAndGraphics# @timestampComputeAndGraphics@
    -- specifies support for timestamps on all graphics and compute queues. If
    -- this limit is 'Vulkan.Core10.FundamentalTypes.TRUE', all queues that
    -- advertise the 'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' or
    -- 'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT' in the
    -- 'QueueFamilyProperties'::@queueFlags@ support
    -- 'QueueFamilyProperties'::@timestampValidBits@ of at least 36. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#queries-timestamps Timestamp Queries>.
    PhysicalDeviceLimits -> Bool
timestampComputeAndGraphics :: Bool
  , -- | #limits-timestampPeriod# @timestampPeriod@ is the number of nanoseconds
    -- /required/ for a timestamp query to be incremented by 1. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#queries-timestamps Timestamp Queries>.
    PhysicalDeviceLimits -> Float
timestampPeriod :: Float
  , -- | #limits-maxClipDistances# @maxClipDistances@ is the maximum number of
    -- clip distances that /can/ be used in a single shader stage. The size of
    -- any array declared with the @ClipDistance@ built-in decoration in a
    -- shader module /must/ be less than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxClipDistances :: Word32
  , -- | #limits-maxCullDistances# @maxCullDistances@ is the maximum number of
    -- cull distances that /can/ be used in a single shader stage. The size of
    -- any array declared with the @CullDistance@ built-in decoration in a
    -- shader module /must/ be less than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxCullDistances :: Word32
  , -- | #limits-maxCombinedClipAndCullDistances#
    -- @maxCombinedClipAndCullDistances@ is the maximum combined number of clip
    -- and cull distances that /can/ be used in a single shader stage. The sum
    -- of the sizes of all arrays declared with the @ClipDistance@ and
    -- @CullDistance@ built-in decoration used by a single shader stage in a
    -- shader module /must/ be less than or equal to this limit.
    PhysicalDeviceLimits -> Word32
maxCombinedClipAndCullDistances :: Word32
  , -- | #limits-discreteQueuePriorities# @discreteQueuePriorities@ is the number
    -- of discrete priorities that /can/ be assigned to a queue based on the
    -- value of each member of
    -- 'Vulkan.Core10.Device.DeviceQueueCreateInfo'::@pQueuePriorities@. This
    -- /must/ be at least 2, and levels /must/ be spread evenly over the range,
    -- with at least one level at 1.0, and another at 0.0. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#devsandqueues-priority>.
    PhysicalDeviceLimits -> Word32
discreteQueuePriorities :: Word32
  , -- | #limits-pointSizeRange# @pointSizeRange@[2] is the range
    -- [@minimum@,@maximum@] of supported sizes for points. Values written to
    -- variables decorated with the @PointSize@ built-in decoration are clamped
    -- to this range.
    PhysicalDeviceLimits -> (Float, Float)
pointSizeRange :: (Float, Float)
  , -- | #limits-lineWidthRange# @lineWidthRange@[2] is the range
    -- [@minimum@,@maximum@] of supported widths for lines. Values specified by
    -- the @lineWidth@ member of the
    -- 'Vulkan.Core10.GraphicsPipeline.PipelineRasterizationStateCreateInfo' or
    -- the @lineWidth@ parameter to
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdSetLineWidth' are clamped to
    -- this range.
    PhysicalDeviceLimits -> (Float, Float)
lineWidthRange :: (Float, Float)
  , -- | #limits-pointSizeGranularity# @pointSizeGranularity@ is the granularity
    -- of supported point sizes. Not all point sizes in the range defined by
    -- @pointSizeRange@ are supported. This limit specifies the granularity (or
    -- increment) between successive supported point sizes.
    PhysicalDeviceLimits -> Float
pointSizeGranularity :: Float
  , -- | #limits-lineWidthGranularity# @lineWidthGranularity@ is the granularity
    -- of supported line widths. Not all line widths in the range defined by
    -- @lineWidthRange@ are supported. This limit specifies the granularity (or
    -- increment) between successive supported line widths.
    PhysicalDeviceLimits -> Float
lineWidthGranularity :: Float
  , -- | #limits-strictLines# @strictLines@ specifies whether lines are
    -- rasterized according to the preferred method of rasterization. If set to
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', lines /may/ be rasterized under
    -- a relaxed set of rules. If set to 'Vulkan.Core10.FundamentalTypes.TRUE',
    -- lines are rasterized as per the strict definition. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-lines-basic Basic Line Segment Rasterization>.
    PhysicalDeviceLimits -> Bool
strictLines :: Bool
  , -- | #limits-standardSampleLocations# @standardSampleLocations@ specifies
    -- whether rasterization uses the standard sample locations as documented
    -- in
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#primsrast-multisampling Multisampling>.
    -- If set to 'Vulkan.Core10.FundamentalTypes.TRUE', the implementation uses
    -- the documented sample locations. If set to
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', the implementation /may/ use
    -- different sample locations.
    PhysicalDeviceLimits -> Bool
standardSampleLocations :: Bool
  , -- | #limits-optimalBufferCopyOffsetAlignment#
    -- @optimalBufferCopyOffsetAlignment@ is the optimal buffer offset
    -- alignment in bytes for
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_copy_commands2.cmdCopyBufferToImage2',
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdCopyBufferToImage',
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_copy_commands2.cmdCopyImageToBuffer2',
    -- and 'Vulkan.Core10.CommandBufferBuilding.cmdCopyImageToBuffer'. This
    -- value is also the optimal host memory offset alignment in bytes for
    -- 'Vulkan.Core14.PromotedStreamingTransfers'.copyMemoryToImage' and
    -- 'Vulkan.Core14.PromotedStreamingTransfers'.copyImageToMemory'. The per
    -- texel alignment requirements are enforced, but applications /should/ use
    -- the optimal alignment for optimal performance and power use. The value
    -- /must/ be a power of two.
    PhysicalDeviceLimits -> DeviceSize
optimalBufferCopyOffsetAlignment :: DeviceSize
  , -- | #limits-optimalBufferCopyRowPitchAlignment#
    -- @optimalBufferCopyRowPitchAlignment@ is the optimal buffer row pitch
    -- alignment in bytes for
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_copy_commands2.cmdCopyBufferToImage2',
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdCopyBufferToImage',
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_copy_commands2.cmdCopyImageToBuffer2',
    -- and 'Vulkan.Core10.CommandBufferBuilding.cmdCopyImageToBuffer'. This
    -- value is also the optimal host memory row pitch alignment in bytes for
    -- 'Vulkan.Core14.PromotedStreamingTransfers'.copyMemoryToImage' and
    -- 'Vulkan.Core14.PromotedStreamingTransfers'.copyImageToMemory'. Row pitch
    -- is the number of bytes between texels with the same X coordinate in
    -- adjacent rows (Y coordinates differ by one). The per texel alignment
    -- requirements are enforced, but applications /should/ use the optimal
    -- alignment for optimal performance and power use. The value /must/ be a
    -- power of two.
    PhysicalDeviceLimits -> DeviceSize
optimalBufferCopyRowPitchAlignment :: DeviceSize
  , -- | #limits-nonCoherentAtomSize# @nonCoherentAtomSize@ is the size and
    -- alignment in bytes that bounds concurrent access to
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#memory-device-hostaccess host-mapped device memory>.
    -- The value /must/ be a power of two.
    --
    -- [1]
    --     For all bitmasks of
    --     'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits', the
    --     sample count limits defined above represent the minimum supported
    --     sample counts for each image type. Individual images /may/ support
    --     additional sample counts, which are queried using
    --     'getPhysicalDeviceImageFormatProperties' as described in
    --     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-supported-sample-counts Supported Sample Counts>.
    PhysicalDeviceLimits -> DeviceSize
nonCoherentAtomSize :: DeviceSize
  }
  deriving (Typeable, PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool
(PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool)
-> (PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool)
-> Eq PhysicalDeviceLimits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool
== :: PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool
$c/= :: PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool
/= :: PhysicalDeviceLimits -> PhysicalDeviceLimits -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLimits)
#endif
deriving instance Show PhysicalDeviceLimits

instance ToCStruct PhysicalDeviceLimits where
  withCStruct :: forall b.
PhysicalDeviceLimits -> (Ptr PhysicalDeviceLimits -> IO b) -> IO b
withCStruct PhysicalDeviceLimits
x Ptr PhysicalDeviceLimits -> IO b
f = Int -> (Ptr PhysicalDeviceLimits -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
504 ((Ptr PhysicalDeviceLimits -> IO b) -> IO b)
-> (Ptr PhysicalDeviceLimits -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceLimits
p -> Ptr PhysicalDeviceLimits -> PhysicalDeviceLimits -> IO b -> IO b
forall b.
Ptr PhysicalDeviceLimits -> PhysicalDeviceLimits -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLimits
p PhysicalDeviceLimits
x (Ptr PhysicalDeviceLimits -> IO b
f Ptr PhysicalDeviceLimits
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceLimits -> PhysicalDeviceLimits -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLimits
p PhysicalDeviceLimits{Bool
Float
Int32
Word32
DeviceSize
(Float, Float)
(Word32, Word32)
(Word32, Word32, Word32)
SampleCountFlags
maxImageDimension1D :: PhysicalDeviceLimits -> Word32
maxImageDimension2D :: PhysicalDeviceLimits -> Word32
maxImageDimension3D :: PhysicalDeviceLimits -> Word32
maxImageDimensionCube :: PhysicalDeviceLimits -> Word32
maxImageArrayLayers :: PhysicalDeviceLimits -> Word32
maxTexelBufferElements :: PhysicalDeviceLimits -> Word32
maxUniformBufferRange :: PhysicalDeviceLimits -> Word32
maxStorageBufferRange :: PhysicalDeviceLimits -> Word32
maxPushConstantsSize :: PhysicalDeviceLimits -> Word32
maxMemoryAllocationCount :: PhysicalDeviceLimits -> Word32
maxSamplerAllocationCount :: PhysicalDeviceLimits -> Word32
bufferImageGranularity :: PhysicalDeviceLimits -> DeviceSize
sparseAddressSpaceSize :: PhysicalDeviceLimits -> DeviceSize
maxBoundDescriptorSets :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorSamplers :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorUniformBuffers :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorStorageBuffers :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorSampledImages :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorStorageImages :: PhysicalDeviceLimits -> Word32
maxPerStageDescriptorInputAttachments :: PhysicalDeviceLimits -> Word32
maxPerStageResources :: PhysicalDeviceLimits -> Word32
maxDescriptorSetSamplers :: PhysicalDeviceLimits -> Word32
maxDescriptorSetUniformBuffers :: PhysicalDeviceLimits -> Word32
maxDescriptorSetUniformBuffersDynamic :: PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageBuffers :: PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageBuffersDynamic :: PhysicalDeviceLimits -> Word32
maxDescriptorSetSampledImages :: PhysicalDeviceLimits -> Word32
maxDescriptorSetStorageImages :: PhysicalDeviceLimits -> Word32
maxDescriptorSetInputAttachments :: PhysicalDeviceLimits -> Word32
maxVertexInputAttributes :: PhysicalDeviceLimits -> Word32
maxVertexInputBindings :: PhysicalDeviceLimits -> Word32
maxVertexInputAttributeOffset :: PhysicalDeviceLimits -> Word32
maxVertexInputBindingStride :: PhysicalDeviceLimits -> Word32
maxVertexOutputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationGenerationLevel :: PhysicalDeviceLimits -> Word32
maxTessellationPatchSize :: PhysicalDeviceLimits -> Word32
maxTessellationControlPerVertexInputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationControlPerVertexOutputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationControlPerPatchOutputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationControlTotalOutputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationEvaluationInputComponents :: PhysicalDeviceLimits -> Word32
maxTessellationEvaluationOutputComponents :: PhysicalDeviceLimits -> Word32
maxGeometryShaderInvocations :: PhysicalDeviceLimits -> Word32
maxGeometryInputComponents :: PhysicalDeviceLimits -> Word32
maxGeometryOutputComponents :: PhysicalDeviceLimits -> Word32
maxGeometryOutputVertices :: PhysicalDeviceLimits -> Word32
maxGeometryTotalOutputComponents :: PhysicalDeviceLimits -> Word32
maxFragmentInputComponents :: PhysicalDeviceLimits -> Word32
maxFragmentOutputAttachments :: PhysicalDeviceLimits -> Word32
maxFragmentDualSrcAttachments :: PhysicalDeviceLimits -> Word32
maxFragmentCombinedOutputResources :: PhysicalDeviceLimits -> Word32
maxComputeSharedMemorySize :: PhysicalDeviceLimits -> Word32
maxComputeWorkGroupCount :: PhysicalDeviceLimits -> (Word32, Word32, Word32)
maxComputeWorkGroupInvocations :: PhysicalDeviceLimits -> Word32
maxComputeWorkGroupSize :: PhysicalDeviceLimits -> (Word32, Word32, Word32)
subPixelPrecisionBits :: PhysicalDeviceLimits -> Word32
subTexelPrecisionBits :: PhysicalDeviceLimits -> Word32
mipmapPrecisionBits :: PhysicalDeviceLimits -> Word32
maxDrawIndexedIndexValue :: PhysicalDeviceLimits -> Word32
maxDrawIndirectCount :: PhysicalDeviceLimits -> Word32
maxSamplerLodBias :: PhysicalDeviceLimits -> Float
maxSamplerAnisotropy :: PhysicalDeviceLimits -> Float
maxViewports :: PhysicalDeviceLimits -> Word32
maxViewportDimensions :: PhysicalDeviceLimits -> (Word32, Word32)
viewportBoundsRange :: PhysicalDeviceLimits -> (Float, Float)
viewportSubPixelBits :: PhysicalDeviceLimits -> Word32
minMemoryMapAlignment :: PhysicalDeviceLimits -> DeviceSize
minTexelBufferOffsetAlignment :: PhysicalDeviceLimits -> DeviceSize
minUniformBufferOffsetAlignment :: PhysicalDeviceLimits -> DeviceSize
minStorageBufferOffsetAlignment :: PhysicalDeviceLimits -> DeviceSize
minTexelOffset :: PhysicalDeviceLimits -> Int32
maxTexelOffset :: PhysicalDeviceLimits -> Word32
minTexelGatherOffset :: PhysicalDeviceLimits -> Int32
maxTexelGatherOffset :: PhysicalDeviceLimits -> Word32
minInterpolationOffset :: PhysicalDeviceLimits -> Float
maxInterpolationOffset :: PhysicalDeviceLimits -> Float
subPixelInterpolationOffsetBits :: PhysicalDeviceLimits -> Word32
maxFramebufferWidth :: PhysicalDeviceLimits -> Word32
maxFramebufferHeight :: PhysicalDeviceLimits -> Word32
maxFramebufferLayers :: PhysicalDeviceLimits -> Word32
framebufferColorSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
framebufferDepthSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
framebufferStencilSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
framebufferNoAttachmentsSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
maxColorAttachments :: PhysicalDeviceLimits -> Word32
sampledImageColorSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
sampledImageIntegerSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
sampledImageDepthSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
sampledImageStencilSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
storageImageSampleCounts :: PhysicalDeviceLimits -> SampleCountFlags
maxSampleMaskWords :: PhysicalDeviceLimits -> Word32
timestampComputeAndGraphics :: PhysicalDeviceLimits -> Bool
timestampPeriod :: PhysicalDeviceLimits -> Float
maxClipDistances :: PhysicalDeviceLimits -> Word32
maxCullDistances :: PhysicalDeviceLimits -> Word32
maxCombinedClipAndCullDistances :: PhysicalDeviceLimits -> Word32
discreteQueuePriorities :: PhysicalDeviceLimits -> Word32
pointSizeRange :: PhysicalDeviceLimits -> (Float, Float)
lineWidthRange :: PhysicalDeviceLimits -> (Float, Float)
pointSizeGranularity :: PhysicalDeviceLimits -> Float
lineWidthGranularity :: PhysicalDeviceLimits -> Float
strictLines :: PhysicalDeviceLimits -> Bool
standardSampleLocations :: PhysicalDeviceLimits -> Bool
optimalBufferCopyOffsetAlignment :: PhysicalDeviceLimits -> DeviceSize
optimalBufferCopyRowPitchAlignment :: PhysicalDeviceLimits -> DeviceSize
nonCoherentAtomSize :: PhysicalDeviceLimits -> DeviceSize
maxImageDimension1D :: Word32
maxImageDimension2D :: Word32
maxImageDimension3D :: Word32
maxImageDimensionCube :: Word32
maxImageArrayLayers :: Word32
maxTexelBufferElements :: Word32
maxUniformBufferRange :: Word32
maxStorageBufferRange :: Word32
maxPushConstantsSize :: Word32
maxMemoryAllocationCount :: Word32
maxSamplerAllocationCount :: Word32
bufferImageGranularity :: DeviceSize
sparseAddressSpaceSize :: DeviceSize
maxBoundDescriptorSets :: Word32
maxPerStageDescriptorSamplers :: Word32
maxPerStageDescriptorUniformBuffers :: Word32
maxPerStageDescriptorStorageBuffers :: Word32
maxPerStageDescriptorSampledImages :: Word32
maxPerStageDescriptorStorageImages :: Word32
maxPerStageDescriptorInputAttachments :: Word32
maxPerStageResources :: Word32
maxDescriptorSetSamplers :: Word32
maxDescriptorSetUniformBuffers :: Word32
maxDescriptorSetUniformBuffersDynamic :: Word32
maxDescriptorSetStorageBuffers :: Word32
maxDescriptorSetStorageBuffersDynamic :: Word32
maxDescriptorSetSampledImages :: Word32
maxDescriptorSetStorageImages :: Word32
maxDescriptorSetInputAttachments :: Word32
maxVertexInputAttributes :: Word32
maxVertexInputBindings :: Word32
maxVertexInputAttributeOffset :: Word32
maxVertexInputBindingStride :: Word32
maxVertexOutputComponents :: Word32
maxTessellationGenerationLevel :: Word32
maxTessellationPatchSize :: Word32
maxTessellationControlPerVertexInputComponents :: Word32
maxTessellationControlPerVertexOutputComponents :: Word32
maxTessellationControlPerPatchOutputComponents :: Word32
maxTessellationControlTotalOutputComponents :: Word32
maxTessellationEvaluationInputComponents :: Word32
maxTessellationEvaluationOutputComponents :: Word32
maxGeometryShaderInvocations :: Word32
maxGeometryInputComponents :: Word32
maxGeometryOutputComponents :: Word32
maxGeometryOutputVertices :: Word32
maxGeometryTotalOutputComponents :: Word32
maxFragmentInputComponents :: Word32
maxFragmentOutputAttachments :: Word32
maxFragmentDualSrcAttachments :: Word32
maxFragmentCombinedOutputResources :: Word32
maxComputeSharedMemorySize :: Word32
maxComputeWorkGroupCount :: (Word32, Word32, Word32)
maxComputeWorkGroupInvocations :: Word32
maxComputeWorkGroupSize :: (Word32, Word32, Word32)
subPixelPrecisionBits :: Word32
subTexelPrecisionBits :: Word32
mipmapPrecisionBits :: Word32
maxDrawIndexedIndexValue :: Word32
maxDrawIndirectCount :: Word32
maxSamplerLodBias :: Float
maxSamplerAnisotropy :: Float
maxViewports :: Word32
maxViewportDimensions :: (Word32, Word32)
viewportBoundsRange :: (Float, Float)
viewportSubPixelBits :: Word32
minMemoryMapAlignment :: DeviceSize
minTexelBufferOffsetAlignment :: DeviceSize
minUniformBufferOffsetAlignment :: DeviceSize
minStorageBufferOffsetAlignment :: DeviceSize
minTexelOffset :: Int32
maxTexelOffset :: Word32
minTexelGatherOffset :: Int32
maxTexelGatherOffset :: Word32
minInterpolationOffset :: Float
maxInterpolationOffset :: Float
subPixelInterpolationOffsetBits :: Word32
maxFramebufferWidth :: Word32
maxFramebufferHeight :: Word32
maxFramebufferLayers :: Word32
framebufferColorSampleCounts :: SampleCountFlags
framebufferDepthSampleCounts :: SampleCountFlags
framebufferStencilSampleCounts :: SampleCountFlags
framebufferNoAttachmentsSampleCounts :: SampleCountFlags
maxColorAttachments :: Word32
sampledImageColorSampleCounts :: SampleCountFlags
sampledImageIntegerSampleCounts :: SampleCountFlags
sampledImageDepthSampleCounts :: SampleCountFlags
sampledImageStencilSampleCounts :: SampleCountFlags
storageImageSampleCounts :: SampleCountFlags
maxSampleMaskWords :: Word32
timestampComputeAndGraphics :: Bool
timestampPeriod :: Float
maxClipDistances :: Word32
maxCullDistances :: Word32
maxCombinedClipAndCullDistances :: Word32
discreteQueuePriorities :: Word32
pointSizeRange :: (Float, Float)
lineWidthRange :: (Float, Float)
pointSizeGranularity :: Float
lineWidthGranularity :: Float
strictLines :: Bool
standardSampleLocations :: Bool
optimalBufferCopyOffsetAlignment :: DeviceSize
optimalBufferCopyRowPitchAlignment :: DeviceSize
nonCoherentAtomSize :: DeviceSize
..} IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
maxImageDimension1D)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
maxImageDimension2D)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
maxImageDimension3D)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
maxImageDimensionCube)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxImageArrayLayers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
maxTexelBufferElements)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
maxUniformBufferRange)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
maxStorageBufferRange)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
maxPushConstantsSize)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
maxMemoryAllocationCount)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
maxSamplerAllocationCount)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceSize)) (DeviceSize
bufferImageGranularity)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceSize)) (DeviceSize
sparseAddressSpaceSize)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) (Word32
maxBoundDescriptorSets)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Word32)) (Word32
maxPerStageDescriptorSamplers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32)) (Word32
maxPerStageDescriptorUniformBuffers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Word32)) (Word32
maxPerStageDescriptorStorageBuffers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Word32)) (Word32
maxPerStageDescriptorSampledImages)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Word32)) (Word32
maxPerStageDescriptorStorageImages)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Word32)) (Word32
maxPerStageDescriptorInputAttachments)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Word32)) (Word32
maxPerStageResources)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32)) (Word32
maxDescriptorSetSamplers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Word32)) (Word32
maxDescriptorSetUniformBuffers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Word32)) (Word32
maxDescriptorSetUniformBuffersDynamic)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
108 :: Ptr Word32)) (Word32
maxDescriptorSetStorageBuffers)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr Word32)) (Word32
maxDescriptorSetStorageBuffersDynamic)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
116 :: Ptr Word32)) (Word32
maxDescriptorSetSampledImages)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Word32)) (Word32
maxDescriptorSetStorageImages)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
124 :: Ptr Word32)) (Word32
maxDescriptorSetInputAttachments)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Word32)) (Word32
maxVertexInputAttributes)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Word32)) (Word32
maxVertexInputBindings)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Word32)) (Word32
maxVertexInputAttributeOffset)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
140 :: Ptr Word32)) (Word32
maxVertexInputBindingStride)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr Word32)) (Word32
maxVertexOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
148 :: Ptr Word32)) (Word32
maxTessellationGenerationLevel)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr Word32)) (Word32
maxTessellationPatchSize)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
156 :: Ptr Word32)) (Word32
maxTessellationControlPerVertexInputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr Word32)) (Word32
maxTessellationControlPerVertexOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
164 :: Ptr Word32)) (Word32
maxTessellationControlPerPatchOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr Word32)) (Word32
maxTessellationControlTotalOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
172 :: Ptr Word32)) (Word32
maxTessellationEvaluationInputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr Word32)) (Word32
maxTessellationEvaluationOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
180 :: Ptr Word32)) (Word32
maxGeometryShaderInvocations)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr Word32)) (Word32
maxGeometryInputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
188 :: Ptr Word32)) (Word32
maxGeometryOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr Word32)) (Word32
maxGeometryOutputVertices)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
196 :: Ptr Word32)) (Word32
maxGeometryTotalOutputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr Word32)) (Word32
maxFragmentInputComponents)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
204 :: Ptr Word32)) (Word32
maxFragmentOutputAttachments)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr Word32)) (Word32
maxFragmentDualSrcAttachments)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
212 :: Ptr Word32)) (Word32
maxFragmentCombinedOutputResources)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr Word32)) (Word32
maxComputeSharedMemorySize)
    let pMaxComputeWorkGroupCount' :: Ptr Word32
pMaxComputeWorkGroupCount' = Ptr (FixedArray 3 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
220 :: Ptr (FixedArray 3 Word32)))
    case ((Word32, Word32, Word32)
maxComputeWorkGroupCount) of
      (Word32
e0, Word32
e1, Word32
e2) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32) (Word32
e2)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr Word32)) (Word32
maxComputeWorkGroupInvocations)
    let pMaxComputeWorkGroupSize' :: Ptr Word32
pMaxComputeWorkGroupSize' = Ptr (FixedArray 3 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
236 :: Ptr (FixedArray 3 Word32)))
    case ((Word32, Word32, Word32)
maxComputeWorkGroupSize) of
      (Word32
e0, Word32
e1, Word32
e2) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32) (Word32
e2)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr Word32)) (Word32
subPixelPrecisionBits)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
252 :: Ptr Word32)) (Word32
subTexelPrecisionBits)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word32)) (Word32
mipmapPrecisionBits)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (Word32
maxDrawIndexedIndexValue)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word32)) (Word32
maxDrawIndirectCount)
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
268 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxSamplerLodBias))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
272 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxSamplerAnisotropy))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
276 :: Ptr Word32)) (Word32
maxViewports)
    let pMaxViewportDimensions' :: Ptr Word32
pMaxViewportDimensions' = Ptr (FixedArray 2 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (FixedArray 2 Word32)))
    case ((Word32, Word32)
maxViewportDimensions) of
      (Word32
e0, Word32
e1) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxViewportDimensions' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxViewportDimensions' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
    let pViewportBoundsRange' :: Ptr CFloat
pViewportBoundsRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (FixedArray 2 CFloat)))
    case ((Float, Float)
viewportBoundsRange) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pViewportBoundsRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pViewportBoundsRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
296 :: Ptr Word32)) (Word32
viewportSubPixelBits)
    Ptr CSize -> CSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
304 :: Ptr CSize)) (DeviceSize -> CSize
CSize (DeviceSize
minMemoryMapAlignment))
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
312 :: Ptr DeviceSize)) (DeviceSize
minTexelBufferOffsetAlignment)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
320 :: Ptr DeviceSize)) (DeviceSize
minUniformBufferOffsetAlignment)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
328 :: Ptr DeviceSize)) (DeviceSize
minStorageBufferOffsetAlignment)
    Ptr Int32 -> Int32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
336 :: Ptr Int32)) (Int32
minTexelOffset)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
340 :: Ptr Word32)) (Word32
maxTexelOffset)
    Ptr Int32 -> Int32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
344 :: Ptr Int32)) (Int32
minTexelGatherOffset)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
348 :: Ptr Word32)) (Word32
maxTexelGatherOffset)
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
352 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minInterpolationOffset))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
356 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxInterpolationOffset))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
360 :: Ptr Word32)) (Word32
subPixelInterpolationOffsetBits)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
364 :: Ptr Word32)) (Word32
maxFramebufferWidth)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
368 :: Ptr Word32)) (Word32
maxFramebufferHeight)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
372 :: Ptr Word32)) (Word32
maxFramebufferLayers)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
376 :: Ptr SampleCountFlags)) (SampleCountFlags
framebufferColorSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
380 :: Ptr SampleCountFlags)) (SampleCountFlags
framebufferDepthSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
384 :: Ptr SampleCountFlags)) (SampleCountFlags
framebufferStencilSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
388 :: Ptr SampleCountFlags)) (SampleCountFlags
framebufferNoAttachmentsSampleCounts)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
392 :: Ptr Word32)) (Word32
maxColorAttachments)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
396 :: Ptr SampleCountFlags)) (SampleCountFlags
sampledImageColorSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
400 :: Ptr SampleCountFlags)) (SampleCountFlags
sampledImageIntegerSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
404 :: Ptr SampleCountFlags)) (SampleCountFlags
sampledImageDepthSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
408 :: Ptr SampleCountFlags)) (SampleCountFlags
sampledImageStencilSampleCounts)
    Ptr SampleCountFlags -> SampleCountFlags -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr SampleCountFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
412 :: Ptr SampleCountFlags)) (SampleCountFlags
storageImageSampleCounts)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
416 :: Ptr Word32)) (Word32
maxSampleMaskWords)
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
420 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
timestampComputeAndGraphics))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
424 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
timestampPeriod))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
428 :: Ptr Word32)) (Word32
maxClipDistances)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
432 :: Ptr Word32)) (Word32
maxCullDistances)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
436 :: Ptr Word32)) (Word32
maxCombinedClipAndCullDistances)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
440 :: Ptr Word32)) (Word32
discreteQueuePriorities)
    let pPointSizeRange' :: Ptr CFloat
pPointSizeRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
444 :: Ptr (FixedArray 2 CFloat)))
    case ((Float, Float)
pointSizeRange) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pPointSizeRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pPointSizeRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    let pLineWidthRange' :: Ptr CFloat
pLineWidthRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
452 :: Ptr (FixedArray 2 CFloat)))
    case ((Float, Float)
lineWidthRange) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pLineWidthRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pLineWidthRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
460 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
pointSizeGranularity))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
464 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
lineWidthGranularity))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
468 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
strictLines))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
472 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
standardSampleLocations))
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
480 :: Ptr DeviceSize)) (DeviceSize
optimalBufferCopyOffsetAlignment)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
488 :: Ptr DeviceSize)) (DeviceSize
optimalBufferCopyRowPitchAlignment)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
496 :: Ptr DeviceSize)) (DeviceSize
nonCoherentAtomSize)
    IO b
f
  cStructSize :: Int
cStructSize = Int
504
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceLimits -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceLimits
p IO b
f = do
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
108 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
116 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
124 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
140 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
148 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
156 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
164 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
172 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
180 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
188 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
196 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
204 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
212 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    let pMaxComputeWorkGroupCount' :: Ptr Word32
pMaxComputeWorkGroupCount' = Ptr (FixedArray 3 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
220 :: Ptr (FixedArray 3 Word32)))
    case ((Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)) of
      (Word32
e0, Word32
e1, Word32
e2) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupCount' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32) (Word32
e2)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    let pMaxComputeWorkGroupSize' :: Ptr Word32
pMaxComputeWorkGroupSize' = Ptr (FixedArray 3 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
236 :: Ptr (FixedArray 3 Word32)))
    case ((Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)) of
      (Word32
e0, Word32
e1, Word32
e2) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxComputeWorkGroupSize' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32) (Word32
e2)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
252 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
268 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
272 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
276 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    let pMaxViewportDimensions' :: Ptr Word32
pMaxViewportDimensions' = Ptr (FixedArray 2 Word32) -> Ptr Word32
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (FixedArray 2 Word32)))
    case ((Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)) of
      (Word32
e0, Word32
e1) -> do
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxViewportDimensions' :: Ptr Word32) (Word32
e0)
        Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr Word32
pMaxViewportDimensions' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32) (Word32
e1)
    let pViewportBoundsRange' :: Ptr CFloat
pViewportBoundsRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (FixedArray 2 CFloat)))
    case ((Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pViewportBoundsRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pViewportBoundsRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
296 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr CSize -> CSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
304 :: Ptr CSize)) (DeviceSize -> CSize
CSize (DeviceSize
forall a. Zero a => a
zero))
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
312 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
320 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
328 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr Int32 -> Int32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
336 :: Ptr Int32)) (Int32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
340 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Int32 -> Int32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
344 :: Ptr Int32)) (Int32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
348 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
352 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
356 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
360 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
364 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
368 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
372 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
392 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
416 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
420 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
424 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
428 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
432 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
436 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
440 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    let pPointSizeRange' :: Ptr CFloat
pPointSizeRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
444 :: Ptr (FixedArray 2 CFloat)))
    case ((Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pPointSizeRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pPointSizeRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    let pLineWidthRange' :: Ptr CFloat
pLineWidthRange' = Ptr (FixedArray 2 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
452 :: Ptr (FixedArray 2 CFloat)))
    case ((Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)) of
      (Float
e0, Float
e1) -> do
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pLineWidthRange' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke (Ptr CFloat
pLineWidthRange' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
460 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr CFloat -> CFloat -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
464 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
468 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
472 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
480 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
488 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    Ptr DeviceSize -> DeviceSize -> FN_vkVoidFunction
forall a. Storable a => Ptr a -> a -> FN_vkVoidFunction
poke ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
496 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceLimits where
  peekCStruct :: Ptr PhysicalDeviceLimits -> IO PhysicalDeviceLimits
peekCStruct Ptr PhysicalDeviceLimits
p = do
    maxImageDimension1D <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    maxImageDimension2D <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32))
    maxImageDimension3D <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))
    maxImageDimensionCube <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))
    maxImageArrayLayers <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
    maxTexelBufferElements <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
    maxUniformBufferRange <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
    maxStorageBufferRange <- peek @Word32 ((p `plusPtr` 28 :: Ptr Word32))
    maxPushConstantsSize <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
    maxMemoryAllocationCount <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32))
    maxSamplerAllocationCount <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32))
    bufferImageGranularity <- peek @DeviceSize ((p `plusPtr` 48 :: Ptr DeviceSize))
    sparseAddressSpaceSize <- peek @DeviceSize ((p `plusPtr` 56 :: Ptr DeviceSize))
    maxBoundDescriptorSets <- peek @Word32 ((p `plusPtr` 64 :: Ptr Word32))
    maxPerStageDescriptorSamplers <- peek @Word32 ((p `plusPtr` 68 :: Ptr Word32))
    maxPerStageDescriptorUniformBuffers <- peek @Word32 ((p `plusPtr` 72 :: Ptr Word32))
    maxPerStageDescriptorStorageBuffers <- peek @Word32 ((p `plusPtr` 76 :: Ptr Word32))
    maxPerStageDescriptorSampledImages <- peek @Word32 ((p `plusPtr` 80 :: Ptr Word32))
    maxPerStageDescriptorStorageImages <- peek @Word32 ((p `plusPtr` 84 :: Ptr Word32))
    maxPerStageDescriptorInputAttachments <- peek @Word32 ((p `plusPtr` 88 :: Ptr Word32))
    maxPerStageResources <- peek @Word32 ((p `plusPtr` 92 :: Ptr Word32))
    maxDescriptorSetSamplers <- peek @Word32 ((p `plusPtr` 96 :: Ptr Word32))
    maxDescriptorSetUniformBuffers <- peek @Word32 ((p `plusPtr` 100 :: Ptr Word32))
    maxDescriptorSetUniformBuffersDynamic <- peek @Word32 ((p `plusPtr` 104 :: Ptr Word32))
    maxDescriptorSetStorageBuffers <- peek @Word32 ((p `plusPtr` 108 :: Ptr Word32))
    maxDescriptorSetStorageBuffersDynamic <- peek @Word32 ((p `plusPtr` 112 :: Ptr Word32))
    maxDescriptorSetSampledImages <- peek @Word32 ((p `plusPtr` 116 :: Ptr Word32))
    maxDescriptorSetStorageImages <- peek @Word32 ((p `plusPtr` 120 :: Ptr Word32))
    maxDescriptorSetInputAttachments <- peek @Word32 ((p `plusPtr` 124 :: Ptr Word32))
    maxVertexInputAttributes <- peek @Word32 ((p `plusPtr` 128 :: Ptr Word32))
    maxVertexInputBindings <- peek @Word32 ((p `plusPtr` 132 :: Ptr Word32))
    maxVertexInputAttributeOffset <- peek @Word32 ((p `plusPtr` 136 :: Ptr Word32))
    maxVertexInputBindingStride <- peek @Word32 ((p `plusPtr` 140 :: Ptr Word32))
    maxVertexOutputComponents <- peek @Word32 ((p `plusPtr` 144 :: Ptr Word32))
    maxTessellationGenerationLevel <- peek @Word32 ((p `plusPtr` 148 :: Ptr Word32))
    maxTessellationPatchSize <- peek @Word32 ((p `plusPtr` 152 :: Ptr Word32))
    maxTessellationControlPerVertexInputComponents <- peek @Word32 ((p `plusPtr` 156 :: Ptr Word32))
    maxTessellationControlPerVertexOutputComponents <- peek @Word32 ((p `plusPtr` 160 :: Ptr Word32))
    maxTessellationControlPerPatchOutputComponents <- peek @Word32 ((p `plusPtr` 164 :: Ptr Word32))
    maxTessellationControlTotalOutputComponents <- peek @Word32 ((p `plusPtr` 168 :: Ptr Word32))
    maxTessellationEvaluationInputComponents <- peek @Word32 ((p `plusPtr` 172 :: Ptr Word32))
    maxTessellationEvaluationOutputComponents <- peek @Word32 ((p `plusPtr` 176 :: Ptr Word32))
    maxGeometryShaderInvocations <- peek @Word32 ((p `plusPtr` 180 :: Ptr Word32))
    maxGeometryInputComponents <- peek @Word32 ((p `plusPtr` 184 :: Ptr Word32))
    maxGeometryOutputComponents <- peek @Word32 ((p `plusPtr` 188 :: Ptr Word32))
    maxGeometryOutputVertices <- peek @Word32 ((p `plusPtr` 192 :: Ptr Word32))
    maxGeometryTotalOutputComponents <- peek @Word32 ((p `plusPtr` 196 :: Ptr Word32))
    maxFragmentInputComponents <- peek @Word32 ((p `plusPtr` 200 :: Ptr Word32))
    maxFragmentOutputAttachments <- peek @Word32 ((p `plusPtr` 204 :: Ptr Word32))
    maxFragmentDualSrcAttachments <- peek @Word32 ((p `plusPtr` 208 :: Ptr Word32))
    maxFragmentCombinedOutputResources <- peek @Word32 ((p `plusPtr` 212 :: Ptr Word32))
    maxComputeSharedMemorySize <- peek @Word32 ((p `plusPtr` 216 :: Ptr Word32))
    let pmaxComputeWorkGroupCount = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @Word32 ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
220 :: Ptr (FixedArray 3 Word32)))
    maxComputeWorkGroupCount0 <- peek @Word32 ((pmaxComputeWorkGroupCount `advancePtrBytes` 0 :: Ptr Word32))
    maxComputeWorkGroupCount1 <- peek @Word32 ((pmaxComputeWorkGroupCount `advancePtrBytes` 4 :: Ptr Word32))
    maxComputeWorkGroupCount2 <- peek @Word32 ((pmaxComputeWorkGroupCount `advancePtrBytes` 8 :: Ptr Word32))
    maxComputeWorkGroupInvocations <- peek @Word32 ((p `plusPtr` 232 :: Ptr Word32))
    let pmaxComputeWorkGroupSize = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @Word32 ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 3 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
236 :: Ptr (FixedArray 3 Word32)))
    maxComputeWorkGroupSize0 <- peek @Word32 ((pmaxComputeWorkGroupSize `advancePtrBytes` 0 :: Ptr Word32))
    maxComputeWorkGroupSize1 <- peek @Word32 ((pmaxComputeWorkGroupSize `advancePtrBytes` 4 :: Ptr Word32))
    maxComputeWorkGroupSize2 <- peek @Word32 ((pmaxComputeWorkGroupSize `advancePtrBytes` 8 :: Ptr Word32))
    subPixelPrecisionBits <- peek @Word32 ((p `plusPtr` 248 :: Ptr Word32))
    subTexelPrecisionBits <- peek @Word32 ((p `plusPtr` 252 :: Ptr Word32))
    mipmapPrecisionBits <- peek @Word32 ((p `plusPtr` 256 :: Ptr Word32))
    maxDrawIndexedIndexValue <- peek @Word32 ((p `plusPtr` 260 :: Ptr Word32))
    maxDrawIndirectCount <- peek @Word32 ((p `plusPtr` 264 :: Ptr Word32))
    maxSamplerLodBias <- peek @CFloat ((p `plusPtr` 268 :: Ptr CFloat))
    maxSamplerAnisotropy <- peek @CFloat ((p `plusPtr` 272 :: Ptr CFloat))
    maxViewports <- peek @Word32 ((p `plusPtr` 276 :: Ptr Word32))
    let pmaxViewportDimensions = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @Word32 ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (FixedArray 2 Word32)))
    maxViewportDimensions0 <- peek @Word32 ((pmaxViewportDimensions `advancePtrBytes` 0 :: Ptr Word32))
    maxViewportDimensions1 <- peek @Word32 ((pmaxViewportDimensions `advancePtrBytes` 4 :: Ptr Word32))
    let pviewportBoundsRange = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (FixedArray 2 CFloat)))
    viewportBoundsRange0 <- peek @CFloat ((pviewportBoundsRange `advancePtrBytes` 0 :: Ptr CFloat))
    viewportBoundsRange1 <- peek @CFloat ((pviewportBoundsRange `advancePtrBytes` 4 :: Ptr CFloat))
    viewportSubPixelBits <- peek @Word32 ((p `plusPtr` 296 :: Ptr Word32))
    minMemoryMapAlignment <- peek @CSize ((p `plusPtr` 304 :: Ptr CSize))
    minTexelBufferOffsetAlignment <- peek @DeviceSize ((p `plusPtr` 312 :: Ptr DeviceSize))
    minUniformBufferOffsetAlignment <- peek @DeviceSize ((p `plusPtr` 320 :: Ptr DeviceSize))
    minStorageBufferOffsetAlignment <- peek @DeviceSize ((p `plusPtr` 328 :: Ptr DeviceSize))
    minTexelOffset <- peek @Int32 ((p `plusPtr` 336 :: Ptr Int32))
    maxTexelOffset <- peek @Word32 ((p `plusPtr` 340 :: Ptr Word32))
    minTexelGatherOffset <- peek @Int32 ((p `plusPtr` 344 :: Ptr Int32))
    maxTexelGatherOffset <- peek @Word32 ((p `plusPtr` 348 :: Ptr Word32))
    minInterpolationOffset <- peek @CFloat ((p `plusPtr` 352 :: Ptr CFloat))
    maxInterpolationOffset <- peek @CFloat ((p `plusPtr` 356 :: Ptr CFloat))
    subPixelInterpolationOffsetBits <- peek @Word32 ((p `plusPtr` 360 :: Ptr Word32))
    maxFramebufferWidth <- peek @Word32 ((p `plusPtr` 364 :: Ptr Word32))
    maxFramebufferHeight <- peek @Word32 ((p `plusPtr` 368 :: Ptr Word32))
    maxFramebufferLayers <- peek @Word32 ((p `plusPtr` 372 :: Ptr Word32))
    framebufferColorSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 376 :: Ptr SampleCountFlags))
    framebufferDepthSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 380 :: Ptr SampleCountFlags))
    framebufferStencilSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 384 :: Ptr SampleCountFlags))
    framebufferNoAttachmentsSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 388 :: Ptr SampleCountFlags))
    maxColorAttachments <- peek @Word32 ((p `plusPtr` 392 :: Ptr Word32))
    sampledImageColorSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 396 :: Ptr SampleCountFlags))
    sampledImageIntegerSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 400 :: Ptr SampleCountFlags))
    sampledImageDepthSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 404 :: Ptr SampleCountFlags))
    sampledImageStencilSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 408 :: Ptr SampleCountFlags))
    storageImageSampleCounts <- peek @SampleCountFlags ((p `plusPtr` 412 :: Ptr SampleCountFlags))
    maxSampleMaskWords <- peek @Word32 ((p `plusPtr` 416 :: Ptr Word32))
    timestampComputeAndGraphics <- peek @Bool32 ((p `plusPtr` 420 :: Ptr Bool32))
    timestampPeriod <- peek @CFloat ((p `plusPtr` 424 :: Ptr CFloat))
    maxClipDistances <- peek @Word32 ((p `plusPtr` 428 :: Ptr Word32))
    maxCullDistances <- peek @Word32 ((p `plusPtr` 432 :: Ptr Word32))
    maxCombinedClipAndCullDistances <- peek @Word32 ((p `plusPtr` 436 :: Ptr Word32))
    discreteQueuePriorities <- peek @Word32 ((p `plusPtr` 440 :: Ptr Word32))
    let ppointSizeRange = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
444 :: Ptr (FixedArray 2 CFloat)))
    pointSizeRange0 <- peek @CFloat ((ppointSizeRange `advancePtrBytes` 0 :: Ptr CFloat))
    pointSizeRange1 <- peek @CFloat ((ppointSizeRange `advancePtrBytes` 4 :: Ptr CFloat))
    let plineWidthRange = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr PhysicalDeviceLimits
p Ptr PhysicalDeviceLimits -> Int -> Ptr (FixedArray 2 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
452 :: Ptr (FixedArray 2 CFloat)))
    lineWidthRange0 <- peek @CFloat ((plineWidthRange `advancePtrBytes` 0 :: Ptr CFloat))
    lineWidthRange1 <- peek @CFloat ((plineWidthRange `advancePtrBytes` 4 :: Ptr CFloat))
    pointSizeGranularity <- peek @CFloat ((p `plusPtr` 460 :: Ptr CFloat))
    lineWidthGranularity <- peek @CFloat ((p `plusPtr` 464 :: Ptr CFloat))
    strictLines <- peek @Bool32 ((p `plusPtr` 468 :: Ptr Bool32))
    standardSampleLocations <- peek @Bool32 ((p `plusPtr` 472 :: Ptr Bool32))
    optimalBufferCopyOffsetAlignment <- peek @DeviceSize ((p `plusPtr` 480 :: Ptr DeviceSize))
    optimalBufferCopyRowPitchAlignment <- peek @DeviceSize ((p `plusPtr` 488 :: Ptr DeviceSize))
    nonCoherentAtomSize <- peek @DeviceSize ((p `plusPtr` 496 :: Ptr DeviceSize))
    pure $ PhysicalDeviceLimits
             maxImageDimension1D
             maxImageDimension2D
             maxImageDimension3D
             maxImageDimensionCube
             maxImageArrayLayers
             maxTexelBufferElements
             maxUniformBufferRange
             maxStorageBufferRange
             maxPushConstantsSize
             maxMemoryAllocationCount
             maxSamplerAllocationCount
             bufferImageGranularity
             sparseAddressSpaceSize
             maxBoundDescriptorSets
             maxPerStageDescriptorSamplers
             maxPerStageDescriptorUniformBuffers
             maxPerStageDescriptorStorageBuffers
             maxPerStageDescriptorSampledImages
             maxPerStageDescriptorStorageImages
             maxPerStageDescriptorInputAttachments
             maxPerStageResources
             maxDescriptorSetSamplers
             maxDescriptorSetUniformBuffers
             maxDescriptorSetUniformBuffersDynamic
             maxDescriptorSetStorageBuffers
             maxDescriptorSetStorageBuffersDynamic
             maxDescriptorSetSampledImages
             maxDescriptorSetStorageImages
             maxDescriptorSetInputAttachments
             maxVertexInputAttributes
             maxVertexInputBindings
             maxVertexInputAttributeOffset
             maxVertexInputBindingStride
             maxVertexOutputComponents
             maxTessellationGenerationLevel
             maxTessellationPatchSize
             maxTessellationControlPerVertexInputComponents
             maxTessellationControlPerVertexOutputComponents
             maxTessellationControlPerPatchOutputComponents
             maxTessellationControlTotalOutputComponents
             maxTessellationEvaluationInputComponents
             maxTessellationEvaluationOutputComponents
             maxGeometryShaderInvocations
             maxGeometryInputComponents
             maxGeometryOutputComponents
             maxGeometryOutputVertices
             maxGeometryTotalOutputComponents
             maxFragmentInputComponents
             maxFragmentOutputAttachments
             maxFragmentDualSrcAttachments
             maxFragmentCombinedOutputResources
             maxComputeSharedMemorySize
             (( maxComputeWorkGroupCount0
              , maxComputeWorkGroupCount1
              , maxComputeWorkGroupCount2 ))
             maxComputeWorkGroupInvocations
             (( maxComputeWorkGroupSize0
              , maxComputeWorkGroupSize1
              , maxComputeWorkGroupSize2 ))
             subPixelPrecisionBits
             subTexelPrecisionBits
             mipmapPrecisionBits
             maxDrawIndexedIndexValue
             maxDrawIndirectCount
             (coerce @CFloat @Float maxSamplerLodBias)
             (coerce @CFloat @Float maxSamplerAnisotropy)
             maxViewports
             ((maxViewportDimensions0, maxViewportDimensions1))
             (( (coerce @CFloat @Float viewportBoundsRange0)
              , (coerce @CFloat @Float viewportBoundsRange1) ))
             viewportSubPixelBits
             (coerce @CSize @Word64 minMemoryMapAlignment)
             minTexelBufferOffsetAlignment
             minUniformBufferOffsetAlignment
             minStorageBufferOffsetAlignment
             minTexelOffset
             maxTexelOffset
             minTexelGatherOffset
             maxTexelGatherOffset
             (coerce @CFloat @Float minInterpolationOffset)
             (coerce @CFloat @Float maxInterpolationOffset)
             subPixelInterpolationOffsetBits
             maxFramebufferWidth
             maxFramebufferHeight
             maxFramebufferLayers
             framebufferColorSampleCounts
             framebufferDepthSampleCounts
             framebufferStencilSampleCounts
             framebufferNoAttachmentsSampleCounts
             maxColorAttachments
             sampledImageColorSampleCounts
             sampledImageIntegerSampleCounts
             sampledImageDepthSampleCounts
             sampledImageStencilSampleCounts
             storageImageSampleCounts
             maxSampleMaskWords
             (bool32ToBool timestampComputeAndGraphics)
             (coerce @CFloat @Float timestampPeriod)
             maxClipDistances
             maxCullDistances
             maxCombinedClipAndCullDistances
             discreteQueuePriorities
             (( (coerce @CFloat @Float pointSizeRange0)
              , (coerce @CFloat @Float pointSizeRange1) ))
             (( (coerce @CFloat @Float lineWidthRange0)
              , (coerce @CFloat @Float lineWidthRange1) ))
             (coerce @CFloat @Float pointSizeGranularity)
             (coerce @CFloat @Float lineWidthGranularity)
             (bool32ToBool strictLines)
             (bool32ToBool standardSampleLocations)
             optimalBufferCopyOffsetAlignment
             optimalBufferCopyRowPitchAlignment
             nonCoherentAtomSize

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

instance Zero PhysicalDeviceLimits where
  zero :: PhysicalDeviceLimits
zero = Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> DeviceSize
-> DeviceSize
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> (Word32, Word32, Word32)
-> Word32
-> (Word32, Word32, Word32)
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Float
-> Float
-> Word32
-> (Word32, Word32)
-> (Float, Float)
-> Word32
-> DeviceSize
-> DeviceSize
-> DeviceSize
-> DeviceSize
-> Int32
-> Word32
-> Int32
-> Word32
-> Float
-> Float
-> Word32
-> Word32
-> Word32
-> Word32
-> SampleCountFlags
-> SampleCountFlags
-> SampleCountFlags
-> SampleCountFlags
-> Word32
-> SampleCountFlags
-> SampleCountFlags
-> SampleCountFlags
-> SampleCountFlags
-> SampleCountFlags
-> Word32
-> Bool
-> Float
-> Word32
-> Word32
-> Word32
-> Word32
-> (Float, Float)
-> (Float, Float)
-> Float
-> Float
-> Bool
-> Bool
-> DeviceSize
-> DeviceSize
-> DeviceSize
-> PhysicalDeviceLimits
PhysicalDeviceLimits
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           (Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)
           Word32
forall a. Zero a => a
zero
           (Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           (Word32
forall a. Zero a => a
zero, Word32
forall a. Zero a => a
zero)
           (Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)
           Word32
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           Int32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Int32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           SampleCountFlags
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           (Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)
           (Float
forall a. Zero a => a
zero, Float
forall a. Zero a => a
zero)
           Float
forall a. Zero a => a
zero
           Float
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero