{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_shader_subgroup_partitioned ( PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT(..)
, EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION
, pattern EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION
, EXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME
, pattern EXT_SHADER_SUBGROUP_PARTITIONED_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_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT))
data PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT = PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
{
PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
shaderSubgroupPartitioned :: Bool }
deriving (Typeable, PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
(PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool)
-> (PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool)
-> Eq PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
== :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
$c/= :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
/= :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
instance ToCStruct PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> (Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
x Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p -> Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO b
-> IO b
forall b.
Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
x (Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO b
f Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT{Bool
shaderSubgroupPartitioned :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Bool
shaderSubgroupPartitioned :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> 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 PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
shaderSubgroupPartitioned))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> 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 PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> 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 PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
peekCStruct Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p = do
shaderSubgroupPartitioned <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
p Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pure $ PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
(bool32ToBool shaderSubgroupPartitioned)
instance Storable PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT where
sizeOf :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Int
sizeOf ~PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> Int
alignment ~PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
peek = Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
poked = Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO ()
-> IO ()
forall b.
Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
ptr PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT where
zero :: PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
zero = Bool -> PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT
Bool
forall a. Zero a => a
zero
type EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION = 1
pattern EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION :: forall a . Integral a => a
pattern $mEXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION :: forall a. Integral a => a
EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION = 1
type EXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_EXT_shader_subgroup_partitioned"
pattern EXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mEXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
EXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_EXT_shader_subgroup_partitioned"