{-# language Strict #-}
{-# language CPP #-}
{-# language PatternSynonyms #-}
{-# language OverloadedStrings #-}
{-# language DuplicateRecordFields #-}
module Graphics.Vulkan.Extensions.VK_NV_external_memory
( pattern VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV
, pattern VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV
, pattern VK_NV_EXTERNAL_MEMORY_SPEC_VERSION
, pattern VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME
, VkExternalMemoryImageCreateInfoNV(..)
, VkExportMemoryAllocateInfoNV(..)
) where
import Data.String
( IsString
)
import Foreign.Ptr
( plusPtr
, Ptr
)
import Foreign.Storable
( Storable(..)
, Storable
)
import Graphics.Vulkan.Core10.Core
( VkStructureType(..)
)
import Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities
( VkExternalMemoryHandleTypeFlagsNV
)
pattern VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV :: VkStructureType
pattern VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = VkStructureType 1000056000
pattern VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV :: VkStructureType
pattern VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = VkStructureType 1000056001
pattern VK_NV_EXTERNAL_MEMORY_SPEC_VERSION :: Integral a => a
pattern VK_NV_EXTERNAL_MEMORY_SPEC_VERSION = 1
pattern VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME :: (Eq a ,IsString a) => a
pattern VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"
data VkExternalMemoryImageCreateInfoNV = VkExternalMemoryImageCreateInfoNV
{
vkSType :: VkStructureType
,
vkPNext :: Ptr ()
,
vkHandleTypes :: VkExternalMemoryHandleTypeFlagsNV
}
deriving (Eq, Show)
instance Storable VkExternalMemoryImageCreateInfoNV where
sizeOf ~_ = 24
alignment ~_ = 8
peek ptr = VkExternalMemoryImageCreateInfoNV <$> peek (ptr `plusPtr` 0)
<*> peek (ptr `plusPtr` 8)
<*> peek (ptr `plusPtr` 16)
poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkExternalMemoryImageCreateInfoNV))
*> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkExternalMemoryImageCreateInfoNV))
*> poke (ptr `plusPtr` 16) (vkHandleTypes (poked :: VkExternalMemoryImageCreateInfoNV))
data VkExportMemoryAllocateInfoNV = VkExportMemoryAllocateInfoNV
{
vkSType :: VkStructureType
,
vkPNext :: Ptr ()
,
vkHandleTypes :: VkExternalMemoryHandleTypeFlagsNV
}
deriving (Eq, Show)
instance Storable VkExportMemoryAllocateInfoNV where
sizeOf ~_ = 24
alignment ~_ = 8
peek ptr = VkExportMemoryAllocateInfoNV <$> peek (ptr `plusPtr` 0)
<*> peek (ptr `plusPtr` 8)
<*> peek (ptr `plusPtr` 16)
poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkExportMemoryAllocateInfoNV))
*> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkExportMemoryAllocateInfoNV))
*> poke (ptr `plusPtr` 16) (vkHandleTypes (poked :: VkExportMemoryAllocateInfoNV))