{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.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.WGPUBindGroupLayoutDescriptor 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.Struct.WGPUChainedStruct
import WGPU.Raw.Generated.Struct.WGPUBindGroupLayoutEntry

data WGPUBindGroupLayoutDescriptor = WGPUBindGroupLayoutDescriptor {
  WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPUBindGroupLayoutDescriptor -> Ptr CChar
label :: Ptr (CChar),
  WGPUBindGroupLayoutDescriptor -> Word32
entryCount :: Word32,
  WGPUBindGroupLayoutDescriptor -> Ptr WGPUBindGroupLayoutEntry
entries :: Ptr (WGPUBindGroupLayoutEntry)
}

instance Storable WGPUBindGroupLayoutDescriptor where
  sizeOf :: WGPUBindGroupLayoutDescriptor -> Int
sizeOf WGPUBindGroupLayoutDescriptor
_ = ((Int
32))
{-# LINE 32 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUBindGroupLayoutDescriptor -> Int
alignment = WGPUBindGroupLayoutDescriptor -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUBindGroupLayoutDescriptor
-> IO WGPUBindGroupLayoutDescriptor
peek Ptr WGPUBindGroupLayoutDescriptor
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr -> Ptr WGPUBindGroupLayoutDescriptor
-> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupLayoutDescriptor
ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    entryCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    entries <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    pure $! WGPUBindGroupLayoutDescriptor{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUBindGroupLayoutDescriptor
-> WGPUBindGroupLayoutDescriptor -> IO ()
poke Ptr WGPUBindGroupLayoutDescriptor
ptr WGPUBindGroupLayoutDescriptor{Word32
Ptr CChar
Ptr WGPUChainedStruct
Ptr WGPUBindGroupLayoutEntry
entries :: Ptr WGPUBindGroupLayoutEntry
entryCount :: Word32
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
entries :: WGPUBindGroupLayoutDescriptor -> Ptr WGPUBindGroupLayoutEntry
entryCount :: WGPUBindGroupLayoutDescriptor -> Word32
label :: WGPUBindGroupLayoutDescriptor -> Ptr CChar
nextInChain :: WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr -> Ptr WGPUBindGroupLayoutDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupLayoutDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr entryCount
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr entries
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
  {-# INLINABLE poke #-}