{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.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.WGPUTextureBindingLayout 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.WGPUTextureSampleType
import WGPU.Raw.Generated.Enum.WGPUTextureViewDimension
import WGPU.Raw.Generated.Struct.WGPUChainedStruct

data WGPUTextureBindingLayout = WGPUTextureBindingLayout {
  WGPUTextureBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPUTextureBindingLayout -> WGPUTextureSampleType
sampleType :: WGPUTextureSampleType,
  WGPUTextureBindingLayout -> WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension,
  WGPUTextureBindingLayout -> CBool
multisampled :: CBool
}

instance Storable WGPUTextureBindingLayout where
  sizeOf :: WGPUTextureBindingLayout -> Int
sizeOf WGPUTextureBindingLayout
_ = ((Int
24))
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUTextureBindingLayout -> Int
alignment = WGPUTextureBindingLayout -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUTextureBindingLayout -> IO WGPUTextureBindingLayout
peek Ptr WGPUTextureBindingLayout
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUTextureBindingLayout
hsc_ptr -> Ptr WGPUTextureBindingLayout -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUTextureBindingLayout
hsc_ptr Int
0)) Ptr WGPUTextureBindingLayout
ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    sampleType <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    viewDimension <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    multisampled <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    pure $! WGPUTextureBindingLayout{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUTextureBindingLayout -> WGPUTextureBindingLayout -> IO ()
poke Ptr WGPUTextureBindingLayout
ptr WGPUTextureBindingLayout{Ptr WGPUChainedStruct
CBool
WGPUTextureSampleType
WGPUTextureViewDimension
multisampled :: CBool
viewDimension :: WGPUTextureViewDimension
sampleType :: WGPUTextureSampleType
nextInChain :: Ptr WGPUChainedStruct
multisampled :: WGPUTextureBindingLayout -> CBool
viewDimension :: WGPUTextureBindingLayout -> WGPUTextureViewDimension
sampleType :: WGPUTextureBindingLayout -> WGPUTextureSampleType
nextInChain :: WGPUTextureBindingLayout -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPUTextureBindingLayout
hsc_ptr -> Ptr WGPUTextureBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTextureBindingLayout
hsc_ptr Int
0)) Ptr WGPUTextureBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr sampleType
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr viewDimension
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr multisampled
{-# LINE 48 "src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc" #-}
  {-# INLINABLE poke #-}