{-# language CPP #-}
-- | = Name
--
-- VK_EXT_device_address_binding_report - device extension
--
-- == VK_EXT_device_address_binding_report
--
-- [__Name String__]
--     @VK_EXT_device_address_binding_report@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     355
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--     and
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_debug_utils VK_EXT_debug_utils>
--
-- [__Special Uses__]
--
--     -   <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-compatibility-specialuse Debugging tools>
--
--     -   <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-compatibility-specialuse Developer tools>
--
-- [__Contact__]
--
--     -   Ralph Potter <<data:image/png;base64, GitLab>>r_potter
--
-- == Other Extension Metadata
--
-- [Last Modified Date]
--     2020-11-23
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires @VK_EXT_debug_utils@
--
-- [Contributors]
--
--     -   Ralph Potter, Samsung
--
--     -   Spencer Fricke, Samsung
--
--     -   Jan-Harald Fredriksen, ARM
--
--     -   Andrew Ellem, Google
--
--     -   Alex Walters, IMG
--
--     -   Jeff Bolz, NVIDIA
--
-- == Description
--
-- This extension enables applications to track the binding of regions of
-- the GPU virtual address space, and to associate those regions with
-- Vulkan objects. This extension is primarily intended to aid in crash
-- postmortem, where applications may wish to map a faulting GPU address to
-- a Vulkan object.
--
-- For example, a page fault triggered by accessing an address located
-- within a region of the GPU virtual address space that was previously
-- reported as bound and then unbound may indicate a use-after-free error.
-- Similarly, faults generated by accessing virtual addresses outside the
-- limits of a bound region of GPU virtual address space may indicate
-- indexing beyond the bounds of a resource.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCallbackDataEXT':
--
--     -   'DeviceAddressBindingCallbackDataEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceAddressBindingReportFeaturesEXT'
--
-- == New Enums
--
-- -   'DeviceAddressBindingFlagBitsEXT'
--
-- -   'DeviceAddressBindingTypeEXT'
--
-- == New Bitmasks
--
-- -   'DeviceAddressBindingFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME'
--
-- -   'EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION'
--
-- -   Extending
--     'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessageTypeFlagBitsEXT':
--
--     -   'Vulkan.Extensions.VK_EXT_debug_utils.DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT'
--
-- == Issues
--
-- 1.) Should this extend VK_EXT_debug_utils or
-- VK_EXT_device_memory_report?
--
-- __RESOLVED__: Extend VK_EXT_debug_utils. VK_EXT_device_memory_report
-- focuses on memory allocations and would not normally trigger callbacks
-- in all of the situations where VK_EXT_device_address_binding_report is
-- expected to.
--
-- 2.) Should this extension cover all Vulkan object types, or only
-- resources such as buffers and images?
--
-- __RESOLVED__: The extension covers all Vulkan objects, and is not
-- restricted to objects backed by VkDeviceMemory objects.
--
-- 3.) Should reallocation be identified explicitly, or as a unbind\/bind
-- pair?
--
-- __RESOLVED__: Reallocation should be represented as an unbind\/bind
-- pair.
--
-- 4.) Can multiple Vulkan objects share an overlapping virtual address
-- range?
--
-- __RESOLVED__: Yes. This can be expected to occur due to resources
-- aliasing.
--
-- 5.) Can a single Vulkan object be associated with multiple virtual
-- address ranges concurrently?
--
-- __RESOLVED__: Yes. These should be reported via multiple calls to the
-- reporting callback.
--
-- 6.) Should the virtual address ranges associated with internal
-- allocations such as memory pools be reported?
--
-- __RESOLVED__: Virtual address ranges associated with internal
-- allocations should only be reported when they become associated with a
-- specific Vulkan object. In the case of internal pool allocations, a bind
-- event should be reported when resources from the pool are assigned to a
-- Vulkan object, and an unbind event should be reported when those
-- resources are returned to the pool. Implementations should not report
-- the binding or unbinding of virtual address ranges for which there are
-- no related API objects visible to the application developer.
--
-- 7.) Can an implementation report binding a virtual address range at
-- VkImage or VkImageView creation, rather than in response to
-- vkBindImageMemory?
--
-- __RESOLVED__: Yes. Virtual address range binding should be reported at
-- the appropriate point at which it occurs within the implementation. This
-- extension does not mandate when that should occur, and applications
-- should anticipate receiving callback events at any point after
-- registering callbacks.
--
-- 8.) Can reporting of binding\/unbinding be deferred until a resource is
-- referenced by an executing command buffer?
--
-- __RESOLVED__: Changes to the virtual address ranges associated with a
-- Vulkan object should be reported as close as possible to where they
-- occur within the implementation. If virtual address binding is deferred,
-- then the callback should also be deferred to match.
--
-- 9.) Do bind\/unbind callbacks have to form matched pairs? Can a large
-- region be bound, and then subregions unbound, resulting in
-- fragmentation?
--
-- __RESOLVED__: Splitting of virtual address regions, and unmatched
-- bind\/unbind callbacks may occur. Developers should anticipate that
-- sparse memory may exhibit this behaviour.
--
-- 10.) The specification mandates that a callback /must/ be triggered
-- whenever a GPU virtual address range associated with any Vulkan object
-- is bound or unbound. Do we need queries or properties indicating which
-- Vulkan objects will report binding modifications?
--
-- __RESOLVED__: No. This extension is not intended to mandate how and when
-- implementations bind virtual ranges to objects. Adding queries or
-- properties would constrain implementations, which might otherwise vary
-- how virtual address bindings occur based on usage.
--
-- 11.) Should vkAllocateMemory and vkFreeMemory trigger reporting
-- callbacks?
--
-- __RESOLVED__: If an implementation binds a GPU virtual address range
-- when vkAllocateMemory is called, then the callbacks must be triggered
-- associating the virtual address range with the VkDeviceMemory object. If
-- the device memory is subsequently bound to a buffer or image via
-- vkBind*Memory, the callbacks should be triggered a second time,
-- reporting the association between virtual address range and the
-- buffer\/image.
--
-- == Version History
--
-- -   Revision 1, 2020-09-23 (Ralph Potter)
--
--     -   Internal revisions
--
-- == See Also
--
-- 'DeviceAddressBindingCallbackDataEXT',
-- 'DeviceAddressBindingFlagBitsEXT', 'DeviceAddressBindingFlagsEXT',
-- 'DeviceAddressBindingTypeEXT',
-- 'PhysicalDeviceAddressBindingReportFeaturesEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_device_address_binding_report Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_device_address_binding_report  ( PhysicalDeviceAddressBindingReportFeaturesEXT(..)
                                                               , DeviceAddressBindingCallbackDataEXT(..)
                                                               , DeviceAddressBindingFlagsEXT
                                                               , DeviceAddressBindingFlagBitsEXT( DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT
                                                                                                , ..
                                                                                                )
                                                               , DeviceAddressBindingTypeEXT( DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT
                                                                                            , DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT
                                                                                            , ..
                                                                                            )
                                                               , EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION
                                                               , pattern EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION
                                                               , EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME
                                                               , pattern EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME
                                                               , DebugUtilsMessageTypeFlagBitsEXT(..)
                                                               , DebugUtilsMessageTypeFlagsEXT
                                                               ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT))
