{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- This file was generated by wgpu-raw-hs-codegen on:
--   2021-08-25T10:02:03.522705
-- Using wgpu-native git hash:
--   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)

module WGPU.Raw.Generated.Struct.WGPUExtent3D where



import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))


data WGPUExtent3D = WGPUExtent3D {
  WGPUExtent3D -> Word32
width :: Word32,
  WGPUExtent3D -> Word32
height :: Word32,
  WGPUExtent3D -> Word32
depthOrArrayLayers :: Word32
}

instance Storable WGPUExtent3D where
  sizeOf :: WGPUExtent3D -> Int
sizeOf WGPUExtent3D
_ = ((Int
12))
{-# LINE 30 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUExtent3D -> Int
alignment = WGPUExtent3D -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUExtent3D -> IO WGPUExtent3D
peek Ptr WGPUExtent3D
ptr = do
    Word32
width <- ((\Ptr WGPUExtent3D
hsc_ptr -> Ptr WGPUExtent3D -> Int -> IO Word32
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUExtent3D
hsc_ptr Int
0)) Ptr WGPUExtent3D
ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
    height <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
    depthOrArrayLayers <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
    pure $! WGPUExtent3D{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUExtent3D -> WGPUExtent3D -> IO ()
poke Ptr WGPUExtent3D
ptr WGPUExtent3D{Word32
depthOrArrayLayers :: Word32
height :: Word32
width :: Word32
depthOrArrayLayers :: WGPUExtent3D -> Word32
height :: WGPUExtent3D -> Word32
width :: WGPUExtent3D -> Word32
..} = do
    ((\Ptr WGPUExtent3D
hsc_ptr -> Ptr WGPUExtent3D -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUExtent3D
hsc_ptr Int
0)) Ptr WGPUExtent3D
ptr Word32
width
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr height
{-# LINE 42 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr depthOrArrayLayers
{-# LINE 43 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
  {-# INLINABLE poke #-}