{-# language CPP #-}
-- | = Name
--
-- VK_NV_external_memory_capabilities - instance extension
--
-- == VK_NV_external_memory_capabilities
--
-- [__Name String__]
--     @VK_NV_external_memory_capabilities@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     56
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__; __Deprecation State__]
--
--     -   /Deprecated/ by @VK_KHR_external_memory_capabilities@ extension
--
--         -   Which in turn was /promoted/ to
--             <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1-promotions Vulkan 1.1>
--
-- [__Contact__]
--
--     -   James Jones
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_external_memory_capabilities] @cubanismo%0A*Here describe the issue or question you have about the VK_NV_external_memory_capabilities extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2016-08-19
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Interactions and External Dependencies__]
--
--     -   Interacts with Vulkan 1.1.
--
--     -   Interacts with @VK_KHR_dedicated_allocation@.
--
--     -   Interacts with @VK_NV_dedicated_allocation@.
--
-- [__Contributors__]
--
--     -   James Jones, NVIDIA
--
-- == Description
--
-- Applications may wish to import memory from the Direct 3D API, or export
-- memory to other Vulkan instances. This extension provides a set of
-- capability queries that allow applications determine what types of win32
-- memory handles an implementation supports for a given set of use cases.
--
-- == New Commands
--
-- -   'getPhysicalDeviceExternalImageFormatPropertiesNV'
--
-- == New Structures
--
-- -   'ExternalImageFormatPropertiesNV'
--
-- == New Enums
--
-- -   'ExternalMemoryFeatureFlagBitsNV'
--
-- -   'ExternalMemoryHandleTypeFlagBitsNV'
--
-- == New Bitmasks
--
-- -   'ExternalMemoryFeatureFlagsNV'
--
-- -   'ExternalMemoryHandleTypeFlagsNV'
--
-- == New Enum Constants
--
-- -   'NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME'
--
-- -   'NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION'
--
-- == Issues
--
-- 1) Why do so many external memory capabilities need to be queried on a
-- per-memory-handle-type basis?
--
-- __RESOLVED__: This is because some handle types are based on OS-native
-- objects that have far more limited capabilities than the very generic
-- Vulkan memory objects. Not all memory handle types can name memory
-- objects that support 3D images, for example. Some handle types cannot
-- even support the deferred image and memory binding behavior of Vulkan
-- and require specifying the image when allocating or importing the memory
-- object.
--
-- 2) Does the 'ExternalImageFormatPropertiesNV' struct need to include a
-- list of memory type bits that support the given handle type?
--
-- __RESOLVED__: No. The memory types that do not support the handle types
-- will simply be filtered out of the results returned by
-- 'Vulkan.Core10.MemoryManagement.getImageMemoryRequirements' when a set
-- of handle types was specified at image creation time.
--
-- 3) Should the non-opaque handle types be moved to their own extension?
--
-- __RESOLVED__: Perhaps. However, defining the handle type bits does very
-- little and does not require any platform-specific types on its own, and
-- it is easier to maintain the bitmask values in a single extension for
-- now. Presumably more handle types could be added by separate extensions
-- though, and it would be midly weird to have some platform-specific ones
-- defined in the core spec and some in extensions
--
-- == Version History
--
-- -   Revision 1, 2016-08-19 (James Jones)
--
--     -   Initial version
--
-- == See Also
--
-- 'ExternalImageFormatPropertiesNV', 'ExternalMemoryFeatureFlagBitsNV',
-- 'ExternalMemoryFeatureFlagsNV', 'ExternalMemoryHandleTypeFlagBitsNV',
-- 'ExternalMemoryHandleTypeFlagsNV',
-- 'getPhysicalDeviceExternalImageFormatPropertiesNV'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_NV_external_memory_capabilities Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_external_memory_capabilities  ( getPhysicalDeviceExternalImageFormatPropertiesNV
                                                             , ExternalImageFormatPropertiesNV(..)
                                                             , ExternalMemoryHandleTypeFlagsNV
                                                             , ExternalMemoryHandleTypeFlagBitsNV( EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV
                                                                                                 , EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV
                                                                                                 , EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV
                                                                                                 , EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV
                                                                                                 , ..
                                                                                                 )
                                                             , ExternalMemoryFeatureFlagsNV
                                                             , ExternalMemoryFeatureFlagBitsNV( EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV
                                                                                              , EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV
                                                                                              , EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV
                                                                                              , ..
                                                                                              )
                                                             , NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION
                                                             , pattern NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION
                                                             , NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME
                                                             , pattern NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME
                                                             ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.Format (Format(..))
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(..))
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)
import Vulkan.Core10.DeviceInitialization (ImageFormatProperties)
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.Dynamic (InstanceCmds(pVkGetPhysicalDeviceExternalImageFormatPropertiesNV))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceExternalImageFormatPropertiesNV
  :: FunPtr (Ptr PhysicalDevice_T -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ExternalMemoryHandleTypeFlagsNV -> Ptr ExternalImageFormatPropertiesNV -> IO Result) -> Ptr PhysicalDevice_T -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ExternalMemoryHandleTypeFlagsNV -> Ptr ExternalImageFormatPropertiesNV -> IO Result

