{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_device_fault ( getDeviceFaultInfoEXT
, PhysicalDeviceFaultFeaturesEXT(..)
, DeviceFaultAddressInfoEXT(..)
, DeviceFaultVendorInfoEXT(..)
, DeviceFaultCountsEXT(..)
, DeviceFaultInfoEXT(..)
, DeviceFaultVendorBinaryHeaderVersionOneEXT(..)
, DeviceFaultAddressTypeEXT( DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT
, DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT
, ..
)
, DeviceFaultVendorBinaryHeaderVersionEXT( DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT
, ..
)
, EXT_DEVICE_FAULT_SPEC_VERSION
, pattern EXT_DEVICE_FAULT_SPEC_VERSION
, EXT_DEVICE_FAULT_EXTENSION_NAME
, pattern EXT_DEVICE_FAULT_EXTENSION_NAME
) where
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Data.ByteString (packCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceFaultInfoEXT))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.APIConstants (MAX_DESCRIPTION_SIZE)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.APIConstants (UUID_SIZE)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceFaultInfoEXT
:: FunPtr (Ptr Device_T -> Ptr DeviceFaultCountsEXT -> Ptr DeviceFaultInfoEXT -> IO Result) -> Ptr Device_T -> Ptr DeviceFaultCountsEXT -> Ptr DeviceFaultInfoEXT -> IO Result
getDeviceFaultInfoEXT :: forall io
. (MonadIO io)
=>
Device
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
getDeviceFaultInfoEXT :: forall (io :: * -> *).
MonadIO io =>
Device -> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
getDeviceFaultInfoEXT Device
device = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceFaultInfoEXTPtr :: FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
vkGetDeviceFaultInfoEXTPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
pVkGetDeviceFaultInfoEXT (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
vkGetDeviceFaultInfoEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDeviceFaultInfoEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetDeviceFaultInfoEXT' :: Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result
vkGetDeviceFaultInfoEXT' = FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
-> Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result
mkVkGetDeviceFaultInfoEXT FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
vkGetDeviceFaultInfoEXTPtr
"pFaultCounts" ::: Ptr DeviceFaultCountsEXT
pPFaultCounts <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @DeviceFaultCountsEXT)
"pFaultInfo" ::: Ptr DeviceFaultInfoEXT
pPFaultInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @DeviceFaultInfoEXT)
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceFaultInfoEXT" (Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result
vkGetDeviceFaultInfoEXT'
(Device -> Ptr Device_T
deviceHandle (Device
device))
("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
pPFaultCounts)
("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
pPFaultInfo))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
DeviceFaultCountsEXT
pFaultCounts <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DeviceFaultCountsEXT "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
pPFaultCounts
DeviceFaultInfoEXT
pFaultInfo <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DeviceFaultInfoEXT "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
pPFaultInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, DeviceFaultCountsEXT
pFaultCounts, DeviceFaultInfoEXT
pFaultInfo)
data PhysicalDeviceFaultFeaturesEXT = PhysicalDeviceFaultFeaturesEXT
{
PhysicalDeviceFaultFeaturesEXT -> Bool
deviceFault :: Bool
,
PhysicalDeviceFaultFeaturesEXT -> Bool
deviceFaultVendorBinary :: Bool
}
deriving (Typeable, PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool
$c/= :: PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool
== :: PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool
$c== :: PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFaultFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceFaultFeaturesEXT
instance ToCStruct PhysicalDeviceFaultFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceFaultFeaturesEXT
-> (Ptr PhysicalDeviceFaultFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceFaultFeaturesEXT
x Ptr PhysicalDeviceFaultFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFaultFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFaultFeaturesEXT
p PhysicalDeviceFaultFeaturesEXT
x (Ptr PhysicalDeviceFaultFeaturesEXT -> IO b
f Ptr PhysicalDeviceFaultFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFaultFeaturesEXT
p PhysicalDeviceFaultFeaturesEXT{Bool
deviceFaultVendorBinary :: Bool
deviceFault :: Bool
$sel:deviceFaultVendorBinary:PhysicalDeviceFaultFeaturesEXT :: PhysicalDeviceFaultFeaturesEXT -> Bool
$sel:deviceFault:PhysicalDeviceFaultFeaturesEXT :: PhysicalDeviceFaultFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
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 PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
deviceFault))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
deviceFaultVendorBinary))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PhysicalDeviceFaultFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFaultFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
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 PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFaultFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceFaultFeaturesEXT
-> IO PhysicalDeviceFaultFeaturesEXT
peekCStruct Ptr PhysicalDeviceFaultFeaturesEXT
p = do
Bool32
deviceFault <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
deviceFaultVendorBinary <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFaultFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDeviceFaultFeaturesEXT
PhysicalDeviceFaultFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
deviceFault) (Bool32 -> Bool
bool32ToBool Bool32
deviceFaultVendorBinary)
instance Storable PhysicalDeviceFaultFeaturesEXT where
sizeOf :: PhysicalDeviceFaultFeaturesEXT -> Int
sizeOf ~PhysicalDeviceFaultFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceFaultFeaturesEXT -> Int
alignment ~PhysicalDeviceFaultFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceFaultFeaturesEXT
-> IO PhysicalDeviceFaultFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceFaultFeaturesEXT
ptr PhysicalDeviceFaultFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFaultFeaturesEXT
ptr PhysicalDeviceFaultFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFaultFeaturesEXT where
zero :: PhysicalDeviceFaultFeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceFaultFeaturesEXT
PhysicalDeviceFaultFeaturesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DeviceFaultAddressInfoEXT = DeviceFaultAddressInfoEXT
{
DeviceFaultAddressInfoEXT -> DeviceFaultAddressTypeEXT
addressType :: DeviceFaultAddressTypeEXT
,
DeviceFaultAddressInfoEXT -> DeviceAddress
reportedAddress :: DeviceAddress
,
DeviceFaultAddressInfoEXT -> DeviceAddress
addressPrecision :: DeviceSize
}
deriving (Typeable, DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool
$c/= :: DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool
== :: DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool
$c== :: DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceFaultAddressInfoEXT)
#endif
deriving instance Show DeviceFaultAddressInfoEXT
instance ToCStruct DeviceFaultAddressInfoEXT where
withCStruct :: forall b.
DeviceFaultAddressInfoEXT
-> (Ptr DeviceFaultAddressInfoEXT -> IO b) -> IO b
withCStruct DeviceFaultAddressInfoEXT
x Ptr DeviceFaultAddressInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultAddressInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultAddressInfoEXT
p DeviceFaultAddressInfoEXT
x (Ptr DeviceFaultAddressInfoEXT -> IO b
f Ptr DeviceFaultAddressInfoEXT
p)
pokeCStruct :: forall b.
Ptr DeviceFaultAddressInfoEXT
-> DeviceFaultAddressInfoEXT -> IO b -> IO b
pokeCStruct Ptr DeviceFaultAddressInfoEXT
p DeviceFaultAddressInfoEXT{DeviceAddress
DeviceFaultAddressTypeEXT
addressPrecision :: DeviceAddress
reportedAddress :: DeviceAddress
addressType :: DeviceFaultAddressTypeEXT
$sel:addressPrecision:DeviceFaultAddressInfoEXT :: DeviceFaultAddressInfoEXT -> DeviceAddress
$sel:reportedAddress:DeviceFaultAddressInfoEXT :: DeviceFaultAddressInfoEXT -> DeviceAddress
$sel:addressType:DeviceFaultAddressInfoEXT :: DeviceFaultAddressInfoEXT -> DeviceFaultAddressTypeEXT
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceFaultAddressTypeEXT)) (DeviceFaultAddressTypeEXT
addressType)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (DeviceAddress
reportedAddress)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceAddress
addressPrecision)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr DeviceFaultAddressInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr DeviceFaultAddressInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceFaultAddressTypeEXT)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceFaultAddressInfoEXT where
peekCStruct :: Ptr DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT
peekCStruct Ptr DeviceFaultAddressInfoEXT
p = do
DeviceFaultAddressTypeEXT
addressType <- forall a. Storable a => Ptr a -> IO a
peek @DeviceFaultAddressTypeEXT ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceFaultAddressTypeEXT))
DeviceAddress
reportedAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress))
DeviceAddress
addressPrecision <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr DeviceFaultAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceFaultAddressTypeEXT
-> DeviceAddress -> DeviceAddress -> DeviceFaultAddressInfoEXT
DeviceFaultAddressInfoEXT
DeviceFaultAddressTypeEXT
addressType DeviceAddress
reportedAddress DeviceAddress
addressPrecision
instance Storable DeviceFaultAddressInfoEXT where
sizeOf :: DeviceFaultAddressInfoEXT -> Int
sizeOf ~DeviceFaultAddressInfoEXT
_ = Int
24
alignment :: DeviceFaultAddressInfoEXT -> Int
alignment ~DeviceFaultAddressInfoEXT
_ = Int
8
peek :: Ptr DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> IO ()
poke Ptr DeviceFaultAddressInfoEXT
ptr DeviceFaultAddressInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultAddressInfoEXT
ptr DeviceFaultAddressInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultAddressInfoEXT where
zero :: DeviceFaultAddressInfoEXT
zero = DeviceFaultAddressTypeEXT
-> DeviceAddress -> DeviceAddress -> DeviceFaultAddressInfoEXT
DeviceFaultAddressInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DeviceFaultVendorInfoEXT = DeviceFaultVendorInfoEXT
{
DeviceFaultVendorInfoEXT -> ByteString
description :: ByteString
,
DeviceFaultVendorInfoEXT -> DeviceAddress
vendorFaultCode :: Word64
,
DeviceFaultVendorInfoEXT -> DeviceAddress
vendorFaultData :: Word64
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceFaultVendorInfoEXT)
#endif
deriving instance Show DeviceFaultVendorInfoEXT
instance ToCStruct DeviceFaultVendorInfoEXT where
withCStruct :: forall b.
DeviceFaultVendorInfoEXT
-> (Ptr DeviceFaultVendorInfoEXT -> IO b) -> IO b
withCStruct DeviceFaultVendorInfoEXT
x Ptr DeviceFaultVendorInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
272 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultVendorInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorInfoEXT
p DeviceFaultVendorInfoEXT
x (Ptr DeviceFaultVendorInfoEXT -> IO b
f Ptr DeviceFaultVendorInfoEXT
p)
pokeCStruct :: forall b.
Ptr DeviceFaultVendorInfoEXT
-> DeviceFaultVendorInfoEXT -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorInfoEXT
p DeviceFaultVendorInfoEXT{DeviceAddress
ByteString
vendorFaultData :: DeviceAddress
vendorFaultCode :: DeviceAddress
description :: ByteString
$sel:vendorFaultData:DeviceFaultVendorInfoEXT :: DeviceFaultVendorInfoEXT -> DeviceAddress
$sel:vendorFaultCode:DeviceFaultVendorInfoEXT :: DeviceFaultVendorInfoEXT -> DeviceAddress
$sel:description:DeviceFaultVendorInfoEXT :: DeviceFaultVendorInfoEXT -> ByteString
..} IO b
f = do
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word64)) (DeviceAddress
vendorFaultCode)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word64)) (DeviceAddress
vendorFaultData)
IO b
f
cStructSize :: Int
cStructSize = Int
272
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr DeviceFaultVendorInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr DeviceFaultVendorInfoEXT
p IO b
f = do
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (forall a. Monoid a => a
mempty)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word64)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word64)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceFaultVendorInfoEXT where
peekCStruct :: Ptr DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT
peekCStruct Ptr DeviceFaultVendorInfoEXT
p = do
ByteString
description <- CString -> IO ByteString
packCString (forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
DeviceAddress
vendorFaultCode <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word64))
DeviceAddress
vendorFaultData <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr DeviceFaultVendorInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word64))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ByteString
-> DeviceAddress -> DeviceAddress -> DeviceFaultVendorInfoEXT
DeviceFaultVendorInfoEXT
ByteString
description DeviceAddress
vendorFaultCode DeviceAddress
vendorFaultData
instance Storable DeviceFaultVendorInfoEXT where
sizeOf :: DeviceFaultVendorInfoEXT -> Int
sizeOf ~DeviceFaultVendorInfoEXT
_ = Int
272
alignment :: DeviceFaultVendorInfoEXT -> Int
alignment ~DeviceFaultVendorInfoEXT
_ = Int
8
peek :: Ptr DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultVendorInfoEXT -> DeviceFaultVendorInfoEXT -> IO ()
poke Ptr DeviceFaultVendorInfoEXT
ptr DeviceFaultVendorInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorInfoEXT
ptr DeviceFaultVendorInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultVendorInfoEXT where
zero :: DeviceFaultVendorInfoEXT
zero = ByteString
-> DeviceAddress -> DeviceAddress -> DeviceFaultVendorInfoEXT
DeviceFaultVendorInfoEXT
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DeviceFaultCountsEXT = DeviceFaultCountsEXT
{
DeviceFaultCountsEXT -> Word32
addressInfoCount :: Word32
,
DeviceFaultCountsEXT -> Word32
vendorInfoCount :: Word32
,
DeviceFaultCountsEXT -> DeviceAddress
vendorBinarySize :: DeviceSize
}
deriving (Typeable, DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool
$c/= :: DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool
== :: DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool
$c== :: DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceFaultCountsEXT)
#endif
deriving instance Show DeviceFaultCountsEXT
instance ToCStruct DeviceFaultCountsEXT where
withCStruct :: forall b.
DeviceFaultCountsEXT
-> (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b) -> IO b
withCStruct DeviceFaultCountsEXT
x ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p DeviceFaultCountsEXT
x (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b
f "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p)
pokeCStruct :: forall b.
("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO b -> IO b
pokeCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p DeviceFaultCountsEXT{Word32
DeviceAddress
vendorBinarySize :: DeviceAddress
vendorInfoCount :: Word32
addressInfoCount :: Word32
$sel:vendorBinarySize:DeviceFaultCountsEXT :: DeviceFaultCountsEXT -> DeviceAddress
$sel:vendorInfoCount:DeviceFaultCountsEXT :: DeviceFaultCountsEXT -> Word32
$sel:addressInfoCount:DeviceFaultCountsEXT :: DeviceFaultCountsEXT -> Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
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 (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
addressInfoCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
vendorInfoCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceAddress
vendorBinarySize)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b -> IO b
pokeZeroCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct DeviceFaultCountsEXT where
peekCStruct :: ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> IO DeviceFaultCountsEXT
peekCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p = do
Word32
addressInfoCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Word32
vendorInfoCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
DeviceAddress
vendorBinarySize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32 -> Word32 -> DeviceAddress -> DeviceFaultCountsEXT
DeviceFaultCountsEXT
Word32
addressInfoCount Word32
vendorInfoCount DeviceAddress
vendorBinarySize
instance Storable DeviceFaultCountsEXT where
sizeOf :: DeviceFaultCountsEXT -> Int
sizeOf ~DeviceFaultCountsEXT
_ = Int
32
alignment :: DeviceFaultCountsEXT -> Int
alignment ~DeviceFaultCountsEXT
_ = Int
8
peek :: ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> IO DeviceFaultCountsEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO ()
poke "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
ptr DeviceFaultCountsEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
ptr DeviceFaultCountsEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultCountsEXT where
zero :: DeviceFaultCountsEXT
zero = Word32 -> Word32 -> DeviceAddress -> DeviceFaultCountsEXT
DeviceFaultCountsEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DeviceFaultInfoEXT = DeviceFaultInfoEXT
{
DeviceFaultInfoEXT -> ByteString
description :: ByteString
,
DeviceFaultInfoEXT -> Ptr DeviceFaultAddressInfoEXT
addressInfos :: Ptr DeviceFaultAddressInfoEXT
,
DeviceFaultInfoEXT -> Ptr DeviceFaultVendorInfoEXT
vendorInfos :: Ptr DeviceFaultVendorInfoEXT
,
DeviceFaultInfoEXT -> Ptr ()
vendorBinaryData :: Ptr ()
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceFaultInfoEXT)
#endif
deriving instance Show DeviceFaultInfoEXT
instance ToCStruct DeviceFaultInfoEXT where
withCStruct :: forall b.
DeviceFaultInfoEXT
-> (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b) -> IO b
withCStruct DeviceFaultInfoEXT
x ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
296 forall a b. (a -> b) -> a -> b
$ \"pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p DeviceFaultInfoEXT
x (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b
f "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p)
pokeCStruct :: forall b.
("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO b -> IO b
pokeCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p DeviceFaultInfoEXT{Ptr ()
Ptr DeviceFaultVendorInfoEXT
Ptr DeviceFaultAddressInfoEXT
ByteString
vendorBinaryData :: Ptr ()
vendorInfos :: Ptr DeviceFaultVendorInfoEXT
addressInfos :: Ptr DeviceFaultAddressInfoEXT
description :: ByteString
$sel:vendorBinaryData:DeviceFaultInfoEXT :: DeviceFaultInfoEXT -> Ptr ()
$sel:vendorInfos:DeviceFaultInfoEXT :: DeviceFaultInfoEXT -> Ptr DeviceFaultVendorInfoEXT
$sel:addressInfos:DeviceFaultInfoEXT :: DeviceFaultInfoEXT -> Ptr DeviceFaultAddressInfoEXT
$sel:description:DeviceFaultInfoEXT :: DeviceFaultInfoEXT -> ByteString
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
272 :: Ptr (Ptr DeviceFaultAddressInfoEXT))) (Ptr DeviceFaultAddressInfoEXT
addressInfos)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (Ptr DeviceFaultVendorInfoEXT))) (Ptr DeviceFaultVendorInfoEXT
vendorInfos)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (Ptr ()))) (Ptr ()
vendorBinaryData)
IO b
f
cStructSize :: Int
cStructSize = Int
296
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b -> IO b
pokeZeroCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (forall a. Monoid a => a
mempty)
IO b
f
instance FromCStruct DeviceFaultInfoEXT where
peekCStruct :: ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO DeviceFaultInfoEXT
peekCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p = do
ByteString
description <- CString -> IO ByteString
packCString (forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
Ptr DeviceFaultAddressInfoEXT
pAddressInfos <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DeviceFaultAddressInfoEXT) (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
272 :: Ptr (Ptr DeviceFaultAddressInfoEXT)))
Ptr DeviceFaultVendorInfoEXT
pVendorInfos <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DeviceFaultVendorInfoEXT) (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (Ptr DeviceFaultVendorInfoEXT)))
Ptr ()
pVendorBinaryData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (Ptr ())))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ByteString
-> Ptr DeviceFaultAddressInfoEXT
-> Ptr DeviceFaultVendorInfoEXT
-> Ptr ()
-> DeviceFaultInfoEXT
DeviceFaultInfoEXT
ByteString
description Ptr DeviceFaultAddressInfoEXT
pAddressInfos Ptr DeviceFaultVendorInfoEXT
pVendorInfos Ptr ()
pVendorBinaryData
instance Storable DeviceFaultInfoEXT where
sizeOf :: DeviceFaultInfoEXT -> Int
sizeOf ~DeviceFaultInfoEXT
_ = Int
296
alignment :: DeviceFaultInfoEXT -> Int
alignment ~DeviceFaultInfoEXT
_ = Int
8
peek :: ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO DeviceFaultInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO ()
poke "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
ptr DeviceFaultInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
ptr DeviceFaultInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultInfoEXT where
zero :: DeviceFaultInfoEXT
zero = ByteString
-> Ptr DeviceFaultAddressInfoEXT
-> Ptr DeviceFaultVendorInfoEXT
-> Ptr ()
-> DeviceFaultInfoEXT
DeviceFaultInfoEXT
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data =
{
:: Word32
,
:: DeviceFaultVendorBinaryHeaderVersionEXT
,
:: Word32
,
:: Word32
,
:: Word32
,
:: ByteString
,
:: Word32
,
:: Word32
,
:: Word32
,
:: Word32
,
:: Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceFaultVendorBinaryHeaderVersionOneEXT)
#endif
deriving instance Show DeviceFaultVendorBinaryHeaderVersionOneEXT
instance ToCStruct DeviceFaultVendorBinaryHeaderVersionOneEXT where
withCStruct :: forall b.
DeviceFaultVendorBinaryHeaderVersionOneEXT
-> (Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b) -> IO b
withCStruct DeviceFaultVendorBinaryHeaderVersionOneEXT
x Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p DeviceFaultVendorBinaryHeaderVersionOneEXT
x (Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b
f Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p)
pokeCStruct :: forall b.
Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p DeviceFaultVendorBinaryHeaderVersionOneEXT{Word32
ByteString
DeviceFaultVendorBinaryHeaderVersionEXT
apiVersion :: Word32
engineVersion :: Word32
engineNameOffset :: Word32
applicationVersion :: Word32
applicationNameOffset :: Word32
pipelineCacheUUID :: ByteString
driverVersion :: Word32
deviceID :: Word32
vendorID :: Word32
headerVersion :: DeviceFaultVendorBinaryHeaderVersionEXT
headerSize :: Word32
$sel:apiVersion:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:engineVersion:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:engineNameOffset:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:applicationVersion:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:applicationNameOffset:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:pipelineCacheUUID:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> ByteString
$sel:driverVersion:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:deviceID:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:vendorID:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
$sel:headerVersion:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
$sel:headerSize:DeviceFaultVendorBinaryHeaderVersionOneEXT :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
headerSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT)) (DeviceFaultVendorBinaryHeaderVersionEXT
headerVersion)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
vendorID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
deviceID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
driverVersion)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
pipelineCacheUUID)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
applicationNameOffset)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
applicationVersion)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
engineNameOffset)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Word32
engineVersion)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Word32
apiVersion)
IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b.
Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b -> IO b
pokeZeroCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray UUID_SIZE Word8))) (forall a. Monoid a => a
mempty)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceFaultVendorBinaryHeaderVersionOneEXT where
peekCStruct :: Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
peekCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p = do
Word32
headerSize <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
DeviceFaultVendorBinaryHeaderVersionEXT
headerVersion <- forall a. Storable a => Ptr a -> IO a
peek @DeviceFaultVendorBinaryHeaderVersionEXT ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT))
Word32
vendorID <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32))
Word32
deviceID <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32))
Word32
driverVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
ByteString
pipelineCacheUUID <- forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> IO ByteString
peekByteStringFromSizedVectorPtr ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray UUID_SIZE Word8)))
Word32
applicationNameOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32))
Word32
applicationVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Word32
engineNameOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
Word32
engineVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
Word32
apiVersion <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> Word32
-> Word32
-> Word32
-> ByteString
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> DeviceFaultVendorBinaryHeaderVersionOneEXT
DeviceFaultVendorBinaryHeaderVersionOneEXT
Word32
headerSize
DeviceFaultVendorBinaryHeaderVersionEXT
headerVersion
Word32
vendorID
Word32
deviceID
Word32
driverVersion
ByteString
pipelineCacheUUID
Word32
applicationNameOffset
Word32
applicationVersion
Word32
engineNameOffset
Word32
engineVersion
Word32
apiVersion
instance Storable DeviceFaultVendorBinaryHeaderVersionOneEXT where
sizeOf :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int
sizeOf ~DeviceFaultVendorBinaryHeaderVersionOneEXT
_ = Int
56
alignment :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int
alignment ~DeviceFaultVendorBinaryHeaderVersionOneEXT
_ = Int
4
peek :: Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO ()
poke Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultVendorBinaryHeaderVersionOneEXT where
zero :: DeviceFaultVendorBinaryHeaderVersionOneEXT
zero = Word32
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> Word32
-> Word32
-> Word32
-> ByteString
-> Word32
-> Word32
-> Word32
-> Word32
-> Word32
-> DeviceFaultVendorBinaryHeaderVersionOneEXT
DeviceFaultVendorBinaryHeaderVersionOneEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype DeviceFaultAddressTypeEXT = DeviceFaultAddressTypeEXT Int32
deriving newtype (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c/= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
== :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c== :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
Eq, Eq DeviceFaultAddressTypeEXT
DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Ordering
DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT
$cmin :: DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT
max :: DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT
$cmax :: DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT
>= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c>= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
> :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c> :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
<= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c<= :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
< :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
$c< :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
compare :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Ordering
$ccompare :: DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Ordering
Ord, Ptr DeviceFaultAddressTypeEXT -> IO DeviceFaultAddressTypeEXT
Ptr DeviceFaultAddressTypeEXT
-> Int -> IO DeviceFaultAddressTypeEXT
Ptr DeviceFaultAddressTypeEXT
-> Int -> DeviceFaultAddressTypeEXT -> IO ()
Ptr DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> IO ()
DeviceFaultAddressTypeEXT -> Int
forall b. Ptr b -> Int -> IO DeviceFaultAddressTypeEXT
forall b. Ptr b -> Int -> DeviceFaultAddressTypeEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> IO ()
$cpoke :: Ptr DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> IO ()
peek :: Ptr DeviceFaultAddressTypeEXT -> IO DeviceFaultAddressTypeEXT
$cpeek :: Ptr DeviceFaultAddressTypeEXT -> IO DeviceFaultAddressTypeEXT
pokeByteOff :: forall b. Ptr b -> Int -> DeviceFaultAddressTypeEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DeviceFaultAddressTypeEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DeviceFaultAddressTypeEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DeviceFaultAddressTypeEXT
pokeElemOff :: Ptr DeviceFaultAddressTypeEXT
-> Int -> DeviceFaultAddressTypeEXT -> IO ()
$cpokeElemOff :: Ptr DeviceFaultAddressTypeEXT
-> Int -> DeviceFaultAddressTypeEXT -> IO ()
peekElemOff :: Ptr DeviceFaultAddressTypeEXT
-> Int -> IO DeviceFaultAddressTypeEXT
$cpeekElemOff :: Ptr DeviceFaultAddressTypeEXT
-> Int -> IO DeviceFaultAddressTypeEXT
alignment :: DeviceFaultAddressTypeEXT -> Int
$calignment :: DeviceFaultAddressTypeEXT -> Int
sizeOf :: DeviceFaultAddressTypeEXT -> Int
$csizeOf :: DeviceFaultAddressTypeEXT -> Int
Storable, DeviceFaultAddressTypeEXT
forall a. a -> Zero a
zero :: DeviceFaultAddressTypeEXT
$czero :: DeviceFaultAddressTypeEXT
Zero)
pattern $bDEVICE_FAULT_ADDRESS_TYPE_NONE_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_NONE_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = DeviceFaultAddressTypeEXT 0
pattern $bDEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = DeviceFaultAddressTypeEXT 1
pattern $bDEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = DeviceFaultAddressTypeEXT 2
pattern $bDEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = DeviceFaultAddressTypeEXT 3
pattern $bDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = DeviceFaultAddressTypeEXT 4
pattern $bDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = DeviceFaultAddressTypeEXT 5
pattern $bDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT :: DeviceFaultAddressTypeEXT
$mDEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT :: forall {r}.
DeviceFaultAddressTypeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = DeviceFaultAddressTypeEXT 6
{-# COMPLETE
DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT
, DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT
, DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT ::
DeviceFaultAddressTypeEXT
#-}
conNameDeviceFaultAddressTypeEXT :: String
conNameDeviceFaultAddressTypeEXT :: String
conNameDeviceFaultAddressTypeEXT = String
"DeviceFaultAddressTypeEXT"
enumPrefixDeviceFaultAddressTypeEXT :: String
enumPrefixDeviceFaultAddressTypeEXT :: String
enumPrefixDeviceFaultAddressTypeEXT = String
"DEVICE_FAULT_ADDRESS_TYPE_"
showTableDeviceFaultAddressTypeEXT :: [(DeviceFaultAddressTypeEXT, String)]
showTableDeviceFaultAddressTypeEXT :: [(DeviceFaultAddressTypeEXT, String)]
showTableDeviceFaultAddressTypeEXT =
[
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT
, String
"NONE_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT
, String
"READ_INVALID_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT
, String
"WRITE_INVALID_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT
, String
"EXECUTE_INVALID_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT
, String
"INSTRUCTION_POINTER_UNKNOWN_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT
, String
"INSTRUCTION_POINTER_INVALID_EXT"
)
,
( DeviceFaultAddressTypeEXT
DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT
, String
"INSTRUCTION_POINTER_FAULT_EXT"
)
]
instance Show DeviceFaultAddressTypeEXT where
showsPrec :: Int -> DeviceFaultAddressTypeEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixDeviceFaultAddressTypeEXT
[(DeviceFaultAddressTypeEXT, String)]
showTableDeviceFaultAddressTypeEXT
String
conNameDeviceFaultAddressTypeEXT
(\(DeviceFaultAddressTypeEXT Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DeviceFaultAddressTypeEXT where
readPrec :: ReadPrec DeviceFaultAddressTypeEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixDeviceFaultAddressTypeEXT
[(DeviceFaultAddressTypeEXT, String)]
showTableDeviceFaultAddressTypeEXT
String
conNameDeviceFaultAddressTypeEXT
Int32 -> DeviceFaultAddressTypeEXT
DeviceFaultAddressTypeEXT
newtype = Int32
deriving newtype (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c/= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
== :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c== :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
Eq, Eq DeviceFaultVendorBinaryHeaderVersionEXT
DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Ordering
DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
$cmin :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
max :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
$cmax :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
>= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c>= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
> :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c> :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
<= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c<= :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
< :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
$c< :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool
compare :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Ordering
$ccompare :: DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Ordering
Ord, Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> IO DeviceFaultVendorBinaryHeaderVersionEXT
Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
DeviceFaultVendorBinaryHeaderVersionEXT -> Int
forall b.
Ptr b -> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
forall b.
Ptr b -> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
$cpoke :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
peek :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> IO DeviceFaultVendorBinaryHeaderVersionEXT
$cpeek :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> IO DeviceFaultVendorBinaryHeaderVersionEXT
pokeByteOff :: forall b.
Ptr b -> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
peekByteOff :: forall b.
Ptr b -> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
pokeElemOff :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
$cpokeElemOff :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
peekElemOff :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
$cpeekElemOff :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT
alignment :: DeviceFaultVendorBinaryHeaderVersionEXT -> Int
$calignment :: DeviceFaultVendorBinaryHeaderVersionEXT -> Int
sizeOf :: DeviceFaultVendorBinaryHeaderVersionEXT -> Int
$csizeOf :: DeviceFaultVendorBinaryHeaderVersionEXT -> Int
Storable, DeviceFaultVendorBinaryHeaderVersionEXT
forall a. a -> Zero a
zero :: DeviceFaultVendorBinaryHeaderVersionEXT
$czero :: DeviceFaultVendorBinaryHeaderVersionEXT
Zero)
pattern = DeviceFaultVendorBinaryHeaderVersionEXT 1
{-# COMPLETE DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT :: DeviceFaultVendorBinaryHeaderVersionEXT #-}
conNameDeviceFaultVendorBinaryHeaderVersionEXT :: String
= String
"DeviceFaultVendorBinaryHeaderVersionEXT"
enumPrefixDeviceFaultVendorBinaryHeaderVersionEXT :: String
= String
"DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT"
showTableDeviceFaultVendorBinaryHeaderVersionEXT :: [(DeviceFaultVendorBinaryHeaderVersionEXT, String)]
=
[
( DeviceFaultVendorBinaryHeaderVersionEXT
DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT
, String
""
)
]
instance Show DeviceFaultVendorBinaryHeaderVersionEXT where
showsPrec :: Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixDeviceFaultVendorBinaryHeaderVersionEXT
[(DeviceFaultVendorBinaryHeaderVersionEXT, String)]
showTableDeviceFaultVendorBinaryHeaderVersionEXT
String
conNameDeviceFaultVendorBinaryHeaderVersionEXT
(\(DeviceFaultVendorBinaryHeaderVersionEXT Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DeviceFaultVendorBinaryHeaderVersionEXT where
readPrec :: ReadPrec DeviceFaultVendorBinaryHeaderVersionEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixDeviceFaultVendorBinaryHeaderVersionEXT
[(DeviceFaultVendorBinaryHeaderVersionEXT, String)]
showTableDeviceFaultVendorBinaryHeaderVersionEXT
String
conNameDeviceFaultVendorBinaryHeaderVersionEXT
Int32 -> DeviceFaultVendorBinaryHeaderVersionEXT
DeviceFaultVendorBinaryHeaderVersionEXT
type EXT_DEVICE_FAULT_SPEC_VERSION = 2
pattern EXT_DEVICE_FAULT_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DEVICE_FAULT_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DEVICE_FAULT_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEVICE_FAULT_SPEC_VERSION = 2
type EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"
pattern EXT_DEVICE_FAULT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DEVICE_FAULT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DEVICE_FAULT_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"