{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_texel_buffer_alignment ( PhysicalDeviceTexelBufferAlignmentFeaturesEXT(..)
, PhysicalDeviceTexelBufferAlignmentPropertiesEXT(..)
, EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION
, pattern EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION
, EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME
, pattern EXT_TEXEL_BUFFER_ALIGNMENT_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 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.FundamentalTypes (DeviceSize)
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_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT))
data PhysicalDeviceTexelBufferAlignmentFeaturesEXT = PhysicalDeviceTexelBufferAlignmentFeaturesEXT
{
PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
texelBufferAlignment :: Bool }
deriving (Typeable, PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
(PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool)
-> (PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool)
-> Eq PhysicalDeviceTexelBufferAlignmentFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
$c/= :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
== :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
$c== :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceTexelBufferAlignmentFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceTexelBufferAlignmentFeaturesEXT
instance ToCStruct PhysicalDeviceTexelBufferAlignmentFeaturesEXT where
withCStruct :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> (Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
x f :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p -> Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p PhysicalDeviceTexelBufferAlignmentFeaturesEXT
x (Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b
f Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p PhysicalDeviceTexelBufferAlignmentFeaturesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> 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 PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
texelBufferAlignment))
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> 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 PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> 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))
IO b
f
instance FromCStruct PhysicalDeviceTexelBufferAlignmentFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT
peekCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p = do
Bool32
texelBufferAlignment <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT)
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceTexelBufferAlignmentFeaturesEXT
PhysicalDeviceTexelBufferAlignmentFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
texelBufferAlignment)
instance Storable PhysicalDeviceTexelBufferAlignmentFeaturesEXT where
sizeOf :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Int
sizeOf ~PhysicalDeviceTexelBufferAlignmentFeaturesEXT
_ = 24
alignment :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> Int
alignment ~PhysicalDeviceTexelBufferAlignmentFeaturesEXT
_ = 8
peek :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT
peek = Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> IO PhysicalDeviceTexelBufferAlignmentFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
ptr poked :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
poked = Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
-> PhysicalDeviceTexelBufferAlignmentFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
ptr PhysicalDeviceTexelBufferAlignmentFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceTexelBufferAlignmentFeaturesEXT where
zero :: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
zero = Bool -> PhysicalDeviceTexelBufferAlignmentFeaturesEXT
PhysicalDeviceTexelBufferAlignmentFeaturesEXT
Bool
forall a. Zero a => a
zero
data PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentPropertiesEXT
{
PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> DeviceSize
storageTexelBufferOffsetAlignmentBytes :: DeviceSize
,
PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
storageTexelBufferOffsetSingleTexelAlignment :: Bool
,
PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> DeviceSize
uniformTexelBufferOffsetAlignmentBytes :: DeviceSize
,
PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
uniformTexelBufferOffsetSingleTexelAlignment :: Bool
}
deriving (Typeable, PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
(PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool)
-> (PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool)
-> Eq PhysicalDeviceTexelBufferAlignmentPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
$c/= :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
== :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
$c== :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceTexelBufferAlignmentPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceTexelBufferAlignmentPropertiesEXT
instance ToCStruct PhysicalDeviceTexelBufferAlignmentPropertiesEXT where
withCStruct :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> (Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
x f :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p -> Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p PhysicalDeviceTexelBufferAlignmentPropertiesEXT
x (Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b
f Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p PhysicalDeviceTexelBufferAlignmentPropertiesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) (DeviceSize
storageTexelBufferOffsetAlignmentBytes)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
storageTexelBufferOffsetSingleTexelAlignment))
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) (DeviceSize
uniformTexelBufferOffsetAlignmentBytes)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
uniformTexelBufferOffsetSingleTexelAlignment))
IO b
f
cStructSize :: Int
cStructSize = 48
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> 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))
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceTexelBufferAlignmentPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT
peekCStruct p :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p = do
DeviceSize
storageTexelBufferOffsetAlignmentBytes <- Ptr DeviceSize -> IO DeviceSize
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize))
Bool32
storageTexelBufferOffsetSingleTexelAlignment <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
DeviceSize
uniformTexelBufferOffsetAlignmentBytes <- Ptr DeviceSize -> IO DeviceSize
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize))
Bool32
uniformTexelBufferOffsetSingleTexelAlignment <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
p Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32))
PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT)
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT
forall a b. (a -> b) -> a -> b
$ DeviceSize
-> Bool
-> DeviceSize
-> Bool
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT
PhysicalDeviceTexelBufferAlignmentPropertiesEXT
DeviceSize
storageTexelBufferOffsetAlignmentBytes (Bool32 -> Bool
bool32ToBool Bool32
storageTexelBufferOffsetSingleTexelAlignment) DeviceSize
uniformTexelBufferOffsetAlignmentBytes (Bool32 -> Bool
bool32ToBool Bool32
uniformTexelBufferOffsetSingleTexelAlignment)
instance Storable PhysicalDeviceTexelBufferAlignmentPropertiesEXT where
sizeOf :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Int
sizeOf ~PhysicalDeviceTexelBufferAlignmentPropertiesEXT
_ = 48
alignment :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> Int
alignment ~PhysicalDeviceTexelBufferAlignmentPropertiesEXT
_ = 8
peek :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT
peek = Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO PhysicalDeviceTexelBufferAlignmentPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
ptr poked :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
poked = Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
ptr PhysicalDeviceTexelBufferAlignmentPropertiesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceTexelBufferAlignmentPropertiesEXT where
zero :: PhysicalDeviceTexelBufferAlignmentPropertiesEXT
zero = DeviceSize
-> Bool
-> DeviceSize
-> Bool
-> PhysicalDeviceTexelBufferAlignmentPropertiesEXT
PhysicalDeviceTexelBufferAlignmentPropertiesEXT
DeviceSize
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
DeviceSize
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
type EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION = 1
pattern EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION :: a
$mEXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION = 1
type EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"
pattern EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME :: a
$mEXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"