{-# LINE 1 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
{-# OPTIONS_GHC -Wall -fno-warn-tabs #-}

module Gpu.Vulkan.Semaphore.Core (

	-- * CREATE AND DESTROY

	create, destroy, S, PtrS, CreateInfo, pattern CreateInfo,
	createInfoSType, createInfoPNext, createInfoFlags,

	-- * SUBMIT INFO

	SubmitInfo, PtrSubmitInfo, pattern SubmitInfo,
	submitInfoSType, submitInfoPNext,
	submitInfoSemaphore, submitInfoValue,
	submitInfoStageMask, submitInfoDeviceIndex

	) where

import Foreign.Ptr
import Foreign.Storable
import Foreign.C.Struct
import Foreign.C.Struct.TypeSynonyms
import Data.Word
import Data.Int

import qualified Gpu.Vulkan.AllocationCallbacks.Core as AllocationCallbacks
import qualified Gpu.Vulkan.Device.Core as Device



sType :: Word32
{-# LINE 35 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
sType = 9
{-# LINE 36 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}

struct "CreateInfo" (24)
{-# LINE 38 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		8 [
{-# LINE 39 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("sType", ''(), [| const $ pure () |],
		[| \p _ -> (\hsc_ptr -> pokeByteOff hsc_ptr 0) p sType |]),
{-# LINE 41 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("pNext", ''PtrVoid,
		[| (\hsc_ptr -> peekByteOff hsc_ptr 8) |],
{-# LINE 43 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 8) |]),
{-# LINE 44 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("flags", ''Word32,
{-# LINE 45 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> peekByteOff hsc_ptr 16) |],
{-# LINE 46 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 16) |]) ]
{-# LINE 47 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	[''Show, ''Storable]

data STag
type S = Ptr STag
type PtrS = Ptr S

foreign import ccall "vkCreateSemaphore" create ::
	Device.D -> Ptr CreateInfo -> Ptr AllocationCallbacks.A ->
	Ptr S -> IO Int32
{-# LINE 56 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}

foreign import ccall "vkDestroySemaphore" destroy ::
	Device.D -> S -> Ptr AllocationCallbacks.A -> IO ()

ssType :: Word32
{-# LINE 61 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
ssType = 1000314005
{-# LINE 62 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}

struct "SubmitInfo" (48)
{-# LINE 64 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	8 [
{-# LINE 65 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("sType", ''(), [| const $ pure () |],
		[| \p _ -> (\hsc_ptr -> pokeByteOff hsc_ptr 0) p ssType |]),
{-# LINE 67 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("pNext", ''PtrVoid,
		[| (\hsc_ptr -> peekByteOff hsc_ptr 8) |],
{-# LINE 69 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 8) |]),
{-# LINE 70 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("semaphore", ''S,
		[| (\hsc_ptr -> peekByteOff hsc_ptr 16) |],
{-# LINE 72 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 16) |]),
{-# LINE 73 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("value", ''Word64,
{-# LINE 74 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> peekByteOff hsc_ptr 24) |],
{-# LINE 75 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 24) |]),
{-# LINE 76 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("stageMask", ''Word64,
{-# LINE 77 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> peekByteOff hsc_ptr 32) |],
{-# LINE 78 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 32) |]),
{-# LINE 79 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	("deviceIndex", ''Word32,
{-# LINE 80 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> peekByteOff hsc_ptr 40) |],
{-# LINE 81 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
		[| (\hsc_ptr -> pokeByteOff hsc_ptr 40) |]) ]
{-# LINE 82 "src/Gpu/Vulkan/Semaphore/Core.hsc" #-}
	[''Show, ''Storable]

type PtrSubmitInfo = Ptr SubmitInfo