{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUQuerySetDescriptor where
import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))
import WGPU.Raw.Generated.Enum.WGPUQueryType
import WGPU.Raw.Generated.Enum.WGPUPipelineStatisticName
import WGPU.Raw.Generated.Struct.WGPUChainedStruct
data WGPUQuerySetDescriptor = WGPUQuerySetDescriptor {
WGPUQuerySetDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUQuerySetDescriptor -> Ptr CChar
label :: Ptr (CChar),
WGPUQuerySetDescriptor -> WGPUQueryType
typ :: WGPUQueryType,
WGPUQuerySetDescriptor -> Word32
count :: Word32,
WGPUQuerySetDescriptor -> Ptr WGPUPipelineStatisticName
pipelineStatistics :: Ptr (WGPUPipelineStatisticName),
WGPUQuerySetDescriptor -> Word32
pipelineStatisticsCount :: Word32
}
instance Storable WGPUQuerySetDescriptor where
sizeOf :: WGPUQuerySetDescriptor -> Int
sizeOf WGPUQuerySetDescriptor
_ = ((Int
40))
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUQuerySetDescriptor -> IO WGPUQuerySetDescriptor
peek Ptr WGPUQuerySetDescriptor
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUQuerySetDescriptor
hsc_ptr -> Ptr WGPUQuerySetDescriptor -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUQuerySetDescriptor
hsc_ptr Int
0)) Ptr WGPUQuerySetDescriptor
ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
count <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
pipelineStatistics <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
pipelineStatisticsCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
pure $! WGPUQuerySetDescriptor{..}
poke :: Ptr WGPUQuerySetDescriptor -> WGPUQuerySetDescriptor -> IO ()
poke Ptr WGPUQuerySetDescriptor
ptr WGPUQuerySetDescriptor{Word32
Ptr CChar
Ptr WGPUPipelineStatisticName
Ptr WGPUChainedStruct
WGPUQueryType
pipelineStatisticsCount :: Word32
pipelineStatistics :: Ptr WGPUPipelineStatisticName
count :: Word32
typ :: WGPUQueryType
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
pipelineStatisticsCount :: WGPUQuerySetDescriptor -> Word32
pipelineStatistics :: WGPUQuerySetDescriptor -> Ptr WGPUPipelineStatisticName
count :: WGPUQuerySetDescriptor -> Word32
typ :: WGPUQuerySetDescriptor -> WGPUQueryType
label :: WGPUQuerySetDescriptor -> Ptr CChar
nextInChain :: WGPUQuerySetDescriptor -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUQuerySetDescriptor
hsc_ptr -> Ptr WGPUQuerySetDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUQuerySetDescriptor
hsc_ptr Int
0)) Ptr WGPUQuerySetDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr typ
{-# LINE 48 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr count
{-# LINE 49 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr pipelineStatistics
{-# LINE 50 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr pipelineStatisticsCount