import Vulkan.Extensions.VK_EXT_debug_utils (DebugUtilsMessageTypeFlagBitsEXT(..))
import Vulkan.Extensions.VK_EXT_debug_utils (DebugUtilsMessageTypeFlagsEXT)
-- | VkPhysicalDeviceAddressBindingReportFeaturesEXT - Structure describing
-- the virtual allocation reporting feature supported by an implementation
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceAddressBindingReportFeaturesEXT' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceAddressBindingReportFeaturesEXT' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_device_address_binding_report VK_EXT_device_address_binding_report>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceAddressBindingReportFeaturesEXT = PhysicalDeviceAddressBindingReportFeaturesEXT
  { -- | #features-reportAddressBinding# @reportAddressBinding@ indicates whether
    -- this implementation supports reporting the binding of GPU virtual
    -- address ranges to Vulkan objects.
    PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
reportAddressBinding :: Bool }
  deriving (Typeable, PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
$c/= :: PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
== :: PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
$c== :: PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceAddressBindingReportFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceAddressBindingReportFeaturesEXT

instance ToCStruct PhysicalDeviceAddressBindingReportFeaturesEXT where
  withCStruct :: forall b.
PhysicalDeviceAddressBindingReportFeaturesEXT
-> (Ptr PhysicalDeviceAddressBindingReportFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceAddressBindingReportFeaturesEXT
x Ptr PhysicalDeviceAddressBindingReportFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p PhysicalDeviceAddressBindingReportFeaturesEXT
x (Ptr PhysicalDeviceAddressBindingReportFeaturesEXT -> IO b
f Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
-> PhysicalDeviceAddressBindingReportFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p PhysicalDeviceAddressBindingReportFeaturesEXT{Bool
reportAddressBinding :: Bool
$sel:reportAddressBinding:PhysicalDeviceAddressBindingReportFeaturesEXT :: PhysicalDeviceAddressBindingReportFeaturesEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
reportAddressBinding))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceAddressBindingReportFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceAddressBindingReportFeaturesEXT where
  peekCStruct :: Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
-> IO PhysicalDeviceAddressBindingReportFeaturesEXT
peekCStruct Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p = do
    Bool32
reportAddressBinding <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAddressBindingReportFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceAddressBindingReportFeaturesEXT
PhysicalDeviceAddressBindingReportFeaturesEXT
             (Bool32 -> Bool
bool32ToBool Bool32
reportAddressBinding)

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

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


-- | VkDeviceAddressBindingCallbackDataEXT - Structure specifying parameters
-- returned to the callback
--
-- = Description
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-reportAddressBinding reportAddressBinding>
-- feature is enabled and the implementation binds or unbinds a region of
-- virtual address space associated with a Vulkan object, the
-- implementation /must/ submit a debug message with the following
-- properties:
--
-- These debug messages /must/ be emitted both for GPU virtual address
-- space regions that are explicitly bound to a Vulkan object via the
-- @vkBind@*Memory\/@vkBind@*Memory2 functions, and for those that are
-- implicitly generated via memory allocation or importing external memory.
--
-- An implementation /may/ report binding events associated with a Vulkan
-- object via 'Vulkan.Extensions.Handles.DebugUtilsMessengerEXT' prior to
-- the object becoming visible to an application via other Vulkan commands.
-- For example, object creation functions /may/ report binding events that
-- occur during an objects creation. In such cases,
-- 'DeviceAddressBindingCallbackDataEXT'::@flags@ /must/ include
-- 'DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT'.
--
-- Object handles reported in this manner are not
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fundamentals-validusage-handles valid object handles>,
-- and /must/ not be used as an input parameter to any Vulkan command.
--
-- Any valid object handle returned by an object creation function /must/
-- match the handle specified via any previously reported binding events
-- associated with the object’s creation.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_device_address_binding_report VK_EXT_device_address_binding_report>,
-- 'Vulkan.Core10.FundamentalTypes.DeviceAddress',
-- 'DeviceAddressBindingFlagsEXT', 'DeviceAddressBindingTypeEXT',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DeviceAddressBindingCallbackDataEXT = DeviceAddressBindingCallbackDataEXT
  { -- | @flags@ is a bitmask of 'DeviceAddressBindingFlagBitsEXT' specifying
    -- additional information about the binding event that caused the callback
    -- to be called.
    --
    -- #VUID-VkDeviceAddressBindingCallbackDataEXT-flags-parameter# @flags@
    -- /must/ be a valid combination of 'DeviceAddressBindingFlagBitsEXT'
    -- values
    DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingFlagBitsEXT
flags :: DeviceAddressBindingFlagsEXT
  , -- | @baseAddress@ is a GPU-accessible virtual address identifying the start
    -- of a region of the virtual address space associated with a Vulkan
    -- object, as identified by the @pObjects@ member of
    -- 'Vulkan.Extensions.VK_EXT_debug_utils.DebugUtilsMessengerCallbackDataEXT'.
    DeviceAddressBindingCallbackDataEXT -> DeviceAddress
baseAddress :: DeviceAddress
  , -- | @size@ is the size in bytes of a region of GPU-accessible virtual
    -- address space.
    DeviceAddressBindingCallbackDataEXT -> DeviceAddress
size :: DeviceSize
  , -- | @bindingType@ is a 'DeviceAddressBindingTypeEXT' specifying the type of
    -- binding event that caused the callback to be called.
    --
    -- #VUID-VkDeviceAddressBindingCallbackDataEXT-bindingType-parameter#
    -- @bindingType@ /must/ be a valid 'DeviceAddressBindingTypeEXT' value
    DeviceAddressBindingCallbackDataEXT -> DeviceAddressBindingTypeEXT
bindingType :: DeviceAddressBindingTypeEXT
  }
  deriving (Typeable, DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> Bool
$c/= :: DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> Bool
== :: DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> Bool
$c== :: DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceAddressBindingCallbackDataEXT)
#endif
deriving instance Show DeviceAddressBindingCallbackDataEXT

instance ToCStruct DeviceAddressBindingCallbackDataEXT where
  withCStruct :: forall b.
DeviceAddressBindingCallbackDataEXT
-> (Ptr DeviceAddressBindingCallbackDataEXT -> IO b) -> IO b
withCStruct DeviceAddressBindingCallbackDataEXT
x Ptr DeviceAddressBindingCallbackDataEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceAddressBindingCallbackDataEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceAddressBindingCallbackDataEXT
p DeviceAddressBindingCallbackDataEXT
x (Ptr DeviceAddressBindingCallbackDataEXT -> IO b
f Ptr DeviceAddressBindingCallbackDataEXT
p)
  pokeCStruct :: forall b.
Ptr DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingCallbackDataEXT -> IO b -> IO b
pokeCStruct Ptr DeviceAddressBindingCallbackDataEXT
p DeviceAddressBindingCallbackDataEXT{DeviceAddress
DeviceAddressBindingTypeEXT
DeviceAddressBindingFlagBitsEXT
bindingType :: DeviceAddressBindingTypeEXT
size :: DeviceAddress
baseAddress :: DeviceAddress
flags :: DeviceAddressBindingFlagBitsEXT
$sel:bindingType:DeviceAddressBindingCallbackDataEXT :: DeviceAddressBindingCallbackDataEXT -> DeviceAddressBindingTypeEXT
$sel:size:DeviceAddressBindingCallbackDataEXT :: DeviceAddressBindingCallbackDataEXT -> DeviceAddress
$sel:baseAddress:DeviceAddressBindingCallbackDataEXT :: DeviceAddressBindingCallbackDataEXT -> DeviceAddress
$sel:flags:DeviceAddressBindingCallbackDataEXT :: DeviceAddressBindingCallbackDataEXT
-> DeviceAddressBindingFlagBitsEXT
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddressBindingFlagsEXT)) (DeviceAddressBindingFlagBitsEXT
flags)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceAddress)) (DeviceAddress
baseAddress)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (DeviceAddress
size)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceAddressBindingTypeEXT)) (DeviceAddressBindingTypeEXT
bindingType)
    IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr DeviceAddressBindingCallbackDataEXT -> IO b -> IO b
