{-# language CPP #-}
-- | = Name
--
-- VK_EXT_global_priority - device extension
--
-- == VK_EXT_global_priority
--
-- [__Name String__]
--     @VK_EXT_global_priority@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     175
--
-- [__Revision__]
--     2
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
-- [__Contact__]
--
--     -   Andres Rodriguez
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_EXT_global_priority:%20&body=@lostgoat%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2017-10-06
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Andres Rodriguez, Valve
--
--     -   Pierre-Loup Griffais, Valve
--
--     -   Dan Ginsburg, Valve
--
--     -   Mitch Singer, AMD
--
-- == Description
--
-- In Vulkan, users can specify device-scope queue priorities. In some
-- cases it may be useful to extend this concept to a system-wide scope.
-- This extension provides a mechanism for caller’s to set their
-- system-wide priority. The default queue priority is
-- 'QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT'.
--
-- The driver implementation will attempt to skew hardware resource
-- allocation in favour of the higher-priority task. Therefore,
-- higher-priority work may retain similar latency and throughput
-- characteristics even if the system is congested with lower priority
-- work.
--
-- The global priority level of a queue shall take precedence over the
-- per-process queue priority
-- ('Vulkan.Core10.Device.DeviceQueueCreateInfo'::@pQueuePriorities@).
--
-- Abuse of this feature may result in starving the rest of the system from
-- hardware resources. Therefore, the driver implementation may deny
-- requests to acquire a priority above the default priority
-- ('QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT') if the caller does not have
-- sufficient privileges. In this scenario
-- 'Vulkan.Core10.Enums.Result.ERROR_NOT_PERMITTED_EXT' is returned.
--
-- The driver implementation may fail the queue allocation request if
-- resources required to complete the operation have been exhausted (either
-- by the same process or a different process). In this scenario
-- 'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED' is returned.
--
-- == New Structures
--
-- -   Extending 'Vulkan.Core10.Device.DeviceQueueCreateInfo':
--
--     -   'DeviceQueueGlobalPriorityCreateInfoEXT'
--
-- == New Enums
--
-- -   'QueueGlobalPriorityEXT'
--
-- == New Enum Constants
--
-- -   'EXT_GLOBAL_PRIORITY_EXTENSION_NAME'
--
-- -   'EXT_GLOBAL_PRIORITY_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.Result.Result':
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_NOT_PERMITTED_EXT'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT'
--
-- == Version History
--
-- -   Revision 2, 2017-11-03 (Andres Rodriguez)
--
--     -   Fixed VkQueueGlobalPriorityEXT missing _EXT suffix
--
-- -   Revision 1, 2017-10-06 (Andres Rodriguez)
--
--     -   First version.
--
-- = See Also
--
-- 'DeviceQueueGlobalPriorityCreateInfoEXT', 'QueueGlobalPriorityEXT'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_global_priority Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_global_priority  ( DeviceQueueGlobalPriorityCreateInfoEXT(..)
                                                 , QueueGlobalPriorityEXT( QUEUE_GLOBAL_PRIORITY_LOW_EXT
                                                                         , QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT
                                                                         , QUEUE_GLOBAL_PRIORITY_HIGH_EXT
                                                                         , QUEUE_GLOBAL_PRIORITY_REALTIME_EXT
                                                                         , ..
                                                                         )
                                                 , EXT_GLOBAL_PRIORITY_SPEC_VERSION
                                                 , pattern EXT_GLOBAL_PRIORITY_SPEC_VERSION
                                                 , EXT_GLOBAL_PRIORITY_EXTENSION_NAME
                                                 , pattern EXT_GLOBAL_PRIORITY_EXTENSION_NAME
                                                 ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT))
-- | VkDeviceQueueGlobalPriorityCreateInfoEXT - Specify a system wide
-- priority
--
-- = Description
--
-- A queue created without specifying
-- 'DeviceQueueGlobalPriorityCreateInfoEXT' will default to
-- 'QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'QueueGlobalPriorityEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfoEXT
  { -- | @globalPriority@ is the system-wide priority associated to this queue as
    -- specified by 'QueueGlobalPriorityEXT'
    --
    -- #VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-globalPriority-parameter#
    -- @globalPriority@ /must/ be a valid 'QueueGlobalPriorityEXT' value
    DeviceQueueGlobalPriorityCreateInfoEXT -> QueueGlobalPriorityEXT
globalPriority :: QueueGlobalPriorityEXT }
  deriving (Typeable, DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool
(DeviceQueueGlobalPriorityCreateInfoEXT
 -> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool)
-> (DeviceQueueGlobalPriorityCreateInfoEXT
    -> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool)
-> Eq DeviceQueueGlobalPriorityCreateInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool
$c/= :: DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool
== :: DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool
$c== :: DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceQueueGlobalPriorityCreateInfoEXT)
#endif
deriving instance Show DeviceQueueGlobalPriorityCreateInfoEXT

