{-# language CPP #-}
module Vulkan.Extensions.VK_AMD_shader_core_properties ( PhysicalDeviceShaderCorePropertiesAMD(..)
, AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION
, pattern AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION
, AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME
, pattern AMD_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_AMD))
data PhysicalDeviceShaderCorePropertiesAMD = PhysicalDeviceShaderCorePropertiesAMD
{
PhysicalDeviceShaderCorePropertiesAMD -> Word32
shaderEngineCount :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
shaderArraysPerEngineCount :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
computeUnitsPerShaderArray :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
simdPerComputeUnit :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
wavefrontsPerSimd :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
wavefrontSize :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
sgprsPerSimd :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
minSgprAllocation :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
maxSgprAllocation :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
sgprAllocationGranularity :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
vgprsPerSimd :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
minVgprAllocation :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
maxVgprAllocation :: Word32
,
PhysicalDeviceShaderCorePropertiesAMD -> Word32
vgprAllocationGranularity :: Word32
}
deriving (Typeable, PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool
(PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool)
-> (PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool)
-> Eq PhysicalDeviceShaderCorePropertiesAMD
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool
$c/= :: PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool
== :: PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool
$c== :: PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceShaderCorePropertiesAMD)
#endif
deriving instance Show PhysicalDeviceShaderCorePropertiesAMD
instance ToCStruct PhysicalDeviceShaderCorePropertiesAMD where
withCStruct :: PhysicalDeviceShaderCorePropertiesAMD
-> (Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b) -> IO b
withCStruct PhysicalDeviceShaderCorePropertiesAMD
x Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b
f = Int -> (Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
72 ((Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b) -> IO b)
-> (Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceShaderCorePropertiesAMD
p -> Ptr PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesAMD
p PhysicalDeviceShaderCorePropertiesAMD
x (Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b
f Ptr PhysicalDeviceShaderCorePropertiesAMD
p)
pokeCStruct :: Ptr PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesAMD
p PhysicalDeviceShaderCorePropertiesAMD{Word32
vgprAllocationGranularity :: Word32
maxVgprAllocation :: Word32
minVgprAllocation :: Word32
vgprsPerSimd :: Word32
sgprAllocationGranularity :: Word32
maxSgprAllocation :: Word32
minSgprAllocation :: Word32
sgprsPerSimd :: Word32
wavefrontSize :: Word32
wavefrontsPerSimd :: Word32
simdPerComputeUnit :: Word32
computeUnitsPerShaderArray :: Word32
shaderArraysPerEngineCount :: Word32
shaderEngineCount :: Word32
$sel:vgprAllocationGranularity:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:maxVgprAllocation:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:minVgprAllocation:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:vgprsPerSimd:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:sgprAllocationGranularity:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:maxSgprAllocation:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:minSgprAllocation:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:sgprsPerSimd:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:wavefrontSize:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:wavefrontsPerSimd:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:simdPerComputeUnit:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:computeUnitsPerShaderArray:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:shaderArraysPerEngineCount:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
$sel:shaderEngineCount:PhysicalDeviceShaderCorePropertiesAMD :: PhysicalDeviceShaderCorePropertiesAMD -> Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> 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 PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
shaderEngineCount)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
shaderArraysPerEngineCount)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
computeUnitsPerShaderArray)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
simdPerComputeUnit)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
wavefrontsPerSimd)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
wavefrontSize)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
sgprsPerSimd)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
minSgprAllocation)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Word32
maxSgprAllocation)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Word32
sgprAllocationGranularity)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
vgprsPerSimd)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
minVgprAllocation)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) (Word32
maxVgprAllocation)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Word32)) (Word32
vgprAllocationGranularity)
IO b
f
cStructSize :: Int
cStructSize = Int
72
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceShaderCorePropertiesAMD -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceShaderCorePropertiesAMD
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> 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 PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> 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 PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> 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 PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> 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 PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceShaderCorePropertiesAMD where
peekCStruct :: Ptr PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD
peekCStruct Ptr PhysicalDeviceShaderCorePropertiesAMD
p = do
Word32
shaderEngineCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Word32
shaderArraysPerEngineCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Word32
computeUnitsPerShaderArray <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
Word32
simdPerComputeUnit <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
Word32
wavefrontsPerSimd <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Word32
wavefrontSize <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32))
Word32
sgprsPerSimd <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Word32
minSgprAllocation <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
Word32
maxSgprAllocation <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
Word32
sgprAllocationGranularity <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
Word32
vgprsPerSimd <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
Word32
minVgprAllocation <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32))
Word32
maxVgprAllocation <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32))
Word32
vgprAllocationGranularity <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceShaderCorePropertiesAMD
p Ptr PhysicalDeviceShaderCorePropertiesAMD -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Word32))
PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD)
-> PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD
forall a b. (a -> b) -> a -> b
$ Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> PhysicalDeviceShaderCorePropertiesAMD
PhysicalDeviceShaderCorePropertiesAMD
Word32
shaderEngineCount Word32
shaderArraysPerEngineCount Word32
computeUnitsPerShaderArray Word32
simdPerComputeUnit Word32
wavefrontsPerSimd Word32
wavefrontSize Word32
sgprsPerSimd Word32
minSgprAllocation Word32
maxSgprAllocation Word32
sgprAllocationGranularity Word32
vgprsPerSimd Word32
minVgprAllocation Word32
maxVgprAllocation Word32
vgprAllocationGranularity
instance Storable PhysicalDeviceShaderCorePropertiesAMD where
sizeOf :: PhysicalDeviceShaderCorePropertiesAMD -> Int
sizeOf ~PhysicalDeviceShaderCorePropertiesAMD
_ = Int
72
alignment :: PhysicalDeviceShaderCorePropertiesAMD -> Int
alignment ~PhysicalDeviceShaderCorePropertiesAMD
_ = Int
8
peek :: Ptr PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD
peek = Ptr PhysicalDeviceShaderCorePropertiesAMD
-> IO PhysicalDeviceShaderCorePropertiesAMD
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> IO ()
poke Ptr PhysicalDeviceShaderCorePropertiesAMD
ptr PhysicalDeviceShaderCorePropertiesAMD
poked = Ptr PhysicalDeviceShaderCorePropertiesAMD
-> PhysicalDeviceShaderCorePropertiesAMD -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceShaderCorePropertiesAMD
ptr PhysicalDeviceShaderCorePropertiesAMD
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceShaderCorePropertiesAMD where
zero :: PhysicalDeviceShaderCorePropertiesAMD
zero = Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> PhysicalDeviceShaderCorePropertiesAMD
PhysicalDeviceShaderCorePropertiesAMD
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
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
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
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
type AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION = 2
pattern AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION :: forall a . Integral a => a
pattern $bAMD_SHADER_CORE_PROPERTIES_SPEC_VERSION :: a
$mAMD_SHADER_CORE_PROPERTIES_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION = 2
type AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"
pattern AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bAMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: a
$mAMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"