pokeZeroCStruct Ptr DeviceAddressBindingCallbackDataEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceAddressBindingTypeEXT)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DeviceAddressBindingCallbackDataEXT where
  peekCStruct :: Ptr DeviceAddressBindingCallbackDataEXT
-> IO DeviceAddressBindingCallbackDataEXT
peekCStruct Ptr DeviceAddressBindingCallbackDataEXT
p = do
    DeviceAddressBindingFlagBitsEXT
flags <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddressBindingFlagsEXT ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddressBindingFlagsEXT))
    DeviceAddress
baseAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceAddress))
    DeviceAddress
size <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
    DeviceAddressBindingTypeEXT
bindingType <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddressBindingTypeEXT ((Ptr DeviceAddressBindingCallbackDataEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceAddressBindingTypeEXT))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceAddressBindingFlagBitsEXT
-> DeviceAddress
-> DeviceAddress
-> DeviceAddressBindingTypeEXT
-> DeviceAddressBindingCallbackDataEXT
DeviceAddressBindingCallbackDataEXT
             DeviceAddressBindingFlagBitsEXT
flags DeviceAddress
baseAddress DeviceAddress
size DeviceAddressBindingTypeEXT
bindingType

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

instance Zero DeviceAddressBindingCallbackDataEXT where
  zero :: DeviceAddressBindingCallbackDataEXT
