{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_depth_clip_control ( PhysicalDeviceDepthClipControlFeaturesEXT(..)
, PipelineViewportDepthClipControlCreateInfoEXT(..)
, EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION
, pattern EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION
, EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME
, pattern EXT_DEPTH_CLIP_CONTROL_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_DEPTH_CLIP_CONTROL_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT))
data PhysicalDeviceDepthClipControlFeaturesEXT = PhysicalDeviceDepthClipControlFeaturesEXT
{
PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
depthClipControl :: Bool }
deriving (Typeable, PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
$c/= :: PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
== :: PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
$c== :: PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDepthClipControlFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceDepthClipControlFeaturesEXT
instance ToCStruct PhysicalDeviceDepthClipControlFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceDepthClipControlFeaturesEXT
-> (Ptr PhysicalDeviceDepthClipControlFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceDepthClipControlFeaturesEXT
x Ptr PhysicalDeviceDepthClipControlFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p PhysicalDeviceDepthClipControlFeaturesEXT
x (Ptr PhysicalDeviceDepthClipControlFeaturesEXT -> IO b
f Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p PhysicalDeviceDepthClipControlFeaturesEXT{Bool
depthClipControl :: Bool
$sel:depthClipControl:PhysicalDeviceDepthClipControlFeaturesEXT :: PhysicalDeviceDepthClipControlFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDepthClipControlFeaturesEXT
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 PhysicalDeviceDepthClipControlFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthClipControl))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDepthClipControlFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDepthClipControlFeaturesEXT
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 PhysicalDeviceDepthClipControlFeaturesEXT
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 PhysicalDeviceDepthClipControlFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceDepthClipControlFeaturesEXT
-> IO PhysicalDeviceDepthClipControlFeaturesEXT
peekCStruct Ptr PhysicalDeviceDepthClipControlFeaturesEXT
p = do
Bool32
depthClipControl <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDepthClipControlFeaturesEXT
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 -> PhysicalDeviceDepthClipControlFeaturesEXT
PhysicalDeviceDepthClipControlFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
depthClipControl)
instance Storable PhysicalDeviceDepthClipControlFeaturesEXT where
sizeOf :: PhysicalDeviceDepthClipControlFeaturesEXT -> Int
sizeOf ~PhysicalDeviceDepthClipControlFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceDepthClipControlFeaturesEXT -> Int
alignment ~PhysicalDeviceDepthClipControlFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceDepthClipControlFeaturesEXT
-> IO PhysicalDeviceDepthClipControlFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDepthClipControlFeaturesEXT
-> PhysicalDeviceDepthClipControlFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceDepthClipControlFeaturesEXT
ptr PhysicalDeviceDepthClipControlFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDepthClipControlFeaturesEXT
ptr PhysicalDeviceDepthClipControlFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDepthClipControlFeaturesEXT where
zero :: PhysicalDeviceDepthClipControlFeaturesEXT
zero = Bool -> PhysicalDeviceDepthClipControlFeaturesEXT
PhysicalDeviceDepthClipControlFeaturesEXT
forall a. Zero a => a
zero
data PipelineViewportDepthClipControlCreateInfoEXT = PipelineViewportDepthClipControlCreateInfoEXT
{
PipelineViewportDepthClipControlCreateInfoEXT -> Bool
negativeOneToOne :: Bool }
deriving (Typeable, PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> Bool
$c/= :: PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> Bool
== :: PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> Bool
$c== :: PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineViewportDepthClipControlCreateInfoEXT)
#endif
deriving instance Show PipelineViewportDepthClipControlCreateInfoEXT
instance ToCStruct PipelineViewportDepthClipControlCreateInfoEXT where
withCStruct :: forall b.
PipelineViewportDepthClipControlCreateInfoEXT
-> (Ptr PipelineViewportDepthClipControlCreateInfoEXT -> IO b)
-> IO b
withCStruct PipelineViewportDepthClipControlCreateInfoEXT
x Ptr PipelineViewportDepthClipControlCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineViewportDepthClipControlCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineViewportDepthClipControlCreateInfoEXT
p PipelineViewportDepthClipControlCreateInfoEXT
x (Ptr PipelineViewportDepthClipControlCreateInfoEXT -> IO b
f Ptr PipelineViewportDepthClipControlCreateInfoEXT
p)
pokeCStruct :: forall b.
Ptr PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr PipelineViewportDepthClipControlCreateInfoEXT
p PipelineViewportDepthClipControlCreateInfoEXT{Bool
negativeOneToOne :: Bool
$sel:negativeOneToOne:PipelineViewportDepthClipControlCreateInfoEXT :: PipelineViewportDepthClipControlCreateInfoEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportDepthClipControlCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportDepthClipControlCreateInfoEXT
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 PipelineViewportDepthClipControlCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
negativeOneToOne))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineViewportDepthClipControlCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PipelineViewportDepthClipControlCreateInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportDepthClipControlCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportDepthClipControlCreateInfoEXT
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 PipelineViewportDepthClipControlCreateInfoEXT
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 PipelineViewportDepthClipControlCreateInfoEXT where
peekCStruct :: Ptr PipelineViewportDepthClipControlCreateInfoEXT
-> IO PipelineViewportDepthClipControlCreateInfoEXT
peekCStruct Ptr PipelineViewportDepthClipControlCreateInfoEXT
p = do
Bool32
negativeOneToOne <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineViewportDepthClipControlCreateInfoEXT
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 -> PipelineViewportDepthClipControlCreateInfoEXT
PipelineViewportDepthClipControlCreateInfoEXT
(Bool32 -> Bool
bool32ToBool Bool32
negativeOneToOne)
instance Storable PipelineViewportDepthClipControlCreateInfoEXT where
sizeOf :: PipelineViewportDepthClipControlCreateInfoEXT -> Int
sizeOf ~PipelineViewportDepthClipControlCreateInfoEXT
_ = Int
24
alignment :: PipelineViewportDepthClipControlCreateInfoEXT -> Int
alignment ~PipelineViewportDepthClipControlCreateInfoEXT
_ = Int
8
peek :: Ptr PipelineViewportDepthClipControlCreateInfoEXT
-> IO PipelineViewportDepthClipControlCreateInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineViewportDepthClipControlCreateInfoEXT
-> PipelineViewportDepthClipControlCreateInfoEXT -> IO ()
poke Ptr PipelineViewportDepthClipControlCreateInfoEXT
ptr PipelineViewportDepthClipControlCreateInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineViewportDepthClipControlCreateInfoEXT
ptr PipelineViewportDepthClipControlCreateInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineViewportDepthClipControlCreateInfoEXT where
zero :: PipelineViewportDepthClipControlCreateInfoEXT
zero = Bool -> PipelineViewportDepthClipControlCreateInfoEXT
PipelineViewportDepthClipControlCreateInfoEXT
forall a. Zero a => a
zero
type EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION = 1
pattern EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DEPTH_CLIP_CONTROL_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DEPTH_CLIP_CONTROL_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION = 1
type EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"
pattern EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"