-- | vkGetPhysicalDeviceExternalImageFormatPropertiesNV - Determine image
-- capabilities compatible with external memory handle types
--
-- = Description
--
-- If @externalHandleType@ is 0,
-- @pExternalImageFormatProperties->imageFormatProperties@ will return the
-- same values as a call to
-- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties',
-- and the other members of @pExternalImageFormatProperties@ will all be 0.
-- Otherwise, they are filled in as described for
-- 'ExternalImageFormatPropertiesNV'.
--
-- == 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_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_FORMAT_NOT_SUPPORTED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_external_memory_capabilities VK_NV_external_memory_capabilities>,
-- 'ExternalImageFormatPropertiesNV', 'ExternalMemoryHandleTypeFlagsNV',
-- 'Vulkan.Core10.Enums.Format.Format',
-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlags',
-- 'Vulkan.Core10.Enums.ImageTiling.ImageTiling',
-- 'Vulkan.Core10.Enums.ImageType.ImageType',
-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceExternalImageFormatPropertiesNV :: forall io
                                                  . (MonadIO io)
                                                 => -- | @physicalDevice@ is the physical device from which to query the image
                                                    -- capabilities
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter#
                                                    -- @physicalDevice@ /must/ be a valid
                                                    -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                                                    PhysicalDevice
                                                 -> -- | @format@ is the image format, corresponding to
                                                    -- 'Vulkan.Core10.Image.ImageCreateInfo'::@format@.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-format-parameter#
                                                    -- @format@ /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
                                                    Format
                                                 -> -- | @type@ is the image type, corresponding to
                                                    -- 'Vulkan.Core10.Image.ImageCreateInfo'::@imageType@.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-type-parameter#
                                                    -- @type@ /must/ be a valid 'Vulkan.Core10.Enums.ImageType.ImageType' value
                                                    ImageType
                                                 -> -- | @tiling@ is the image tiling, corresponding to
                                                    -- 'Vulkan.Core10.Image.ImageCreateInfo'::@tiling@.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-tiling-parameter#
                                                    -- @tiling@ /must/ be a valid 'Vulkan.Core10.Enums.ImageTiling.ImageTiling'
                                                    -- value
                                                    ImageTiling
                                                 -> -- | @usage@ is the intended usage of the image, corresponding to
                                                    -- 'Vulkan.Core10.Image.ImageCreateInfo'::@usage@.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-parameter#
                                                    -- @usage@ /must/ be a valid combination of
                                                    -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits' values
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-requiredbitmask#
                                                    -- @usage@ /must/ not be @0@
                                                    ImageUsageFlags
                                                 -> -- | @flags@ is a bitmask describing additional parameters of the image,
                                                    -- corresponding to 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-flags-parameter#
                                                    -- @flags@ /must/ be a valid combination of
                                                    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' values
                                                    ImageCreateFlags
                                                 -> -- | @externalHandleType@ is either one of the bits from
                                                    -- 'ExternalMemoryHandleTypeFlagBitsNV', or 0.
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-externalHandleType-07721#
                                                    -- @externalHandleType@ /must/ not have more than one bit set
                                                    --
                                                    -- #VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-externalHandleType-parameter#
                                                    -- @externalHandleType@ /must/ be a valid combination of
                                                    -- 'ExternalMemoryHandleTypeFlagBitsNV' values
                                                    ("externalHandleType" ::: ExternalMemoryHandleTypeFlagsNV)
                                                 -> io (ExternalImageFormatPropertiesNV)