instance ToCStruct DeviceQueueGlobalPriorityCreateInfoEXT where
  withCStruct :: DeviceQueueGlobalPriorityCreateInfoEXT
-> (Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b) -> IO b
withCStruct x :: DeviceQueueGlobalPriorityCreateInfoEXT
x f :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b
f = Int
-> Int
-> (Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b) -> IO b)
-> (Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p -> Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p DeviceQueueGlobalPriorityCreateInfoEXT
x (Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b
f Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p)
  pokeCStruct :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p DeviceQueueGlobalPriorityCreateInfoEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> Int -> Ptr QueueGlobalPriorityEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr QueueGlobalPriorityEXT)) (QueueGlobalPriorityEXT
globalPriority)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> Int -> Ptr QueueGlobalPriorityEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr QueueGlobalPriorityEXT)) (QueueGlobalPriorityEXT
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DeviceQueueGlobalPriorityCreateInfoEXT where
  peekCStruct :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> IO DeviceQueueGlobalPriorityCreateInfoEXT
peekCStruct p :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p = do
    QueueGlobalPriorityEXT
globalPriority <- Ptr QueueGlobalPriorityEXT -> IO QueueGlobalPriorityEXT
forall a. Storable a => Ptr a -> IO a
peek @QueueGlobalPriorityEXT ((Ptr DeviceQueueGlobalPriorityCreateInfoEXT
p Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> Int -> Ptr QueueGlobalPriorityEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr QueueGlobalPriorityEXT))
    DeviceQueueGlobalPriorityCreateInfoEXT
-> IO DeviceQueueGlobalPriorityCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceQueueGlobalPriorityCreateInfoEXT
 -> IO DeviceQueueGlobalPriorityCreateInfoEXT)
-> DeviceQueueGlobalPriorityCreateInfoEXT
-> IO DeviceQueueGlobalPriorityCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ QueueGlobalPriorityEXT -> DeviceQueueGlobalPriorityCreateInfoEXT
DeviceQueueGlobalPriorityCreateInfoEXT
             QueueGlobalPriorityEXT
globalPriority

instance Storable DeviceQueueGlobalPriorityCreateInfoEXT where
  sizeOf :: DeviceQueueGlobalPriorityCreateInfoEXT -> Int
sizeOf ~DeviceQueueGlobalPriorityCreateInfoEXT
_ = 24
  alignment :: DeviceQueueGlobalPriorityCreateInfoEXT -> Int
alignment ~DeviceQueueGlobalPriorityCreateInfoEXT
_ = 8
  peek :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> IO DeviceQueueGlobalPriorityCreateInfoEXT
peek = Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> IO DeviceQueueGlobalPriorityCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> IO ()
poke ptr :: Ptr DeviceQueueGlobalPriorityCreateInfoEXT
ptr poked :: DeviceQueueGlobalPriorityCreateInfoEXT
poked = Ptr DeviceQueueGlobalPriorityCreateInfoEXT
-> DeviceQueueGlobalPriorityCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceQueueGlobalPriorityCreateInfoEXT
ptr DeviceQueueGlobalPriorityCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DeviceQueueGlobalPriorityCreateInfoEXT where
  zero :: DeviceQueueGlobalPriorityCreateInfoEXT
zero = QueueGlobalPriorityEXT -> DeviceQueueGlobalPriorityCreateInfoEXT
DeviceQueueGlobalPriorityCreateInfoEXT
           QueueGlobalPriorityEXT
forall a. Zero a => a
zero


