{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- This file was generated by wgpu-raw-hs-codegen on:
--   2021-08-25T10:02:03.522705
-- Using wgpu-native git hash:
--   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)

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" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUQuerySetDescriptor -> Int
alignment = WGPUQuerySetDescriptor -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  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 40 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    count <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    pipelineStatistics <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    pipelineStatisticsCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    pure $! WGPUQuerySetDescriptor{..}
  {-# INLINABLE peek #-}
  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 49 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 50 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr typ
{-# LINE 51 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr count
{-# LINE 52 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr pipelineStatistics
{-# LINE 53 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr pipelineStatisticsCount
{-# LINE 54 "src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc" #-}
  {-# INLINABLE poke #-}