{-# 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 (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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 Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
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)
deriving instance Show PhysicalDeviceFragmentShaderInterlockFeaturesEXT
instance ToCStruct PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
withCStruct :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> (Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
x f :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p -> Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b -> IO b
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 :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p PhysicalDeviceFragmentShaderInterlockFeaturesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderSampleInterlock))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderPixelInterlock))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShaderShadingRateInterlock))
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
peekCStruct p :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p = do
Bool32
fragmentShaderSampleInterlock <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
fragmentShaderPixelInterlock <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
fragmentShaderShadingRateInterlock <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
p Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT)
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
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
_ = 32
alignment :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> Int
alignment ~PhysicalDeviceFragmentShaderInterlockFeaturesEXT
_ = 8
peek :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
peek = Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO PhysicalDeviceFragmentShaderInterlockFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
ptr poked :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
poked = Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> PhysicalDeviceFragmentShaderInterlockFeaturesEXT
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
ptr PhysicalDeviceFragmentShaderInterlockFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShaderInterlockFeaturesEXT where
zero :: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
zero = Bool
-> Bool -> Bool -> PhysicalDeviceFragmentShaderInterlockFeaturesEXT
PhysicalDeviceFragmentShaderInterlockFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
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 :: a
$mEXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> 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 :: a
$mEXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"