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

data WGPUSamplerBindingLayout = WGPUSamplerBindingLayout {
  WGPUSamplerBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPUSamplerBindingLayout -> WGPUSamplerBindingType
typ :: WGPUSamplerBindingType
}

instance Storable WGPUSamplerBindingLayout where
  sizeOf :: WGPUSamplerBindingLayout -> Int
sizeOf WGPUSamplerBindingLayout
_ = ((Int
16))
{-# LINE 30 "src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUSamplerBindingLayout -> Int
alignment = WGPUSamplerBindingLayout -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUSamplerBindingLayout -> IO WGPUSamplerBindingLayout
peek Ptr WGPUSamplerBindingLayout
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUSamplerBindingLayout
hsc_ptr -> Ptr WGPUSamplerBindingLayout -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUSamplerBindingLayout
hsc_ptr Int
0)) Ptr WGPUSamplerBindingLayout
ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc" #-}
    typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc" #-}
    pure $! WGPUSamplerBindingLayout{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUSamplerBindingLayout -> WGPUSamplerBindingLayout -> IO ()
poke Ptr WGPUSamplerBindingLayout
ptr WGPUSamplerBindingLayout{Ptr WGPUChainedStruct
WGPUSamplerBindingType
typ :: WGPUSamplerBindingType
nextInChain :: Ptr WGPUChainedStruct
typ :: WGPUSamplerBindingLayout -> WGPUSamplerBindingType
nextInChain :: WGPUSamplerBindingLayout -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPUSamplerBindingLayout
hsc_ptr -> Ptr WGPUSamplerBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSamplerBindingLayout
hsc_ptr Int
0)) Ptr WGPUSamplerBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr typ
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc" #-}
  {-# INLINABLE poke #-}