zero = DeviceAddressBindingFlagBitsEXT
-> DeviceAddress
-> DeviceAddress
-> DeviceAddressBindingTypeEXT
-> DeviceAddressBindingCallbackDataEXT
DeviceAddressBindingCallbackDataEXT
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


type DeviceAddressBindingFlagsEXT = DeviceAddressBindingFlagBitsEXT

-- | VkDeviceAddressBindingFlagBitsEXT - Bitmask specifying the additional
-- information about a binding event
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_device_address_binding_report VK_EXT_device_address_binding_report>,
-- 'DeviceAddressBindingFlagsEXT'
newtype DeviceAddressBindingFlagBitsEXT = DeviceAddressBindingFlagBitsEXT Flags
  deriving newtype (DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c/= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
== :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c== :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
Eq, Eq DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Ordering
DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
$cmin :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
max :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
$cmax :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
>= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c>= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
> :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c> :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
<= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c<= :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
< :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
$c< :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Bool
compare :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Ordering
$ccompare :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> Ordering
Ord, Ptr DeviceAddressBindingFlagBitsEXT
-> IO DeviceAddressBindingFlagBitsEXT
Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> IO DeviceAddressBindingFlagBitsEXT
Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
Ptr DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> IO ()
DeviceAddressBindingFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO DeviceAddressBindingFlagBitsEXT
forall b. Ptr b -> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> IO ()
$cpoke :: Ptr DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT -> IO ()
peek :: Ptr DeviceAddressBindingFlagBitsEXT
-> IO DeviceAddressBindingFlagBitsEXT
$cpeek :: Ptr DeviceAddressBindingFlagBitsEXT
-> IO DeviceAddressBindingFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DeviceAddressBindingFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DeviceAddressBindingFlagBitsEXT
pokeElemOff :: Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT -> IO ()
peekElemOff :: Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> IO DeviceAddressBindingFlagBitsEXT
$cpeekElemOff :: Ptr DeviceAddressBindingFlagBitsEXT
-> Int -> IO DeviceAddressBindingFlagBitsEXT
alignment :: DeviceAddressBindingFlagBitsEXT -> Int
$calignment :: DeviceAddressBindingFlagBitsEXT -> Int
sizeOf :: DeviceAddressBindingFlagBitsEXT -> Int
$csizeOf :: DeviceAddressBindingFlagBitsEXT -> Int
Storable, DeviceAddressBindingFlagBitsEXT
forall a. a -> Zero a
zero :: DeviceAddressBindingFlagBitsEXT
$czero :: DeviceAddressBindingFlagBitsEXT
Zero, Eq DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT
Int -> DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT -> Bool
DeviceAddressBindingFlagBitsEXT -> Int
DeviceAddressBindingFlagBitsEXT -> Maybe Int
DeviceAddressBindingFlagBitsEXT -> DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT -> Int -> Bool
DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: DeviceAddressBindingFlagBitsEXT -> Int
$cpopCount :: DeviceAddressBindingFlagBitsEXT -> Int
rotateR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$crotateR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
rotateL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$crotateL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
unsafeShiftR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cunsafeShiftR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
shiftR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cshiftR :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
unsafeShiftL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cunsafeShiftL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
shiftL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cshiftL :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
isSigned :: DeviceAddressBindingFlagBitsEXT -> Bool
$cisSigned :: DeviceAddressBindingFlagBitsEXT -> Bool
bitSize :: DeviceAddressBindingFlagBitsEXT -> Int
$cbitSize :: DeviceAddressBindingFlagBitsEXT -> Int
bitSizeMaybe :: DeviceAddressBindingFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: DeviceAddressBindingFlagBitsEXT -> Maybe Int
testBit :: DeviceAddressBindingFlagBitsEXT -> Int -> Bool
$ctestBit :: DeviceAddressBindingFlagBitsEXT -> Int -> Bool
complementBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$ccomplementBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
clearBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cclearBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
setBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$csetBit :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
bit :: Int -> DeviceAddressBindingFlagBitsEXT
$cbit :: Int -> DeviceAddressBindingFlagBitsEXT
zeroBits :: DeviceAddressBindingFlagBitsEXT
$czeroBits :: DeviceAddressBindingFlagBitsEXT
rotate :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$crotate :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
shift :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
$cshift :: DeviceAddressBindingFlagBitsEXT
-> Int -> DeviceAddressBindingFlagBitsEXT
complement :: DeviceAddressBindingFlagBitsEXT -> DeviceAddressBindingFlagBitsEXT
$ccomplement :: DeviceAddressBindingFlagBitsEXT -> DeviceAddressBindingFlagBitsEXT
xor :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
$cxor :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
.|. :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
$c.|. :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
.&. :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
$c.&. :: DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
-> DeviceAddressBindingFlagBitsEXT
Bits, Bits DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: DeviceAddressBindingFlagBitsEXT -> Int
$ccountTrailingZeros :: DeviceAddressBindingFlagBitsEXT -> Int
countLeadingZeros :: DeviceAddressBindingFlagBitsEXT -> Int
$ccountLeadingZeros :: DeviceAddressBindingFlagBitsEXT -> Int
finiteBitSize :: DeviceAddressBindingFlagBitsEXT -> Int
$cfiniteBitSize :: DeviceAddressBindingFlagBitsEXT -> Int
FiniteBits)

