{-# language CPP #-}
module Vulkan.Extensions.VK_ANDROID_external_format_resolve ( PhysicalDeviceExternalFormatResolveFeaturesANDROID(..)
, PhysicalDeviceExternalFormatResolvePropertiesANDROID(..)
, AndroidHardwareBufferFormatResolvePropertiesANDROID(..)
, ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION
, pattern ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION
, ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME
, pattern ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME
) where
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
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 Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core11.Enums.ChromaLocation (ChromaLocation)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID))
data PhysicalDeviceExternalFormatResolveFeaturesANDROID = PhysicalDeviceExternalFormatResolveFeaturesANDROID
{
PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
externalFormatResolve :: Bool }
deriving (Typeable, PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
$c/= :: PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
== :: PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
$c== :: PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceExternalFormatResolveFeaturesANDROID)
#endif
deriving instance Show PhysicalDeviceExternalFormatResolveFeaturesANDROID
instance ToCStruct PhysicalDeviceExternalFormatResolveFeaturesANDROID where
withCStruct :: forall b.
PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> (Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID -> IO b)
-> IO b
withCStruct PhysicalDeviceExternalFormatResolveFeaturesANDROID
x Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p PhysicalDeviceExternalFormatResolveFeaturesANDROID
x (Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID -> IO b
f Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p PhysicalDeviceExternalFormatResolveFeaturesANDROID{Bool
externalFormatResolve :: Bool
$sel:externalFormatResolve:PhysicalDeviceExternalFormatResolveFeaturesANDROID :: PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
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 PhysicalDeviceExternalFormatResolveFeaturesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
externalFormatResolve))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
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 PhysicalDeviceExternalFormatResolveFeaturesANDROID
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 PhysicalDeviceExternalFormatResolveFeaturesANDROID where
peekCStruct :: Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> IO PhysicalDeviceExternalFormatResolveFeaturesANDROID
peekCStruct Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
p = do
Bool32
externalFormatResolve <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
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 -> PhysicalDeviceExternalFormatResolveFeaturesANDROID
PhysicalDeviceExternalFormatResolveFeaturesANDROID
(Bool32 -> Bool
bool32ToBool Bool32
externalFormatResolve)
instance Storable PhysicalDeviceExternalFormatResolveFeaturesANDROID where
sizeOf :: PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Int
sizeOf ~PhysicalDeviceExternalFormatResolveFeaturesANDROID
_ = Int
24
alignment :: PhysicalDeviceExternalFormatResolveFeaturesANDROID -> Int
alignment ~PhysicalDeviceExternalFormatResolveFeaturesANDROID
_ = Int
8
peek :: Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> IO PhysicalDeviceExternalFormatResolveFeaturesANDROID
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
-> PhysicalDeviceExternalFormatResolveFeaturesANDROID -> IO ()
poke Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
ptr PhysicalDeviceExternalFormatResolveFeaturesANDROID
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceExternalFormatResolveFeaturesANDROID where
zero :: PhysicalDeviceExternalFormatResolveFeaturesANDROID
zero = Bool -> PhysicalDeviceExternalFormatResolveFeaturesANDROID
PhysicalDeviceExternalFormatResolveFeaturesANDROID
forall a. Zero a => a
zero
data PhysicalDeviceExternalFormatResolvePropertiesANDROID = PhysicalDeviceExternalFormatResolvePropertiesANDROID
{
PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
nullColorAttachmentWithExternalFormatResolve :: Bool
,
PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> ChromaLocation
externalFormatResolveChromaOffsetX :: ChromaLocation
,
PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> ChromaLocation
externalFormatResolveChromaOffsetY :: ChromaLocation
}
deriving (Typeable, PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
$c/= :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
== :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
$c== :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceExternalFormatResolvePropertiesANDROID)
#endif
deriving instance Show PhysicalDeviceExternalFormatResolvePropertiesANDROID
instance ToCStruct PhysicalDeviceExternalFormatResolvePropertiesANDROID where
withCStruct :: forall b.
PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> (Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> IO b)
-> IO b
withCStruct PhysicalDeviceExternalFormatResolvePropertiesANDROID
x Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p PhysicalDeviceExternalFormatResolvePropertiesANDROID
x (Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID -> IO b
f Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p PhysicalDeviceExternalFormatResolvePropertiesANDROID{Bool
ChromaLocation
externalFormatResolveChromaOffsetY :: ChromaLocation
externalFormatResolveChromaOffsetX :: ChromaLocation
nullColorAttachmentWithExternalFormatResolve :: Bool
$sel:externalFormatResolveChromaOffsetY:PhysicalDeviceExternalFormatResolvePropertiesANDROID :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> ChromaLocation
$sel:externalFormatResolveChromaOffsetX:PhysicalDeviceExternalFormatResolvePropertiesANDROID :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> ChromaLocation
$sel:nullColorAttachmentWithExternalFormatResolve:PhysicalDeviceExternalFormatResolvePropertiesANDROID :: PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
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 PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
nullColorAttachmentWithExternalFormatResolve))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ChromaLocation)) (ChromaLocation
externalFormatResolveChromaOffsetX)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ChromaLocation)) (ChromaLocation
externalFormatResolveChromaOffsetY)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
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 PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ChromaLocation)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ChromaLocation)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceExternalFormatResolvePropertiesANDROID where
peekCStruct :: Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> IO PhysicalDeviceExternalFormatResolvePropertiesANDROID
peekCStruct Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p = do
Bool32
nullColorAttachmentWithExternalFormatResolve <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
ChromaLocation
externalFormatResolveChromaOffsetX <- forall a. Storable a => Ptr a -> IO a
peek @ChromaLocation ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ChromaLocation))
ChromaLocation
externalFormatResolveChromaOffsetY <- forall a. Storable a => Ptr a -> IO a
peek @ChromaLocation ((Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ChromaLocation))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> ChromaLocation
-> ChromaLocation
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID
PhysicalDeviceExternalFormatResolvePropertiesANDROID
(Bool32 -> Bool
bool32ToBool Bool32
nullColorAttachmentWithExternalFormatResolve)
ChromaLocation
externalFormatResolveChromaOffsetX
ChromaLocation
externalFormatResolveChromaOffsetY
instance Storable PhysicalDeviceExternalFormatResolvePropertiesANDROID where
sizeOf :: PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Int
sizeOf ~PhysicalDeviceExternalFormatResolvePropertiesANDROID
_ = Int
32
alignment :: PhysicalDeviceExternalFormatResolvePropertiesANDROID -> Int
alignment ~PhysicalDeviceExternalFormatResolvePropertiesANDROID
_ = Int
8
peek :: Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> IO PhysicalDeviceExternalFormatResolvePropertiesANDROID
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID -> IO ()
poke Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
ptr PhysicalDeviceExternalFormatResolvePropertiesANDROID
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceExternalFormatResolvePropertiesANDROID where
zero :: PhysicalDeviceExternalFormatResolvePropertiesANDROID
zero = Bool
-> ChromaLocation
-> ChromaLocation
-> PhysicalDeviceExternalFormatResolvePropertiesANDROID
PhysicalDeviceExternalFormatResolvePropertiesANDROID
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data AndroidHardwareBufferFormatResolvePropertiesANDROID = AndroidHardwareBufferFormatResolvePropertiesANDROID
{
AndroidHardwareBufferFormatResolvePropertiesANDROID -> Format
colorAttachmentFormat :: Format }
deriving (Typeable, AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> Bool
$c/= :: AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> Bool
== :: AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> Bool
$c== :: AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AndroidHardwareBufferFormatResolvePropertiesANDROID)
#endif
deriving instance Show AndroidHardwareBufferFormatResolvePropertiesANDROID
instance ToCStruct AndroidHardwareBufferFormatResolvePropertiesANDROID where
withCStruct :: forall b.
AndroidHardwareBufferFormatResolvePropertiesANDROID
-> (Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> IO b)
-> IO b
withCStruct AndroidHardwareBufferFormatResolvePropertiesANDROID
x Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p AndroidHardwareBufferFormatResolvePropertiesANDROID
x (Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID -> IO b
f Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p)
pokeCStruct :: forall b.
Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID
-> IO b
-> IO b
pokeCStruct Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p AndroidHardwareBufferFormatResolvePropertiesANDROID{Format
colorAttachmentFormat :: Format
$sel:colorAttachmentFormat:AndroidHardwareBufferFormatResolvePropertiesANDROID :: AndroidHardwareBufferFormatResolvePropertiesANDROID -> Format
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
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 AndroidHardwareBufferFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (Format
colorAttachmentFormat)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> IO b -> IO b
pokeZeroCStruct Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
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 AndroidHardwareBufferFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AndroidHardwareBufferFormatResolvePropertiesANDROID where
peekCStruct :: Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> IO AndroidHardwareBufferFormatResolvePropertiesANDROID
peekCStruct Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p = do
Format
colorAttachmentFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Format -> AndroidHardwareBufferFormatResolvePropertiesANDROID
AndroidHardwareBufferFormatResolvePropertiesANDROID
Format
colorAttachmentFormat
instance Storable AndroidHardwareBufferFormatResolvePropertiesANDROID where
sizeOf :: AndroidHardwareBufferFormatResolvePropertiesANDROID -> Int
sizeOf ~AndroidHardwareBufferFormatResolvePropertiesANDROID
_ = Int
24
alignment :: AndroidHardwareBufferFormatResolvePropertiesANDROID -> Int
alignment ~AndroidHardwareBufferFormatResolvePropertiesANDROID
_ = Int
8
peek :: Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> IO AndroidHardwareBufferFormatResolvePropertiesANDROID
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
-> AndroidHardwareBufferFormatResolvePropertiesANDROID -> IO ()
poke Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
ptr AndroidHardwareBufferFormatResolvePropertiesANDROID
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AndroidHardwareBufferFormatResolvePropertiesANDROID where
zero :: AndroidHardwareBufferFormatResolvePropertiesANDROID
zero = Format -> AndroidHardwareBufferFormatResolvePropertiesANDROID
AndroidHardwareBufferFormatResolvePropertiesANDROID
forall a. Zero a => a
zero
type ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION = 1
pattern ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION :: forall a . Integral a => a
pattern $bANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION :: forall a. Integral a => a
$mANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION = 1
type ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME = "VK_ANDROID_external_format_resolve"
pattern ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME = "VK_ANDROID_external_format_resolve"