-- | VkQueueGlobalPriorityEXT - Values specifying a system-wide queue
-- priority
--
-- = Description
--
-- Priority values are sorted in ascending order. A comparison operation on
-- the enum values can be used to determine the priority order.
--
-- = See Also
--
-- 'DeviceQueueGlobalPriorityCreateInfoEXT'
newtype QueueGlobalPriorityEXT = QueueGlobalPriorityEXT Int32
  deriving newtype (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
(QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> Eq QueueGlobalPriorityEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c/= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
== :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c== :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
Eq, Eq QueueGlobalPriorityEXT
Eq QueueGlobalPriorityEXT =>
(QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Ordering)
-> (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> (QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool)
-> (QueueGlobalPriorityEXT
    -> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT)
-> (QueueGlobalPriorityEXT
    -> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT)
-> Ord QueueGlobalPriorityEXT
QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Ordering
QueueGlobalPriorityEXT
-> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: QueueGlobalPriorityEXT
-> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT
$cmin :: QueueGlobalPriorityEXT
-> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT
max :: QueueGlobalPriorityEXT
-> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT
$cmax :: QueueGlobalPriorityEXT
-> QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT
>= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c>= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
> :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c> :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
<= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c<= :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
< :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
$c< :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Bool
compare :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Ordering
$ccompare :: QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> Ordering
$cp1Ord :: Eq QueueGlobalPriorityEXT
Ord, Ptr b -> Int -> IO QueueGlobalPriorityEXT
Ptr b -> Int -> QueueGlobalPriorityEXT -> IO ()
Ptr QueueGlobalPriorityEXT -> IO QueueGlobalPriorityEXT
Ptr QueueGlobalPriorityEXT -> Int -> IO QueueGlobalPriorityEXT
Ptr QueueGlobalPriorityEXT
-> Int -> QueueGlobalPriorityEXT -> IO ()
Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ()
QueueGlobalPriorityEXT -> Int
(QueueGlobalPriorityEXT -> Int)
-> (QueueGlobalPriorityEXT -> Int)
-> (Ptr QueueGlobalPriorityEXT -> Int -> IO QueueGlobalPriorityEXT)
-> (Ptr QueueGlobalPriorityEXT
    -> Int -> QueueGlobalPriorityEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO QueueGlobalPriorityEXT)
-> (forall b. Ptr b -> Int -> QueueGlobalPriorityEXT -> IO ())
-> (Ptr QueueGlobalPriorityEXT -> IO QueueGlobalPriorityEXT)
-> (Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ())
-> Storable QueueGlobalPriorityEXT
forall b. Ptr b -> Int -> IO QueueGlobalPriorityEXT
forall b. Ptr b -> Int -> QueueGlobalPriorityEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ()
$cpoke :: Ptr QueueGlobalPriorityEXT -> QueueGlobalPriorityEXT -> IO ()
peek :: Ptr QueueGlobalPriorityEXT -> IO QueueGlobalPriorityEXT
$cpeek :: Ptr QueueGlobalPriorityEXT -> IO QueueGlobalPriorityEXT
pokeByteOff :: Ptr b -> Int -> QueueGlobalPriorityEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> QueueGlobalPriorityEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO QueueGlobalPriorityEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO QueueGlobalPriorityEXT
pokeElemOff :: Ptr QueueGlobalPriorityEXT
-> Int -> QueueGlobalPriorityEXT -> IO ()
$cpokeElemOff :: Ptr QueueGlobalPriorityEXT
-> Int -> QueueGlobalPriorityEXT -> IO ()
peekElemOff :: Ptr QueueGlobalPriorityEXT -> Int -> IO QueueGlobalPriorityEXT
$cpeekElemOff :: Ptr QueueGlobalPriorityEXT -> Int -> IO QueueGlobalPriorityEXT
alignment :: QueueGlobalPriorityEXT -> Int
$calignment :: QueueGlobalPriorityEXT -> Int
sizeOf :: QueueGlobalPriorityEXT -> Int
$csizeOf :: QueueGlobalPriorityEXT -> Int
Storable, QueueGlobalPriorityEXT
QueueGlobalPriorityEXT -> Zero QueueGlobalPriorityEXT
forall a. a -> Zero a
zero :: QueueGlobalPriorityEXT
$czero :: QueueGlobalPriorityEXT
Zero)
-- Note that the zero instance does not produce a valid value, passing 'zero' to Vulkan will result in an error

-- | 'QUEUE_GLOBAL_PRIORITY_LOW_EXT' is below the system default. Useful for
-- non-interactive tasks.
pattern $bQUEUE_GLOBAL_PRIORITY_LOW_EXT :: QueueGlobalPriorityEXT
$mQUEUE_GLOBAL_PRIORITY_LOW_EXT :: forall r.
QueueGlobalPriorityEXT -> (Void# -> r) -> (Void# -> r) -> r
QUEUE_GLOBAL_PRIORITY_LOW_EXT      = QueueGlobalPriorityEXT 128
-- | 'QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT' is the system default priority.
pattern $bQUEUE_GLOBAL_PRIORITY_MEDIUM_EXT :: QueueGlobalPriorityEXT
$mQUEUE_GLOBAL_PRIORITY_MEDIUM_EXT :: forall r.
QueueGlobalPriorityEXT -> (Void# -> r) -> (Void# -> r) -> r
QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT   = QueueGlobalPriorityEXT 256
-- | 'QUEUE_GLOBAL_PRIORITY_HIGH_EXT' is above the system default.
pattern $bQUEUE_GLOBAL_PRIORITY_HIGH_EXT :: QueueGlobalPriorityEXT
$mQUEUE_GLOBAL_PRIORITY_HIGH_EXT :: forall r.
QueueGlobalPriorityEXT -> (Void# -> r) -> (Void# -> r) -> r
QUEUE_GLOBAL_PRIORITY_HIGH_EXT     = QueueGlobalPriorityEXT 512
-- | 'QUEUE_GLOBAL_PRIORITY_REALTIME_EXT' is the highest priority. Useful for
-- critical tasks.
pattern $bQUEUE_GLOBAL_PRIORITY_REALTIME_EXT :: QueueGlobalPriorityEXT
$mQUEUE_GLOBAL_PRIORITY_REALTIME_EXT :: forall r.
QueueGlobalPriorityEXT -> (Void# -> r) -> (Void# -> r) -> r
QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = QueueGlobalPriorityEXT 1024
{-# complete QUEUE_GLOBAL_PRIORITY_LOW_EXT,
             QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT,
             QUEUE_GLOBAL_PRIORITY_HIGH_EXT,
             QUEUE_GLOBAL_PRIORITY_REALTIME_EXT :: QueueGlobalPriorityEXT #-}

conNameQueueGlobalPriorityEXT :: String
conNameQueueGlobalPriorityEXT :: String
conNameQueueGlobalPriorityEXT = "QueueGlobalPriorityEXT"

enumPrefixQueueGlobalPriorityEXT :: String
enumPrefixQueueGlobalPriorityEXT :: String
enumPrefixQueueGlobalPriorityEXT = "QUEUE_GLOBAL_PRIORITY_"

showTableQueueGlobalPriorityEXT :: [(QueueGlobalPriorityEXT, String)]
showTableQueueGlobalPriorityEXT :: [(QueueGlobalPriorityEXT, String)]
showTableQueueGlobalPriorityEXT =
  [ (QueueGlobalPriorityEXT
QUEUE_GLOBAL_PRIORITY_LOW_EXT     , "LOW_EXT")
  , (QueueGlobalPriorityEXT
QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT  , "MEDIUM_EXT")
  , (QueueGlobalPriorityEXT
QUEUE_GLOBAL_PRIORITY_HIGH_EXT    , "HIGH_EXT")
  , (QueueGlobalPriorityEXT
QUEUE_GLOBAL_PRIORITY_REALTIME_EXT, "REALTIME_EXT")
  ]

instance Show QueueGlobalPriorityEXT where
  showsPrec :: Int -> QueueGlobalPriorityEXT -> ShowS
showsPrec = String
-> [(QueueGlobalPriorityEXT, String)]
-> String
-> (QueueGlobalPriorityEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> QueueGlobalPriorityEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixQueueGlobalPriorityEXT
                            [(QueueGlobalPriorityEXT, String)]
showTableQueueGlobalPriorityEXT
                            String
conNameQueueGlobalPriorityEXT
                            (\(QueueGlobalPriorityEXT x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read QueueGlobalPriorityEXT where
  readPrec :: ReadPrec QueueGlobalPriorityEXT
readPrec = String
-> [(QueueGlobalPriorityEXT, String)]
-> String
-> (Int32 -> QueueGlobalPriorityEXT)
-> ReadPrec QueueGlobalPriorityEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixQueueGlobalPriorityEXT
                          [(QueueGlobalPriorityEXT, String)]
showTableQueueGlobalPriorityEXT
                          String
conNameQueueGlobalPriorityEXT
                          Int32 -> QueueGlobalPriorityEXT
QueueGlobalPriorityEXT


type EXT_GLOBAL_PRIORITY_SPEC_VERSION = 2

-- No documentation found for TopLevel "VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION"
pattern EXT_GLOBAL_PRIORITY_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_GLOBAL_PRIORITY_SPEC_VERSION :: a
$mEXT_GLOBAL_PRIORITY_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_GLOBAL_PRIORITY_SPEC_VERSION = 2


type EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"

-- No documentation found for TopLevel "VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME"
pattern EXT_GLOBAL_PRIORITY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_GLOBAL_PRIORITY_EXTENSION_NAME :: a
$mEXT_GLOBAL_PRIORITY_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"