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

data WGPURenderBundleEncoderDescriptor = WGPURenderBundleEncoderDescriptor {
  WGPURenderBundleEncoderDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPURenderBundleEncoderDescriptor -> Ptr CChar
label :: Ptr (CChar),
  WGPURenderBundleEncoderDescriptor -> Word32
colorFormatsCount :: Word32,
  WGPURenderBundleEncoderDescriptor -> Ptr WGPUTextureFormat
colorFormats :: Ptr (WGPUTextureFormat),
  WGPURenderBundleEncoderDescriptor -> WGPUTextureFormat
depthStencilFormat :: WGPUTextureFormat,
  WGPURenderBundleEncoderDescriptor -> Word32
sampleCount :: Word32
}

instance Storable WGPURenderBundleEncoderDescriptor where
  sizeOf :: WGPURenderBundleEncoderDescriptor -> Int
sizeOf WGPURenderBundleEncoderDescriptor
_ = ((Int
40))
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPURenderBundleEncoderDescriptor -> Int
alignment = WGPURenderBundleEncoderDescriptor -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPURenderBundleEncoderDescriptor
-> IO WGPURenderBundleEncoderDescriptor
peek Ptr WGPURenderBundleEncoderDescriptor
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPURenderBundleEncoderDescriptor
hsc_ptr -> Ptr WGPURenderBundleEncoderDescriptor
-> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPURenderBundleEncoderDescriptor
hsc_ptr Int
0)) Ptr WGPURenderBundleEncoderDescriptor
ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    colorFormatsCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    colorFormats <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    depthStencilFormat <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    sampleCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    pure $! WGPURenderBundleEncoderDescriptor{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPURenderBundleEncoderDescriptor
-> WGPURenderBundleEncoderDescriptor -> IO ()
poke Ptr WGPURenderBundleEncoderDescriptor
ptr WGPURenderBundleEncoderDescriptor{Word32
Ptr CChar
Ptr WGPUTextureFormat
Ptr WGPUChainedStruct
WGPUTextureFormat
sampleCount :: Word32
depthStencilFormat :: WGPUTextureFormat
colorFormats :: Ptr WGPUTextureFormat
colorFormatsCount :: Word32
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
sampleCount :: WGPURenderBundleEncoderDescriptor -> Word32
depthStencilFormat :: WGPURenderBundleEncoderDescriptor -> WGPUTextureFormat
colorFormats :: WGPURenderBundleEncoderDescriptor -> Ptr WGPUTextureFormat
colorFormatsCount :: WGPURenderBundleEncoderDescriptor -> Word32
label :: WGPURenderBundleEncoderDescriptor -> Ptr CChar
nextInChain :: WGPURenderBundleEncoderDescriptor -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPURenderBundleEncoderDescriptor
hsc_ptr -> Ptr WGPURenderBundleEncoderDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURenderBundleEncoderDescriptor
hsc_ptr Int
0)) Ptr WGPURenderBundleEncoderDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 49 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 50 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr colorFormatsCount
{-# LINE 51 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr colorFormats
{-# LINE 52 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr depthStencilFormat
{-# LINE 53 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr sampleCount
{-# LINE 54 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
  {-# INLINABLE poke #-}