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