{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_fragment_shader_interlock ( PhysicalDeviceFragmentShaderInterlockFeaturesEXT(..)
, EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION
, pattern EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION
, EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME
, pattern EXT_FRAGMENT_SHADER_INTERLOCK_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_INTERLOCK_FEATURES_EXT))
data PhysicalDeviceFragmentShaderInterlockFeaturesEXT = PhysicalDeviceFragmentShaderInterlockFeaturesEXT
{
PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
fragmentShaderSampleInterlock :: Bool
,
PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
fragmentShaderPixelInterlock :: Bool
,
PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
fragmentShaderShadingRateInterlock :: Bool
}
deriving (Typeable, PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
$c/= :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
== :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
$c== :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShaderInterlockFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceFragmentShaderInterlockFeaturesEXT
instance ToCStruct PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> (Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShaderInterlockFeaturesEXT
x Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p PhysicalDeviceFragmentShaderInterlockFeaturesEXT
x (Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b
f Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p PhysicalDeviceFragmentShaderInterlockFeaturesEXT{Bool
fragmentShaderShadingRateInterlock :: Bool
fragmentShaderPixelInterlock :: Bool
fragmentShaderSampleInterlock :: Bool
$sel:fragmentShaderShadingRateInterlock:PhysicalDeviceFragmentShaderInterlockFeaturesEXT :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
$sel:fragmentShaderPixelInterlock:PhysicalDeviceFragmentShaderInterlockFeaturesEXT :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
$sel:fragmentShaderSampleInterlock:PhysicalDeviceFragmentShaderInterlockFeaturesEXT :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderSampleInterlock))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderPixelInterlock))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderShadingRateInterlock))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
peekCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p = do
Bool32
fragmentShaderSampleInterlock <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
fragmentShaderPixelInterlock <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
fragmentShaderShadingRateInterlock <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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 -> PhysicalDeviceFragmentShaderInterlockFeaturesEXT
PhysicalDeviceFragmentShaderInterlockFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShaderSampleInterlock)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShaderPixelInterlock)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShaderShadingRateInterlock)
instance Storable PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
sizeOf :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Int
sizeOf ~PhysicalDeviceFragmentShaderInterlockFeaturesEXT
_ = Int
32
alignment :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Int
alignment ~PhysicalDeviceFragmentShaderInterlockFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
zero :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
zero = Bool
-> Bool -> Bool -> PhysicalDeviceFragmentShaderInterlockFeaturesEXT
PhysicalDeviceFragmentShaderInterlockFeaturesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
type EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION = 1
pattern EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION :: forall a. Integral a => a
$mEXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION = 1
type EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"
pattern EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"