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

data WGPUProgrammableStageDescriptor = WGPUProgrammableStageDescriptor {
  WGPUProgrammableStageDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
  WGPUProgrammableStageDescriptor -> WGPUShaderModule
shaderModule :: WGPUShaderModule,
  WGPUProgrammableStageDescriptor -> Ptr CChar
entryPoint :: Ptr (CChar)
}

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