getPhysicalDeviceExternalImageFormatPropertiesNV :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> ExternalMemoryHandleTypeFlagBitsNV
-> io ExternalImageFormatPropertiesNV
getPhysicalDeviceExternalImageFormatPropertiesNV PhysicalDevice
physicalDevice
                                                   Format
format
                                                   ImageType
type'
                                                   ImageTiling
tiling
                                                   ImageUsageFlags
usage
                                                   ImageCreateFlags
flags
                                                   ExternalMemoryHandleTypeFlagBitsNV
externalHandleType = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceExternalImageFormatPropertiesNVPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> ExternalMemoryHandleTypeFlagBitsNV
   -> ("pExternalImageFormatProperties"
       ::: Ptr ExternalImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceExternalImageFormatPropertiesNVPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Format
      -> ImageType
      -> ImageTiling
      -> ImageUsageFlags
      -> ImageCreateFlags
      -> ExternalMemoryHandleTypeFlagBitsNV
      -> ("pExternalImageFormatProperties"
          ::: Ptr ExternalImageFormatPropertiesNV)
      -> IO Result)
pVkGetPhysicalDeviceExternalImageFormatPropertiesNV (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> ExternalMemoryHandleTypeFlagBitsNV
   -> ("pExternalImageFormatProperties"
       ::: Ptr ExternalImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceExternalImageFormatPropertiesNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceExternalImageFormatPropertiesNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceExternalImageFormatPropertiesNV' :: Ptr PhysicalDevice_T
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> ExternalMemoryHandleTypeFlagBitsNV
-> ("pExternalImageFormatProperties"
    ::: Ptr ExternalImageFormatPropertiesNV)
-> IO Result
vkGetPhysicalDeviceExternalImageFormatPropertiesNV' = FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> ExternalMemoryHandleTypeFlagBitsNV
   -> ("pExternalImageFormatProperties"
       ::: Ptr ExternalImageFormatPropertiesNV)
   -> IO Result)
-> Ptr PhysicalDevice_T
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> ExternalMemoryHandleTypeFlagBitsNV
-> ("pExternalImageFormatProperties"
    ::: Ptr ExternalImageFormatPropertiesNV)
-> IO Result
mkVkGetPhysicalDeviceExternalImageFormatPropertiesNV FunPtr
  (Ptr PhysicalDevice_T
   -> Format
   -> ImageType
   -> ImageTiling
   -> ImageUsageFlags
   -> ImageCreateFlags
   -> ExternalMemoryHandleTypeFlagBitsNV
   -> ("pExternalImageFormatProperties"
       ::: Ptr ExternalImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceExternalImageFormatPropertiesNVPtr
  "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
pPExternalImageFormatProperties <- 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 @ExternalImageFormatPropertiesNV)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceExternalImageFormatPropertiesNV" (Ptr PhysicalDevice_T
-> Format
-> ImageType
-> ImageTiling
-> ImageUsageFlags
-> ImageCreateFlags
-> ExternalMemoryHandleTypeFlagBitsNV
-> ("pExternalImageFormatProperties"
    ::: Ptr ExternalImageFormatPropertiesNV)
-> IO Result
vkGetPhysicalDeviceExternalImageFormatPropertiesNV'
                                                                                       (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
                                                                                       (Format
format)
                                                                                       (ImageType
type')
                                                                                       (ImageTiling
tiling)
                                                                                       (ImageUsageFlags
usage)
                                                                                       (ImageCreateFlags
flags)
                                                                                       (ExternalMemoryHandleTypeFlagBitsNV
externalHandleType)
                                                                                       ("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
pPExternalImageFormatProperties))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  ExternalImageFormatPropertiesNV
pExternalImageFormatProperties <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @ExternalImageFormatPropertiesNV "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
pPExternalImageFormatProperties
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (ExternalImageFormatPropertiesNV
pExternalImageFormatProperties)


-- | VkExternalImageFormatPropertiesNV - Structure specifying external image
-- format properties
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_external_memory_capabilities VK_NV_external_memory_capabilities>,
-- 'ExternalMemoryFeatureFlagsNV', 'ExternalMemoryHandleTypeFlagsNV',
-- 'Vulkan.Core10.DeviceInitialization.ImageFormatProperties',
-- 'getPhysicalDeviceExternalImageFormatPropertiesNV'
data ExternalImageFormatPropertiesNV = ExternalImageFormatPropertiesNV
  { -- | @imageFormatProperties@ will be filled in as when calling
    -- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties',
    -- but the values returned /may/ vary depending on the external handle type
    -- requested.
    ExternalImageFormatPropertiesNV -> ImageFormatProperties
imageFormatProperties :: ImageFormatProperties
  , -- | @externalMemoryFeatures@ is a bitmask of
    -- 'ExternalMemoryFeatureFlagBitsNV', indicating properties of the external
    -- memory handle type
    -- ('getPhysicalDeviceExternalImageFormatPropertiesNV'::@externalHandleType@)
    -- being queried, or 0 if the external memory handle type is 0.
    ExternalImageFormatPropertiesNV -> ExternalMemoryFeatureFlagBitsNV
externalMemoryFeatures :: ExternalMemoryFeatureFlagsNV
  , -- | @exportFromImportedHandleTypes@ is a bitmask of
    -- 'ExternalMemoryHandleTypeFlagBitsNV' containing a bit set for every
    -- external handle type that /may/ be used to create memory from which the
    -- handles of the type specified in
    -- 'getPhysicalDeviceExternalImageFormatPropertiesNV'::@externalHandleType@
    -- /can/ be exported, or 0 if the external memory handle type is 0.
    ExternalImageFormatPropertiesNV
-> ExternalMemoryHandleTypeFlagBitsNV
exportFromImportedHandleTypes :: ExternalMemoryHandleTypeFlagsNV
  , -- | @compatibleHandleTypes@ is a bitmask of
    -- 'ExternalMemoryHandleTypeFlagBitsNV' containing a bit set for every
    -- external handle type that /may/ be specified simultaneously with the
    -- handle type specified by
    -- 'getPhysicalDeviceExternalImageFormatPropertiesNV'::@externalHandleType@
    -- when calling 'Vulkan.Core10.Memory.allocateMemory', or 0 if the external
    -- memory handle type is 0. @compatibleHandleTypes@ will always contain
    -- 'getPhysicalDeviceExternalImageFormatPropertiesNV'::@externalHandleType@
    ExternalImageFormatPropertiesNV
-> ExternalMemoryHandleTypeFlagBitsNV
compatibleHandleTypes :: ExternalMemoryHandleTypeFlagsNV
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ExternalImageFormatPropertiesNV)
#endif
deriving instance Show ExternalImageFormatPropertiesNV

instance ToCStruct ExternalImageFormatPropertiesNV where
  withCStruct :: forall b.
ExternalImageFormatPropertiesNV
-> (("pExternalImageFormatProperties"
     ::: Ptr ExternalImageFormatPropertiesNV)
    -> IO b)
-> IO b
withCStruct ExternalImageFormatPropertiesNV
x ("pExternalImageFormatProperties"
 ::: Ptr ExternalImageFormatPropertiesNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \"pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p ExternalImageFormatPropertiesNV
x (("pExternalImageFormatProperties"
 ::: Ptr ExternalImageFormatPropertiesNV)
-> IO b
f "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p)
  pokeCStruct :: forall b.
("pExternalImageFormatProperties"
 ::: Ptr ExternalImageFormatPropertiesNV)
-> ExternalImageFormatPropertiesNV -> IO b -> IO b
pokeCStruct "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p ExternalImageFormatPropertiesNV{ImageFormatProperties
ExternalMemoryHandleTypeFlagBitsNV
ExternalMemoryFeatureFlagBitsNV
compatibleHandleTypes :: ExternalMemoryHandleTypeFlagBitsNV
exportFromImportedHandleTypes :: ExternalMemoryHandleTypeFlagBitsNV
externalMemoryFeatures :: ExternalMemoryFeatureFlagBitsNV
imageFormatProperties :: ImageFormatProperties
$sel:compatibleHandleTypes:ExternalImageFormatPropertiesNV :: ExternalImageFormatPropertiesNV
-> ExternalMemoryHandleTypeFlagBitsNV
$sel:exportFromImportedHandleTypes:ExternalImageFormatPropertiesNV :: ExternalImageFormatPropertiesNV
-> ExternalMemoryHandleTypeFlagBitsNV
$sel:externalMemoryFeatures:ExternalImageFormatPropertiesNV :: ExternalImageFormatPropertiesNV -> ExternalMemoryFeatureFlagBitsNV
$sel:imageFormatProperties:ExternalImageFormatPropertiesNV :: ExternalImageFormatPropertiesNV -> ImageFormatProperties
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr ImageFormatProperties)) (ImageFormatProperties
imageFormatProperties)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ExternalMemoryFeatureFlagsNV)) (ExternalMemoryFeatureFlagBitsNV
externalMemoryFeatures)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr ExternalMemoryHandleTypeFlagsNV)) (ExternalMemoryHandleTypeFlagBitsNV
exportFromImportedHandleTypes)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ExternalMemoryHandleTypeFlagsNV)) (ExternalMemoryHandleTypeFlagBitsNV
compatibleHandleTypes)
    IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pExternalImageFormatProperties"
 ::: Ptr ExternalImageFormatPropertiesNV)
