{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUStorageTextureBindingLayout 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.WGPUStorageTextureAccess
import WGPU.Raw.Generated.Enum.WGPUTextureFormat
import WGPU.Raw.Generated.Enum.WGPUTextureViewDimension
import WGPU.Raw.Generated.Struct.WGPUChainedStruct
data WGPUStorageTextureBindingLayout = WGPUStorageTextureBindingLayout {
WGPUStorageTextureBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUStorageTextureBindingLayout -> WGPUStorageTextureAccess
access :: WGPUStorageTextureAccess,
WGPUStorageTextureBindingLayout -> WGPUTextureFormat
format :: WGPUTextureFormat,
WGPUStorageTextureBindingLayout -> WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension
}
instance Storable WGPUStorageTextureBindingLayout where
sizeOf :: WGPUStorageTextureBindingLayout -> Int
sizeOf WGPUStorageTextureBindingLayout
_ = ((Int
24))
{-# LINE 34 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUStorageTextureBindingLayout
-> IO WGPUStorageTextureBindingLayout
peek Ptr WGPUStorageTextureBindingLayout
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUStorageTextureBindingLayout
hsc_ptr -> Ptr WGPUStorageTextureBindingLayout
-> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUStorageTextureBindingLayout
hsc_ptr Int
0)) Ptr WGPUStorageTextureBindingLayout
ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
access <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
viewDimension <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
pure $! WGPUStorageTextureBindingLayout{..}
poke :: Ptr WGPUStorageTextureBindingLayout
-> WGPUStorageTextureBindingLayout -> IO ()
poke Ptr WGPUStorageTextureBindingLayout
ptr WGPUStorageTextureBindingLayout{Ptr WGPUChainedStruct
WGPUStorageTextureAccess
WGPUTextureFormat
WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension
format :: WGPUTextureFormat
access :: WGPUStorageTextureAccess
nextInChain :: Ptr WGPUChainedStruct
viewDimension :: WGPUStorageTextureBindingLayout -> WGPUTextureViewDimension
format :: WGPUStorageTextureBindingLayout -> WGPUTextureFormat
access :: WGPUStorageTextureBindingLayout -> WGPUStorageTextureAccess
nextInChain :: WGPUStorageTextureBindingLayout -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUStorageTextureBindingLayout
hsc_ptr -> Ptr WGPUStorageTextureBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUStorageTextureBindingLayout
hsc_ptr Int
0)) Ptr WGPUStorageTextureBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr access
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr format
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr viewDimension