{-# LINE 1 "src/Mischief/WGPU/Types/General.hsc" #-}


module Mischief.WGPU.Types.General where 

import Foreign 
import Foreign.C.ConstPtr
import Foreign.C.Types
import Data.Void

import Mischief.WGPU.Callbacks
import Mischief.WGPU.Types.Enums


import Data.Data(Proxy(Proxy))
import Mischief.WGPU.Opaque


data WGPUSurface = WGPUSurface

data WGPUChainedStruct = WGPUChainedStruct
  { WGPUChainedStruct -> Ptr WGPUChainedStruct
next :: Ptr WGPUChainedStruct,
    WGPUChainedStruct -> WGPUSType
sType :: WGPUSType
  }
  

instance Storable WGPUChainedStruct where 
  alignment :: WGPUChainedStruct -> Int
alignment WGPUChainedStruct
_ = Int
8
{-# LINE 28 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (16)
{-# LINE 29 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    next <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 31 "src/Mischief/WGPU/Types/General.hsc" #-}
    sType <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 32 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUChainedStruct {next, sType}
  poke :: Ptr WGPUChainedStruct -> WGPUChainedStruct -> IO ()
poke Ptr WGPUChainedStruct
ptr WGPUChainedStruct {Ptr WGPUChainedStruct
next :: WGPUChainedStruct -> Ptr WGPUChainedStruct
next :: Ptr WGPUChainedStruct
next, WGPUSType
sType :: WGPUChainedStruct -> WGPUSType
sType :: WGPUSType
sType} = do 
    (\Ptr WGPUChainedStruct
hsc_ptr -> Ptr WGPUChainedStruct -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUChainedStruct
hsc_ptr Int
0) Ptr WGPUChainedStruct
ptr Ptr WGPUChainedStruct
next
{-# LINE 35 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr sType  
{-# LINE 36 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUSurfaceSourceXlibWindow = WGPUSurfaceSourceXlibWindow { 
  WGPUSurfaceSourceXlibWindow -> WGPUChainedStruct
chain :: WGPUChainedStruct,
  WGPUSurfaceSourceXlibWindow -> Ptr Void
display :: Ptr Void,
  WGPUSurfaceSourceXlibWindow -> Int64
window :: Int64
}

instance Storable WGPUSurfaceSourceXlibWindow where 
  alignment :: WGPUSurfaceSourceXlibWindow -> Int
alignment WGPUSurfaceSourceXlibWindow
_ = Int
8
{-# LINE 46 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 47 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    chain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 49 "src/Mischief/WGPU/Types/General.hsc" #-}
    display <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 50 "src/Mischief/WGPU/Types/General.hsc" #-}
    window <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 51 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceSourceXlibWindow {chain, display, window}
  poke :: Ptr WGPUSurfaceSourceXlibWindow
-> WGPUSurfaceSourceXlibWindow -> IO ()
poke Ptr WGPUSurfaceSourceXlibWindow
ptr WGPUSurfaceSourceXlibWindow {WGPUChainedStruct
chain :: WGPUSurfaceSourceXlibWindow -> WGPUChainedStruct
chain :: WGPUChainedStruct
chain, Ptr Void
display :: WGPUSurfaceSourceXlibWindow -> Ptr Void
display :: Ptr Void
display, Int64
window :: WGPUSurfaceSourceXlibWindow -> Int64
window :: Int64
window} = do 
    (\Ptr WGPUSurfaceSourceXlibWindow
hsc_ptr -> Ptr WGPUSurfaceSourceXlibWindow
-> Int -> WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceSourceXlibWindow
hsc_ptr Int
0) Ptr WGPUSurfaceSourceXlibWindow
ptr WGPUChainedStruct
chain
{-# LINE 54 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr display
{-# LINE 55 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr window
{-# LINE 56 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUSurfaceSourceWindowsHWND = WGPUSurfaceSourceWindowsHWND {
  WGPUSurfaceSourceWindowsHWND -> WGPUChainedStruct
chain :: WGPUChainedStruct, 
  WGPUSurfaceSourceWindowsHWND -> Ptr Void
hinstance :: Ptr Void,
  WGPUSurfaceSourceWindowsHWND -> Ptr Void
hwnd :: Ptr Void  
}

instance Storable WGPUSurfaceSourceWindowsHWND where
  alignment :: WGPUSurfaceSourceWindowsHWND -> Int
alignment WGPUSurfaceSourceWindowsHWND
_ = Int
8
{-# LINE 65 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 66 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    chain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 68 "src/Mischief/WGPU/Types/General.hsc" #-}
    hinstance <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 69 "src/Mischief/WGPU/Types/General.hsc" #-}
    hwnd <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 70 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceSourceWindowsHWND{chain, hinstance, hwnd}
  poke :: Ptr WGPUSurfaceSourceWindowsHWND
-> WGPUSurfaceSourceWindowsHWND -> IO ()
poke Ptr WGPUSurfaceSourceWindowsHWND
ptr WGPUSurfaceSourceWindowsHWND{WGPUChainedStruct
chain :: WGPUSurfaceSourceWindowsHWND -> WGPUChainedStruct
chain :: WGPUChainedStruct
chain, Ptr Void
hinstance :: WGPUSurfaceSourceWindowsHWND -> Ptr Void
hinstance :: Ptr Void
hinstance, Ptr Void
hwnd :: WGPUSurfaceSourceWindowsHWND -> Ptr Void
hwnd :: Ptr Void
hwnd} = do
    (\Ptr WGPUSurfaceSourceWindowsHWND
hsc_ptr -> Ptr WGPUSurfaceSourceWindowsHWND
-> Int -> WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceSourceWindowsHWND
hsc_ptr Int
0) Ptr WGPUSurfaceSourceWindowsHWND
ptr WGPUChainedStruct
chain
{-# LINE 73 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr hinstance
{-# LINE 74 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr hwnd
{-# LINE 75 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUSurfaceSourceMetalLayer = WGPUSurfaceSourceMetalLayer {
  WGPUSurfaceSourceMetalLayer -> WGPUChainedStruct
chain :: WGPUChainedStruct, 
  WGPUSurfaceSourceMetalLayer -> Ptr Void
layer :: Ptr Void 
}

instance Storable WGPUSurfaceSourceMetalLayer where 
  alignment :: WGPUSurfaceSourceMetalLayer -> Int
alignment WGPUSurfaceSourceMetalLayer
_ = Int
8
{-# LINE 84 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 85 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    chain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 87 "src/Mischief/WGPU/Types/General.hsc" #-}
    layer <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 88 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceSourceMetalLayer {chain, layer} 
  poke :: Ptr WGPUSurfaceSourceMetalLayer
-> WGPUSurfaceSourceMetalLayer -> IO ()
poke Ptr WGPUSurfaceSourceMetalLayer
ptr WGPUSurfaceSourceMetalLayer {WGPUChainedStruct
chain :: WGPUSurfaceSourceMetalLayer -> WGPUChainedStruct
chain :: WGPUChainedStruct
chain, Ptr Void
layer :: WGPUSurfaceSourceMetalLayer -> Ptr Void
layer :: Ptr Void
layer} = do 
    (\Ptr WGPUSurfaceSourceMetalLayer
hsc_ptr -> Ptr WGPUSurfaceSourceMetalLayer
-> Int -> WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceSourceMetalLayer
hsc_ptr Int
0) Ptr WGPUSurfaceSourceMetalLayer
ptr WGPUChainedStruct
chain 
{-# LINE 91 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr layer
{-# LINE 92 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUStringView = WGPUStringView {
  WGPUStringView -> ConstPtr CChar
_data :: ConstPtr CChar, 
  WGPUStringView -> Int
length :: Int 
}

instance Storable WGPUStringView where 
  alignment :: WGPUStringView -> Int
alignment WGPUStringView
_ = Int
8
{-# LINE 100 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (16)
{-# LINE 101 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    _data <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 103 "src/Mischief/WGPU/Types/General.hsc" #-}
    length <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 104 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUStringView {_data, length} 
  poke :: Ptr WGPUStringView -> WGPUStringView -> IO ()
poke Ptr WGPUStringView
ptr WGPUStringView {ConstPtr CChar
_data :: WGPUStringView -> ConstPtr CChar
_data :: ConstPtr CChar
_data, Int
length :: WGPUStringView -> Int
length :: Int
length} = do 
    (\Ptr WGPUStringView
hsc_ptr -> Ptr WGPUStringView -> Int -> ConstPtr CChar -> IO ()
forall b. Ptr b -> Int -> ConstPtr CChar -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUStringView
hsc_ptr Int
0) Ptr WGPUStringView
ptr ConstPtr CChar
_data
{-# LINE 107 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr length
{-# LINE 108 "src/Mischief/WGPU/Types/General.hsc" #-}
  
data WGPUSurfaceDescriptor = WGPUSurfaceDescriptor {
  WGPUSurfaceDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct,
  WGPUSurfaceDescriptor -> WGPUStringView
label :: WGPUStringView 
}

instance Storable WGPUSurfaceDescriptor where 
  alignment :: WGPUSurfaceDescriptor -> Int
alignment WGPUSurfaceDescriptor
_ = Int
8
{-# LINE 116 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 117 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 119 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 120 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceDescriptor {nextInChain, label}
  poke :: Ptr WGPUSurfaceDescriptor -> WGPUSurfaceDescriptor -> IO ()
poke Ptr WGPUSurfaceDescriptor
ptr WGPUSurfaceDescriptor {Ptr WGPUChainedStruct
nextInChain :: WGPUSurfaceDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUSurfaceDescriptor -> WGPUStringView
label :: WGPUStringView
label} = do
    (\Ptr WGPUSurfaceDescriptor
hsc_ptr -> Ptr WGPUSurfaceDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceDescriptor
hsc_ptr Int
0) Ptr WGPUSurfaceDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 123 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label 
{-# LINE 124 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPURequestAdapterOptions = WGPURequestAdapterOptions {
  WGPURequestAdapterOptions -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPURequestAdapterOptions -> WGPUFeatureLevel
featureLevel :: WGPUFeatureLevel, 
  WGPURequestAdapterOptions -> WGPUPowerPreference
powerPreference :: WGPUPowerPreference, 
  WGPURequestAdapterOptions -> WGPUBool
forceFallbackAdapter :: WGPUBool,
  WGPURequestAdapterOptions -> WGPUBackendType
backendType :: WGPUBackendType, 
  WGPURequestAdapterOptions -> Ptr WGPUSurface
compatibleSurface :: Ptr WGPUSurface 
}

instance Storable WGPURequestAdapterOptions where 
  alignment :: WGPURequestAdapterOptions -> Int
alignment WGPURequestAdapterOptions
_ = Int
8
{-# LINE 137 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 138 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 140 "src/Mischief/WGPU/Types/General.hsc" #-}
    featureLevel <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 141 "src/Mischief/WGPU/Types/General.hsc" #-}
    powerPreference <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr 
{-# LINE 142 "src/Mischief/WGPU/Types/General.hsc" #-}
    forceFallbackAdapter <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 143 "src/Mischief/WGPU/Types/General.hsc" #-}
    backendType <- (\hsc_ptr -> peekByteOff hsc_ptr 20) ptr 
{-# LINE 144 "src/Mischief/WGPU/Types/General.hsc" #-}
    compatibleSurface <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 145 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURequestAdapterOptions {nextInChain, featureLevel, powerPreference, forceFallbackAdapter, backendType, compatibleSurface}
  poke :: Ptr WGPURequestAdapterOptions -> WGPURequestAdapterOptions -> IO ()
poke Ptr WGPURequestAdapterOptions
ptr WGPURequestAdapterOptions {Ptr WGPUChainedStruct
nextInChain :: WGPURequestAdapterOptions -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUFeatureLevel
featureLevel :: WGPURequestAdapterOptions -> WGPUFeatureLevel
featureLevel :: WGPUFeatureLevel
featureLevel, WGPUPowerPreference
powerPreference :: WGPURequestAdapterOptions -> WGPUPowerPreference
powerPreference :: WGPUPowerPreference
powerPreference, WGPUBool
forceFallbackAdapter :: WGPURequestAdapterOptions -> WGPUBool
forceFallbackAdapter :: WGPUBool
forceFallbackAdapter, WGPUBackendType
backendType :: WGPURequestAdapterOptions -> WGPUBackendType
backendType :: WGPUBackendType
backendType, Ptr WGPUSurface
compatibleSurface :: WGPURequestAdapterOptions -> Ptr WGPUSurface
compatibleSurface :: Ptr WGPUSurface
compatibleSurface} = do
    (\Ptr WGPURequestAdapterOptions
hsc_ptr -> Ptr WGPURequestAdapterOptions
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURequestAdapterOptions
hsc_ptr Int
0) Ptr WGPURequestAdapterOptions
ptr Ptr WGPUChainedStruct
nextInChain 
{-# LINE 148 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr featureLevel 
{-# LINE 149 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr powerPreference 
{-# LINE 150 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr forceFallbackAdapter 
{-# LINE 151 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 20) ptr backendType 
{-# LINE 152 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr compatibleSurface
{-# LINE 153 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPURequestCallbackInfo f = WGPURequestCallbackInfo {
  forall f. WGPURequestCallbackInfo f -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  forall f. WGPURequestCallbackInfo f -> WGPUCallbackMode
mode :: WGPUCallbackMode, 
  forall f. WGPURequestCallbackInfo f -> FunPtr f
callback :: FunPtr f, 
  forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata1 :: Ptr (), 
  forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata2 :: Ptr ()
}

instance Storable (WGPURequestCallbackInfo WGPURequestAdapterCallback) where 
  alignment :: WGPURequestCallbackInfo WGPURequestAdapterCallback -> Int
alignment WGPURequestCallbackInfo WGPURequestAdapterCallback
_ = Int
8
{-# LINE 165 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (40)
{-# LINE 166 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 168 "src/Mischief/WGPU/Types/General.hsc" #-}
    mode <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 169 "src/Mischief/WGPU/Types/General.hsc" #-}
    callback <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 170 "src/Mischief/WGPU/Types/General.hsc" #-}
    userdata1 <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 171 "src/Mischief/WGPU/Types/General.hsc" #-}
    userdata2 <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr 
{-# LINE 172 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURequestCallbackInfo {nextInChain, mode, callback, userdata1, userdata2}
  poke :: Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
-> WGPURequestCallbackInfo WGPURequestAdapterCallback -> IO ()
poke Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
ptr WGPURequestCallbackInfo {Ptr WGPUChainedStruct
nextInChain :: forall f. WGPURequestCallbackInfo f -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUCallbackMode
mode :: forall f. WGPURequestCallbackInfo f -> WGPUCallbackMode
mode :: WGPUCallbackMode
mode, FunPtr WGPURequestAdapterCallback
callback :: forall f. WGPURequestCallbackInfo f -> FunPtr f
callback :: FunPtr WGPURequestAdapterCallback
callback, Ptr ()
userdata1 :: forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata1 :: Ptr ()
userdata1, Ptr ()
userdata2 :: forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata2 :: Ptr ()
userdata2} = do 
    (\Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
hsc_ptr -> Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
hsc_ptr Int
0) Ptr (WGPURequestCallbackInfo WGPURequestAdapterCallback)
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 175 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr mode  
{-# LINE 176 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr callback  
{-# LINE 177 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr userdata1  
{-# LINE 178 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr userdata2  
{-# LINE 179 "src/Mischief/WGPU/Types/General.hsc" #-}


instance Storable (WGPURequestCallbackInfo WGPURequestDeviceCallback) where 
  alignment :: WGPURequestCallbackInfo WGPURequestDeviceCallback -> Int
alignment WGPURequestCallbackInfo WGPURequestDeviceCallback
_ = Int
8
{-# LINE 183 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (40)
{-# LINE 184 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 186 "src/Mischief/WGPU/Types/General.hsc" #-}
    mode <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 187 "src/Mischief/WGPU/Types/General.hsc" #-}
    callback <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 188 "src/Mischief/WGPU/Types/General.hsc" #-}
    userdata1 <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 189 "src/Mischief/WGPU/Types/General.hsc" #-}
    userdata2 <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr 
{-# LINE 190 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURequestCallbackInfo {nextInChain, mode, callback, userdata1, userdata2}
  poke :: Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
-> WGPURequestCallbackInfo WGPURequestDeviceCallback -> IO ()
poke Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
ptr WGPURequestCallbackInfo {Ptr WGPUChainedStruct
nextInChain :: forall f. WGPURequestCallbackInfo f -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUCallbackMode
mode :: forall f. WGPURequestCallbackInfo f -> WGPUCallbackMode
mode :: WGPUCallbackMode
mode, FunPtr WGPURequestDeviceCallback
callback :: forall f. WGPURequestCallbackInfo f -> FunPtr f
callback :: FunPtr WGPURequestDeviceCallback
callback, Ptr ()
userdata1 :: forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata1 :: Ptr ()
userdata1, Ptr ()
userdata2 :: forall f. WGPURequestCallbackInfo f -> Ptr ()
userdata2 :: Ptr ()
userdata2} = do 
    (\Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
hsc_ptr -> Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
hsc_ptr Int
0) Ptr (WGPURequestCallbackInfo WGPURequestDeviceCallback)
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 193 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr mode  
{-# LINE 194 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr callback  
{-# LINE 195 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr userdata1  
{-# LINE 196 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr userdata2  
{-# LINE 197 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUShaderSourceWGSL = WGPUShaderSourceWGSL {
  WGPUShaderSourceWGSL -> WGPUChainedStruct
chain :: WGPUChainedStruct, 
  WGPUShaderSourceWGSL -> WGPUStringView
code :: WGPUStringView
}

instance Storable WGPUShaderSourceWGSL where 
  alignment :: WGPUShaderSourceWGSL -> Int
alignment WGPUShaderSourceWGSL
_ = Int
8
{-# LINE 205 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 206 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    chain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 208 "src/Mischief/WGPU/Types/General.hsc" #-}
    code <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 209 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUShaderSourceWGSL {chain, code}
  poke :: Ptr WGPUShaderSourceWGSL -> WGPUShaderSourceWGSL -> IO ()
poke Ptr WGPUShaderSourceWGSL
ptr WGPUShaderSourceWGSL {WGPUChainedStruct
chain :: WGPUShaderSourceWGSL -> WGPUChainedStruct
chain :: WGPUChainedStruct
chain, WGPUStringView
code :: WGPUShaderSourceWGSL -> WGPUStringView
code :: WGPUStringView
code} = do 
    (\Ptr WGPUShaderSourceWGSL
hsc_ptr -> Ptr WGPUShaderSourceWGSL -> Int -> WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUShaderSourceWGSL
hsc_ptr Int
0) Ptr WGPUShaderSourceWGSL
ptr WGPUChainedStruct
chain 
{-# LINE 212 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr code 
{-# LINE 213 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUShaderModuleDescriptor = WGPUShaderModuleDescriptor {
  WGPUShaderModuleDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUShaderModuleDescriptor -> WGPUStringView
label :: WGPUStringView
}

instance Storable WGPUShaderModuleDescriptor where 
  alignment :: WGPUShaderModuleDescriptor -> Int
alignment WGPUShaderModuleDescriptor
_ = Int
8
{-# LINE 221 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 222 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 224 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 225 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUShaderModuleDescriptor {nextInChain, label}
  poke :: Ptr WGPUShaderModuleDescriptor
-> WGPUShaderModuleDescriptor -> IO ()
poke Ptr WGPUShaderModuleDescriptor
ptr WGPUShaderModuleDescriptor {Ptr WGPUChainedStruct
nextInChain :: WGPUShaderModuleDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUShaderModuleDescriptor -> WGPUStringView
label :: WGPUStringView
label} = do 
    (\Ptr WGPUShaderModuleDescriptor
hsc_ptr -> Ptr WGPUShaderModuleDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUShaderModuleDescriptor
hsc_ptr Int
0) Ptr WGPUShaderModuleDescriptor
ptr Ptr WGPUChainedStruct
nextInChain 
{-# LINE 228 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label 
{-# LINE 229 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUSurfaceCapabilities = WGPUSurfaceCapabilities {
  WGPUSurfaceCapabilities -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUSurfaceCapabilities -> WGPUTextureUsage
usages :: WGPUTextureUsage, 
  WGPUSurfaceCapabilities -> Int
formatCount :: Int,
  WGPUSurfaceCapabilities -> ConstPtr WGPUTextureFormat
formats :: ConstPtr WGPUTextureFormat, 
  WGPUSurfaceCapabilities -> Int
presentModeCount :: Int, 
  WGPUSurfaceCapabilities -> ConstPtr WGPUPresentMode
presentModes :: ConstPtr WGPUPresentMode, 
  WGPUSurfaceCapabilities -> Int
alphaModeCount :: Int, 
  WGPUSurfaceCapabilities -> ConstPtr WGPUCompositeAlphaMode
alphaModes :: ConstPtr WGPUCompositeAlphaMode
}

instance Storable WGPUSurfaceCapabilities where 
  alignment :: WGPUSurfaceCapabilities -> Int
alignment WGPUSurfaceCapabilities
_ = Int
8
{-# LINE 243 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 244 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 246 "src/Mischief/WGPU/Types/General.hsc" #-}
    usages <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 247 "src/Mischief/WGPU/Types/General.hsc" #-}
    formatCount <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 248 "src/Mischief/WGPU/Types/General.hsc" #-}
    formats <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 249 "src/Mischief/WGPU/Types/General.hsc" #-}
    presentModeCount <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr 
{-# LINE 250 "src/Mischief/WGPU/Types/General.hsc" #-}
    alphaModeCount <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr 
{-# LINE 251 "src/Mischief/WGPU/Types/General.hsc" #-}
    alphaModes <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr 
{-# LINE 252 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceCapabilities {nextInChain, usages, formatCount, formats, presentModeCount, alphaModeCount, alphaModes}
  poke :: Ptr WGPUSurfaceCapabilities -> WGPUSurfaceCapabilities -> IO ()
poke Ptr WGPUSurfaceCapabilities
ptr WGPUSurfaceCapabilities {Ptr WGPUChainedStruct
nextInChain :: WGPUSurfaceCapabilities -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUTextureUsage
usages :: WGPUSurfaceCapabilities -> WGPUTextureUsage
usages :: WGPUTextureUsage
usages, Int
formatCount :: WGPUSurfaceCapabilities -> Int
formatCount :: Int
formatCount, ConstPtr WGPUTextureFormat
formats :: WGPUSurfaceCapabilities -> ConstPtr WGPUTextureFormat
formats :: ConstPtr WGPUTextureFormat
formats, Int
presentModeCount :: WGPUSurfaceCapabilities -> Int
presentModeCount :: Int
presentModeCount, Int
alphaModeCount :: WGPUSurfaceCapabilities -> Int
alphaModeCount :: Int
alphaModeCount, ConstPtr WGPUCompositeAlphaMode
alphaModes :: WGPUSurfaceCapabilities -> ConstPtr WGPUCompositeAlphaMode
alphaModes :: ConstPtr WGPUCompositeAlphaMode
alphaModes} = do 
    (\Ptr WGPUSurfaceCapabilities
hsc_ptr -> Ptr WGPUSurfaceCapabilities
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceCapabilities
hsc_ptr Int
0) Ptr WGPUSurfaceCapabilities
ptr Ptr WGPUChainedStruct
nextInChain 
{-# LINE 255 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr usages 
{-# LINE 256 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr formatCount 
{-# LINE 257 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr formats 
{-# LINE 258 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr presentModeCount
{-# LINE 259 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr alphaModeCount
{-# LINE 260 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr alphaModes
{-# LINE 261 "src/Mischief/WGPU/Types/General.hsc" #-}
  
data WGPUMultisampleState = WGPUMultisampleState {
  WGPUMultisampleState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUMultisampleState -> Word32
count :: Word32, 
  WGPUMultisampleState -> Word32
mask :: Word32, 
  WGPUMultisampleState -> WGPUBool
alphaToCoverageEnabled :: WGPUBool 
}

instance Storable WGPUMultisampleState where 
  alignment :: WGPUMultisampleState -> Int
alignment WGPUMultisampleState
_ = Int
8
{-# LINE 271 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 272 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 274 "src/Mischief/WGPU/Types/General.hsc" #-}
    count <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 275 "src/Mischief/WGPU/Types/General.hsc" #-}
    mask <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr 
{-# LINE 276 "src/Mischief/WGPU/Types/General.hsc" #-}
    alphaToCoverageEnabled <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 277 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUMultisampleState {nextInChain, count, mask, alphaToCoverageEnabled}
  poke :: Ptr WGPUMultisampleState -> WGPUMultisampleState -> IO ()
poke Ptr WGPUMultisampleState
ptr WGPUMultisampleState {Ptr WGPUChainedStruct
nextInChain :: WGPUMultisampleState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Word32
count :: WGPUMultisampleState -> Word32
count :: Word32
count, Word32
mask :: WGPUMultisampleState -> Word32
mask :: Word32
mask, WGPUBool
alphaToCoverageEnabled :: WGPUMultisampleState -> WGPUBool
alphaToCoverageEnabled :: WGPUBool
alphaToCoverageEnabled} = do 
    (\Ptr WGPUMultisampleState
hsc_ptr -> Ptr WGPUMultisampleState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUMultisampleState
hsc_ptr Int
0) Ptr WGPUMultisampleState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 280 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr count
{-# LINE 281 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr mask
{-# LINE 282 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr alphaToCoverageEnabled
{-# LINE 283 "src/Mischief/WGPU/Types/General.hsc" #-}
    
data WGPUPrimitiveState = WGPUPrimitiveState {
  WGPUPrimitiveState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUPrimitiveState -> WGPUPrimitiveTopology
topology :: WGPUPrimitiveTopology, 
  WGPUPrimitiveState -> WGPUIndexFormat
stripIndexFormat :: WGPUIndexFormat, 
  WGPUPrimitiveState -> WGPUFrontFace
frontFace :: WGPUFrontFace, 
  WGPUPrimitiveState -> WGPUCullMode
cullMode :: WGPUCullMode, 
  WGPUPrimitiveState -> WGPUBool
unclippedDepth :: WGPUBool 
}

instance Storable WGPUPrimitiveState where
  alignment :: WGPUPrimitiveState -> Int
alignment WGPUPrimitiveState
_ = Int
8
{-# LINE 295 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 296 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 298 "src/Mischief/WGPU/Types/General.hsc" #-}
    topology <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 299 "src/Mischief/WGPU/Types/General.hsc" #-}
    stripIndexFormat <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 300 "src/Mischief/WGPU/Types/General.hsc" #-}
    frontFace <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 301 "src/Mischief/WGPU/Types/General.hsc" #-}
    cullMode <- (\hsc_ptr -> peekByteOff hsc_ptr 20) ptr
{-# LINE 302 "src/Mischief/WGPU/Types/General.hsc" #-}
    unclippedDepth <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 303 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUPrimitiveState{nextInChain, topology, stripIndexFormat, frontFace, cullMode, unclippedDepth}
  poke :: Ptr WGPUPrimitiveState -> WGPUPrimitiveState -> IO ()
poke Ptr WGPUPrimitiveState
ptr WGPUPrimitiveState{Ptr WGPUChainedStruct
nextInChain :: WGPUPrimitiveState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUPrimitiveTopology
topology :: WGPUPrimitiveState -> WGPUPrimitiveTopology
topology :: WGPUPrimitiveTopology
topology, WGPUIndexFormat
stripIndexFormat :: WGPUPrimitiveState -> WGPUIndexFormat
stripIndexFormat :: WGPUIndexFormat
stripIndexFormat, WGPUFrontFace
frontFace :: WGPUPrimitiveState -> WGPUFrontFace
frontFace :: WGPUFrontFace
frontFace, WGPUCullMode
cullMode :: WGPUPrimitiveState -> WGPUCullMode
cullMode :: WGPUCullMode
cullMode, WGPUBool
unclippedDepth :: WGPUPrimitiveState -> WGPUBool
unclippedDepth :: WGPUBool
unclippedDepth} = do
    (\Ptr WGPUPrimitiveState
hsc_ptr -> Ptr WGPUPrimitiveState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUPrimitiveState
hsc_ptr Int
0) Ptr WGPUPrimitiveState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 306 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr topology
{-# LINE 307 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr stripIndexFormat
{-# LINE 308 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr frontFace
{-# LINE 309 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 20) ptr cullMode
{-# LINE 310 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr unclippedDepth
{-# LINE 311 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUConstantEntry = WGPUConstantEntry {
  WGPUConstantEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUConstantEntry -> WGPUStringView
key :: WGPUStringView, 
  WGPUConstantEntry -> CDouble
value :: CDouble
}

instance Storable WGPUConstantEntry where 
  alignment :: WGPUConstantEntry -> Int
alignment WGPUConstantEntry
_ = Int
8
{-# LINE 320 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 321 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 323 "src/Mischief/WGPU/Types/General.hsc" #-}
    key <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 324 "src/Mischief/WGPU/Types/General.hsc" #-}
    value <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr 
{-# LINE 325 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUConstantEntry {nextInChain, key, value}
  poke :: Ptr WGPUConstantEntry -> WGPUConstantEntry -> IO ()
poke Ptr WGPUConstantEntry
ptr WGPUConstantEntry {Ptr WGPUChainedStruct
nextInChain :: WGPUConstantEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
key :: WGPUConstantEntry -> WGPUStringView
key :: WGPUStringView
key, CDouble
value :: WGPUConstantEntry -> CDouble
value :: CDouble
value} = do 
    (\Ptr WGPUConstantEntry
hsc_ptr -> Ptr WGPUConstantEntry -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUConstantEntry
hsc_ptr Int
0) Ptr WGPUConstantEntry
ptr Ptr WGPUChainedStruct
nextInChain 
{-# LINE 328 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr key 
{-# LINE 329 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr value
{-# LINE 330 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUVertexAttribute = WGPUVertexAttribute {
  WGPUVertexAttribute -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct,
  WGPUVertexAttribute -> WGPUVertexFormat
format :: WGPUVertexFormat, 
  WGPUVertexAttribute -> Word64
offset :: Word64, 
  WGPUVertexAttribute -> Word32
shaderLocation :: Word32
}

instance Storable WGPUVertexAttribute where
  alignment :: WGPUVertexAttribute -> Int
alignment WGPUVertexAttribute
_ = Int
8
{-# LINE 340 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 341 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 343 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 344 "src/Mischief/WGPU/Types/General.hsc" #-}
    offset <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 345 "src/Mischief/WGPU/Types/General.hsc" #-}
    shaderLocation <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 346 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUVertexAttribute{nextInChain, format, offset, shaderLocation}
  poke :: Ptr WGPUVertexAttribute -> WGPUVertexAttribute -> IO ()
poke Ptr WGPUVertexAttribute
ptr WGPUVertexAttribute{Ptr WGPUChainedStruct
nextInChain :: WGPUVertexAttribute -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUVertexFormat
format :: WGPUVertexAttribute -> WGPUVertexFormat
format :: WGPUVertexFormat
format, Word64
offset :: WGPUVertexAttribute -> Word64
offset :: Word64
offset, Word32
shaderLocation :: WGPUVertexAttribute -> Word32
shaderLocation :: Word32
shaderLocation} = do
    (\Ptr WGPUVertexAttribute
hsc_ptr -> Ptr WGPUVertexAttribute -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUVertexAttribute
hsc_ptr Int
0) Ptr WGPUVertexAttribute
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 349 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr format
{-# LINE 350 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr offset
{-# LINE 351 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr shaderLocation
{-# LINE 352 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUVertexBufferLayout = WGPUVertexBufferLayout {
  WGPUVertexBufferLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUVertexBufferLayout -> WGPUVertexStepMode
stepMode :: WGPUVertexStepMode, 
  WGPUVertexBufferLayout -> Word64
arrayStride :: Word64, 
  WGPUVertexBufferLayout -> Int
attributeCount :: Int,
  WGPUVertexBufferLayout -> ConstPtr WGPUVertexAttribute
attributes :: ConstPtr WGPUVertexAttribute
}

instance Storable WGPUVertexBufferLayout where
  alignment :: WGPUVertexBufferLayout -> Int
alignment WGPUVertexBufferLayout
_ = Int
8
{-# LINE 364 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (40)
{-# LINE 365 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 367 "src/Mischief/WGPU/Types/General.hsc" #-}
    stepMode <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 368 "src/Mischief/WGPU/Types/General.hsc" #-}
    arrayStride <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 369 "src/Mischief/WGPU/Types/General.hsc" #-}
    attributeCount <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 370 "src/Mischief/WGPU/Types/General.hsc" #-}
    attributes <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 371 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUVertexBufferLayout{nextInChain, stepMode, arrayStride, attributeCount, attributes}
  poke :: Ptr WGPUVertexBufferLayout -> WGPUVertexBufferLayout -> IO ()
poke Ptr WGPUVertexBufferLayout
ptr WGPUVertexBufferLayout{Ptr WGPUChainedStruct
nextInChain :: WGPUVertexBufferLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUVertexStepMode
stepMode :: WGPUVertexBufferLayout -> WGPUVertexStepMode
stepMode :: WGPUVertexStepMode
stepMode, Word64
arrayStride :: WGPUVertexBufferLayout -> Word64
arrayStride :: Word64
arrayStride, Int
attributeCount :: WGPUVertexBufferLayout -> Int
attributeCount :: Int
attributeCount, ConstPtr WGPUVertexAttribute
attributes :: WGPUVertexBufferLayout -> ConstPtr WGPUVertexAttribute
attributes :: ConstPtr WGPUVertexAttribute
attributes} = do
    (\Ptr WGPUVertexBufferLayout
hsc_ptr -> Ptr WGPUVertexBufferLayout -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUVertexBufferLayout
hsc_ptr Int
0) Ptr WGPUVertexBufferLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 374 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr stepMode
{-# LINE 375 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr arrayStride
{-# LINE 376 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr attributeCount
{-# LINE 377 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr attributes
{-# LINE 378 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUVertexState = WGPUVertexState {
  WGPUVertexState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUVertexState -> Ptr WGPUShaderModule
_module :: Ptr WGPUShaderModule, 
  WGPUVertexState -> WGPUStringView
entryPoint :: WGPUStringView, 
  WGPUVertexState -> Int
constantCount :: Int, 
  WGPUVertexState -> ConstPtr WGPUConstantEntry
constants :: ConstPtr WGPUConstantEntry, 
  WGPUVertexState -> Int
bufferCount :: Int, 
  WGPUVertexState -> ConstPtr WGPUVertexBufferLayout
buffers :: ConstPtr WGPUVertexBufferLayout, 
  WGPUVertexState -> Proxy ()
_WGPUVertexState :: Proxy ()
}

instance Storable WGPUVertexState where
  alignment :: WGPUVertexState -> Int
alignment WGPUVertexState
_ = Int
8
{-# LINE 392 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 393 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 395 "src/Mischief/WGPU/Types/General.hsc" #-}
    _module <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 396 "src/Mischief/WGPU/Types/General.hsc" #-}
    entryPoint <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 397 "src/Mischief/WGPU/Types/General.hsc" #-}
    constantCount <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 398 "src/Mischief/WGPU/Types/General.hsc" #-}
    constants <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 399 "src/Mischief/WGPU/Types/General.hsc" #-}
    bufferCount <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 400 "src/Mischief/WGPU/Types/General.hsc" #-}
    buffers <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 401 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUVertexState{nextInChain, _module, entryPoint, constantCount, constants, bufferCount, buffers, _WGPUVertexState = Proxy}
  poke :: Ptr WGPUVertexState -> WGPUVertexState -> IO ()
poke Ptr WGPUVertexState
ptr WGPUVertexState{Ptr WGPUChainedStruct
nextInChain :: WGPUVertexState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Ptr WGPUShaderModule
_module :: WGPUVertexState -> Ptr WGPUShaderModule
_module :: Ptr WGPUShaderModule
_module, WGPUStringView
entryPoint :: WGPUVertexState -> WGPUStringView
entryPoint :: WGPUStringView
entryPoint, Int
constantCount :: WGPUVertexState -> Int
constantCount :: Int
constantCount, ConstPtr WGPUConstantEntry
constants :: WGPUVertexState -> ConstPtr WGPUConstantEntry
constants :: ConstPtr WGPUConstantEntry
constants, Int
bufferCount :: WGPUVertexState -> Int
bufferCount :: Int
bufferCount, ConstPtr WGPUVertexBufferLayout
buffers :: WGPUVertexState -> ConstPtr WGPUVertexBufferLayout
buffers :: ConstPtr WGPUVertexBufferLayout
buffers} = do
    (\Ptr WGPUVertexState
hsc_ptr -> Ptr WGPUVertexState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUVertexState
hsc_ptr Int
0) Ptr WGPUVertexState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 404 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr _module
{-# LINE 405 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr entryPoint
{-# LINE 406 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr constantCount
{-# LINE 407 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr constants
{-# LINE 408 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr bufferCount
{-# LINE 409 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr buffers
{-# LINE 410 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUBufferBindingLayout = WGPUBufferBindingLayout {
  WGPUBufferBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBufferBindingLayout -> WGPUBufferBindingType
_type :: WGPUBufferBindingType, 
  WGPUBufferBindingLayout -> WGPUBool
hasDynamicOffset :: WGPUBool, 
  WGPUBufferBindingLayout -> Word64
minBindingSize :: Word64
}

instance Storable WGPUBufferBindingLayout where 
  alignment :: WGPUBufferBindingLayout -> Int
alignment WGPUBufferBindingLayout
_ = Int
8
{-# LINE 421 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 422 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 424 "src/Mischief/WGPU/Types/General.hsc" #-}
    _type <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 425 "src/Mischief/WGPU/Types/General.hsc" #-}
    hasDynamicOffset <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr 
{-# LINE 426 "src/Mischief/WGPU/Types/General.hsc" #-}
    minBindingSize <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 427 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBufferBindingLayout {nextInChain, _type, hasDynamicOffset, minBindingSize} 
  poke :: Ptr WGPUBufferBindingLayout -> WGPUBufferBindingLayout -> IO ()
poke Ptr WGPUBufferBindingLayout
ptr WGPUBufferBindingLayout {Ptr WGPUChainedStruct
nextInChain :: WGPUBufferBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUBufferBindingType
_type :: WGPUBufferBindingLayout -> WGPUBufferBindingType
_type :: WGPUBufferBindingType
_type, WGPUBool
hasDynamicOffset :: WGPUBufferBindingLayout -> WGPUBool
hasDynamicOffset :: WGPUBool
hasDynamicOffset, Word64
minBindingSize :: WGPUBufferBindingLayout -> Word64
minBindingSize :: Word64
minBindingSize} = do 
    (\Ptr WGPUBufferBindingLayout
hsc_ptr -> Ptr WGPUBufferBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBufferBindingLayout
hsc_ptr Int
0) Ptr WGPUBufferBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain 
{-# LINE 430 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr _type
{-# LINE 431 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr hasDynamicOffset
{-# LINE 432 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr minBindingSize
{-# LINE 433 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUSamplerBindingLayout = WGPUSamplerBindingLayout {
  WGPUSamplerBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct,
  WGPUSamplerBindingLayout -> WGPUSamplerBindingType
_type :: WGPUSamplerBindingType
}

instance Storable WGPUSamplerBindingLayout where 
  alignment :: WGPUSamplerBindingLayout -> Int
alignment WGPUSamplerBindingLayout
_ = Int
8
{-# LINE 441 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (16)
{-# LINE 442 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 444 "src/Mischief/WGPU/Types/General.hsc" #-}
    _type <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr 
{-# LINE 445 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSamplerBindingLayout {nextInChain, _type}
  poke :: Ptr WGPUSamplerBindingLayout -> WGPUSamplerBindingLayout -> IO ()
poke Ptr WGPUSamplerBindingLayout
ptr WGPUSamplerBindingLayout {Ptr WGPUChainedStruct
nextInChain :: WGPUSamplerBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUSamplerBindingType
_type :: WGPUSamplerBindingLayout -> WGPUSamplerBindingType
_type :: WGPUSamplerBindingType
_type} = do 
    (\Ptr WGPUSamplerBindingLayout
hsc_ptr -> Ptr WGPUSamplerBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSamplerBindingLayout
hsc_ptr Int
0) Ptr WGPUSamplerBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 448 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr _type
{-# LINE 449 "src/Mischief/WGPU/Types/General.hsc" #-}
  
data WGPUTextureBindingLayout = WGPUTextureBindingLayout {
  WGPUTextureBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUTextureBindingLayout -> WGPUTextureSampleType
sampleType :: WGPUTextureSampleType, 
  WGPUTextureBindingLayout -> WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension, 
  WGPUTextureBindingLayout -> WGPUBool
multisampled :: WGPUBool
} 

instance Storable WGPUTextureBindingLayout where 
  alignment :: WGPUTextureBindingLayout -> Int
alignment WGPUTextureBindingLayout
_ = Int
8
{-# LINE 459 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 460 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 462 "src/Mischief/WGPU/Types/General.hsc" #-}
    sampleType <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 463 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewDimension <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 464 "src/Mischief/WGPU/Types/General.hsc" #-}
    multisampled <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 465 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUTextureBindingLayout {nextInChain, sampleType, viewDimension, multisampled}
  poke :: Ptr WGPUTextureBindingLayout -> WGPUTextureBindingLayout -> IO ()
poke Ptr WGPUTextureBindingLayout
ptr WGPUTextureBindingLayout {Ptr WGPUChainedStruct
nextInChain :: WGPUTextureBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUTextureSampleType
sampleType :: WGPUTextureBindingLayout -> WGPUTextureSampleType
sampleType :: WGPUTextureSampleType
sampleType, WGPUTextureViewDimension
viewDimension :: WGPUTextureBindingLayout -> WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension
viewDimension, WGPUBool
multisampled :: WGPUTextureBindingLayout -> WGPUBool
multisampled :: WGPUBool
multisampled} = do 
    (\Ptr WGPUTextureBindingLayout
hsc_ptr -> Ptr WGPUTextureBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTextureBindingLayout
hsc_ptr Int
0) Ptr WGPUTextureBindingLayout
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 468 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr sampleType 
{-# LINE 469 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr viewDimension
{-# LINE 470 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr multisampled
{-# LINE 471 "src/Mischief/WGPU/Types/General.hsc" #-}

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 
  alignment :: WGPUStorageTextureBindingLayout -> Int
alignment WGPUStorageTextureBindingLayout
_ = Int
8
{-# LINE 481 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 482 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 484 "src/Mischief/WGPU/Types/General.hsc" #-}
    access <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 485 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 486 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewDimension <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 487 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUStorageTextureBindingLayout {nextInChain, access, format, viewDimension}
  poke :: Ptr WGPUStorageTextureBindingLayout
-> WGPUStorageTextureBindingLayout -> IO ()
poke Ptr WGPUStorageTextureBindingLayout
ptr WGPUStorageTextureBindingLayout {Ptr WGPUChainedStruct
nextInChain :: WGPUStorageTextureBindingLayout -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStorageTextureAccess
access :: WGPUStorageTextureBindingLayout -> WGPUStorageTextureAccess
access :: WGPUStorageTextureAccess
access, WGPUTextureFormat
format :: WGPUStorageTextureBindingLayout -> WGPUTextureFormat
format :: WGPUTextureFormat
format, WGPUTextureViewDimension
viewDimension :: WGPUStorageTextureBindingLayout -> WGPUTextureViewDimension
viewDimension :: WGPUTextureViewDimension
viewDimension} = do 
    (\Ptr WGPUStorageTextureBindingLayout
hsc_ptr -> Ptr WGPUStorageTextureBindingLayout
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> 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 490 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr access 
{-# LINE 491 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr format
{-# LINE 492 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr viewDimension
{-# LINE 493 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBindGroupLayoutEntry = WGPUBindGroupLayoutEntry {
  WGPUBindGroupLayoutEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBindGroupLayoutEntry -> Word32
binding :: Word32, 
  WGPUBindGroupLayoutEntry -> WGPUShaderStage
visibility :: WGPUShaderStage, 
  WGPUBindGroupLayoutEntry -> Word32
bindingArraySize :: Word32, 
  WGPUBindGroupLayoutEntry -> WGPUBufferBindingLayout
buffer :: WGPUBufferBindingLayout, 
  WGPUBindGroupLayoutEntry -> WGPUSamplerBindingLayout
sampler :: WGPUSamplerBindingLayout, 
  WGPUBindGroupLayoutEntry -> WGPUTextureBindingLayout
texture :: WGPUTextureBindingLayout, 
  WGPUBindGroupLayoutEntry -> WGPUStorageTextureBindingLayout
storageTexture :: WGPUStorageTextureBindingLayout
} 

instance Storable WGPUBindGroupLayoutEntry where 
  alignment :: WGPUBindGroupLayoutEntry -> Int
alignment WGPUBindGroupLayoutEntry
_ = Int
8
{-# LINE 507 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (120)
{-# LINE 508 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr 
{-# LINE 510 "src/Mischief/WGPU/Types/General.hsc" #-}
    binding <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 511 "src/Mischief/WGPU/Types/General.hsc" #-}
    visibility <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr 
{-# LINE 512 "src/Mischief/WGPU/Types/General.hsc" #-}
    bindingArraySize <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 513 "src/Mischief/WGPU/Types/General.hsc" #-}
    buffer <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 514 "src/Mischief/WGPU/Types/General.hsc" #-}
    sampler <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr 
{-# LINE 515 "src/Mischief/WGPU/Types/General.hsc" #-}
    texture <- (\hsc_ptr -> peekByteOff hsc_ptr 72) ptr 
{-# LINE 516 "src/Mischief/WGPU/Types/General.hsc" #-}
    storageTexture <- (\hsc_ptr -> peekByteOff hsc_ptr 96) ptr 
{-# LINE 517 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBindGroupLayoutEntry {nextInChain, binding, visibility, bindingArraySize, buffer, sampler, texture, storageTexture}
  poke :: Ptr WGPUBindGroupLayoutEntry -> WGPUBindGroupLayoutEntry -> IO ()
poke Ptr WGPUBindGroupLayoutEntry
ptr WGPUBindGroupLayoutEntry {Ptr WGPUChainedStruct
nextInChain :: WGPUBindGroupLayoutEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Word32
binding :: WGPUBindGroupLayoutEntry -> Word32
binding :: Word32
binding, WGPUShaderStage
visibility :: WGPUBindGroupLayoutEntry -> WGPUShaderStage
visibility :: WGPUShaderStage
visibility, Word32
bindingArraySize :: WGPUBindGroupLayoutEntry -> Word32
bindingArraySize :: Word32
bindingArraySize, WGPUBufferBindingLayout
buffer :: WGPUBindGroupLayoutEntry -> WGPUBufferBindingLayout
buffer :: WGPUBufferBindingLayout
buffer, WGPUSamplerBindingLayout
sampler :: WGPUBindGroupLayoutEntry -> WGPUSamplerBindingLayout
sampler :: WGPUSamplerBindingLayout
sampler, WGPUTextureBindingLayout
texture :: WGPUBindGroupLayoutEntry -> WGPUTextureBindingLayout
texture :: WGPUTextureBindingLayout
texture, WGPUStorageTextureBindingLayout
storageTexture :: WGPUBindGroupLayoutEntry -> WGPUStorageTextureBindingLayout
storageTexture :: WGPUStorageTextureBindingLayout
storageTexture} = do
    (\Ptr WGPUBindGroupLayoutEntry
hsc_ptr -> Ptr WGPUBindGroupLayoutEntry
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupLayoutEntry
hsc_ptr Int
0) Ptr WGPUBindGroupLayoutEntry
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 520 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr binding
{-# LINE 521 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr visibility
{-# LINE 522 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr bindingArraySize
{-# LINE 523 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr buffer
{-# LINE 524 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr sampler
{-# LINE 525 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 72) ptr texture
{-# LINE 526 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 96) ptr storageTexture
{-# LINE 527 "src/Mischief/WGPU/Types/General.hsc" #-}
    
data WGPUPipelineLayoutDescriptor = WGPUPipelineLayoutDescriptor {
  WGPUPipelineLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUPipelineLayoutDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUPipelineLayoutDescriptor -> CSize
bindGroupLayoutCount :: CSize, 
  WGPUPipelineLayoutDescriptor -> ConstPtr (Ptr WGPUBindGroupLayout)
bindGroupLayouts :: ConstPtr (Ptr WGPUBindGroupLayout),
  WGPUPipelineLayoutDescriptor -> CUInt
immediateSize :: CUInt
}

instance Storable WGPUPipelineLayoutDescriptor where 
  alignment :: WGPUPipelineLayoutDescriptor -> Int
alignment WGPUPipelineLayoutDescriptor
_ = Int
8
{-# LINE 538 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (48)
{-# LINE 539 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do 
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 541 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 542 "src/Mischief/WGPU/Types/General.hsc" #-}
    bindGroupLayoutCount <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 543 "src/Mischief/WGPU/Types/General.hsc" #-}
    bindGroupLayouts <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 544 "src/Mischief/WGPU/Types/General.hsc" #-}
    immediateSize <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 545 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUPipelineLayoutDescriptor {nextInChain, label, bindGroupLayoutCount, bindGroupLayouts, immediateSize}
  poke :: Ptr WGPUPipelineLayoutDescriptor
-> WGPUPipelineLayoutDescriptor -> IO ()
poke Ptr WGPUPipelineLayoutDescriptor
ptr WGPUPipelineLayoutDescriptor {Ptr WGPUChainedStruct
nextInChain :: WGPUPipelineLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUPipelineLayoutDescriptor -> WGPUStringView
label :: WGPUStringView
label, CSize
bindGroupLayoutCount :: WGPUPipelineLayoutDescriptor -> CSize
bindGroupLayoutCount :: CSize
bindGroupLayoutCount, ConstPtr (Ptr WGPUBindGroupLayout)
bindGroupLayouts :: WGPUPipelineLayoutDescriptor -> ConstPtr (Ptr WGPUBindGroupLayout)
bindGroupLayouts :: ConstPtr (Ptr WGPUBindGroupLayout)
bindGroupLayouts, CUInt
immediateSize :: WGPUPipelineLayoutDescriptor -> CUInt
immediateSize :: CUInt
immediateSize} = do 
    (\Ptr WGPUPipelineLayoutDescriptor
hsc_ptr -> Ptr WGPUPipelineLayoutDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> 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 548 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label 
{-# LINE 549 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr bindGroupLayoutCount 
{-# LINE 550 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr bindGroupLayouts 
{-# LINE 551 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr immediateSize 
{-# LINE 552 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBlendComponent = WGPUBlendComponent {
  WGPUBlendComponent -> WGPUBlendOperation
operation :: WGPUBlendOperation, 
  WGPUBlendComponent -> WGPUBlendFactor
srcFactor :: WGPUBlendFactor, 
  WGPUBlendComponent -> WGPUBlendFactor
dstFactor :: WGPUBlendFactor
}

instance Storable WGPUBlendComponent where
  alignment :: WGPUBlendComponent -> Int
alignment WGPUBlendComponent
_ = Int
4
{-# LINE 561 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (12)
{-# LINE 562 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    operation <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 564 "src/Mischief/WGPU/Types/General.hsc" #-}
    srcFactor <- (\hsc_ptr -> peekByteOff hsc_ptr 4) ptr
{-# LINE 565 "src/Mischief/WGPU/Types/General.hsc" #-}
    dstFactor <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 566 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBlendComponent{operation, srcFactor, dstFactor}
  poke :: Ptr WGPUBlendComponent -> WGPUBlendComponent -> IO ()
poke Ptr WGPUBlendComponent
ptr WGPUBlendComponent{WGPUBlendOperation
operation :: WGPUBlendComponent -> WGPUBlendOperation
operation :: WGPUBlendOperation
operation, WGPUBlendFactor
srcFactor :: WGPUBlendComponent -> WGPUBlendFactor
srcFactor :: WGPUBlendFactor
srcFactor, WGPUBlendFactor
dstFactor :: WGPUBlendComponent -> WGPUBlendFactor
dstFactor :: WGPUBlendFactor
dstFactor} = do
    (\Ptr WGPUBlendComponent
hsc_ptr -> Ptr WGPUBlendComponent -> Int -> WGPUBlendOperation -> IO ()
forall b. Ptr b -> Int -> WGPUBlendOperation -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBlendComponent
hsc_ptr Int
0) Ptr WGPUBlendComponent
ptr WGPUBlendOperation
operation
{-# LINE 569 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 4) ptr srcFactor
{-# LINE 570 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr dstFactor
{-# LINE 571 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBlendState = WGPUBlendState {
  WGPUBlendState -> WGPUBlendComponent
color :: WGPUBlendComponent, 
  WGPUBlendState -> WGPUBlendComponent
alpha :: WGPUBlendComponent
}

instance Storable WGPUBlendState where
  alignment :: WGPUBlendState -> Int
alignment WGPUBlendState
_ = Int
4
{-# LINE 579 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 580 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    color <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 582 "src/Mischief/WGPU/Types/General.hsc" #-}
    alpha <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 583 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBlendState{color, alpha}
  poke :: Ptr WGPUBlendState -> WGPUBlendState -> IO ()
poke Ptr WGPUBlendState
ptr WGPUBlendState{WGPUBlendComponent
color :: WGPUBlendState -> WGPUBlendComponent
color :: WGPUBlendComponent
color, WGPUBlendComponent
alpha :: WGPUBlendState -> WGPUBlendComponent
alpha :: WGPUBlendComponent
alpha} = do
    (\Ptr WGPUBlendState
hsc_ptr -> Ptr WGPUBlendState -> Int -> WGPUBlendComponent -> IO ()
forall b. Ptr b -> Int -> WGPUBlendComponent -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBlendState
hsc_ptr Int
0) Ptr WGPUBlendState
ptr WGPUBlendComponent
color
{-# LINE 586 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr alpha
{-# LINE 587 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUColorTargetState = WGPUColorTargetState {
  WGPUColorTargetState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUColorTargetState -> WGPUTextureFormat
format :: WGPUTextureFormat, 
  WGPUColorTargetState -> ConstPtr WGPUBlendState
blend :: ConstPtr WGPUBlendState, 
  WGPUColorTargetState -> WGPUColorWriteMask
writeMask :: WGPUColorWriteMask
}

instance Storable WGPUColorTargetState where
  alignment :: WGPUColorTargetState -> Int
alignment WGPUColorTargetState
_ = Int
8
{-# LINE 597 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 598 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 600 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 601 "src/Mischief/WGPU/Types/General.hsc" #-}
    blend <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 602 "src/Mischief/WGPU/Types/General.hsc" #-}
    writeMask <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 603 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUColorTargetState{nextInChain, format, blend, writeMask}
  poke :: Ptr WGPUColorTargetState -> WGPUColorTargetState -> IO ()
poke Ptr WGPUColorTargetState
ptr WGPUColorTargetState{Ptr WGPUChainedStruct
nextInChain :: WGPUColorTargetState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUTextureFormat
format :: WGPUColorTargetState -> WGPUTextureFormat
format :: WGPUTextureFormat
format, ConstPtr WGPUBlendState
blend :: WGPUColorTargetState -> ConstPtr WGPUBlendState
blend :: ConstPtr WGPUBlendState
blend, WGPUColorWriteMask
writeMask :: WGPUColorTargetState -> WGPUColorWriteMask
writeMask :: WGPUColorWriteMask
writeMask} = do
    (\Ptr WGPUColorTargetState
hsc_ptr -> Ptr WGPUColorTargetState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUColorTargetState
hsc_ptr Int
0) Ptr WGPUColorTargetState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 606 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr format
{-# LINE 607 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr blend
{-# LINE 608 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr writeMask
{-# LINE 609 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUFragmentState = WGPUFragmentState {
  WGPUFragmentState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUFragmentState -> Ptr WGPUShaderModule
_module :: Ptr WGPUShaderModule, 
  WGPUFragmentState -> WGPUStringView
entryPoint :: WGPUStringView, 
  WGPUFragmentState -> Int
constantCount :: Int, 
  WGPUFragmentState -> ConstPtr WGPUConstantEntry
constants :: ConstPtr WGPUConstantEntry, 
  WGPUFragmentState -> Int
targetCount :: Int, 
  WGPUFragmentState -> ConstPtr WGPUColorTargetState
targets :: ConstPtr WGPUColorTargetState, 
  WGPUFragmentState -> Proxy ()
_WGPUFragmentState :: Proxy ()
}

instance Storable WGPUFragmentState where
  alignment :: WGPUFragmentState -> Int
alignment WGPUFragmentState
_ = Int
8
{-# LINE 624 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 625 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 627 "src/Mischief/WGPU/Types/General.hsc" #-}
    _module <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 628 "src/Mischief/WGPU/Types/General.hsc" #-}
    entryPoint <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 629 "src/Mischief/WGPU/Types/General.hsc" #-}
    constantCount <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 630 "src/Mischief/WGPU/Types/General.hsc" #-}
    constants <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 631 "src/Mischief/WGPU/Types/General.hsc" #-}
    targetCount <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 632 "src/Mischief/WGPU/Types/General.hsc" #-}
    targets <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 633 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUFragmentState{nextInChain, _module, entryPoint, constantCount, constants, targetCount, targets, _WGPUFragmentState = Proxy}
  poke :: Ptr WGPUFragmentState -> WGPUFragmentState -> IO ()
poke Ptr WGPUFragmentState
ptr WGPUFragmentState{Ptr WGPUChainedStruct
nextInChain :: WGPUFragmentState -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Ptr WGPUShaderModule
_module :: WGPUFragmentState -> Ptr WGPUShaderModule
_module :: Ptr WGPUShaderModule
_module, WGPUStringView
entryPoint :: WGPUFragmentState -> WGPUStringView
entryPoint :: WGPUStringView
entryPoint, Int
constantCount :: WGPUFragmentState -> Int
constantCount :: Int
constantCount, ConstPtr WGPUConstantEntry
constants :: WGPUFragmentState -> ConstPtr WGPUConstantEntry
constants :: ConstPtr WGPUConstantEntry
constants, Int
targetCount :: WGPUFragmentState -> Int
targetCount :: Int
targetCount, ConstPtr WGPUColorTargetState
targets :: WGPUFragmentState -> ConstPtr WGPUColorTargetState
targets :: ConstPtr WGPUColorTargetState
targets} = do
    (\Ptr WGPUFragmentState
hsc_ptr -> Ptr WGPUFragmentState -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUFragmentState
hsc_ptr Int
0) Ptr WGPUFragmentState
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 636 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr _module
{-# LINE 637 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr entryPoint
{-# LINE 638 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr constantCount
{-# LINE 639 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr constants
{-# LINE 640 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr targetCount
{-# LINE 641 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr targets
{-# LINE 642 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPURenderPipelineDescriptor = WGPURenderPipelineDescriptor {
  WGPURenderPipelineDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPURenderPipelineDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPURenderPipelineDescriptor -> Ptr WGPUPipelineLayout
layout :: Ptr WGPUPipelineLayout, 
  WGPURenderPipelineDescriptor -> WGPUVertexState
vertex :: WGPUVertexState, 
  WGPURenderPipelineDescriptor -> WGPUPrimitiveState
primitive :: WGPUPrimitiveState, 
  WGPURenderPipelineDescriptor -> ConstPtr ()
depthStencil :: ConstPtr (), 
  WGPURenderPipelineDescriptor -> WGPUMultisampleState
multisample :: WGPUMultisampleState, 
  WGPURenderPipelineDescriptor -> ConstPtr WGPUFragmentState
fragment :: ConstPtr WGPUFragmentState
}

instance Storable WGPURenderPipelineDescriptor where
  alignment :: WGPURenderPipelineDescriptor -> Int
alignment WGPURenderPipelineDescriptor
_ = Int
8
{-# LINE 656 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (168)
{-# LINE 657 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 659 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 660 "src/Mischief/WGPU/Types/General.hsc" #-}
    layout <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 661 "src/Mischief/WGPU/Types/General.hsc" #-}
    vertex <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 662 "src/Mischief/WGPU/Types/General.hsc" #-}
    primitive <- (\hsc_ptr -> peekByteOff hsc_ptr 96) ptr
{-# LINE 663 "src/Mischief/WGPU/Types/General.hsc" #-}
    depthStencil <- (\hsc_ptr -> peekByteOff hsc_ptr 128) ptr
{-# LINE 664 "src/Mischief/WGPU/Types/General.hsc" #-}
    multisample <- (\hsc_ptr -> peekByteOff hsc_ptr 136) ptr
{-# LINE 665 "src/Mischief/WGPU/Types/General.hsc" #-}
    fragment <- (\hsc_ptr -> peekByteOff hsc_ptr 160) ptr
{-# LINE 666 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURenderPipelineDescriptor{nextInChain, label, layout, vertex, primitive, depthStencil, multisample, fragment}
  poke :: Ptr WGPURenderPipelineDescriptor
-> WGPURenderPipelineDescriptor -> IO ()
poke Ptr WGPURenderPipelineDescriptor
ptr WGPURenderPipelineDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPURenderPipelineDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPURenderPipelineDescriptor -> WGPUStringView
label :: WGPUStringView
label, Ptr WGPUPipelineLayout
layout :: WGPURenderPipelineDescriptor -> Ptr WGPUPipelineLayout
layout :: Ptr WGPUPipelineLayout
layout, WGPUVertexState
vertex :: WGPURenderPipelineDescriptor -> WGPUVertexState
vertex :: WGPUVertexState
vertex, WGPUPrimitiveState
primitive :: WGPURenderPipelineDescriptor -> WGPUPrimitiveState
primitive :: WGPUPrimitiveState
primitive, ConstPtr ()
depthStencil :: WGPURenderPipelineDescriptor -> ConstPtr ()
depthStencil :: ConstPtr ()
depthStencil, WGPUMultisampleState
multisample :: WGPURenderPipelineDescriptor -> WGPUMultisampleState
multisample :: WGPUMultisampleState
multisample, ConstPtr WGPUFragmentState
fragment :: WGPURenderPipelineDescriptor -> ConstPtr WGPUFragmentState
fragment :: ConstPtr WGPUFragmentState
fragment} = do
    (\Ptr WGPURenderPipelineDescriptor
hsc_ptr -> Ptr WGPURenderPipelineDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURenderPipelineDescriptor
hsc_ptr Int
0) Ptr WGPURenderPipelineDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 669 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 670 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr layout
{-# LINE 671 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr vertex
{-# LINE 672 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 96) ptr primitive
{-# LINE 673 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 128) ptr depthStencil
{-# LINE 674 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 136) ptr multisample
{-# LINE 675 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 160) ptr fragment
{-# LINE 676 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUSurfaceConfiguration = WGPUSurfaceConfiguration {
  WGPUSurfaceConfiguration -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUSurfaceConfiguration -> Ptr WGPUDevice
device :: Ptr WGPUDevice, 
  WGPUSurfaceConfiguration -> WGPUTextureFormat
format :: WGPUTextureFormat, 
  WGPUSurfaceConfiguration -> WGPUTextureUsage
usage :: WGPUTextureUsage, 
  WGPUSurfaceConfiguration -> CInt
width :: CInt, 
  WGPUSurfaceConfiguration -> CInt
height :: CInt, 
  WGPUSurfaceConfiguration -> Int
viewFormatCount :: Int, 
  WGPUSurfaceConfiguration -> ConstPtr WGPUTextureFormat
viewFormats :: ConstPtr WGPUTextureFormat, 
  WGPUSurfaceConfiguration -> WGPUCompositeAlphaMode
alphaMode :: WGPUCompositeAlphaMode, 
  WGPUSurfaceConfiguration -> WGPUPresentMode
presentMode :: WGPUPresentMode
}

instance Storable WGPUSurfaceConfiguration where
  alignment :: WGPUSurfaceConfiguration -> Int
alignment WGPUSurfaceConfiguration
_ = Int
8
{-# LINE 692 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 693 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 695 "src/Mischief/WGPU/Types/General.hsc" #-}
    device <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 696 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 697 "src/Mischief/WGPU/Types/General.hsc" #-}
    usage <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 698 "src/Mischief/WGPU/Types/General.hsc" #-}
    width <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 699 "src/Mischief/WGPU/Types/General.hsc" #-}
    height <- (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 700 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewFormatCount <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 701 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewFormats <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 702 "src/Mischief/WGPU/Types/General.hsc" #-}
    alphaMode <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 703 "src/Mischief/WGPU/Types/General.hsc" #-}
    presentMode <- (\hsc_ptr -> peekByteOff hsc_ptr 60) ptr
{-# LINE 704 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceConfiguration{nextInChain, device, format, usage, width, height, viewFormatCount, viewFormats, alphaMode, presentMode}
  poke :: Ptr WGPUSurfaceConfiguration -> WGPUSurfaceConfiguration -> IO ()
poke Ptr WGPUSurfaceConfiguration
ptr WGPUSurfaceConfiguration{Ptr WGPUChainedStruct
nextInChain :: WGPUSurfaceConfiguration -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Ptr WGPUDevice
device :: WGPUSurfaceConfiguration -> Ptr WGPUDevice
device :: Ptr WGPUDevice
device, WGPUTextureFormat
format :: WGPUSurfaceConfiguration -> WGPUTextureFormat
format :: WGPUTextureFormat
format, WGPUTextureUsage
usage :: WGPUSurfaceConfiguration -> WGPUTextureUsage
usage :: WGPUTextureUsage
usage, CInt
width :: WGPUSurfaceConfiguration -> CInt
width :: CInt
width, CInt
height :: WGPUSurfaceConfiguration -> CInt
height :: CInt
height, Int
viewFormatCount :: WGPUSurfaceConfiguration -> Int
viewFormatCount :: Int
viewFormatCount, ConstPtr WGPUTextureFormat
viewFormats :: WGPUSurfaceConfiguration -> ConstPtr WGPUTextureFormat
viewFormats :: ConstPtr WGPUTextureFormat
viewFormats, WGPUCompositeAlphaMode
alphaMode :: WGPUSurfaceConfiguration -> WGPUCompositeAlphaMode
alphaMode :: WGPUCompositeAlphaMode
alphaMode, WGPUPresentMode
presentMode :: WGPUSurfaceConfiguration -> WGPUPresentMode
presentMode :: WGPUPresentMode
presentMode} = do
    (\Ptr WGPUSurfaceConfiguration
hsc_ptr -> Ptr WGPUSurfaceConfiguration
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceConfiguration
hsc_ptr Int
0) Ptr WGPUSurfaceConfiguration
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 707 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr device
{-# LINE 708 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr format
{-# LINE 709 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr usage
{-# LINE 710 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr width
{-# LINE 711 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 36) ptr height
{-# LINE 712 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr viewFormatCount
{-# LINE 713 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr viewFormats
{-# LINE 714 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr alphaMode
{-# LINE 715 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 60) ptr presentMode
{-# LINE 716 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUSurfaceTexture = WGPUSurfaceTexture {
  WGPUSurfaceTexture -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUSurfaceTexture -> Ptr WGPUTexture
texture :: Ptr WGPUTexture, 
  WGPUSurfaceTexture -> WGPUSurfaceGetCurrentTextureStatus
status :: WGPUSurfaceGetCurrentTextureStatus
}

instance Storable WGPUSurfaceTexture where
  alignment :: WGPUSurfaceTexture -> Int
alignment WGPUSurfaceTexture
_ = Int
8
{-# LINE 725 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 726 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 728 "src/Mischief/WGPU/Types/General.hsc" #-}
    texture <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 729 "src/Mischief/WGPU/Types/General.hsc" #-}
    status <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 730 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSurfaceTexture{nextInChain, texture, status}
  poke :: Ptr WGPUSurfaceTexture -> WGPUSurfaceTexture -> IO ()
poke Ptr WGPUSurfaceTexture
ptr WGPUSurfaceTexture{Ptr WGPUChainedStruct
nextInChain :: WGPUSurfaceTexture -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Ptr WGPUTexture
texture :: WGPUSurfaceTexture -> Ptr WGPUTexture
texture :: Ptr WGPUTexture
texture, WGPUSurfaceGetCurrentTextureStatus
status :: WGPUSurfaceTexture -> WGPUSurfaceGetCurrentTextureStatus
status :: WGPUSurfaceGetCurrentTextureStatus
status} = do
    (\Ptr WGPUSurfaceTexture
hsc_ptr -> Ptr WGPUSurfaceTexture -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSurfaceTexture
hsc_ptr Int
0) Ptr WGPUSurfaceTexture
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 733 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr texture
{-# LINE 734 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr status
{-# LINE 735 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUCommandEncoderDescriptor = WGPUCommandEncoderDescriptor {
  WGPUCommandEncoderDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUCommandEncoderDescriptor -> WGPUStringView
label :: WGPUStringView
}

instance Storable WGPUCommandEncoderDescriptor where
  alignment :: WGPUCommandEncoderDescriptor -> Int
alignment WGPUCommandEncoderDescriptor
_ = Int
8
{-# LINE 743 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 744 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 746 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 747 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUCommandEncoderDescriptor{nextInChain, label}
  poke :: Ptr WGPUCommandEncoderDescriptor
-> WGPUCommandEncoderDescriptor -> IO ()
poke Ptr WGPUCommandEncoderDescriptor
ptr WGPUCommandEncoderDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUCommandEncoderDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUCommandEncoderDescriptor -> WGPUStringView
label :: WGPUStringView
label} = do
    (\Ptr WGPUCommandEncoderDescriptor
hsc_ptr -> Ptr WGPUCommandEncoderDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUCommandEncoderDescriptor
hsc_ptr Int
0) Ptr WGPUCommandEncoderDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 750 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 751 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUColor = WGPUColor {
  WGPUColor -> CDouble
wgpuColorR :: CDouble, 
  WGPUColor -> CDouble
wgpuColorG :: CDouble, 
  WGPUColor -> CDouble
wgpuColorB :: CDouble, 
  WGPUColor -> CDouble
wgpuColorA :: CDouble
}

instance Storable WGPUColor where
  alignment :: WGPUColor -> Int
alignment WGPUColor
_ = Int
8
{-# LINE 761 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 762 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    wgpuColorR <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 764 "src/Mischief/WGPU/Types/General.hsc" #-}
    wgpuColorG <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 765 "src/Mischief/WGPU/Types/General.hsc" #-}
    wgpuColorB <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 766 "src/Mischief/WGPU/Types/General.hsc" #-}
    wgpuColorA <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 767 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUColor{wgpuColorR, wgpuColorG, wgpuColorB, wgpuColorA}
  poke :: Ptr WGPUColor -> WGPUColor -> IO ()
poke Ptr WGPUColor
ptr WGPUColor{CDouble
wgpuColorR :: WGPUColor -> CDouble
wgpuColorR :: CDouble
wgpuColorR, CDouble
wgpuColorG :: WGPUColor -> CDouble
wgpuColorG :: CDouble
wgpuColorG, CDouble
wgpuColorB :: WGPUColor -> CDouble
wgpuColorB :: CDouble
wgpuColorB, CDouble
wgpuColorA :: WGPUColor -> CDouble
wgpuColorA :: CDouble
wgpuColorA} = do
    (\Ptr WGPUColor
hsc_ptr -> Ptr WGPUColor -> Int -> CDouble -> IO ()
forall b. Ptr b -> Int -> CDouble -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUColor
hsc_ptr Int
0) Ptr WGPUColor
ptr CDouble
wgpuColorR
{-# LINE 770 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr wgpuColorG
{-# LINE 771 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr wgpuColorB
{-# LINE 772 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr wgpuColorA
{-# LINE 773 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPURenderPassColorAttachment = WGPURenderPassColorAttachment {
  WGPURenderPassColorAttachment -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPURenderPassColorAttachment -> Ptr WGPUTextureView
view :: Ptr WGPUTextureView, 
  WGPURenderPassColorAttachment -> Word32
depthSlice :: Word32, 
  WGPURenderPassColorAttachment -> Ptr WGPUTextureView
resolveTarget :: Ptr WGPUTextureView, 
  WGPURenderPassColorAttachment -> WGPULoadOp
loadOp :: WGPULoadOp,
  WGPURenderPassColorAttachment -> WGPUStoreOp
storeOp :: WGPUStoreOp,
  WGPURenderPassColorAttachment -> WGPUColor
clearValue :: WGPUColor    
}

instance Storable WGPURenderPassColorAttachment where
  alignment :: WGPURenderPassColorAttachment -> Int
alignment WGPURenderPassColorAttachment
_ = Int
8
{-# LINE 786 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (72)
{-# LINE 787 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 789 "src/Mischief/WGPU/Types/General.hsc" #-}
    view <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 790 "src/Mischief/WGPU/Types/General.hsc" #-}
    depthSlice <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 791 "src/Mischief/WGPU/Types/General.hsc" #-}
    resolveTarget <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 792 "src/Mischief/WGPU/Types/General.hsc" #-}
    loadOp <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 793 "src/Mischief/WGPU/Types/General.hsc" #-}
    storeOp <- (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 794 "src/Mischief/WGPU/Types/General.hsc" #-}
    clearValue <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 795 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURenderPassColorAttachment{nextInChain, view, depthSlice, resolveTarget, loadOp, storeOp, clearValue}
  poke :: Ptr WGPURenderPassColorAttachment
-> WGPURenderPassColorAttachment -> IO ()
poke Ptr WGPURenderPassColorAttachment
ptr WGPURenderPassColorAttachment{Ptr WGPUChainedStruct
nextInChain :: WGPURenderPassColorAttachment -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Ptr WGPUTextureView
view :: WGPURenderPassColorAttachment -> Ptr WGPUTextureView
view :: Ptr WGPUTextureView
view, Word32
depthSlice :: WGPURenderPassColorAttachment -> Word32
depthSlice :: Word32
depthSlice, Ptr WGPUTextureView
resolveTarget :: WGPURenderPassColorAttachment -> Ptr WGPUTextureView
resolveTarget :: Ptr WGPUTextureView
resolveTarget, WGPULoadOp
loadOp :: WGPURenderPassColorAttachment -> WGPULoadOp
loadOp :: WGPULoadOp
loadOp, WGPUStoreOp
storeOp :: WGPURenderPassColorAttachment -> WGPUStoreOp
storeOp :: WGPUStoreOp
storeOp, WGPUColor
clearValue :: WGPURenderPassColorAttachment -> WGPUColor
clearValue :: WGPUColor
clearValue} = do
    (\Ptr WGPURenderPassColorAttachment
hsc_ptr -> Ptr WGPURenderPassColorAttachment
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURenderPassColorAttachment
hsc_ptr Int
0) Ptr WGPURenderPassColorAttachment
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 798 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr view
{-# LINE 799 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr depthSlice
{-# LINE 800 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr resolveTarget
{-# LINE 801 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr loadOp
{-# LINE 802 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 36) ptr storeOp
{-# LINE 803 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr clearValue
{-# LINE 804 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPURenderPassDescriptor = WGPURenderPassDescriptor {
  WGPURenderPassDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct,
  WGPURenderPassDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPURenderPassDescriptor -> Int
colorAttachmentCount :: Int, 
  WGPURenderPassDescriptor -> ConstPtr WGPURenderPassColorAttachment
colorAttachments :: ConstPtr WGPURenderPassColorAttachment, 
  WGPURenderPassDescriptor -> ConstPtr ()
depthStencilAttachment :: ConstPtr (), 
  WGPURenderPassDescriptor -> Ptr WGPUQuerySet
occlusionQuerySet :: Ptr WGPUQuerySet, 
  WGPURenderPassDescriptor -> ConstPtr ()
timestampWrites :: ConstPtr () 
}

instance Storable WGPURenderPassDescriptor where
  alignment :: WGPURenderPassDescriptor -> Int
alignment WGPURenderPassDescriptor
_ = Int
8
{-# LINE 817 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 818 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 820 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 821 "src/Mischief/WGPU/Types/General.hsc" #-}
    colorAttachmentCount <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 822 "src/Mischief/WGPU/Types/General.hsc" #-}
    colorAttachments <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 823 "src/Mischief/WGPU/Types/General.hsc" #-}
    depthStencilAttachment <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 824 "src/Mischief/WGPU/Types/General.hsc" #-}
    occlusionQuerySet <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 825 "src/Mischief/WGPU/Types/General.hsc" #-}
    timestampWrites <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 826 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPURenderPassDescriptor{nextInChain, label, colorAttachmentCount, colorAttachments, depthStencilAttachment, occlusionQuerySet, timestampWrites}
  poke :: Ptr WGPURenderPassDescriptor -> WGPURenderPassDescriptor -> IO ()
poke Ptr WGPURenderPassDescriptor
ptr WGPURenderPassDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPURenderPassDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPURenderPassDescriptor -> WGPUStringView
label :: WGPUStringView
label, Int
colorAttachmentCount :: WGPURenderPassDescriptor -> Int
colorAttachmentCount :: Int
colorAttachmentCount, ConstPtr WGPURenderPassColorAttachment
colorAttachments :: WGPURenderPassDescriptor -> ConstPtr WGPURenderPassColorAttachment
colorAttachments :: ConstPtr WGPURenderPassColorAttachment
colorAttachments, ConstPtr ()
depthStencilAttachment :: WGPURenderPassDescriptor -> ConstPtr ()
depthStencilAttachment :: ConstPtr ()
depthStencilAttachment, Ptr WGPUQuerySet
occlusionQuerySet :: WGPURenderPassDescriptor -> Ptr WGPUQuerySet
occlusionQuerySet :: Ptr WGPUQuerySet
occlusionQuerySet, ConstPtr ()
timestampWrites :: WGPURenderPassDescriptor -> ConstPtr ()
timestampWrites :: ConstPtr ()
timestampWrites} = do
    (\Ptr WGPURenderPassDescriptor
hsc_ptr -> Ptr WGPURenderPassDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPURenderPassDescriptor
hsc_ptr Int
0) Ptr WGPURenderPassDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 829 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 830 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr colorAttachmentCount
{-# LINE 831 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr colorAttachments
{-# LINE 832 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr depthStencilAttachment
{-# LINE 833 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr occlusionQuerySet
{-# LINE 834 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr timestampWrites
{-# LINE 835 "src/Mischief/WGPU/Types/General.hsc" #-}

wGPU_DEPTH_SLICE_UNDEFINED :: Word32 
wGPU_DEPTH_SLICE_UNDEFINED :: Word32
wGPU_DEPTH_SLICE_UNDEFINED = Word32
4294967295
{-# LINE 838 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUCommandBufferDescriptor = WGPUCommandBufferDescriptor {
  WGPUCommandBufferDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUCommandBufferDescriptor -> WGPUStringView
label :: WGPUStringView
}

instance Storable WGPUCommandBufferDescriptor where
  alignment :: WGPUCommandBufferDescriptor -> Int
alignment WGPUCommandBufferDescriptor
_ = Int
8
{-# LINE 846 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (24)
{-# LINE 847 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 849 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 850 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUCommandBufferDescriptor{nextInChain, label}
  poke :: Ptr WGPUCommandBufferDescriptor
-> WGPUCommandBufferDescriptor -> IO ()
poke Ptr WGPUCommandBufferDescriptor
ptr WGPUCommandBufferDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUCommandBufferDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUCommandBufferDescriptor -> WGPUStringView
label :: WGPUStringView
label} = do
    (\Ptr WGPUCommandBufferDescriptor
hsc_ptr -> Ptr WGPUCommandBufferDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUCommandBufferDescriptor
hsc_ptr Int
0) Ptr WGPUCommandBufferDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 853 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 854 "src/Mischief/WGPU/Types/General.hsc" #-}

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

instance Storable WGPUExtent3D where
  alignment :: WGPUExtent3D -> Int
alignment WGPUExtent3D
_ = Int
4
{-# LINE 863 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (12)
{-# LINE 864 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    width <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 866 "src/Mischief/WGPU/Types/General.hsc" #-}
    height <- (\hsc_ptr -> peekByteOff hsc_ptr 4) ptr
{-# LINE 867 "src/Mischief/WGPU/Types/General.hsc" #-}
    depthOrArrayLayers <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 868 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUExtent3D{width, height, depthOrArrayLayers}
  poke :: Ptr WGPUExtent3D -> WGPUExtent3D -> IO ()
poke Ptr WGPUExtent3D
ptr WGPUExtent3D{Word32
width :: WGPUExtent3D -> Word32
width :: Word32
width, Word32
height :: WGPUExtent3D -> Word32
height :: Word32
height, Word32
depthOrArrayLayers :: WGPUExtent3D -> Word32
depthOrArrayLayers :: Word32
depthOrArrayLayers} = do
    (\Ptr WGPUExtent3D
hsc_ptr -> Ptr WGPUExtent3D -> Int -> Word32 -> IO ()
forall b. Ptr b -> 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 871 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 4) ptr height
{-# LINE 872 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr depthOrArrayLayers
{-# LINE 873 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUTextureDescriptor = WGPUTextureDescriptor {
  WGPUTextureDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUTextureDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUTextureDescriptor -> WGPUTextureUsage
usage :: WGPUTextureUsage, 
  WGPUTextureDescriptor -> WGPUTextureDimension
dimension :: WGPUTextureDimension, 
  WGPUTextureDescriptor -> WGPUExtent3D
size :: WGPUExtent3D, 
  WGPUTextureDescriptor -> WGPUTextureFormat
format :: WGPUTextureFormat, 
  WGPUTextureDescriptor -> Word32
mipLevelCount :: Word32, 
  WGPUTextureDescriptor -> Word32
sampleCount :: Word32, 
  WGPUTextureDescriptor -> CSize
viewFormatCount :: CSize, 
  WGPUTextureDescriptor -> ConstPtr WGPUTextureFormat
viewFormats :: ConstPtr WGPUTextureFormat
}

instance Storable WGPUTextureDescriptor where
  alignment :: WGPUTextureDescriptor -> Int
alignment WGPUTextureDescriptor
_ = Int
8
{-# LINE 889 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (80)
{-# LINE 890 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 892 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 893 "src/Mischief/WGPU/Types/General.hsc" #-}
    usage <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 894 "src/Mischief/WGPU/Types/General.hsc" #-}
    dimension <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 895 "src/Mischief/WGPU/Types/General.hsc" #-}
    size <- (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 896 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 897 "src/Mischief/WGPU/Types/General.hsc" #-}
    mipLevelCount <- (\hsc_ptr -> peekByteOff hsc_ptr 52) ptr
{-# LINE 898 "src/Mischief/WGPU/Types/General.hsc" #-}
    sampleCount <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 899 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewFormatCount <- (\hsc_ptr -> peekByteOff hsc_ptr 64) ptr
{-# LINE 900 "src/Mischief/WGPU/Types/General.hsc" #-}
    viewFormats <- (\hsc_ptr -> peekByteOff hsc_ptr 72) ptr
{-# LINE 901 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUTextureDescriptor{nextInChain, label, usage, dimension, size, format, mipLevelCount, sampleCount, viewFormatCount, viewFormats}
  poke :: Ptr WGPUTextureDescriptor -> WGPUTextureDescriptor -> IO ()
poke Ptr WGPUTextureDescriptor
ptr WGPUTextureDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUTextureDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUTextureDescriptor -> WGPUStringView
label :: WGPUStringView
label, WGPUTextureUsage
usage :: WGPUTextureDescriptor -> WGPUTextureUsage
usage :: WGPUTextureUsage
usage, WGPUTextureDimension
dimension :: WGPUTextureDescriptor -> WGPUTextureDimension
dimension :: WGPUTextureDimension
dimension, WGPUExtent3D
size :: WGPUTextureDescriptor -> WGPUExtent3D
size :: WGPUExtent3D
size, WGPUTextureFormat
format :: WGPUTextureDescriptor -> WGPUTextureFormat
format :: WGPUTextureFormat
format, Word32
mipLevelCount :: WGPUTextureDescriptor -> Word32
mipLevelCount :: Word32
mipLevelCount, Word32
sampleCount :: WGPUTextureDescriptor -> Word32
sampleCount :: Word32
sampleCount, CSize
viewFormatCount :: WGPUTextureDescriptor -> CSize
viewFormatCount :: CSize
viewFormatCount, ConstPtr WGPUTextureFormat
viewFormats :: WGPUTextureDescriptor -> ConstPtr WGPUTextureFormat
viewFormats :: ConstPtr WGPUTextureFormat
viewFormats} = do
    (\Ptr WGPUTextureDescriptor
hsc_ptr -> Ptr WGPUTextureDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTextureDescriptor
hsc_ptr Int
0) Ptr WGPUTextureDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 904 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 905 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr usage
{-# LINE 906 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr dimension
{-# LINE 907 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 36) ptr size
{-# LINE 908 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr format
{-# LINE 909 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 52) ptr mipLevelCount
{-# LINE 910 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr sampleCount
{-# LINE 911 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 64) ptr viewFormatCount
{-# LINE 912 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 72) ptr viewFormats
{-# LINE 913 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUOrigin3D = WGPUOrigin3D {
  WGPUOrigin3D -> Word32
x :: Word32, 
  WGPUOrigin3D -> Word32
y :: Word32, 
  WGPUOrigin3D -> Word32
z :: Word32
}

instance Storable WGPUOrigin3D where
  alignment :: WGPUOrigin3D -> Int
alignment WGPUOrigin3D
_ = Int
4
{-# LINE 922 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (12)
{-# LINE 923 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    x <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 925 "src/Mischief/WGPU/Types/General.hsc" #-}
    y <- (\hsc_ptr -> peekByteOff hsc_ptr 4) ptr
{-# LINE 926 "src/Mischief/WGPU/Types/General.hsc" #-}
    z <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 927 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUOrigin3D{x, y, z}
  poke :: Ptr WGPUOrigin3D -> WGPUOrigin3D -> IO ()
poke Ptr WGPUOrigin3D
ptr WGPUOrigin3D{Word32
x :: WGPUOrigin3D -> Word32
x :: Word32
x, Word32
y :: WGPUOrigin3D -> Word32
y :: Word32
y, Word32
z :: WGPUOrigin3D -> Word32
z :: Word32
z} = do
    (\Ptr WGPUOrigin3D
hsc_ptr -> Ptr WGPUOrigin3D -> Int -> Word32 -> IO ()
forall b. Ptr b -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUOrigin3D
hsc_ptr Int
0) Ptr WGPUOrigin3D
ptr Word32
x
{-# LINE 930 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 4) ptr y
{-# LINE 931 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr z
{-# LINE 932 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUTexelCopyTextureInfo = WGPUTexelCopyTextureInfo {
  WGPUTexelCopyTextureInfo -> Ptr WGPUTexture
texture :: Ptr WGPUTexture, 
  WGPUTexelCopyTextureInfo -> Word32
mipLevel :: Word32, 
  WGPUTexelCopyTextureInfo -> WGPUOrigin3D
origin :: WGPUOrigin3D, 
  WGPUTexelCopyTextureInfo -> WGPUTextureAspect
aspect :: WGPUTextureAspect
}

instance Storable WGPUTexelCopyTextureInfo where
  alignment :: WGPUTexelCopyTextureInfo -> Int
alignment WGPUTexelCopyTextureInfo
_ = Int
8
{-# LINE 942 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (32)
{-# LINE 943 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    texture <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 945 "src/Mischief/WGPU/Types/General.hsc" #-}
    mipLevel <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 946 "src/Mischief/WGPU/Types/General.hsc" #-}
    origin <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 947 "src/Mischief/WGPU/Types/General.hsc" #-}
    aspect <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 948 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUTexelCopyTextureInfo{texture, mipLevel, origin, aspect}
  poke :: Ptr WGPUTexelCopyTextureInfo -> WGPUTexelCopyTextureInfo -> IO ()
poke Ptr WGPUTexelCopyTextureInfo
ptr WGPUTexelCopyTextureInfo{Ptr WGPUTexture
texture :: WGPUTexelCopyTextureInfo -> Ptr WGPUTexture
texture :: Ptr WGPUTexture
texture, Word32
mipLevel :: WGPUTexelCopyTextureInfo -> Word32
mipLevel :: Word32
mipLevel, WGPUOrigin3D
origin :: WGPUTexelCopyTextureInfo -> WGPUOrigin3D
origin :: WGPUOrigin3D
origin, WGPUTextureAspect
aspect :: WGPUTexelCopyTextureInfo -> WGPUTextureAspect
aspect :: WGPUTextureAspect
aspect} = do
    (\Ptr WGPUTexelCopyTextureInfo
hsc_ptr -> Ptr WGPUTexelCopyTextureInfo -> Int -> Ptr WGPUTexture -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUTexture -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTexelCopyTextureInfo
hsc_ptr Int
0) Ptr WGPUTexelCopyTextureInfo
ptr Ptr WGPUTexture
texture
{-# LINE 951 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr mipLevel
{-# LINE 952 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr origin
{-# LINE 953 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr aspect
{-# LINE 954 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUTexelCopyBufferLayout = WGPUTexelCopyBufferLayout {
  WGPUTexelCopyBufferLayout -> Word64
offset :: Word64, 
  WGPUTexelCopyBufferLayout -> Word32
bytesPerRow :: Word32, 
  WGPUTexelCopyBufferLayout -> Word32
rowsPerImage :: Word32
}

instance Storable WGPUTexelCopyBufferLayout where
  alignment :: WGPUTexelCopyBufferLayout -> Int
alignment WGPUTexelCopyBufferLayout
_ = Int
8
{-# LINE 963 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (16)
{-# LINE 964 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    offset <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 966 "src/Mischief/WGPU/Types/General.hsc" #-}
    bytesPerRow <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 967 "src/Mischief/WGPU/Types/General.hsc" #-}
    rowsPerImage <- (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 968 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUTexelCopyBufferLayout{offset, bytesPerRow, rowsPerImage}
  poke :: Ptr WGPUTexelCopyBufferLayout -> WGPUTexelCopyBufferLayout -> IO ()
poke Ptr WGPUTexelCopyBufferLayout
ptr WGPUTexelCopyBufferLayout{Word64
offset :: WGPUTexelCopyBufferLayout -> Word64
offset :: Word64
offset, Word32
bytesPerRow :: WGPUTexelCopyBufferLayout -> Word32
bytesPerRow :: Word32
bytesPerRow, Word32
rowsPerImage :: WGPUTexelCopyBufferLayout -> Word32
rowsPerImage :: Word32
rowsPerImage} = do
    (\Ptr WGPUTexelCopyBufferLayout
hsc_ptr -> Ptr WGPUTexelCopyBufferLayout -> Int -> Word64 -> IO ()
forall b. Ptr b -> Int -> Word64 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTexelCopyBufferLayout
hsc_ptr Int
0) Ptr WGPUTexelCopyBufferLayout
ptr Word64
offset
{-# LINE 971 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr bytesPerRow
{-# LINE 972 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 12) ptr rowsPerImage
{-# LINE 973 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUSamplerDescriptor = WGPUSamplerDescriptor {
  WGPUSamplerDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUSamplerDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUSamplerDescriptor -> WGPUAddressMode
addressModeU :: WGPUAddressMode, 
  WGPUSamplerDescriptor -> WGPUAddressMode
addressModeV :: WGPUAddressMode, 
  WGPUSamplerDescriptor -> WGPUAddressMode
addressModeW :: WGPUAddressMode, 
  WGPUSamplerDescriptor -> WGPUFilterMode
magFilter :: WGPUFilterMode, 
  WGPUSamplerDescriptor -> WGPUFilterMode
minFilter :: WGPUFilterMode, 
  WGPUSamplerDescriptor -> WGPUMipmapFilterMode
mipmapFilter :: WGPUMipmapFilterMode, 
  WGPUSamplerDescriptor -> Float
lodMinClamp :: Float, 
  WGPUSamplerDescriptor -> Float
lodMaxClamp :: Float, 
  WGPUSamplerDescriptor -> WGPUCompareFunction
compare :: WGPUCompareFunction, 
  WGPUSamplerDescriptor -> Word16
maxAnisotropy :: Word16
}

instance Storable WGPUSamplerDescriptor where
  alignment :: WGPUSamplerDescriptor -> Int
alignment WGPUSamplerDescriptor
_ = Int
8
{-# LINE 992 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 993 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 995 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 996 "src/Mischief/WGPU/Types/General.hsc" #-}
    addressModeU <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 997 "src/Mischief/WGPU/Types/General.hsc" #-}
    addressModeV <- (\hsc_ptr -> peekByteOff hsc_ptr 28) ptr
{-# LINE 998 "src/Mischief/WGPU/Types/General.hsc" #-}
    addressModeW <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 999 "src/Mischief/WGPU/Types/General.hsc" #-}
    magFilter <- (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 1000 "src/Mischief/WGPU/Types/General.hsc" #-}
    minFilter <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 1001 "src/Mischief/WGPU/Types/General.hsc" #-}
    mipmapFilter <- (\hsc_ptr -> peekByteOff hsc_ptr 44) ptr
{-# LINE 1002 "src/Mischief/WGPU/Types/General.hsc" #-}
    lodMinClamp <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 1003 "src/Mischief/WGPU/Types/General.hsc" #-}
    lodMaxClamp <- (\hsc_ptr -> peekByteOff hsc_ptr 52) ptr
{-# LINE 1004 "src/Mischief/WGPU/Types/General.hsc" #-}
    compare <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 1005 "src/Mischief/WGPU/Types/General.hsc" #-}
    maxAnisotropy <- (\hsc_ptr -> peekByteOff hsc_ptr 60) ptr
{-# LINE 1006 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUSamplerDescriptor{nextInChain, label, addressModeU, addressModeV, addressModeW, magFilter, minFilter, mipmapFilter, lodMinClamp, lodMaxClamp, compare, maxAnisotropy}
  poke :: Ptr WGPUSamplerDescriptor -> WGPUSamplerDescriptor -> IO ()
poke Ptr WGPUSamplerDescriptor
ptr WGPUSamplerDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUSamplerDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUSamplerDescriptor -> WGPUStringView
label :: WGPUStringView
label, WGPUAddressMode
addressModeU :: WGPUSamplerDescriptor -> WGPUAddressMode
addressModeU :: WGPUAddressMode
addressModeU, WGPUAddressMode
addressModeV :: WGPUSamplerDescriptor -> WGPUAddressMode
addressModeV :: WGPUAddressMode
addressModeV, WGPUAddressMode
addressModeW :: WGPUSamplerDescriptor -> WGPUAddressMode
addressModeW :: WGPUAddressMode
addressModeW, WGPUFilterMode
magFilter :: WGPUSamplerDescriptor -> WGPUFilterMode
magFilter :: WGPUFilterMode
magFilter, WGPUFilterMode
minFilter :: WGPUSamplerDescriptor -> WGPUFilterMode
minFilter :: WGPUFilterMode
minFilter, WGPUMipmapFilterMode
mipmapFilter :: WGPUSamplerDescriptor -> WGPUMipmapFilterMode
mipmapFilter :: WGPUMipmapFilterMode
mipmapFilter, Float
lodMinClamp :: WGPUSamplerDescriptor -> Float
lodMinClamp :: Float
lodMinClamp, Float
lodMaxClamp :: WGPUSamplerDescriptor -> Float
lodMaxClamp :: Float
lodMaxClamp, WGPUCompareFunction
compare :: WGPUSamplerDescriptor -> WGPUCompareFunction
compare :: WGPUCompareFunction
compare, Word16
maxAnisotropy :: WGPUSamplerDescriptor -> Word16
maxAnisotropy :: Word16
maxAnisotropy} = do
    (\Ptr WGPUSamplerDescriptor
hsc_ptr -> Ptr WGPUSamplerDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUSamplerDescriptor
hsc_ptr Int
0) Ptr WGPUSamplerDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 1009 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 1010 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr addressModeU
{-# LINE 1011 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 28) ptr addressModeV
{-# LINE 1012 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr addressModeW
{-# LINE 1013 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 36) ptr magFilter
{-# LINE 1014 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr minFilter
{-# LINE 1015 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 44) ptr mipmapFilter
{-# LINE 1016 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr lodMinClamp
{-# LINE 1017 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 52) ptr lodMaxClamp
{-# LINE 1018 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr compare
{-# LINE 1019 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 60) ptr maxAnisotropy
{-# LINE 1020 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBindGroupLayoutDescriptor = WGPUBindGroupLayoutDescriptor {
  WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBindGroupLayoutDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUBindGroupLayoutDescriptor -> CSize
entryCount :: CSize, 
  WGPUBindGroupLayoutDescriptor -> ConstPtr WGPUBindGroupLayoutEntry
entries :: ConstPtr WGPUBindGroupLayoutEntry
}

instance Storable WGPUBindGroupLayoutDescriptor where
  alignment :: WGPUBindGroupLayoutDescriptor -> Int
alignment WGPUBindGroupLayoutDescriptor
_ = Int
8
{-# LINE 1030 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (40)
{-# LINE 1031 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 1033 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 1034 "src/Mischief/WGPU/Types/General.hsc" #-}
    entryCount <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 1035 "src/Mischief/WGPU/Types/General.hsc" #-}
    entries <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 1036 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBindGroupLayoutDescriptor{nextInChain, label, entryCount, entries}
  poke :: Ptr WGPUBindGroupLayoutDescriptor
-> WGPUBindGroupLayoutDescriptor -> IO ()
poke Ptr WGPUBindGroupLayoutDescriptor
ptr WGPUBindGroupLayoutDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUBindGroupLayoutDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUBindGroupLayoutDescriptor -> WGPUStringView
label :: WGPUStringView
label, CSize
entryCount :: WGPUBindGroupLayoutDescriptor -> CSize
entryCount :: CSize
entryCount, ConstPtr WGPUBindGroupLayoutEntry
entries :: WGPUBindGroupLayoutDescriptor -> ConstPtr WGPUBindGroupLayoutEntry
entries :: ConstPtr WGPUBindGroupLayoutEntry
entries} = do
    (\Ptr WGPUBindGroupLayoutDescriptor
hsc_ptr -> Ptr WGPUBindGroupLayoutDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> 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 1039 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 1040 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr entryCount
{-# LINE 1041 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr entries
{-# LINE 1042 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBindGroupEntry = WGPUBindGroupEntry {
  WGPUBindGroupEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBindGroupEntry -> Word32
binding :: Word32, 
  WGPUBindGroupEntry -> Ptr WGPUBuffer
buffer :: Ptr WGPUBuffer, 
  WGPUBindGroupEntry -> Word64
offset :: Word64, 
  WGPUBindGroupEntry -> Word64
size :: Word64, 
  WGPUBindGroupEntry -> Ptr WGPUSampler
sampler :: Ptr WGPUSampler, 
  WGPUBindGroupEntry -> Ptr WGPUTextureView
textureView :: Ptr WGPUTextureView
}

instance Storable WGPUBindGroupEntry where
  alignment :: WGPUBindGroupEntry -> Int
alignment WGPUBindGroupEntry
_ = Int
8
{-# LINE 1055 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (56)
{-# LINE 1056 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 1058 "src/Mischief/WGPU/Types/General.hsc" #-}
    binding <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 1059 "src/Mischief/WGPU/Types/General.hsc" #-}
    buffer <- (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 1060 "src/Mischief/WGPU/Types/General.hsc" #-}
    offset <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 1061 "src/Mischief/WGPU/Types/General.hsc" #-}
    size <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 1062 "src/Mischief/WGPU/Types/General.hsc" #-}
    sampler <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 1063 "src/Mischief/WGPU/Types/General.hsc" #-}
    textureView <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 1064 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBindGroupEntry{nextInChain, binding, buffer, offset, size, sampler, textureView}
  poke :: Ptr WGPUBindGroupEntry -> WGPUBindGroupEntry -> IO ()
poke Ptr WGPUBindGroupEntry
ptr WGPUBindGroupEntry{Ptr WGPUChainedStruct
nextInChain :: WGPUBindGroupEntry -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, Word32
binding :: WGPUBindGroupEntry -> Word32
binding :: Word32
binding, Ptr WGPUBuffer
buffer :: WGPUBindGroupEntry -> Ptr WGPUBuffer
buffer :: Ptr WGPUBuffer
buffer, Word64
offset :: WGPUBindGroupEntry -> Word64
offset :: Word64
offset, Word64
size :: WGPUBindGroupEntry -> Word64
size :: Word64
size, Ptr WGPUSampler
sampler :: WGPUBindGroupEntry -> Ptr WGPUSampler
sampler :: Ptr WGPUSampler
sampler, Ptr WGPUTextureView
textureView :: WGPUBindGroupEntry -> Ptr WGPUTextureView
textureView :: Ptr WGPUTextureView
textureView} = do
    (\Ptr WGPUBindGroupEntry
hsc_ptr -> Ptr WGPUBindGroupEntry -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupEntry
hsc_ptr Int
0) Ptr WGPUBindGroupEntry
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 1067 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr binding
{-# LINE 1068 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 16) ptr buffer
{-# LINE 1069 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr offset
{-# LINE 1070 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr size
{-# LINE 1071 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr sampler
{-# LINE 1072 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr textureView
{-# LINE 1073 "src/Mischief/WGPU/Types/General.hsc" #-}

data WGPUBindGroupDescriptor = WGPUBindGroupDescriptor {
  WGPUBindGroupDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBindGroupDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUBindGroupDescriptor -> Ptr WGPUBindGroupLayout
layout :: Ptr WGPUBindGroupLayout, 
  WGPUBindGroupDescriptor -> CSize
entryCount :: CSize, 
  WGPUBindGroupDescriptor -> ConstPtr WGPUBindGroupEntry
entries :: ConstPtr WGPUBindGroupEntry
}
 
instance Storable WGPUBindGroupDescriptor where
  alignment :: WGPUBindGroupDescriptor -> Int
alignment WGPUBindGroupDescriptor
_ = Int
8
{-# LINE 1084 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (48)
{-# LINE 1085 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 1087 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 1088 "src/Mischief/WGPU/Types/General.hsc" #-}
    layout <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 1089 "src/Mischief/WGPU/Types/General.hsc" #-}
    entryCount <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 1090 "src/Mischief/WGPU/Types/General.hsc" #-}
    entries <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 1091 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBindGroupDescriptor{nextInChain, label, layout, entryCount, entries}
  poke :: Ptr WGPUBindGroupDescriptor -> WGPUBindGroupDescriptor -> IO ()
poke Ptr WGPUBindGroupDescriptor
ptr WGPUBindGroupDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUBindGroupDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUBindGroupDescriptor -> WGPUStringView
label :: WGPUStringView
label, Ptr WGPUBindGroupLayout
layout :: WGPUBindGroupDescriptor -> Ptr WGPUBindGroupLayout
layout :: Ptr WGPUBindGroupLayout
layout, CSize
entryCount :: WGPUBindGroupDescriptor -> CSize
entryCount :: CSize
entryCount, ConstPtr WGPUBindGroupEntry
entries :: WGPUBindGroupDescriptor -> ConstPtr WGPUBindGroupEntry
entries :: ConstPtr WGPUBindGroupEntry
entries} = do
    (\Ptr WGPUBindGroupDescriptor
hsc_ptr -> Ptr WGPUBindGroupDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBindGroupDescriptor
hsc_ptr Int
0) Ptr WGPUBindGroupDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 1094 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 1095 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr layout
{-# LINE 1096 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr entryCount
{-# LINE 1097 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr entries
{-# LINE 1098 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUTextureViewDescriptor = WGPUTextureViewDescriptor {
  WGPUTextureViewDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUTextureViewDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUTextureViewDescriptor -> WGPUTextureFormat
format :: WGPUTextureFormat, 
  WGPUTextureViewDescriptor -> WGPUTextureViewDimension
dimension :: WGPUTextureViewDimension, 
  WGPUTextureViewDescriptor -> Word32
baseMipLevel :: Word32, 
  WGPUTextureViewDescriptor -> Word32
mipLevelCount :: Word32, 
  WGPUTextureViewDescriptor -> Word32
baseArrayLayer :: Word32, 
  WGPUTextureViewDescriptor -> Word32
arrayLayerCount :: Word32, 
  WGPUTextureViewDescriptor -> WGPUTextureAspect
aspect :: WGPUTextureAspect, 
  WGPUTextureViewDescriptor -> WGPUTextureUsage
usage :: WGPUTextureUsage
}

instance Storable WGPUTextureViewDescriptor where
  alignment :: WGPUTextureViewDescriptor -> Int
alignment WGPUTextureViewDescriptor
_ = Int
8
{-# LINE 1115 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (64)
{-# LINE 1116 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 1118 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 1119 "src/Mischief/WGPU/Types/General.hsc" #-}
    format <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 1120 "src/Mischief/WGPU/Types/General.hsc" #-}
    dimension <- (\hsc_ptr -> peekByteOff hsc_ptr 28) ptr
{-# LINE 1121 "src/Mischief/WGPU/Types/General.hsc" #-}
    baseMipLevel <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 1122 "src/Mischief/WGPU/Types/General.hsc" #-}
    mipLevelCount <- (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 1123 "src/Mischief/WGPU/Types/General.hsc" #-}
    baseArrayLayer <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 1124 "src/Mischief/WGPU/Types/General.hsc" #-}
    arrayLayerCount <- (\hsc_ptr -> peekByteOff hsc_ptr 44) ptr
{-# LINE 1125 "src/Mischief/WGPU/Types/General.hsc" #-}
    aspect <- (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 1126 "src/Mischief/WGPU/Types/General.hsc" #-}
    usage <- (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 1127 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUTextureViewDescriptor{nextInChain, label, format, dimension, baseMipLevel, mipLevelCount, baseArrayLayer, arrayLayerCount, aspect, usage}
  poke :: Ptr WGPUTextureViewDescriptor -> WGPUTextureViewDescriptor -> IO ()
poke Ptr WGPUTextureViewDescriptor
ptr WGPUTextureViewDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUTextureViewDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUTextureViewDescriptor -> WGPUStringView
label :: WGPUStringView
label, WGPUTextureFormat
format :: WGPUTextureViewDescriptor -> WGPUTextureFormat
format :: WGPUTextureFormat
format, WGPUTextureViewDimension
dimension :: WGPUTextureViewDescriptor -> WGPUTextureViewDimension
dimension :: WGPUTextureViewDimension
dimension, Word32
baseMipLevel :: WGPUTextureViewDescriptor -> Word32
baseMipLevel :: Word32
baseMipLevel, Word32
mipLevelCount :: WGPUTextureViewDescriptor -> Word32
mipLevelCount :: Word32
mipLevelCount, Word32
baseArrayLayer :: WGPUTextureViewDescriptor -> Word32
baseArrayLayer :: Word32
baseArrayLayer, Word32
arrayLayerCount :: WGPUTextureViewDescriptor -> Word32
arrayLayerCount :: Word32
arrayLayerCount, WGPUTextureAspect
aspect :: WGPUTextureViewDescriptor -> WGPUTextureAspect
aspect :: WGPUTextureAspect
aspect, WGPUTextureUsage
usage :: WGPUTextureViewDescriptor -> WGPUTextureUsage
usage :: WGPUTextureUsage
usage} = do
    (\Ptr WGPUTextureViewDescriptor
hsc_ptr -> Ptr WGPUTextureViewDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUTextureViewDescriptor
hsc_ptr Int
0) Ptr WGPUTextureViewDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 1130 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 1131 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr format
{-# LINE 1132 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 28) ptr dimension
{-# LINE 1133 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr baseMipLevel
{-# LINE 1134 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 36) ptr mipLevelCount
{-# LINE 1135 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr baseArrayLayer
{-# LINE 1136 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 44) ptr arrayLayerCount
{-# LINE 1137 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 48) ptr aspect
{-# LINE 1138 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 56) ptr usage
{-# LINE 1139 "src/Mischief/WGPU/Types/General.hsc" #-}


data WGPUBufferDescriptor = WGPUBufferDescriptor {
  WGPUBufferDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct, 
  WGPUBufferDescriptor -> WGPUStringView
label :: WGPUStringView, 
  WGPUBufferDescriptor -> WGPUBufferUsage
usage :: WGPUBufferUsage, 
  WGPUBufferDescriptor -> Word64
size :: Word64, 
  WGPUBufferDescriptor -> WGPUBool
mappedAtCreation :: WGPUBool
}

instance Storable WGPUBufferDescriptor where
  alignment :: WGPUBufferDescriptor -> Int
alignment WGPUBufferDescriptor
_ = Int
8
{-# LINE 1151 "src/Mischief/WGPU/Types/General.hsc" #-}
  sizeOf _ = (48)
{-# LINE 1152 "src/Mischief/WGPU/Types/General.hsc" #-}
  peek ptr = do
    nextInChain <- (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 1154 "src/Mischief/WGPU/Types/General.hsc" #-}
    label <- (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 1155 "src/Mischief/WGPU/Types/General.hsc" #-}
    usage <- (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 1156 "src/Mischief/WGPU/Types/General.hsc" #-}
    size <- (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 1157 "src/Mischief/WGPU/Types/General.hsc" #-}
    mappedAtCreation <- (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 1158 "src/Mischief/WGPU/Types/General.hsc" #-}
    return WGPUBufferDescriptor{nextInChain, label, usage, size, mappedAtCreation}
  poke :: Ptr WGPUBufferDescriptor -> WGPUBufferDescriptor -> IO ()
poke Ptr WGPUBufferDescriptor
ptr WGPUBufferDescriptor{Ptr WGPUChainedStruct
nextInChain :: WGPUBufferDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain, WGPUStringView
label :: WGPUBufferDescriptor -> WGPUStringView
label :: WGPUStringView
label, WGPUBufferUsage
usage :: WGPUBufferDescriptor -> WGPUBufferUsage
usage :: WGPUBufferUsage
usage, Word64
size :: WGPUBufferDescriptor -> Word64
size :: Word64
size, WGPUBool
mappedAtCreation :: WGPUBufferDescriptor -> WGPUBool
mappedAtCreation :: WGPUBool
mappedAtCreation} = do
    (\Ptr WGPUBufferDescriptor
hsc_ptr -> Ptr WGPUBufferDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall b. Ptr b -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBufferDescriptor
hsc_ptr Int
0) Ptr WGPUBufferDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 1161 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 8) ptr label
{-# LINE 1162 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 24) ptr usage
{-# LINE 1163 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 32) ptr size
{-# LINE 1164 "src/Mischief/WGPU/Types/General.hsc" #-}
    (\hsc_ptr -> pokeByteOff hsc_ptr 40) ptr mappedAtCreation
{-# LINE 1165 "src/Mischief/WGPU/Types/General.hsc" #-}