-> IO b -> IO b
pokeZeroCStruct "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr ImageFormatProperties)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ExternalImageFormatPropertiesNV where
  peekCStruct :: ("pExternalImageFormatProperties"
 ::: Ptr ExternalImageFormatPropertiesNV)
-> IO ExternalImageFormatPropertiesNV
peekCStruct "pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p = do
    ImageFormatProperties
imageFormatProperties <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @ImageFormatProperties (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr ImageFormatProperties))
    ExternalMemoryFeatureFlagBitsNV
externalMemoryFeatures <- forall a. Storable a => Ptr a -> IO a
peek @ExternalMemoryFeatureFlagsNV (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ExternalMemoryFeatureFlagsNV))
    ExternalMemoryHandleTypeFlagBitsNV
exportFromImportedHandleTypes <- forall a. Storable a => Ptr a -> IO a
peek @ExternalMemoryHandleTypeFlagsNV (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr ExternalMemoryHandleTypeFlagsNV))
    ExternalMemoryHandleTypeFlagBitsNV
compatibleHandleTypes <- forall a. Storable a => Ptr a -> IO a
peek @ExternalMemoryHandleTypeFlagsNV (("pExternalImageFormatProperties"
::: Ptr ExternalImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ExternalMemoryHandleTypeFlagsNV))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ImageFormatProperties
-> ExternalMemoryFeatureFlagBitsNV
-> ExternalMemoryHandleTypeFlagBitsNV
-> ExternalMemoryHandleTypeFlagBitsNV
-> ExternalImageFormatPropertiesNV
ExternalImageFormatPropertiesNV
             ImageFormatProperties
