{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_blend_operation_advanced ( PhysicalDeviceBlendOperationAdvancedFeaturesEXT(..)
, PhysicalDeviceBlendOperationAdvancedPropertiesEXT(..)
, PipelineColorBlendAdvancedStateCreateInfoEXT(..)
, BlendOverlapEXT( BLEND_OVERLAP_UNCORRELATED_EXT
, BLEND_OVERLAP_DISJOINT_EXT
, BLEND_OVERLAP_CONJOINT_EXT
, ..
)
, EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION
, pattern EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION
, EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME
, pattern EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
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 Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
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_BLEND_OPERATION_ADVANCED_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT))
data PhysicalDeviceBlendOperationAdvancedFeaturesEXT = PhysicalDeviceBlendOperationAdvancedFeaturesEXT
{
PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
advancedBlendCoherentOperations :: Bool }
deriving (Typeable, PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
$c/= :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
== :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
$c== :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceBlendOperationAdvancedFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceBlendOperationAdvancedFeaturesEXT
instance ToCStruct PhysicalDeviceBlendOperationAdvancedFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> (Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceBlendOperationAdvancedFeaturesEXT
x Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p PhysicalDeviceBlendOperationAdvancedFeaturesEXT
x (Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO b
f Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p PhysicalDeviceBlendOperationAdvancedFeaturesEXT{Bool
advancedBlendCoherentOperations :: Bool
$sel:advancedBlendCoherentOperations:PhysicalDeviceBlendOperationAdvancedFeaturesEXT :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
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 PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendCoherentOperations))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
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 PhysicalDeviceBlendOperationAdvancedFeaturesEXT
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 PhysicalDeviceBlendOperationAdvancedFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> IO PhysicalDeviceBlendOperationAdvancedFeaturesEXT
peekCStruct Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
p = do
Bool32
advancedBlendCoherentOperations <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
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 -> PhysicalDeviceBlendOperationAdvancedFeaturesEXT
PhysicalDeviceBlendOperationAdvancedFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendCoherentOperations)
instance Storable PhysicalDeviceBlendOperationAdvancedFeaturesEXT where
sizeOf :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Int
sizeOf ~PhysicalDeviceBlendOperationAdvancedFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> Int
alignment ~PhysicalDeviceBlendOperationAdvancedFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> IO PhysicalDeviceBlendOperationAdvancedFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
-> PhysicalDeviceBlendOperationAdvancedFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
ptr PhysicalDeviceBlendOperationAdvancedFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceBlendOperationAdvancedFeaturesEXT where
zero :: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
zero = Bool -> PhysicalDeviceBlendOperationAdvancedFeaturesEXT
PhysicalDeviceBlendOperationAdvancedFeaturesEXT
forall a. Zero a => a
zero
data PhysicalDeviceBlendOperationAdvancedPropertiesEXT = PhysicalDeviceBlendOperationAdvancedPropertiesEXT
{
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Word32
advancedBlendMaxColorAttachments :: Word32
,
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
advancedBlendIndependentBlend :: Bool
,
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
advancedBlendNonPremultipliedSrcColor :: Bool
,
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
advancedBlendNonPremultipliedDstColor :: Bool
,
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
advancedBlendCorrelatedOverlap :: Bool
,
PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
advancedBlendAllOperations :: Bool
}
deriving (Typeable, PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$c/= :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
== :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$c== :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceBlendOperationAdvancedPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceBlendOperationAdvancedPropertiesEXT
instance ToCStruct PhysicalDeviceBlendOperationAdvancedPropertiesEXT where
withCStruct :: forall b.
PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> (Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceBlendOperationAdvancedPropertiesEXT
x Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p PhysicalDeviceBlendOperationAdvancedPropertiesEXT
x (Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> IO b
f Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p PhysicalDeviceBlendOperationAdvancedPropertiesEXT{Bool
Word32
advancedBlendAllOperations :: Bool
advancedBlendCorrelatedOverlap :: Bool
advancedBlendNonPremultipliedDstColor :: Bool
advancedBlendNonPremultipliedSrcColor :: Bool
advancedBlendIndependentBlend :: Bool
advancedBlendMaxColorAttachments :: Word32
$sel:advancedBlendAllOperations:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$sel:advancedBlendCorrelatedOverlap:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$sel:advancedBlendNonPremultipliedDstColor:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$sel:advancedBlendNonPremultipliedSrcColor:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$sel:advancedBlendIndependentBlend:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Bool
$sel:advancedBlendMaxColorAttachments:PhysicalDeviceBlendOperationAdvancedPropertiesEXT :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
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 PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
advancedBlendMaxColorAttachments)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendIndependentBlend))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendNonPremultipliedSrcColor))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendNonPremultipliedDstColor))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendCorrelatedOverlap))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
advancedBlendAllOperations))
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
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 PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
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 PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceBlendOperationAdvancedPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> IO PhysicalDeviceBlendOperationAdvancedPropertiesEXT
peekCStruct Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p = do
Word32
advancedBlendMaxColorAttachments <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Bool32
advancedBlendIndependentBlend <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
advancedBlendNonPremultipliedSrcColor <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
Bool32
advancedBlendNonPremultipliedDstColor <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
Bool32
advancedBlendCorrelatedOverlap <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
Bool32
advancedBlendAllOperations <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT
PhysicalDeviceBlendOperationAdvancedPropertiesEXT
Word32
advancedBlendMaxColorAttachments
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendIndependentBlend)
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendNonPremultipliedSrcColor)
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendNonPremultipliedDstColor)
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendCorrelatedOverlap)
(Bool32 -> Bool
bool32ToBool Bool32
advancedBlendAllOperations)
instance Storable PhysicalDeviceBlendOperationAdvancedPropertiesEXT where
sizeOf :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Int
sizeOf ~PhysicalDeviceBlendOperationAdvancedPropertiesEXT
_ = Int
40
alignment :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> Int
alignment ~PhysicalDeviceBlendOperationAdvancedPropertiesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> IO PhysicalDeviceBlendOperationAdvancedPropertiesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
ptr PhysicalDeviceBlendOperationAdvancedPropertiesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceBlendOperationAdvancedPropertiesEXT where
zero :: PhysicalDeviceBlendOperationAdvancedPropertiesEXT
zero = Word32
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceBlendOperationAdvancedPropertiesEXT
PhysicalDeviceBlendOperationAdvancedPropertiesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data PipelineColorBlendAdvancedStateCreateInfoEXT = PipelineColorBlendAdvancedStateCreateInfoEXT
{
PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
srcPremultiplied :: Bool
,
PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
dstPremultiplied :: Bool
,
PipelineColorBlendAdvancedStateCreateInfoEXT -> BlendOverlapEXT
blendOverlap :: BlendOverlapEXT
}
deriving (Typeable, PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
$c/= :: PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
== :: PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
$c== :: PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineColorBlendAdvancedStateCreateInfoEXT)
#endif
deriving instance Show PipelineColorBlendAdvancedStateCreateInfoEXT
instance ToCStruct PipelineColorBlendAdvancedStateCreateInfoEXT where
withCStruct :: forall b.
PipelineColorBlendAdvancedStateCreateInfoEXT
-> (Ptr PipelineColorBlendAdvancedStateCreateInfoEXT -> IO b)
-> IO b
withCStruct PipelineColorBlendAdvancedStateCreateInfoEXT
x Ptr PipelineColorBlendAdvancedStateCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p PipelineColorBlendAdvancedStateCreateInfoEXT
x (Ptr PipelineColorBlendAdvancedStateCreateInfoEXT -> IO b
f Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p)
pokeCStruct :: forall b.
Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p PipelineColorBlendAdvancedStateCreateInfoEXT{Bool
BlendOverlapEXT
blendOverlap :: BlendOverlapEXT
dstPremultiplied :: Bool
srcPremultiplied :: Bool
$sel:blendOverlap:PipelineColorBlendAdvancedStateCreateInfoEXT :: PipelineColorBlendAdvancedStateCreateInfoEXT -> BlendOverlapEXT
$sel:dstPremultiplied:PipelineColorBlendAdvancedStateCreateInfoEXT :: PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
$sel:srcPremultiplied:PipelineColorBlendAdvancedStateCreateInfoEXT :: PipelineColorBlendAdvancedStateCreateInfoEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
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 PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
srcPremultiplied))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
dstPremultiplied))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOverlapEXT)) (BlendOverlapEXT
blendOverlap)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineColorBlendAdvancedStateCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
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 PipelineColorBlendAdvancedStateCreateInfoEXT
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 PipelineColorBlendAdvancedStateCreateInfoEXT
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 PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOverlapEXT)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineColorBlendAdvancedStateCreateInfoEXT where
peekCStruct :: Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
-> IO PipelineColorBlendAdvancedStateCreateInfoEXT
peekCStruct Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p = do
Bool32
srcPremultiplied <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
dstPremultiplied <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
BlendOverlapEXT
blendOverlap <- forall a. Storable a => Ptr a -> IO a
peek @BlendOverlapEXT ((Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOverlapEXT))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> BlendOverlapEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT
PipelineColorBlendAdvancedStateCreateInfoEXT
(Bool32 -> Bool
bool32ToBool Bool32
srcPremultiplied)
(Bool32 -> Bool
bool32ToBool Bool32
dstPremultiplied)
BlendOverlapEXT
blendOverlap
instance Storable PipelineColorBlendAdvancedStateCreateInfoEXT where
sizeOf :: PipelineColorBlendAdvancedStateCreateInfoEXT -> Int
sizeOf ~PipelineColorBlendAdvancedStateCreateInfoEXT
_ = Int
32
alignment :: PipelineColorBlendAdvancedStateCreateInfoEXT -> Int
alignment ~PipelineColorBlendAdvancedStateCreateInfoEXT
_ = Int
8
peek :: Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
-> IO PipelineColorBlendAdvancedStateCreateInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT -> IO ()
poke Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
ptr PipelineColorBlendAdvancedStateCreateInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineColorBlendAdvancedStateCreateInfoEXT
ptr PipelineColorBlendAdvancedStateCreateInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineColorBlendAdvancedStateCreateInfoEXT where
zero :: PipelineColorBlendAdvancedStateCreateInfoEXT
zero = Bool
-> Bool
-> BlendOverlapEXT
-> PipelineColorBlendAdvancedStateCreateInfoEXT
PipelineColorBlendAdvancedStateCreateInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype BlendOverlapEXT = BlendOverlapEXT Int32
deriving newtype (BlendOverlapEXT -> BlendOverlapEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c/= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
== :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c== :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
Eq, Eq BlendOverlapEXT
BlendOverlapEXT -> BlendOverlapEXT -> Bool
BlendOverlapEXT -> BlendOverlapEXT -> Ordering
BlendOverlapEXT -> BlendOverlapEXT -> BlendOverlapEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BlendOverlapEXT -> BlendOverlapEXT -> BlendOverlapEXT
$cmin :: BlendOverlapEXT -> BlendOverlapEXT -> BlendOverlapEXT
max :: BlendOverlapEXT -> BlendOverlapEXT -> BlendOverlapEXT
$cmax :: BlendOverlapEXT -> BlendOverlapEXT -> BlendOverlapEXT
>= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c>= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
> :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c> :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
<= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c<= :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
< :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
$c< :: BlendOverlapEXT -> BlendOverlapEXT -> Bool
compare :: BlendOverlapEXT -> BlendOverlapEXT -> Ordering
$ccompare :: BlendOverlapEXT -> BlendOverlapEXT -> Ordering
Ord, Ptr BlendOverlapEXT -> IO BlendOverlapEXT
Ptr BlendOverlapEXT -> Int -> IO BlendOverlapEXT
Ptr BlendOverlapEXT -> Int -> BlendOverlapEXT -> IO ()
Ptr BlendOverlapEXT -> BlendOverlapEXT -> IO ()
BlendOverlapEXT -> Int
forall b. Ptr b -> Int -> IO BlendOverlapEXT
forall b. Ptr b -> Int -> BlendOverlapEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr BlendOverlapEXT -> BlendOverlapEXT -> IO ()
$cpoke :: Ptr BlendOverlapEXT -> BlendOverlapEXT -> IO ()
peek :: Ptr BlendOverlapEXT -> IO BlendOverlapEXT
$cpeek :: Ptr BlendOverlapEXT -> IO BlendOverlapEXT
pokeByteOff :: forall b. Ptr b -> Int -> BlendOverlapEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> BlendOverlapEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO BlendOverlapEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BlendOverlapEXT
pokeElemOff :: Ptr BlendOverlapEXT -> Int -> BlendOverlapEXT -> IO ()
$cpokeElemOff :: Ptr BlendOverlapEXT -> Int -> BlendOverlapEXT -> IO ()
peekElemOff :: Ptr BlendOverlapEXT -> Int -> IO BlendOverlapEXT
$cpeekElemOff :: Ptr BlendOverlapEXT -> Int -> IO BlendOverlapEXT
alignment :: BlendOverlapEXT -> Int
$calignment :: BlendOverlapEXT -> Int
sizeOf :: BlendOverlapEXT -> Int
$csizeOf :: BlendOverlapEXT -> Int
Storable, BlendOverlapEXT
forall a. a -> Zero a
zero :: BlendOverlapEXT
$czero :: BlendOverlapEXT
Zero)
pattern $bBLEND_OVERLAP_UNCORRELATED_EXT :: BlendOverlapEXT
$mBLEND_OVERLAP_UNCORRELATED_EXT :: forall {r}. BlendOverlapEXT -> ((# #) -> r) -> ((# #) -> r) -> r
BLEND_OVERLAP_UNCORRELATED_EXT = BlendOverlapEXT 0
pattern $bBLEND_OVERLAP_DISJOINT_EXT :: BlendOverlapEXT
$mBLEND_OVERLAP_DISJOINT_EXT :: forall {r}. BlendOverlapEXT -> ((# #) -> r) -> ((# #) -> r) -> r
BLEND_OVERLAP_DISJOINT_EXT = BlendOverlapEXT 1
pattern $bBLEND_OVERLAP_CONJOINT_EXT :: BlendOverlapEXT
$mBLEND_OVERLAP_CONJOINT_EXT :: forall {r}. BlendOverlapEXT -> ((# #) -> r) -> ((# #) -> r) -> r
BLEND_OVERLAP_CONJOINT_EXT = BlendOverlapEXT 2
{-# COMPLETE
BLEND_OVERLAP_UNCORRELATED_EXT
, BLEND_OVERLAP_DISJOINT_EXT
, BLEND_OVERLAP_CONJOINT_EXT ::
BlendOverlapEXT
#-}
conNameBlendOverlapEXT :: String
conNameBlendOverlapEXT :: String
conNameBlendOverlapEXT = String
"BlendOverlapEXT"
enumPrefixBlendOverlapEXT :: String
enumPrefixBlendOverlapEXT :: String
enumPrefixBlendOverlapEXT = String
"BLEND_OVERLAP_"
showTableBlendOverlapEXT :: [(BlendOverlapEXT, String)]
showTableBlendOverlapEXT :: [(BlendOverlapEXT, String)]
showTableBlendOverlapEXT =
[
( BlendOverlapEXT
BLEND_OVERLAP_UNCORRELATED_EXT
, String
"UNCORRELATED_EXT"
)
, (BlendOverlapEXT
BLEND_OVERLAP_DISJOINT_EXT, String
"DISJOINT_EXT")
, (BlendOverlapEXT
BLEND_OVERLAP_CONJOINT_EXT, String
"CONJOINT_EXT")
]
instance Show BlendOverlapEXT where
showsPrec :: Int -> BlendOverlapEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixBlendOverlapEXT
[(BlendOverlapEXT, String)]
showTableBlendOverlapEXT
String
conNameBlendOverlapEXT
(\(BlendOverlapEXT Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read BlendOverlapEXT where
readPrec :: ReadPrec BlendOverlapEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixBlendOverlapEXT
[(BlendOverlapEXT, String)]
showTableBlendOverlapEXT
String
conNameBlendOverlapEXT
Int32 -> BlendOverlapEXT
BlendOverlapEXT
type EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION = 2
pattern EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION :: forall a. Integral a => a
$mEXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION = 2
type EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"
pattern EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"