{-# 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 = IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> (ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
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)
IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ())
-> IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
vkGetDeviceFaultInfoEXTPtr FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDeviceFaultInfoEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- ((("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
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 <- ((("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> IO (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
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 <- IO Result
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO Result)
-> IO Result
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
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))
IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ())
-> IO ()
-> ContT (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
DeviceFaultCountsEXT
pFaultCounts <- IO DeviceFaultCountsEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultCountsEXT
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO DeviceFaultCountsEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultCountsEXT)
-> IO DeviceFaultCountsEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultCountsEXT
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DeviceFaultCountsEXT "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
pPFaultCounts
DeviceFaultInfoEXT
pFaultInfo <- IO DeviceFaultInfoEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultInfoEXT
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO DeviceFaultInfoEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultInfoEXT)
-> IO DeviceFaultInfoEXT
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
DeviceFaultInfoEXT
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DeviceFaultInfoEXT "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
pPFaultInfo
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT))
-> (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
-> ContT
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
IO
(Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
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
(PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool)
-> (PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> Bool)
-> Eq PhysicalDeviceFaultFeaturesEXT
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 = Int -> (Ptr PhysicalDeviceFaultFeaturesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceFaultFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceFaultFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFaultFeaturesEXT
p -> Ptr PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> IO b -> IO b
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
deviceFault))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFaultFeaturesEXT
p Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
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 Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
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 Ptr PhysicalDeviceFaultFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
PhysicalDeviceFaultFeaturesEXT -> IO PhysicalDeviceFaultFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFaultFeaturesEXT
-> IO PhysicalDeviceFaultFeaturesEXT)
-> PhysicalDeviceFaultFeaturesEXT
-> IO PhysicalDeviceFaultFeaturesEXT
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 = Ptr PhysicalDeviceFaultFeaturesEXT
-> IO PhysicalDeviceFaultFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceFaultFeaturesEXT
ptr PhysicalDeviceFaultFeaturesEXT
poked = Ptr PhysicalDeviceFaultFeaturesEXT
-> PhysicalDeviceFaultFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFaultFeaturesEXT
ptr PhysicalDeviceFaultFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFaultFeaturesEXT where
zero :: PhysicalDeviceFaultFeaturesEXT
zero = Bool -> Bool -> PhysicalDeviceFaultFeaturesEXT
PhysicalDeviceFaultFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
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
(DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool)
-> (DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> Bool)
-> Eq DeviceFaultAddressInfoEXT
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 = Int -> (Ptr DeviceFaultAddressInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr DeviceFaultAddressInfoEXT -> IO b) -> IO b)
-> (Ptr DeviceFaultAddressInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultAddressInfoEXT
p -> Ptr DeviceFaultAddressInfoEXT
-> DeviceFaultAddressInfoEXT -> IO b -> IO b
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
Ptr DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT
-> Int -> Ptr DeviceFaultAddressTypeEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceFaultAddressTypeEXT)) (DeviceFaultAddressTypeEXT
addressType)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (DeviceAddress
reportedAddress)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
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
Ptr DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT
-> Int -> Ptr DeviceFaultAddressTypeEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceFaultAddressTypeEXT)) (DeviceFaultAddressTypeEXT
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultAddressInfoEXT
p Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceAddress
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 Ptr DeviceFaultAddressInfoEXT
-> Int -> Ptr DeviceFaultAddressTypeEXT
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 Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
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 Ptr DeviceFaultAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT)
-> DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT
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 = Ptr DeviceFaultAddressInfoEXT -> IO DeviceFaultAddressInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultAddressInfoEXT -> DeviceFaultAddressInfoEXT -> IO ()
poke Ptr DeviceFaultAddressInfoEXT
ptr DeviceFaultAddressInfoEXT
poked = Ptr DeviceFaultAddressInfoEXT
-> DeviceFaultAddressInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultAddressInfoEXT
ptr DeviceFaultAddressInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultAddressInfoEXT where
zero :: DeviceFaultAddressInfoEXT
zero = DeviceFaultAddressTypeEXT
-> DeviceAddress -> DeviceAddress -> DeviceFaultAddressInfoEXT
DeviceFaultAddressInfoEXT
DeviceFaultAddressTypeEXT
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
DeviceAddress
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 = Int -> (Ptr DeviceFaultVendorInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
272 ((Ptr DeviceFaultVendorInfoEXT -> IO b) -> IO b)
-> (Ptr DeviceFaultVendorInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultVendorInfoEXT
p -> Ptr DeviceFaultVendorInfoEXT
-> DeviceFaultVendorInfoEXT -> IO b -> IO b
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
Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word64)) (DeviceAddress
vendorFaultCode)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
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
Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
256 :: Ptr Word64)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word64)) (DeviceAddress
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 (Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr DeviceFaultVendorInfoEXT
p Ptr DeviceFaultVendorInfoEXT
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
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 Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
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 Ptr DeviceFaultVendorInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
264 :: Ptr Word64))
DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT)
-> DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT
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 = Ptr DeviceFaultVendorInfoEXT -> IO DeviceFaultVendorInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultVendorInfoEXT -> DeviceFaultVendorInfoEXT -> IO ()
poke Ptr DeviceFaultVendorInfoEXT
ptr DeviceFaultVendorInfoEXT
poked = Ptr DeviceFaultVendorInfoEXT
-> DeviceFaultVendorInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorInfoEXT
ptr DeviceFaultVendorInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultVendorInfoEXT where
zero :: DeviceFaultVendorInfoEXT
zero = ByteString
-> DeviceAddress -> DeviceAddress -> DeviceFaultVendorInfoEXT
DeviceFaultVendorInfoEXT
ByteString
forall a. Monoid a => a
mempty
DeviceAddress
forall a. Zero a => a
zero
DeviceAddress
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
(DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool)
-> (DeviceFaultCountsEXT -> DeviceFaultCountsEXT -> Bool)
-> Eq DeviceFaultCountsEXT
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 = Int
-> (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b) -> IO b)
-> (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \"pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p -> ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO b -> IO b
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> 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 (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
addressInfoCount)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
vendorInfoCount)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> Int -> Ptr DeviceAddress
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultCounts" ::: Ptr DeviceFaultCountsEXT
p ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (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 ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> Int -> Ptr Word32
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 ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT) -> Int -> Ptr Word32
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 ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
DeviceFaultCountsEXT -> IO DeviceFaultCountsEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceFaultCountsEXT -> IO DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO DeviceFaultCountsEXT
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 = ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> IO DeviceFaultCountsEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO ()
poke "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
ptr DeviceFaultCountsEXT
poked = ("pFaultCounts" ::: Ptr DeviceFaultCountsEXT)
-> DeviceFaultCountsEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultCounts" ::: Ptr DeviceFaultCountsEXT
ptr DeviceFaultCountsEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultCountsEXT where
zero :: DeviceFaultCountsEXT
zero = Word32 -> Word32 -> DeviceAddress -> DeviceFaultCountsEXT
DeviceFaultCountsEXT
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
DeviceAddress
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 = Int -> (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
296 ((("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b) -> IO b)
-> (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \"pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p -> ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO b -> IO b
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
Ptr (Ptr DeviceFaultAddressInfoEXT)
-> Ptr DeviceFaultAddressInfoEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (Ptr DeviceFaultAddressInfoEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
272 :: Ptr (Ptr DeviceFaultAddressInfoEXT))) (Ptr DeviceFaultAddressInfoEXT
addressInfos)
Ptr (Ptr DeviceFaultVendorInfoEXT)
-> Ptr DeviceFaultVendorInfoEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (Ptr DeviceFaultVendorInfoEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
280 :: Ptr (Ptr DeviceFaultVendorInfoEXT))) (Ptr DeviceFaultVendorInfoEXT
vendorInfos)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> Int -> Ptr (Ptr ())
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
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
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 (Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pFaultInfo" ::: Ptr DeviceFaultInfoEXT
p ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
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 ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (Ptr DeviceFaultAddressInfoEXT)
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 ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> Int -> Ptr (Ptr DeviceFaultVendorInfoEXT)
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 ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
288 :: Ptr (Ptr ())))
DeviceFaultInfoEXT -> IO DeviceFaultInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceFaultInfoEXT -> IO DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO DeviceFaultInfoEXT
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 = ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT) -> IO DeviceFaultInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO ()
poke "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
ptr DeviceFaultInfoEXT
poked = ("pFaultInfo" ::: Ptr DeviceFaultInfoEXT)
-> DeviceFaultInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFaultInfo" ::: Ptr DeviceFaultInfoEXT
ptr DeviceFaultInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceFaultInfoEXT where
zero :: DeviceFaultInfoEXT
zero = ByteString
-> Ptr DeviceFaultAddressInfoEXT
-> Ptr DeviceFaultVendorInfoEXT
-> Ptr ()
-> DeviceFaultInfoEXT
DeviceFaultInfoEXT
ByteString
forall a. Monoid a => a
mempty
Ptr DeviceFaultAddressInfoEXT
forall a. Zero a => a
zero
Ptr DeviceFaultVendorInfoEXT
forall a. Zero a => a
zero
Ptr ()
forall a. Zero a => a
zero
data =
{
:: Word32
,
:: DeviceFaultVendorBinaryHeaderVersionEXT
,
:: Word32
,
:: Word32
,
:: Word32
,
:: ByteString
,
:: 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 = Int
-> (Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b) -> IO b)
-> (Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p -> Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b -> IO b
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
engineNameOffset :: Word32
applicationVersion :: Word32
applicationNameOffset :: Word32
pipelineCacheUUID :: ByteString
driverVersion :: Word32
deviceID :: Word32
vendorID :: Word32
headerVersion :: DeviceFaultVendorBinaryHeaderVersionEXT
headerSize :: 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
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
headerSize)
Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr DeviceFaultVendorBinaryHeaderVersionEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT)) (DeviceFaultVendorBinaryHeaderVersionEXT
headerVersion)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
vendorID)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
deviceID)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
driverVersion)
Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
pipelineCacheUUID)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
applicationNameOffset)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
applicationVersion)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
engineNameOffset)
IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b.
Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO b -> IO b
pokeZeroCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p IO b
f = do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr DeviceFaultVendorBinaryHeaderVersionEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr DeviceFaultVendorBinaryHeaderVersionEXT)) (DeviceFaultVendorBinaryHeaderVersionEXT
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
forall a. Monoid a => a
mempty)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> 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 DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> 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 DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr DeviceFaultVendorBinaryHeaderVersionEXT
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
ByteString
pipelineCacheUUID <- Ptr (FixedArray UUID_SIZE Word8) -> IO ByteString
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> IO ByteString
peekByteStringFromSizedVectorPtr ((Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
p Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
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 Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT)
-> DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
forall a b. (a -> b) -> a -> b
$ Word32
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> Word32
-> Word32
-> Word32
-> ByteString
-> Word32
-> Word32
-> Word32
-> DeviceFaultVendorBinaryHeaderVersionOneEXT
DeviceFaultVendorBinaryHeaderVersionOneEXT
Word32
headerSize
DeviceFaultVendorBinaryHeaderVersionEXT
headerVersion
Word32
vendorID
Word32
deviceID
Word32
driverVersion
ByteString
pipelineCacheUUID
Word32
applicationNameOffset
Word32
applicationVersion
Word32
engineNameOffset
instance Storable DeviceFaultVendorBinaryHeaderVersionOneEXT where
sizeOf :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int
sizeOf ~DeviceFaultVendorBinaryHeaderVersionOneEXT
_ = Int
48
alignment :: DeviceFaultVendorBinaryHeaderVersionOneEXT -> Int
alignment ~DeviceFaultVendorBinaryHeaderVersionOneEXT
_ = Int
4
peek :: Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
peek = Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> IO DeviceFaultVendorBinaryHeaderVersionOneEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO ()
poke Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
poked = Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
-> DeviceFaultVendorBinaryHeaderVersionOneEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
ptr DeviceFaultVendorBinaryHeaderVersionOneEXT
poked (() -> IO ()
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
-> DeviceFaultVendorBinaryHeaderVersionOneEXT
DeviceFaultVendorBinaryHeaderVersionOneEXT
Word32
forall a. Zero a => a
zero
DeviceFaultVendorBinaryHeaderVersionEXT
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
ByteString
forall a. Monoid a => a
mempty
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
newtype DeviceFaultAddressTypeEXT = DeviceFaultAddressTypeEXT Int32
deriving newtype (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool
(DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> Eq DeviceFaultAddressTypeEXT
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
Eq DeviceFaultAddressTypeEXT
-> (DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> Ordering)
-> (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> (DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT -> Bool)
-> (DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT)
-> (DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> DeviceFaultAddressTypeEXT)
-> Ord 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
(DeviceFaultAddressTypeEXT -> Int)
-> (DeviceFaultAddressTypeEXT -> Int)
-> (Ptr DeviceFaultAddressTypeEXT
-> Int -> IO DeviceFaultAddressTypeEXT)
-> (Ptr DeviceFaultAddressTypeEXT
-> Int -> DeviceFaultAddressTypeEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO DeviceFaultAddressTypeEXT)
-> (forall b. Ptr b -> Int -> DeviceFaultAddressTypeEXT -> IO ())
-> (Ptr DeviceFaultAddressTypeEXT -> IO DeviceFaultAddressTypeEXT)
-> (Ptr DeviceFaultAddressTypeEXT
-> DeviceFaultAddressTypeEXT -> IO ())
-> Storable DeviceFaultAddressTypeEXT
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
DeviceFaultAddressTypeEXT -> Zero 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 =
String
-> [(DeviceFaultAddressTypeEXT, String)]
-> String
-> (DeviceFaultAddressTypeEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> DeviceFaultAddressTypeEXT
-> ShowS
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)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DeviceFaultAddressTypeEXT where
readPrec :: ReadPrec DeviceFaultAddressTypeEXT
readPrec =
String
-> [(DeviceFaultAddressTypeEXT, String)]
-> String
-> (Int32 -> DeviceFaultAddressTypeEXT)
-> ReadPrec DeviceFaultAddressTypeEXT
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
(DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> Eq DeviceFaultVendorBinaryHeaderVersionEXT
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
Eq DeviceFaultVendorBinaryHeaderVersionEXT
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Ordering)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> Bool)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT)
-> (DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT)
-> Ord 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
(DeviceFaultVendorBinaryHeaderVersionEXT -> Int)
-> (DeviceFaultVendorBinaryHeaderVersionEXT -> Int)
-> (Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT)
-> (Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ())
-> (forall b.
Ptr b -> Int -> IO DeviceFaultVendorBinaryHeaderVersionEXT)
-> (forall b.
Ptr b -> Int -> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ())
-> (Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> IO DeviceFaultVendorBinaryHeaderVersionEXT)
-> (Ptr DeviceFaultVendorBinaryHeaderVersionEXT
-> DeviceFaultVendorBinaryHeaderVersionEXT -> IO ())
-> Storable DeviceFaultVendorBinaryHeaderVersionEXT
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
DeviceFaultVendorBinaryHeaderVersionEXT
-> Zero 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 =
String
-> [(DeviceFaultVendorBinaryHeaderVersionEXT, String)]
-> String
-> (DeviceFaultVendorBinaryHeaderVersionEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> DeviceFaultVendorBinaryHeaderVersionEXT
-> ShowS
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)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DeviceFaultVendorBinaryHeaderVersionEXT where
readPrec :: ReadPrec DeviceFaultVendorBinaryHeaderVersionEXT
readPrec =
String
-> [(DeviceFaultVendorBinaryHeaderVersionEXT, String)]
-> String
-> (Int32 -> DeviceFaultVendorBinaryHeaderVersionEXT)
-> ReadPrec DeviceFaultVendorBinaryHeaderVersionEXT
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 = 1
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 -> (Void# -> r) -> (Void# -> r) -> r
EXT_DEVICE_FAULT_SPEC_VERSION = 1
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 -> (Void# -> r) -> (Void# -> r) -> r
EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"