{-# language CPP #-}
module Vulkan.Extensions.VK_NV_representative_fragment_test ( PhysicalDeviceRepresentativeFragmentTestFeaturesNV(..)
, PipelineRepresentativeFragmentTestStateCreateInfoNV(..)
, NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION
, pattern NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION
, NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME
, pattern NV_REPRESENTATIVE_FRAGMENT_TEST_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_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV))
data PhysicalDeviceRepresentativeFragmentTestFeaturesNV = PhysicalDeviceRepresentativeFragmentTestFeaturesNV
{
PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
representativeFragmentTest :: Bool }
deriving (Typeable, PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
$c/= :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
== :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
$c== :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRepresentativeFragmentTestFeaturesNV)
#endif
deriving instance Show PhysicalDeviceRepresentativeFragmentTestFeaturesNV
instance ToCStruct PhysicalDeviceRepresentativeFragmentTestFeaturesNV where
withCStruct :: forall b.
PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> (Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceRepresentativeFragmentTestFeaturesNV
x Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p PhysicalDeviceRepresentativeFragmentTestFeaturesNV
x (Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> IO b
f Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p PhysicalDeviceRepresentativeFragmentTestFeaturesNV{Bool
representativeFragmentTest :: Bool
$sel:representativeFragmentTest:PhysicalDeviceRepresentativeFragmentTestFeaturesNV :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
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 PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
representativeFragmentTest))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
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 PhysicalDeviceRepresentativeFragmentTestFeaturesNV
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 PhysicalDeviceRepresentativeFragmentTestFeaturesNV where
peekCStruct :: Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> IO PhysicalDeviceRepresentativeFragmentTestFeaturesNV
peekCStruct Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
p = do
Bool32
representativeFragmentTest <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
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 -> PhysicalDeviceRepresentativeFragmentTestFeaturesNV
PhysicalDeviceRepresentativeFragmentTestFeaturesNV
(Bool32 -> Bool
bool32ToBool Bool32
representativeFragmentTest)
instance Storable PhysicalDeviceRepresentativeFragmentTestFeaturesNV where
sizeOf :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Int
sizeOf ~PhysicalDeviceRepresentativeFragmentTestFeaturesNV
_ = Int
24
alignment :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> Int
alignment ~PhysicalDeviceRepresentativeFragmentTestFeaturesNV
_ = Int
8
peek :: Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> IO PhysicalDeviceRepresentativeFragmentTestFeaturesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
-> PhysicalDeviceRepresentativeFragmentTestFeaturesNV -> IO ()
poke Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
ptr PhysicalDeviceRepresentativeFragmentTestFeaturesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRepresentativeFragmentTestFeaturesNV where
zero :: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
zero = Bool -> PhysicalDeviceRepresentativeFragmentTestFeaturesNV
PhysicalDeviceRepresentativeFragmentTestFeaturesNV
forall a. Zero a => a
zero
data PipelineRepresentativeFragmentTestStateCreateInfoNV = PipelineRepresentativeFragmentTestStateCreateInfoNV
{
PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
representativeFragmentTestEnable :: Bool }
deriving (Typeable, PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
$c/= :: PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
== :: PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
$c== :: PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineRepresentativeFragmentTestStateCreateInfoNV)
#endif
deriving instance Show PipelineRepresentativeFragmentTestStateCreateInfoNV
instance ToCStruct PipelineRepresentativeFragmentTestStateCreateInfoNV where
withCStruct :: forall b.
PipelineRepresentativeFragmentTestStateCreateInfoNV
-> (Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> IO b)
-> IO b
withCStruct PipelineRepresentativeFragmentTestStateCreateInfoNV
x Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p PipelineRepresentativeFragmentTestStateCreateInfoNV
x (Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV -> IO b
f Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p)
pokeCStruct :: forall b.
Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV
-> IO b
-> IO b
pokeCStruct Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p PipelineRepresentativeFragmentTestStateCreateInfoNV{Bool
representativeFragmentTestEnable :: Bool
$sel:representativeFragmentTestEnable:PipelineRepresentativeFragmentTestStateCreateInfoNV :: PipelineRepresentativeFragmentTestStateCreateInfoNV -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
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 PipelineRepresentativeFragmentTestStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
representativeFragmentTestEnable))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> IO b -> IO b
pokeZeroCStruct Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
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 PipelineRepresentativeFragmentTestStateCreateInfoNV
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 PipelineRepresentativeFragmentTestStateCreateInfoNV where
peekCStruct :: Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> IO PipelineRepresentativeFragmentTestStateCreateInfoNV
peekCStruct Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
p = do
Bool32
representativeFragmentTestEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
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 -> PipelineRepresentativeFragmentTestStateCreateInfoNV
PipelineRepresentativeFragmentTestStateCreateInfoNV
(Bool32 -> Bool
bool32ToBool Bool32
representativeFragmentTestEnable)
instance Storable PipelineRepresentativeFragmentTestStateCreateInfoNV where
sizeOf :: PipelineRepresentativeFragmentTestStateCreateInfoNV -> Int
sizeOf ~PipelineRepresentativeFragmentTestStateCreateInfoNV
_ = Int
24
alignment :: PipelineRepresentativeFragmentTestStateCreateInfoNV -> Int
alignment ~PipelineRepresentativeFragmentTestStateCreateInfoNV
_ = Int
8
peek :: Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> IO PipelineRepresentativeFragmentTestStateCreateInfoNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
-> PipelineRepresentativeFragmentTestStateCreateInfoNV -> IO ()
poke Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
ptr PipelineRepresentativeFragmentTestStateCreateInfoNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineRepresentativeFragmentTestStateCreateInfoNV where
zero :: PipelineRepresentativeFragmentTestStateCreateInfoNV
zero = Bool -> PipelineRepresentativeFragmentTestStateCreateInfoNV
PipelineRepresentativeFragmentTestStateCreateInfoNV
forall a. Zero a => a
zero
type NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION = 2
pattern NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION :: forall a. Integral a => a
$mNV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION = 2
type NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"
pattern NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"