{-# language CPP #-}
module Vulkan.Extensions.VK_NV_push_constant_bank ( PushConstantBankInfoNV(..)
, PhysicalDevicePushConstantBankFeaturesNV(..)
, PhysicalDevicePushConstantBankPropertiesNV(..)
, NV_PUSH_CONSTANT_BANK_SPEC_VERSION
, pattern NV_PUSH_CONSTANT_BANK_SPEC_VERSION
, NV_PUSH_CONSTANT_BANK_EXTENSION_NAME
, pattern NV_PUSH_CONSTANT_BANK_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.Word (Word32)
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_PUSH_CONSTANT_BANK_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV))
data PushConstantBankInfoNV = PushConstantBankInfoNV
{
PushConstantBankInfoNV -> Word32
bank :: Word32 }
deriving (Typeable, PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool
(PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool)
-> (PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool)
-> Eq PushConstantBankInfoNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool
== :: PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool
$c/= :: PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool
/= :: PushConstantBankInfoNV -> PushConstantBankInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PushConstantBankInfoNV)
#endif
deriving instance Show PushConstantBankInfoNV
instance ToCStruct PushConstantBankInfoNV where
withCStruct :: forall b.
PushConstantBankInfoNV
-> (Ptr PushConstantBankInfoNV -> IO b) -> IO b
withCStruct PushConstantBankInfoNV
x Ptr PushConstantBankInfoNV -> IO b
f = Int -> (Ptr PushConstantBankInfoNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PushConstantBankInfoNV -> IO b) -> IO b)
-> (Ptr PushConstantBankInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PushConstantBankInfoNV
p -> Ptr PushConstantBankInfoNV
-> PushConstantBankInfoNV -> IO b -> IO b
forall b.
Ptr PushConstantBankInfoNV
-> PushConstantBankInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PushConstantBankInfoNV
p PushConstantBankInfoNV
x (Ptr PushConstantBankInfoNV -> IO b
f Ptr PushConstantBankInfoNV
p)
pokeCStruct :: forall b.
Ptr PushConstantBankInfoNV
-> PushConstantBankInfoNV -> IO b -> IO b
pokeCStruct Ptr PushConstantBankInfoNV
p PushConstantBankInfoNV{Word32
bank :: PushConstantBankInfoNV -> Word32
bank :: Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
bank)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PushConstantBankInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr PushConstantBankInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PushConstantBankInfoNV where
peekCStruct :: Ptr PushConstantBankInfoNV -> IO PushConstantBankInfoNV
peekCStruct Ptr PushConstantBankInfoNV
p = do
bank <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PushConstantBankInfoNV
p Ptr PushConstantBankInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pure $ PushConstantBankInfoNV
bank
instance Storable PushConstantBankInfoNV where
sizeOf :: PushConstantBankInfoNV -> Int
sizeOf ~PushConstantBankInfoNV
_ = Int
24
alignment :: PushConstantBankInfoNV -> Int
alignment ~PushConstantBankInfoNV
_ = Int
8
peek :: Ptr PushConstantBankInfoNV -> IO PushConstantBankInfoNV
peek = Ptr PushConstantBankInfoNV -> IO PushConstantBankInfoNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PushConstantBankInfoNV -> PushConstantBankInfoNV -> IO ()
poke Ptr PushConstantBankInfoNV
ptr PushConstantBankInfoNV
poked = Ptr PushConstantBankInfoNV
-> PushConstantBankInfoNV -> IO () -> IO ()
forall b.
Ptr PushConstantBankInfoNV
-> PushConstantBankInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PushConstantBankInfoNV
ptr PushConstantBankInfoNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PushConstantBankInfoNV where
zero :: PushConstantBankInfoNV
zero = Word32 -> PushConstantBankInfoNV
PushConstantBankInfoNV
Word32
forall a. Zero a => a
zero
data PhysicalDevicePushConstantBankFeaturesNV = PhysicalDevicePushConstantBankFeaturesNV
{
PhysicalDevicePushConstantBankFeaturesNV -> Bool
pushConstantBank :: Bool }
deriving (Typeable, PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool
(PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool)
-> (PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool)
-> Eq PhysicalDevicePushConstantBankFeaturesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool
== :: PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool
$c/= :: PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool
/= :: PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePushConstantBankFeaturesNV)
#endif
deriving instance Show PhysicalDevicePushConstantBankFeaturesNV
instance ToCStruct PhysicalDevicePushConstantBankFeaturesNV where
withCStruct :: forall b.
PhysicalDevicePushConstantBankFeaturesNV
-> (Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b) -> IO b
withCStruct PhysicalDevicePushConstantBankFeaturesNV
x Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b
f = Int
-> (Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b) -> IO b)
-> (Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePushConstantBankFeaturesNV
p -> Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO b -> IO b
forall b.
Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankFeaturesNV
p PhysicalDevicePushConstantBankFeaturesNV
x (Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b
f Ptr PhysicalDevicePushConstantBankFeaturesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankFeaturesNV
p PhysicalDevicePushConstantBankFeaturesNV{Bool
pushConstantBank :: PhysicalDevicePushConstantBankFeaturesNV -> Bool
pushConstantBank :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV -> 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 PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pushConstantBank))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePushConstantBankFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePushConstantBankFeaturesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV -> 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 PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV -> 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 PhysicalDevicePushConstantBankFeaturesNV where
peekCStruct :: Ptr PhysicalDevicePushConstantBankFeaturesNV
-> IO PhysicalDevicePushConstantBankFeaturesNV
peekCStruct Ptr PhysicalDevicePushConstantBankFeaturesNV
p = do
pushConstantBank <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePushConstantBankFeaturesNV
p Ptr PhysicalDevicePushConstantBankFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pure $ PhysicalDevicePushConstantBankFeaturesNV
(bool32ToBool pushConstantBank)
instance Storable PhysicalDevicePushConstantBankFeaturesNV where
sizeOf :: PhysicalDevicePushConstantBankFeaturesNV -> Int
sizeOf ~PhysicalDevicePushConstantBankFeaturesNV
_ = Int
24
alignment :: PhysicalDevicePushConstantBankFeaturesNV -> Int
alignment ~PhysicalDevicePushConstantBankFeaturesNV
_ = Int
8
peek :: Ptr PhysicalDevicePushConstantBankFeaturesNV
-> IO PhysicalDevicePushConstantBankFeaturesNV
peek = Ptr PhysicalDevicePushConstantBankFeaturesNV
-> IO PhysicalDevicePushConstantBankFeaturesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO ()
poke Ptr PhysicalDevicePushConstantBankFeaturesNV
ptr PhysicalDevicePushConstantBankFeaturesNV
poked = Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDevicePushConstantBankFeaturesNV
-> PhysicalDevicePushConstantBankFeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankFeaturesNV
ptr PhysicalDevicePushConstantBankFeaturesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePushConstantBankFeaturesNV where
zero :: PhysicalDevicePushConstantBankFeaturesNV
zero = Bool -> PhysicalDevicePushConstantBankFeaturesNV
PhysicalDevicePushConstantBankFeaturesNV
Bool
forall a. Zero a => a
zero
data PhysicalDevicePushConstantBankPropertiesNV = PhysicalDevicePushConstantBankPropertiesNV
{
PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxGraphicsPushConstantBanks :: Word32
,
PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxComputePushConstantBanks :: Word32
,
PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxGraphicsPushDataBanks :: Word32
,
PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxComputePushDataBanks :: Word32
}
deriving (Typeable, PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool
(PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool)
-> (PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool)
-> Eq PhysicalDevicePushConstantBankPropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool
== :: PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool
$c/= :: PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool
/= :: PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePushConstantBankPropertiesNV)
#endif
deriving instance Show PhysicalDevicePushConstantBankPropertiesNV
instance ToCStruct PhysicalDevicePushConstantBankPropertiesNV where
withCStruct :: forall b.
PhysicalDevicePushConstantBankPropertiesNV
-> (Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b) -> IO b
withCStruct PhysicalDevicePushConstantBankPropertiesNV
x Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b
f = Int
-> (Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b) -> IO b)
-> (Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDevicePushConstantBankPropertiesNV
p -> Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO b -> IO b
forall b.
Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankPropertiesNV
p PhysicalDevicePushConstantBankPropertiesNV
x (Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b
f Ptr PhysicalDevicePushConstantBankPropertiesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankPropertiesNV
p PhysicalDevicePushConstantBankPropertiesNV{Word32
maxGraphicsPushConstantBanks :: PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxComputePushConstantBanks :: PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxGraphicsPushDataBanks :: PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxComputePushDataBanks :: PhysicalDevicePushConstantBankPropertiesNV -> Word32
maxGraphicsPushConstantBanks :: Word32
maxComputePushConstantBanks :: Word32
maxGraphicsPushDataBanks :: Word32
maxComputePushDataBanks :: Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxGraphicsPushConstantBanks)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
maxComputePushConstantBanks)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
maxGraphicsPushDataBanks)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
maxComputePushDataBanks)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDevicePushConstantBankPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDevicePushConstantBankPropertiesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDevicePushConstantBankPropertiesNV where
peekCStruct :: Ptr PhysicalDevicePushConstantBankPropertiesNV
-> IO PhysicalDevicePushConstantBankPropertiesNV
peekCStruct Ptr PhysicalDevicePushConstantBankPropertiesNV
p = do
maxGraphicsPushConstantBanks <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDevicePushConstantBankPropertiesNV
p Ptr PhysicalDevicePushConstantBankPropertiesNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
maxComputePushConstantBanks <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
maxGraphicsPushDataBanks <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
maxComputePushDataBanks <- peek @Word32 ((p `plusPtr` 28 :: Ptr Word32))
pure $ PhysicalDevicePushConstantBankPropertiesNV
maxGraphicsPushConstantBanks
maxComputePushConstantBanks
maxGraphicsPushDataBanks
maxComputePushDataBanks
instance Storable PhysicalDevicePushConstantBankPropertiesNV where
sizeOf :: PhysicalDevicePushConstantBankPropertiesNV -> Int
sizeOf ~PhysicalDevicePushConstantBankPropertiesNV
_ = Int
32
alignment :: PhysicalDevicePushConstantBankPropertiesNV -> Int
alignment ~PhysicalDevicePushConstantBankPropertiesNV
_ = Int
8
peek :: Ptr PhysicalDevicePushConstantBankPropertiesNV
-> IO PhysicalDevicePushConstantBankPropertiesNV
peek = Ptr PhysicalDevicePushConstantBankPropertiesNV
-> IO PhysicalDevicePushConstantBankPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO ()
poke Ptr PhysicalDevicePushConstantBankPropertiesNV
ptr PhysicalDevicePushConstantBankPropertiesNV
poked = Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDevicePushConstantBankPropertiesNV
-> PhysicalDevicePushConstantBankPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePushConstantBankPropertiesNV
ptr PhysicalDevicePushConstantBankPropertiesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDevicePushConstantBankPropertiesNV where
zero :: PhysicalDevicePushConstantBankPropertiesNV
zero = Word32
-> Word32
-> Word32
-> Word32
-> PhysicalDevicePushConstantBankPropertiesNV
PhysicalDevicePushConstantBankPropertiesNV
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
type NV_PUSH_CONSTANT_BANK_SPEC_VERSION = 1
pattern NV_PUSH_CONSTANT_BANK_SPEC_VERSION :: forall a . Integral a => a
pattern $mNV_PUSH_CONSTANT_BANK_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_PUSH_CONSTANT_BANK_SPEC_VERSION :: forall a. Integral a => a
NV_PUSH_CONSTANT_BANK_SPEC_VERSION = 1
type NV_PUSH_CONSTANT_BANK_EXTENSION_NAME = "VK_NV_push_constant_bank"
pattern NV_PUSH_CONSTANT_BANK_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mNV_PUSH_CONSTANT_BANK_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_PUSH_CONSTANT_BANK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
NV_PUSH_CONSTANT_BANK_EXTENSION_NAME = "VK_NV_push_constant_bank"