{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_fragment_shader_barycentric ( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR(..)
, PhysicalDeviceFragmentShaderBarycentricPropertiesKHR(..)
, KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION
, pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION
, KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME
, pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_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_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR))
data PhysicalDeviceFragmentShaderBarycentricFeaturesKHR = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
{
PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
fragmentShaderBarycentric :: Bool }
deriving (Typeable, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
$c/= :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
== :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
$c== :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShaderBarycentricFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
instance ToCStruct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR where
withCStruct :: forall b.
PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> (Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
x Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
x (Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> IO b
f Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p PhysicalDeviceFragmentShaderBarycentricFeaturesKHR{Bool
fragmentShaderBarycentric :: Bool
$sel:fragmentShaderBarycentric:PhysicalDeviceFragmentShaderBarycentricFeaturesKHR :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
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 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderBarycentric))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
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 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
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 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> IO PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
peekCStruct Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
p = do
Bool32
fragmentShaderBarycentric <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
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 -> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShaderBarycentric)
instance Storable PhysicalDeviceFragmentShaderBarycentricFeaturesKHR where
sizeOf :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Int
sizeOf ~PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
_ = Int
24
alignment :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> Int
alignment ~PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> IO PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
-> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR -> IO ()
poke Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
ptr PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShaderBarycentricFeaturesKHR where
zero :: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
zero = Bool -> PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
forall a. Zero a => a
zero
data PhysicalDeviceFragmentShaderBarycentricPropertiesKHR = PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
{
PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
triStripVertexOrderIndependentOfProvokingVertex :: Bool }
deriving (Typeable, PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
$c/= :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
== :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
$c== :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShaderBarycentricPropertiesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
instance ToCStruct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR where
withCStruct :: forall b.
PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> (Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
x Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
x (Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> IO b
f Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p PhysicalDeviceFragmentShaderBarycentricPropertiesKHR{Bool
triStripVertexOrderIndependentOfProvokingVertex :: Bool
$sel:triStripVertexOrderIndependentOfProvokingVertex:PhysicalDeviceFragmentShaderBarycentricPropertiesKHR :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
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 PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
triStripVertexOrderIndependentOfProvokingVertex))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
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 PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
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 PhysicalDeviceFragmentShaderBarycentricPropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> IO PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
peekCStruct Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
p = do
Bool32
triStripVertexOrderIndependentOfProvokingVertex <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
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 -> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
(Bool32 -> Bool
bool32ToBool Bool32
triStripVertexOrderIndependentOfProvokingVertex)
instance Storable PhysicalDeviceFragmentShaderBarycentricPropertiesKHR where
sizeOf :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Int
sizeOf ~PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
_ = Int
24
alignment :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> Int
alignment ~PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> IO PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
-> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR -> IO ()
poke Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
ptr PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShaderBarycentricPropertiesKHR where
zero :: PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
zero = Bool -> PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
forall a. Zero a => a
zero
type KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1
pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION :: forall a. Integral a => a
$mKHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1
type KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"
pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"