{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_image_2d_view_of_3d ( PhysicalDeviceImage2DViewOf3DFeaturesEXT(..)
, EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION
, pattern EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION
, EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME
, pattern EXT_IMAGE_2D_VIEW_OF_3D_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.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT))
data PhysicalDeviceImage2DViewOf3DFeaturesEXT = PhysicalDeviceImage2DViewOf3DFeaturesEXT
{
PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
image2DViewOf3D :: Bool
,
PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
sampler2DViewOf3D :: Bool
}
deriving (Typeable, PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
(PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool)
-> (PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool)
-> Eq PhysicalDeviceImage2DViewOf3DFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
$c/= :: PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
== :: PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
$c== :: PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceImage2DViewOf3DFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceImage2DViewOf3DFeaturesEXT
instance ToCStruct PhysicalDeviceImage2DViewOf3DFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> (Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceImage2DViewOf3DFeaturesEXT
x Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p -> Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p PhysicalDeviceImage2DViewOf3DFeaturesEXT
x (Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b
f Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p PhysicalDeviceImage2DViewOf3DFeaturesEXT{Bool
sampler2DViewOf3D :: Bool
image2DViewOf3D :: Bool
$sel:sampler2DViewOf3D:PhysicalDeviceImage2DViewOf3DFeaturesEXT :: PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
$sel:image2DViewOf3D:PhysicalDeviceImage2DViewOf3DFeaturesEXT :: PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
image2DViewOf3D))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sampler2DViewOf3D))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceImage2DViewOf3DFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT
peekCStruct Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p = do
Bool32
image2DViewOf3D <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
sampler2DViewOf3D <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
p Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT)
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDeviceImage2DViewOf3DFeaturesEXT
PhysicalDeviceImage2DViewOf3DFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
image2DViewOf3D) (Bool32 -> Bool
bool32ToBool Bool32
sampler2DViewOf3D)
instance Storable PhysicalDeviceImage2DViewOf3DFeaturesEXT where
sizeOf :: PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int
sizeOf ~PhysicalDeviceImage2DViewOf3DFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceImage2DViewOf3DFeaturesEXT -> Int
alignment ~PhysicalDeviceImage2DViewOf3DFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT
peek = Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> IO PhysicalDeviceImage2DViewOf3DFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
poked = Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
-> PhysicalDeviceImage2DViewOf3DFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
ptr PhysicalDeviceImage2DViewOf3DFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceImage2DViewOf3DFeaturesEXT where
zero :: PhysicalDeviceImage2DViewOf3DFeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceImage2DViewOf3DFeaturesEXT
PhysicalDeviceImage2DViewOf3DFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
type EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION = 1
pattern EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION :: forall a. Integral a => a
$mEXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION = 1
type EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"
pattern EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"