{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_rasterization_order_attachment_access ( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(..)
, EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION
, pattern EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION
, EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME
, pattern EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_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_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT))
data PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
{
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
rasterizationOrderColorAttachmentAccess :: Bool
,
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
rasterizationOrderDepthAttachmentAccess :: Bool
,
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
rasterizationOrderStencilAttachmentAccess :: Bool
}
deriving (Typeable, PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> Bool
$c/= :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> Bool
== :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> Bool
$c== :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
instance ToCStruct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> (Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO b)
-> IO b
withCStruct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
x Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
x (Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO b
f Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT{Bool
rasterizationOrderStencilAttachmentAccess :: Bool
rasterizationOrderDepthAttachmentAccess :: Bool
rasterizationOrderColorAttachmentAccess :: Bool
$sel:rasterizationOrderStencilAttachmentAccess:PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
$sel:rasterizationOrderDepthAttachmentAccess:PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
$sel:rasterizationOrderColorAttachmentAccess:PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
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 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rasterizationOrderColorAttachmentAccess))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rasterizationOrderDepthAttachmentAccess))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rasterizationOrderStencilAttachmentAccess))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
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 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
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 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
peekCStruct Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p = do
Bool32
rasterizationOrderColorAttachmentAccess <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
rasterizationOrderDepthAttachmentAccess <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
rasterizationOrderStencilAttachmentAccess <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
rasterizationOrderColorAttachmentAccess)
(Bool32 -> Bool
bool32ToBool Bool32
rasterizationOrderDepthAttachmentAccess)
(Bool32 -> Bool
bool32ToBool Bool32
rasterizationOrderStencilAttachmentAccess)
instance Storable PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT where
sizeOf :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Int
sizeOf ~PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
_ = Int
32
alignment :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT -> Int
alignment ~PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
-> IO ()
poke Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
ptr PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT where
zero :: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
zero = Bool
-> Bool
-> Bool
-> PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
type EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1
pattern EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION :: forall a. Integral a => a
$mEXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1
type EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"
pattern EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"