{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
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" #-}
alignment = sizeOf
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 38 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
colorFormatsCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
colorFormats <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
depthStencilFormat <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
sampleCount <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
pure $! WGPURenderBundleEncoderDescriptor{..}
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 46 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 47 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr colorFormatsCount
{-# LINE 48 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr colorFormats
{-# LINE 49 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr depthStencilFormat
{-# LINE 50 "src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr sampleCount