imageFormatProperties
             ExternalMemoryFeatureFlagBitsNV
externalMemoryFeatures
             ExternalMemoryHandleTypeFlagBitsNV
exportFromImportedHandleTypes
             ExternalMemoryHandleTypeFlagBitsNV
compatibleHandleTypes

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

instance Zero ExternalImageFormatPropertiesNV where
  zero :: ExternalImageFormatPropertiesNV
zero = ImageFormatProperties
-> ExternalMemoryFeatureFlagBitsNV
-> ExternalMemoryHandleTypeFlagBitsNV
-> ExternalMemoryHandleTypeFlagBitsNV
-> ExternalImageFormatPropertiesNV
ExternalImageFormatPropertiesNV
           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 ExternalMemoryHandleTypeFlagsNV = ExternalMemoryHandleTypeFlagBitsNV

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

-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV' specifies a handle to
-- memory returned by
-- 'Vulkan.Extensions.VK_NV_external_memory_win32.getMemoryWin32HandleNV',
-- or one duplicated from such a handle using @DuplicateHandle()@.
pattern $bEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV :: ExternalMemoryHandleTypeFlagBitsNV
$mEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV :: forall {r}.
ExternalMemoryHandleTypeFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = ExternalMemoryHandleTypeFlagBitsNV 0x00000001

