{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUBindGroupLayoutDescriptor 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.WGPUBindGroupLayoutEntry
data WGPUBindGroupLayoutDescriptor = WGPUBindGroupLayoutDescriptor {
WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUBindGroupLayoutDescriptor -> Ptr CChar
label :: Ptr (CChar),
WGPUBindGroupLayoutDescriptor -> Word32
entryCount :: Word32,
WGPUBindGroupLayoutDescriptor -> Ptr WGPUBindGroupLayoutEntry
entries :: Ptr (WGPUBindGroupLayoutEntry)
}
instance Storable WGPUBindGroupLayoutDescriptor where
sizeOf :: WGPUBindGroupLayoutDescriptor -> Int
sizeOf WGPUBindGroupLayoutDescriptor
_ = ((Int
32))
{-# LINE 32 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUBindGroupLayoutDescriptor
-> IO WGPUBindGroupLayoutDescriptor
peek Ptr WGPUBindGroupLayoutDescriptor
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr -> Ptr WGPUBindGroupLayoutDescriptor
-> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupLayoutDescriptor
ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
entryCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
entries <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
pure $! WGPUBindGroupLayoutDescriptor{..}
poke :: Ptr WGPUBindGroupLayoutDescriptor
-> WGPUBindGroupLayoutDescriptor -> IO ()
poke Ptr WGPUBindGroupLayoutDescriptor
ptr WGPUBindGroupLayoutDescriptor{Word32
Ptr CChar
Ptr WGPUChainedStruct
Ptr WGPUBindGroupLayoutEntry
entries :: Ptr WGPUBindGroupLayoutEntry
entryCount :: Word32
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
entries :: WGPUBindGroupLayoutDescriptor -> Ptr WGPUBindGroupLayoutEntry
entryCount :: WGPUBindGroupLayoutDescriptor -> Word32
label :: WGPUBindGroupLayoutDescriptor -> Ptr CChar
nextInChain :: WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr -> Ptr WGPUBindGroupLayoutDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr Int
0)) Ptr WGPUBindGroupLayoutDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr entryCount
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr entries