-- | 'DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT' specifies that
-- 'DeviceAddressBindingCallbackDataEXT' describes a Vulkan object that has
-- not been made visible to the application via a Vulkan command.
pattern $bDEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT :: DeviceAddressBindingFlagBitsEXT
$mDEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT :: forall {r}.
DeviceAddressBindingFlagBitsEXT
-> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = DeviceAddressBindingFlagBitsEXT 0x00000001

conNameDeviceAddressBindingFlagBitsEXT :: String
conNameDeviceAddressBindingFlagBitsEXT :: String
conNameDeviceAddressBindingFlagBitsEXT = String
"DeviceAddressBindingFlagBitsEXT"

enumPrefixDeviceAddressBindingFlagBitsEXT :: String
enumPrefixDeviceAddressBindingFlagBitsEXT :: String
enumPrefixDeviceAddressBindingFlagBitsEXT = String
"DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT"

showTableDeviceAddressBindingFlagBitsEXT :: [(DeviceAddressBindingFlagBitsEXT, String)]
showTableDeviceAddressBindingFlagBitsEXT :: [(DeviceAddressBindingFlagBitsEXT, String)]
showTableDeviceAddressBindingFlagBitsEXT =
  [
    ( DeviceAddressBindingFlagBitsEXT
DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT
    , String
""
    )
  ]