-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV' specifies a handle
-- to memory returned by
-- 'Vulkan.Extensions.VK_NV_external_memory_win32.getMemoryWin32HandleNV'.
pattern $bEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV :: ExternalMemoryHandleTypeFlagBitsNV
$mEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV :: forall {r}.
ExternalMemoryHandleTypeFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = ExternalMemoryHandleTypeFlagBitsNV 0x00000002

-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV' specifies a valid NT
-- handle to memory returned by @IDXGIResource1::CreateSharedHandle@, or a
-- handle duplicated from such a handle using @DuplicateHandle()@.
pattern $bEXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV :: ExternalMemoryHandleTypeFlagBitsNV
$mEXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV :: forall {r}.
ExternalMemoryHandleTypeFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = ExternalMemoryHandleTypeFlagBitsNV 0x00000004

-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV' specifies a handle
-- to memory returned by @IDXGIResource::GetSharedHandle()@.
pattern $bEXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV :: ExternalMemoryHandleTypeFlagBitsNV
$mEXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV :: forall {r}.
ExternalMemoryHandleTypeFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = ExternalMemoryHandleTypeFlagBitsNV 0x00000008

conNameExternalMemoryHandleTypeFlagBitsNV :: String
conNameExternalMemoryHandleTypeFlagBitsNV :: String
conNameExternalMemoryHandleTypeFlagBitsNV = String
"ExternalMemoryHandleTypeFlagBitsNV"

enumPrefixExternalMemoryHandleTypeFlagBitsNV :: String
enumPrefixExternalMemoryHandleTypeFlagBitsNV :: String
enumPrefixExternalMemoryHandleTypeFlagBitsNV = String
"EXTERNAL_MEMORY_HANDLE_TYPE_"

showTableExternalMemoryHandleTypeFlagBitsNV :: [(ExternalMemoryHandleTypeFlagBitsNV, String)]
showTableExternalMemoryHandleTypeFlagBitsNV :: [(ExternalMemoryHandleTypeFlagBitsNV, String)]
showTableExternalMemoryHandleTypeFlagBitsNV =
  [
    ( ExternalMemoryHandleTypeFlagBitsNV
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV
    , String
"OPAQUE_WIN32_BIT_NV"
    )
  ,
    ( ExternalMemoryHandleTypeFlagBitsNV
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV
    , String
"OPAQUE_WIN32_KMT_BIT_NV"
    )
  ,
    ( ExternalMemoryHandleTypeFlagBitsNV
EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV
    , String
"D3D11_IMAGE_BIT_NV"
    )
  ,
    ( ExternalMemoryHandleTypeFlagBitsNV
EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV
    , String
"D3D11_IMAGE_KMT_BIT_NV"
    )
  ]

instance Show ExternalMemoryHandleTypeFlagBitsNV where
  showsPrec :: Int -> ExternalMemoryHandleTypeFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixExternalMemoryHandleTypeFlagBitsNV
      [(ExternalMemoryHandleTypeFlagBitsNV, String)]
showTableExternalMemoryHandleTypeFlagBitsNV
      String
