{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled ( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(..)
, SubpassResolvePerformanceQueryEXT(..)
, MultisampledRenderToSingleSampledInfoEXT(..)
, EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION
, pattern EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION
, EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME
, pattern EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_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.SampleCountFlagBits (SampleCountFlagBits)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT))
data PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT = PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
{
PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT -> Bool
multisampledRenderToSingleSampled :: Bool }
deriving (Typeable, PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool
(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool)
-> (PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool)
-> Eq PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool
$c/= :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool
== :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool
$c== :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
instance ToCStruct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT where
withCStruct :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> (Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b)
-> IO b
withCStruct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
x Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b
f = Int
-> (Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b)
-> IO b)
-> (Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p -> Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
x (Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b
f Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT{Bool
multisampledRenderToSingleSampled :: Bool
$sel:multisampledRenderToSingleSampled:PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> 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 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multisampledRenderToSingleSampled))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> 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 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> 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))
IO b
f
instance FromCStruct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
peekCStruct Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p = do
Bool32
multisampledRenderToSingleSampled <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
p Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
multisampledRenderToSingleSampled)
instance Storable PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT where
sizeOf :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT -> Int
sizeOf ~PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT -> Int
alignment ~PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
peek = Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO ()
poke Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
poked = Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
ptr PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT where
zero :: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
zero = Bool -> PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
Bool
forall a. Zero a => a
zero
data SubpassResolvePerformanceQueryEXT = SubpassResolvePerformanceQueryEXT
{
SubpassResolvePerformanceQueryEXT -> Bool
optimal :: Bool }
deriving (Typeable, SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool
(SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool)
-> (SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool)
-> Eq SubpassResolvePerformanceQueryEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool
$c/= :: SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool
== :: SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool
$c== :: SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SubpassResolvePerformanceQueryEXT)
#endif
deriving instance Show SubpassResolvePerformanceQueryEXT
instance ToCStruct SubpassResolvePerformanceQueryEXT where
withCStruct :: SubpassResolvePerformanceQueryEXT
-> (Ptr SubpassResolvePerformanceQueryEXT -> IO b) -> IO b
withCStruct SubpassResolvePerformanceQueryEXT
x Ptr SubpassResolvePerformanceQueryEXT -> IO b
f = Int -> (Ptr SubpassResolvePerformanceQueryEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr SubpassResolvePerformanceQueryEXT -> IO b) -> IO b)
-> (Ptr SubpassResolvePerformanceQueryEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SubpassResolvePerformanceQueryEXT
p -> Ptr SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SubpassResolvePerformanceQueryEXT
p SubpassResolvePerformanceQueryEXT
x (Ptr SubpassResolvePerformanceQueryEXT -> IO b
f Ptr SubpassResolvePerformanceQueryEXT
p)
pokeCStruct :: Ptr SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> IO b -> IO b
pokeCStruct Ptr SubpassResolvePerformanceQueryEXT
p SubpassResolvePerformanceQueryEXT{Bool
optimal :: Bool
$sel:optimal:SubpassResolvePerformanceQueryEXT :: SubpassResolvePerformanceQueryEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> 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 SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
optimal))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr SubpassResolvePerformanceQueryEXT -> IO b -> IO b
pokeZeroCStruct Ptr SubpassResolvePerformanceQueryEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> 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 SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> 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))
IO b
f
instance FromCStruct SubpassResolvePerformanceQueryEXT where
peekCStruct :: Ptr SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT
peekCStruct Ptr SubpassResolvePerformanceQueryEXT
p = do
Bool32
optimal <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr SubpassResolvePerformanceQueryEXT
p Ptr SubpassResolvePerformanceQueryEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT)
-> SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT
forall a b. (a -> b) -> a -> b
$ Bool -> SubpassResolvePerformanceQueryEXT
SubpassResolvePerformanceQueryEXT
(Bool32 -> Bool
bool32ToBool Bool32
optimal)
instance Storable SubpassResolvePerformanceQueryEXT where
sizeOf :: SubpassResolvePerformanceQueryEXT -> Int
sizeOf ~SubpassResolvePerformanceQueryEXT
_ = Int
24
alignment :: SubpassResolvePerformanceQueryEXT -> Int
alignment ~SubpassResolvePerformanceQueryEXT
_ = Int
8
peek :: Ptr SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT
peek = Ptr SubpassResolvePerformanceQueryEXT
-> IO SubpassResolvePerformanceQueryEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> IO ()
poke Ptr SubpassResolvePerformanceQueryEXT
ptr SubpassResolvePerformanceQueryEXT
poked = Ptr SubpassResolvePerformanceQueryEXT
-> SubpassResolvePerformanceQueryEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SubpassResolvePerformanceQueryEXT
ptr SubpassResolvePerformanceQueryEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SubpassResolvePerformanceQueryEXT where
zero :: SubpassResolvePerformanceQueryEXT
zero = Bool -> SubpassResolvePerformanceQueryEXT
SubpassResolvePerformanceQueryEXT
Bool
forall a. Zero a => a
zero
data MultisampledRenderToSingleSampledInfoEXT = MultisampledRenderToSingleSampledInfoEXT
{
MultisampledRenderToSingleSampledInfoEXT -> Bool
multisampledRenderToSingleSampledEnable :: Bool
,
MultisampledRenderToSingleSampledInfoEXT -> SampleCountFlagBits
rasterizationSamples :: SampleCountFlagBits
}
deriving (Typeable, MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool
(MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool)
-> (MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool)
-> Eq MultisampledRenderToSingleSampledInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool
$c/= :: MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool
== :: MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool
$c== :: MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (MultisampledRenderToSingleSampledInfoEXT)
#endif
deriving instance Show MultisampledRenderToSingleSampledInfoEXT
instance ToCStruct MultisampledRenderToSingleSampledInfoEXT where
withCStruct :: MultisampledRenderToSingleSampledInfoEXT
-> (Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b) -> IO b
withCStruct MultisampledRenderToSingleSampledInfoEXT
x Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b
f = Int
-> (Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b) -> IO b)
-> (Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr MultisampledRenderToSingleSampledInfoEXT
p -> Ptr MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MultisampledRenderToSingleSampledInfoEXT
p MultisampledRenderToSingleSampledInfoEXT
x (Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b
f Ptr MultisampledRenderToSingleSampledInfoEXT
p)
pokeCStruct :: Ptr MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> IO b -> IO b
pokeCStruct Ptr MultisampledRenderToSingleSampledInfoEXT
p MultisampledRenderToSingleSampledInfoEXT{Bool
SampleCountFlagBits
rasterizationSamples :: SampleCountFlagBits
multisampledRenderToSingleSampledEnable :: Bool
$sel:rasterizationSamples:MultisampledRenderToSingleSampledInfoEXT :: MultisampledRenderToSingleSampledInfoEXT -> SampleCountFlagBits
$sel:multisampledRenderToSingleSampledEnable:MultisampledRenderToSingleSampledInfoEXT :: MultisampledRenderToSingleSampledInfoEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT -> 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 MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
multisampledRenderToSingleSampledEnable))
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
rasterizationSamples)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr MultisampledRenderToSingleSampledInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr MultisampledRenderToSingleSampledInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT -> 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 MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT -> 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 SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct MultisampledRenderToSingleSampledInfoEXT where
peekCStruct :: Ptr MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT
peekCStruct Ptr MultisampledRenderToSingleSampledInfoEXT
p = do
Bool32
multisampledRenderToSingleSampledEnable <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
SampleCountFlagBits
rasterizationSamples <- Ptr SampleCountFlagBits -> IO SampleCountFlagBits
forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr MultisampledRenderToSingleSampledInfoEXT
p Ptr MultisampledRenderToSingleSampledInfoEXT
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits))
MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT)
-> MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT
forall a b. (a -> b) -> a -> b
$ Bool
-> SampleCountFlagBits -> MultisampledRenderToSingleSampledInfoEXT
MultisampledRenderToSingleSampledInfoEXT
(Bool32 -> Bool
bool32ToBool Bool32
multisampledRenderToSingleSampledEnable) SampleCountFlagBits
rasterizationSamples
instance Storable MultisampledRenderToSingleSampledInfoEXT where
sizeOf :: MultisampledRenderToSingleSampledInfoEXT -> Int
sizeOf ~MultisampledRenderToSingleSampledInfoEXT
_ = Int
24
alignment :: MultisampledRenderToSingleSampledInfoEXT -> Int
alignment ~MultisampledRenderToSingleSampledInfoEXT
_ = Int
8
peek :: Ptr MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT
peek = Ptr MultisampledRenderToSingleSampledInfoEXT
-> IO MultisampledRenderToSingleSampledInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> IO ()
poke Ptr MultisampledRenderToSingleSampledInfoEXT
ptr MultisampledRenderToSingleSampledInfoEXT
poked = Ptr MultisampledRenderToSingleSampledInfoEXT
-> MultisampledRenderToSingleSampledInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MultisampledRenderToSingleSampledInfoEXT
ptr MultisampledRenderToSingleSampledInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero MultisampledRenderToSingleSampledInfoEXT where
zero :: MultisampledRenderToSingleSampledInfoEXT
zero = Bool
-> SampleCountFlagBits -> MultisampledRenderToSingleSampledInfoEXT
MultisampledRenderToSingleSampledInfoEXT
Bool
forall a. Zero a => a
zero
SampleCountFlagBits
forall a. Zero a => a
zero
type EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION = 1
pattern EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION :: a
$mEXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION = 1
type EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"
pattern EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME :: a
$mEXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"