instance Show DeviceAddressBindingFlagBitsEXT where
  showsPrec :: Int -> DeviceAddressBindingFlagBitsEXT -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixDeviceAddressBindingFlagBitsEXT
      [(DeviceAddressBindingFlagBitsEXT, String)]
showTableDeviceAddressBindingFlagBitsEXT
      String
conNameDeviceAddressBindingFlagBitsEXT
      (\(DeviceAddressBindingFlagBitsEXT Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read DeviceAddressBindingFlagBitsEXT where
  readPrec :: ReadPrec DeviceAddressBindingFlagBitsEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixDeviceAddressBindingFlagBitsEXT
      [(DeviceAddressBindingFlagBitsEXT, String)]
showTableDeviceAddressBindingFlagBitsEXT
      String
conNameDeviceAddressBindingFlagBitsEXT
      Flags -> DeviceAddressBindingFlagBitsEXT
DeviceAddressBindingFlagBitsEXT

-- | VkDeviceAddressBindingTypeEXT - Enum describing a change in device
-- address bindings
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_device_address_binding_report VK_EXT_device_address_binding_report>,
-- 'DeviceAddressBindingCallbackDataEXT'
newtype DeviceAddressBindingTypeEXT = DeviceAddressBindingTypeEXT Int32
  deriving newtype (DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c/= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
== :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c== :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
Eq, Eq DeviceAddressBindingTypeEXT
DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> Ordering
DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT
$cmin :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT
max :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT
$cmax :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT
>= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c>= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
> :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c> :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
<= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c<= :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
< :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
$c< :: DeviceAddressBindingTypeEXT -> DeviceAddressBindingTypeEXT -> Bool
compare :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> Ordering
$ccompare :: DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> Ordering
Ord, Ptr DeviceAddressBindingTypeEXT -> IO DeviceAddressBindingTypeEXT
Ptr DeviceAddressBindingTypeEXT
-> Int -> IO DeviceAddressBindingTypeEXT
Ptr DeviceAddressBindingTypeEXT
-> Int -> DeviceAddressBindingTypeEXT -> IO ()
Ptr DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> IO ()
DeviceAddressBindingTypeEXT -> Int
forall b. Ptr b -> Int -> IO DeviceAddressBindingTypeEXT
forall b. Ptr b -> Int -> DeviceAddressBindingTypeEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> IO ()
$cpoke :: Ptr DeviceAddressBindingTypeEXT
-> DeviceAddressBindingTypeEXT -> IO ()
peek :: Ptr DeviceAddressBindingTypeEXT -> IO DeviceAddressBindingTypeEXT
$cpeek :: Ptr DeviceAddressBindingTypeEXT -> IO DeviceAddressBindingTypeEXT
pokeByteOff :: forall b. Ptr b -> Int -> DeviceAddressBindingTypeEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DeviceAddressBindingTypeEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DeviceAddressBindingTypeEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DeviceAddressBindingTypeEXT
pokeElemOff :: Ptr DeviceAddressBindingTypeEXT
-> Int -> DeviceAddressBindingTypeEXT -> IO ()
$cpokeElemOff :: Ptr DeviceAddressBindingTypeEXT
-> Int -> DeviceAddressBindingTypeEXT -> IO ()
peekElemOff :: Ptr DeviceAddressBindingTypeEXT
-> Int -> IO DeviceAddressBindingTypeEXT
$cpeekElemOff :: Ptr DeviceAddressBindingTypeEXT
-> Int -> IO DeviceAddressBindingTypeEXT
alignment :: DeviceAddressBindingTypeEXT -> Int
$calignment :: DeviceAddressBindingTypeEXT -> Int
sizeOf :: DeviceAddressBindingTypeEXT -> Int
$csizeOf :: DeviceAddressBindingTypeEXT -> Int
Storable, DeviceAddressBindingTypeEXT
forall a. a -> Zero a
zero :: DeviceAddressBindingTypeEXT
$czero :: DeviceAddressBindingTypeEXT
Zero)

-- | 'DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT' specifies that a new
-- GPU-accessible virtual address range has been bound.
pattern $bDEVICE_ADDRESS_BINDING_TYPE_BIND_EXT :: DeviceAddressBindingTypeEXT
$mDEVICE_ADDRESS_BINDING_TYPE_BIND_EXT :: forall {r}.
DeviceAddressBindingTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = DeviceAddressBindingTypeEXT 0

-- | 'DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT' specifies that a GPU-accessible
-- virtual address range has been unbound.
pattern $bDEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT :: DeviceAddressBindingTypeEXT
$mDEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT :: forall {r}.
DeviceAddressBindingTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = DeviceAddressBindingTypeEXT 1

{-# COMPLETE
  DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT
  , DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT ::
    DeviceAddressBindingTypeEXT
  #-}

conNameDeviceAddressBindingTypeEXT :: String
conNameDeviceAddressBindingTypeEXT :: String
conNameDeviceAddressBindingTypeEXT = String
"DeviceAddressBindingTypeEXT"

enumPrefixDeviceAddressBindingTypeEXT :: String
enumPrefixDeviceAddressBindingTypeEXT :: String
enumPrefixDeviceAddressBindingTypeEXT = String
"DEVICE_ADDRESS_BINDING_TYPE_"

showTableDeviceAddressBindingTypeEXT :: [(DeviceAddressBindingTypeEXT, String)]
showTableDeviceAddressBindingTypeEXT :: [(DeviceAddressBindingTypeEXT, String)]
showTableDeviceAddressBindingTypeEXT =
  [
    ( DeviceAddressBindingTypeEXT
DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT
    , String
"BIND_EXT"
    )
  ,
    ( DeviceAddressBindingTypeEXT
DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT
    , String
"UNBIND_EXT"
    )
  ]

instance Show DeviceAddressBindingTypeEXT where
  showsPrec :: Int -> DeviceAddressBindingTypeEXT -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixDeviceAddressBindingTypeEXT
      [(DeviceAddressBindingTypeEXT, String)]
showTableDeviceAddressBindingTypeEXT
      String
conNameDeviceAddressBindingTypeEXT
      (\(DeviceAddressBindingTypeEXT Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read DeviceAddressBindingTypeEXT where
  readPrec :: ReadPrec DeviceAddressBindingTypeEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixDeviceAddressBindingTypeEXT
      [(DeviceAddressBindingTypeEXT, String)]
showTableDeviceAddressBindingTypeEXT
      String
conNameDeviceAddressBindingTypeEXT
      Int32 -> DeviceAddressBindingTypeEXT
DeviceAddressBindingTypeEXT

type EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION"
pattern EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION = 1


type EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"

-- No documentation found for TopLevel "VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME"
pattern EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"