{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUFragmentState 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.WGPUColorTargetState
data WGPUFragmentState = WGPUFragmentState {
WGPUFragmentState -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUFragmentState -> WGPUShaderModule
shaderModule :: WGPUShaderModule,
WGPUFragmentState -> Ptr CChar
entryPoint :: Ptr (CChar),
WGPUFragmentState -> Word32
targetCount :: Word32,
WGPUFragmentState -> Ptr WGPUColorTargetState
targets :: Ptr (WGPUColorTargetState)
}
instance Storable WGPUFragmentState where
sizeOf :: WGPUFragmentState -> Int
sizeOf WGPUFragmentState
_ = ((Int
40))
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUFragmentState -> IO WGPUFragmentState
peek Ptr WGPUFragmentState
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUFragmentState
hsc_ptr -> Ptr WGPUFragmentState -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUFragmentState
hsc_ptr Int
0)) Ptr WGPUFragmentState
ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
shaderModule <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
entryPoint <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
targetCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
targets <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
pure $! WGPUFragmentState{..}
poke :: Ptr WGPUFragmentState -> WGPUFragmentState -> IO ()
poke Ptr WGPUFragmentState
ptr WGPUFragmentState{Word32
Ptr CChar
Ptr WGPUChainedStruct
Ptr WGPUColorTargetState
WGPUShaderModule
targets :: Ptr WGPUColorTargetState
targetCount :: Word32
entryPoint :: Ptr CChar
shaderModule :: WGPUShaderModule
nextInChain :: Ptr WGPUChainedStruct
targets :: WGPUFragmentState -> Ptr WGPUColorTargetState
targetCount :: WGPUFragmentState -> Word32
entryPoint :: WGPUFragmentState -> Ptr CChar
shaderModule :: WGPUFragmentState -> WGPUShaderModule
nextInChain :: WGPUFragmentState -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUFragmentState
hsc_ptr -> Ptr WGPUFragmentState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUFragmentState
hsc_ptr Int
0)) Ptr WGPUFragmentState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr shaderModule
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr entryPoint
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr targetCount
{-# LINE 46 "src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr targets