conNameExternalMemoryHandleTypeFlagBitsNV
      (\(ExternalMemoryHandleTypeFlagBitsNV 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 ExternalMemoryHandleTypeFlagBitsNV where
  readPrec :: ReadPrec ExternalMemoryHandleTypeFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixExternalMemoryHandleTypeFlagBitsNV
      [(ExternalMemoryHandleTypeFlagBitsNV, String)]
showTableExternalMemoryHandleTypeFlagBitsNV
      String
conNameExternalMemoryHandleTypeFlagBitsNV
      Flags -> ExternalMemoryHandleTypeFlagBitsNV
ExternalMemoryHandleTypeFlagBitsNV

type ExternalMemoryFeatureFlagsNV = ExternalMemoryFeatureFlagBitsNV

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

-- | 'EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV' specifies that external
-- memory of the specified type /must/ be created as a dedicated allocation
-- when used in the manner specified.
pattern $bEXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV :: ExternalMemoryFeatureFlagBitsNV
$mEXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV :: forall {r}.
ExternalMemoryFeatureFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = ExternalMemoryFeatureFlagBitsNV 0x00000001

-- | 'EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV' specifies that the
-- implementation supports exporting handles of the specified type.
pattern $bEXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV :: ExternalMemoryFeatureFlagBitsNV
$mEXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV :: forall {r}.
ExternalMemoryFeatureFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = ExternalMemoryFeatureFlagBitsNV 0x00000002

-- | 'EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV' specifies that the
-- implementation supports importing handles of the specified type.
pattern $bEXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV :: ExternalMemoryFeatureFlagBitsNV
$mEXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV :: forall {r}.
ExternalMemoryFeatureFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = ExternalMemoryFeatureFlagBitsNV 0x00000004

conNameExternalMemoryFeatureFlagBitsNV :: String
conNameExternalMemoryFeatureFlagBitsNV :: String
conNameExternalMemoryFeatureFlagBitsNV = String
"ExternalMemoryFeatureFlagBitsNV"

enumPrefixExternalMemoryFeatureFlagBitsNV :: String
enumPrefixExternalMemoryFeatureFlagBitsNV :: String
enumPrefixExternalMemoryFeatureFlagBitsNV = String
"EXTERNAL_MEMORY_FEATURE_"

showTableExternalMemoryFeatureFlagBitsNV :: [(ExternalMemoryFeatureFlagBitsNV, String)]
showTableExternalMemoryFeatureFlagBitsNV :: [(ExternalMemoryFeatureFlagBitsNV, String)]
showTableExternalMemoryFeatureFlagBitsNV =
  [
    ( ExternalMemoryFeatureFlagBitsNV
EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV
    , String
"DEDICATED_ONLY_BIT_NV"
    )
  ,
    ( ExternalMemoryFeatureFlagBitsNV
EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV
    , String
"EXPORTABLE_BIT_NV"
    )
  ,
    ( ExternalMemoryFeatureFlagBitsNV
EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV
    , String
"IMPORTABLE_BIT_NV"
    )
  ]

instance Show ExternalMemoryFeatureFlagBitsNV where
  showsPrec :: Int -> ExternalMemoryFeatureFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixExternalMemoryFeatureFlagBitsNV
      [(ExternalMemoryFeatureFlagBitsNV, String)]
showTableExternalMemoryFeatureFlagBitsNV
      String
conNameExternalMemoryFeatureFlagBitsNV
      (\(ExternalMemoryFeatureFlagBitsNV 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 ExternalMemoryFeatureFlagBitsNV where
  readPrec :: ReadPrec ExternalMemoryFeatureFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixExternalMemoryFeatureFlagBitsNV
      [(ExternalMemoryFeatureFlagBitsNV, String)]
showTableExternalMemoryFeatureFlagBitsNV
      String
conNameExternalMemoryFeatureFlagBitsNV
      Flags -> ExternalMemoryFeatureFlagBitsNV
ExternalMemoryFeatureFlagBitsNV

type NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"
pattern NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION :: forall a. Integral a => a
$mNV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1


type NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"

-- No documentation found for TopLevel "VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"
pattern NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"