{-# language CPP #-}
module Vulkan.Extensions.VK_ARM_shader_core_properties ( PhysicalDeviceShaderCorePropertiesARM(..)
, ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION
, pattern ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION
, ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME
, pattern ARM_SHADER_CORE_PROPERTIES_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.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM))
data PhysicalDeviceShaderCorePropertiesARM = PhysicalDeviceShaderCorePropertiesARM
{
PhysicalDeviceShaderCorePropertiesARM -> Word32
pixelRate :: Word32
,
PhysicalDeviceShaderCorePropertiesARM -> Word32
texelRate :: Word32
,
PhysicalDeviceShaderCorePropertiesARM -> Word32
fmaRate :: Word32
}
deriving (Typeable, PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> Bool
$c/= :: PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> Bool
== :: PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> Bool
$c== :: PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderCorePropertiesARM)
#endif
deriving instance Show PhysicalDeviceShaderCorePropertiesARM
instance ToCStruct PhysicalDeviceShaderCorePropertiesARM where
withCStruct :: forall b.
PhysicalDeviceShaderCorePropertiesARM
-> (Ptr PhysicalDeviceShaderCorePropertiesARM -> IO b) -> IO b
withCStruct PhysicalDeviceShaderCorePropertiesARM
x Ptr PhysicalDeviceShaderCorePropertiesARM -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderCorePropertiesARM
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesARM
p PhysicalDeviceShaderCorePropertiesARM
x (Ptr PhysicalDeviceShaderCorePropertiesARM -> IO b
f Ptr PhysicalDeviceShaderCorePropertiesARM
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesARM
p PhysicalDeviceShaderCorePropertiesARM{Word32
fmaRate :: Word32
texelRate :: Word32
pixelRate :: Word32
$sel:fmaRate:PhysicalDeviceShaderCorePropertiesARM :: PhysicalDeviceShaderCorePropertiesARM -> Word32
$sel:texelRate:PhysicalDeviceShaderCorePropertiesARM :: PhysicalDeviceShaderCorePropertiesARM -> Word32
$sel:pixelRate:PhysicalDeviceShaderCorePropertiesARM :: PhysicalDeviceShaderCorePropertiesARM -> Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
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 PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
pixelRate)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
texelRate)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
fmaRate)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PhysicalDeviceShaderCorePropertiesARM -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderCorePropertiesARM
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
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 PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceShaderCorePropertiesARM where
peekCStruct :: Ptr PhysicalDeviceShaderCorePropertiesARM
-> IO PhysicalDeviceShaderCorePropertiesARM
peekCStruct Ptr PhysicalDeviceShaderCorePropertiesARM
p = do
Word32
pixelRate <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Word32
texelRate <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Word32
fmaRate <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesARM
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32 -> Word32 -> Word32 -> PhysicalDeviceShaderCorePropertiesARM
PhysicalDeviceShaderCorePropertiesARM
Word32
pixelRate Word32
texelRate Word32
fmaRate
instance Storable PhysicalDeviceShaderCorePropertiesARM where
sizeOf :: PhysicalDeviceShaderCorePropertiesARM -> Int
sizeOf ~PhysicalDeviceShaderCorePropertiesARM
_ = Int
32
alignment :: PhysicalDeviceShaderCorePropertiesARM -> Int
alignment ~PhysicalDeviceShaderCorePropertiesARM
_ = Int
8
peek :: Ptr PhysicalDeviceShaderCorePropertiesARM
-> IO PhysicalDeviceShaderCorePropertiesARM
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderCorePropertiesARM
-> PhysicalDeviceShaderCorePropertiesARM -> IO ()
poke Ptr PhysicalDeviceShaderCorePropertiesARM
ptr PhysicalDeviceShaderCorePropertiesARM
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesARM
ptr PhysicalDeviceShaderCorePropertiesARM
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderCorePropertiesARM where
zero :: PhysicalDeviceShaderCorePropertiesARM
zero = Word32 -> Word32 -> Word32 -> PhysicalDeviceShaderCorePropertiesARM
PhysicalDeviceShaderCorePropertiesARM
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
type ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION = 1
pattern ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION :: forall a . Integral a => a
pattern $bARM_SHADER_CORE_PROPERTIES_SPEC_VERSION :: forall a. Integral a => a
$mARM_SHADER_CORE_PROPERTIES_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION = 1
type ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_ARM_shader_core_properties"
pattern ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_ARM_shader_core_properties"