{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_discard_rectangles ( cmdSetDiscardRectangleEXT
, cmdSetDiscardRectangleEnableEXT
, cmdSetDiscardRectangleModeEXT
, PhysicalDeviceDiscardRectanglePropertiesEXT(..)
, PipelineDiscardRectangleStateCreateInfoEXT(..)
, PipelineDiscardRectangleStateCreateFlagsEXT(..)
, DiscardRectangleModeEXT( DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
, DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
, ..
)
, EXT_DISCARD_RECTANGLES_SPEC_VERSION
, pattern EXT_DISCARD_RECTANGLES_SPEC_VERSION
, EXT_DISCARD_RECTANGLES_EXTENSION_NAME
, pattern EXT_DISCARD_RECTANGLES_EXTENSION_NAME
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDiscardRectangleEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDiscardRectangleEnableEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDiscardRectangleModeEXT))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.FundamentalTypes (Rect2D)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetDiscardRectangleEXT
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()
cmdSetDiscardRectangleEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("firstDiscardRectangle" ::: Word32)
->
("discardRectangles" ::: Vector Rect2D)
-> io ()
cmdSetDiscardRectangleEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("firstDiscardRectangle" ::: Word32)
-> ("discardRectangles" ::: Vector Rect2D)
-> io ()
cmdSetDiscardRectangleEXT CommandBuffer
commandBuffer
"firstDiscardRectangle" ::: Word32
firstDiscardRectangle
"discardRectangles" ::: Vector Rect2D
discardRectangles = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetDiscardRectangleEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ())
vkCmdSetDiscardRectangleEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ())
pVkCmdSetDiscardRectangleEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ())
vkCmdSetDiscardRectangleEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDiscardRectangleEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdSetDiscardRectangleEXT' :: Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ()
vkCmdSetDiscardRectangleEXT' = FunPtr
(Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ())
-> Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ()
mkVkCmdSetDiscardRectangleEXT FunPtr
(Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ())
vkCmdSetDiscardRectangleEXTPtr
"pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Rect2D ((forall a. Vector a -> Int
Data.Vector.length ("discardRectangles" ::: Vector Rect2D
discardRectangles)) forall a. Num a => a -> a -> a
* Int
16)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Rect2D
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D) (Rect2D
e)) ("discardRectangles" ::: Vector Rect2D
discardRectangles)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetDiscardRectangleEXT" (Ptr CommandBuffer_T
-> ("firstDiscardRectangle" ::: Word32)
-> ("firstDiscardRectangle" ::: Word32)
-> ("pDiscardRectangles" ::: Ptr Rect2D)
-> IO ()
vkCmdSetDiscardRectangleEXT'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
("firstDiscardRectangle" ::: Word32
firstDiscardRectangle)
((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("discardRectangles" ::: Vector Rect2D
discardRectangles)) :: Word32))
("pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetDiscardRectangleEnableEXT
:: FunPtr (Ptr CommandBuffer_T -> Bool32 -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> IO ()
cmdSetDiscardRectangleEnableEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("discardRectangleEnable" ::: Bool)
-> io ()
cmdSetDiscardRectangleEnableEXT :: forall (io :: * -> *). MonadIO io => CommandBuffer -> Bool -> io ()
cmdSetDiscardRectangleEnableEXT CommandBuffer
commandBuffer
Bool
discardRectangleEnable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetDiscardRectangleEnableEXTPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ())
vkCmdSetDiscardRectangleEnableEXTPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ())
pVkCmdSetDiscardRectangleEnableEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ())
vkCmdSetDiscardRectangleEnableEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDiscardRectangleEnableEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdSetDiscardRectangleEnableEXT' :: Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ()
vkCmdSetDiscardRectangleEnableEXT' = FunPtr
(Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ())
-> Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32)
-> IO ()
mkVkCmdSetDiscardRectangleEnableEXT FunPtr
(Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ())
vkCmdSetDiscardRectangleEnableEXTPtr
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetDiscardRectangleEnableEXT" (Ptr CommandBuffer_T
-> ("discardRectangleEnable" ::: Bool32) -> IO ()
vkCmdSetDiscardRectangleEnableEXT'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(Bool -> "discardRectangleEnable" ::: Bool32
boolToBool32 (Bool
discardRectangleEnable)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetDiscardRectangleModeEXT
:: FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ()) -> Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ()
cmdSetDiscardRectangleModeEXT :: forall io
. (MonadIO io)
=>
CommandBuffer
->
DiscardRectangleModeEXT
-> io ()
cmdSetDiscardRectangleModeEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> DiscardRectangleModeEXT -> io ()
cmdSetDiscardRectangleModeEXT CommandBuffer
commandBuffer DiscardRectangleModeEXT
discardRectangleMode = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetDiscardRectangleModeEXTPtr :: FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ())
vkCmdSetDiscardRectangleModeEXTPtr = DeviceCmds
-> FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ())
pVkCmdSetDiscardRectangleModeEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ())
vkCmdSetDiscardRectangleModeEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDiscardRectangleModeEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdSetDiscardRectangleModeEXT' :: Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ()
vkCmdSetDiscardRectangleModeEXT' = FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ())
-> Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ()
mkVkCmdSetDiscardRectangleModeEXT FunPtr (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ())
vkCmdSetDiscardRectangleModeEXTPtr
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetDiscardRectangleModeEXT" (Ptr CommandBuffer_T -> DiscardRectangleModeEXT -> IO ()
vkCmdSetDiscardRectangleModeEXT'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(DiscardRectangleModeEXT
discardRectangleMode))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
data PhysicalDeviceDiscardRectanglePropertiesEXT = PhysicalDeviceDiscardRectanglePropertiesEXT
{
PhysicalDeviceDiscardRectanglePropertiesEXT
-> "firstDiscardRectangle" ::: Word32
maxDiscardRectangles :: Word32 }
deriving (Typeable, PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> Bool
$c/= :: PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> Bool
== :: PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> Bool
$c== :: PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDiscardRectanglePropertiesEXT)
#endif
deriving instance Show PhysicalDeviceDiscardRectanglePropertiesEXT
instance ToCStruct PhysicalDeviceDiscardRectanglePropertiesEXT where
withCStruct :: forall b.
PhysicalDeviceDiscardRectanglePropertiesEXT
-> (Ptr PhysicalDeviceDiscardRectanglePropertiesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceDiscardRectanglePropertiesEXT
x Ptr PhysicalDeviceDiscardRectanglePropertiesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p PhysicalDeviceDiscardRectanglePropertiesEXT
x (Ptr PhysicalDeviceDiscardRectanglePropertiesEXT -> IO b
f Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p PhysicalDeviceDiscardRectanglePropertiesEXT{"firstDiscardRectangle" ::: Word32
maxDiscardRectangles :: "firstDiscardRectangle" ::: Word32
$sel:maxDiscardRectangles:PhysicalDeviceDiscardRectanglePropertiesEXT :: PhysicalDeviceDiscardRectanglePropertiesEXT
-> "firstDiscardRectangle" ::: Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ("firstDiscardRectangle" ::: Word32
maxDiscardRectangles)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDiscardRectanglePropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceDiscardRectanglePropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
-> IO PhysicalDeviceDiscardRectanglePropertiesEXT
peekCStruct Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p = do
"firstDiscardRectangle" ::: Word32
maxDiscardRectangles <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("firstDiscardRectangle" ::: Word32)
-> PhysicalDeviceDiscardRectanglePropertiesEXT
PhysicalDeviceDiscardRectanglePropertiesEXT
"firstDiscardRectangle" ::: Word32
maxDiscardRectangles
instance Storable PhysicalDeviceDiscardRectanglePropertiesEXT where
sizeOf :: PhysicalDeviceDiscardRectanglePropertiesEXT -> Int
sizeOf ~PhysicalDeviceDiscardRectanglePropertiesEXT
_ = Int
24
alignment :: PhysicalDeviceDiscardRectanglePropertiesEXT -> Int
alignment ~PhysicalDeviceDiscardRectanglePropertiesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
-> IO PhysicalDeviceDiscardRectanglePropertiesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
-> PhysicalDeviceDiscardRectanglePropertiesEXT -> IO ()
poke Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
ptr PhysicalDeviceDiscardRectanglePropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDiscardRectanglePropertiesEXT
ptr PhysicalDeviceDiscardRectanglePropertiesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDiscardRectanglePropertiesEXT where
zero :: PhysicalDeviceDiscardRectanglePropertiesEXT
zero = ("firstDiscardRectangle" ::: Word32)
-> PhysicalDeviceDiscardRectanglePropertiesEXT
PhysicalDeviceDiscardRectanglePropertiesEXT
forall a. Zero a => a
zero
data PipelineDiscardRectangleStateCreateInfoEXT = PipelineDiscardRectangleStateCreateInfoEXT
{
PipelineDiscardRectangleStateCreateInfoEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
flags :: PipelineDiscardRectangleStateCreateFlagsEXT
,
PipelineDiscardRectangleStateCreateInfoEXT
-> DiscardRectangleModeEXT
discardRectangleMode :: DiscardRectangleModeEXT
,
PipelineDiscardRectangleStateCreateInfoEXT
-> "discardRectangles" ::: Vector Rect2D
discardRectangles :: Vector Rect2D
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineDiscardRectangleStateCreateInfoEXT)
#endif
deriving instance Show PipelineDiscardRectangleStateCreateInfoEXT
instance ToCStruct PipelineDiscardRectangleStateCreateInfoEXT where
withCStruct :: forall b.
PipelineDiscardRectangleStateCreateInfoEXT
-> (Ptr PipelineDiscardRectangleStateCreateInfoEXT -> IO b) -> IO b
withCStruct PipelineDiscardRectangleStateCreateInfoEXT
x Ptr PipelineDiscardRectangleStateCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineDiscardRectangleStateCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineDiscardRectangleStateCreateInfoEXT
p PipelineDiscardRectangleStateCreateInfoEXT
x (Ptr PipelineDiscardRectangleStateCreateInfoEXT -> IO b
f Ptr PipelineDiscardRectangleStateCreateInfoEXT
p)
pokeCStruct :: forall b.
Ptr PipelineDiscardRectangleStateCreateInfoEXT
-> PipelineDiscardRectangleStateCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr PipelineDiscardRectangleStateCreateInfoEXT
p PipelineDiscardRectangleStateCreateInfoEXT{"discardRectangles" ::: Vector Rect2D
DiscardRectangleModeEXT
PipelineDiscardRectangleStateCreateFlagsEXT
discardRectangles :: "discardRectangles" ::: Vector Rect2D
discardRectangleMode :: DiscardRectangleModeEXT
flags :: PipelineDiscardRectangleStateCreateFlagsEXT
$sel:discardRectangles:PipelineDiscardRectangleStateCreateInfoEXT :: PipelineDiscardRectangleStateCreateInfoEXT
-> "discardRectangles" ::: Vector Rect2D
$sel:discardRectangleMode:PipelineDiscardRectangleStateCreateInfoEXT :: PipelineDiscardRectangleStateCreateInfoEXT
-> DiscardRectangleModeEXT
$sel:flags:PipelineDiscardRectangleStateCreateInfoEXT :: PipelineDiscardRectangleStateCreateInfoEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT)) (PipelineDiscardRectangleStateCreateFlagsEXT
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr DiscardRectangleModeEXT)) (DiscardRectangleModeEXT
discardRectangleMode)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("discardRectangles" ::: Vector Rect2D
discardRectangles)) :: Word32))
"pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Rect2D ((forall a. Vector a -> Int
Data.Vector.length ("discardRectangles" ::: Vector Rect2D
discardRectangles)) forall a. Num a => a -> a -> a
* Int
16)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Rect2D
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D) (Rect2D
e)) ("discardRectangles" ::: Vector Rect2D
discardRectangles)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Rect2D))) ("pDiscardRectangles" ::: Ptr Rect2D
pPDiscardRectangles')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineDiscardRectangleStateCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr PipelineDiscardRectangleStateCreateInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr DiscardRectangleModeEXT)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineDiscardRectangleStateCreateInfoEXT where
peekCStruct :: Ptr PipelineDiscardRectangleStateCreateInfoEXT
-> IO PipelineDiscardRectangleStateCreateInfoEXT
peekCStruct Ptr PipelineDiscardRectangleStateCreateInfoEXT
p = do
PipelineDiscardRectangleStateCreateFlagsEXT
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineDiscardRectangleStateCreateFlagsEXT ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT))
DiscardRectangleModeEXT
discardRectangleMode <- forall a. Storable a => Ptr a -> IO a
peek @DiscardRectangleModeEXT ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr DiscardRectangleModeEXT))
"firstDiscardRectangle" ::: Word32
discardRectangleCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
"pDiscardRectangles" ::: Ptr Rect2D
pDiscardRectangles <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Rect2D) ((Ptr PipelineDiscardRectangleStateCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Rect2D)))
"discardRectangles" ::: Vector Rect2D
pDiscardRectangles' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "firstDiscardRectangle" ::: Word32
discardRectangleCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Rect2D (("pDiscardRectangles" ::: Ptr Rect2D
pDiscardRectangles forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineDiscardRectangleStateCreateFlagsEXT
-> DiscardRectangleModeEXT
-> ("discardRectangles" ::: Vector Rect2D)
-> PipelineDiscardRectangleStateCreateInfoEXT
PipelineDiscardRectangleStateCreateInfoEXT
PipelineDiscardRectangleStateCreateFlagsEXT
flags DiscardRectangleModeEXT
discardRectangleMode "discardRectangles" ::: Vector Rect2D
pDiscardRectangles'
instance Zero PipelineDiscardRectangleStateCreateInfoEXT where
zero :: PipelineDiscardRectangleStateCreateInfoEXT
zero = PipelineDiscardRectangleStateCreateFlagsEXT
-> DiscardRectangleModeEXT
-> ("discardRectangles" ::: Vector Rect2D)
-> PipelineDiscardRectangleStateCreateInfoEXT
PipelineDiscardRectangleStateCreateInfoEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
newtype PipelineDiscardRectangleStateCreateFlagsEXT = PipelineDiscardRectangleStateCreateFlagsEXT Flags
deriving newtype (PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c/= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
== :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c== :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
Eq, Eq PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Ordering
PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
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 :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$cmin :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
max :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$cmax :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
>= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c>= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
> :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c> :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
<= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c<= :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
< :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$c< :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
compare :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Ordering
$ccompare :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> Ordering
Ord, Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> IO PipelineDiscardRectangleStateCreateFlagsEXT
Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
PipelineDiscardRectangleStateCreateFlagsEXT -> Int
forall b.
Ptr b -> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
forall b.
Ptr b
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> 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 PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
$cpoke :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
peek :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> IO PipelineDiscardRectangleStateCreateFlagsEXT
$cpeek :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> IO PipelineDiscardRectangleStateCreateFlagsEXT
pokeByteOff :: forall b.
Ptr b
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
peekByteOff :: forall b.
Ptr b -> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
pokeElemOff :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
$cpokeElemOff :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> IO ()
peekElemOff :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
$cpeekElemOff :: Ptr PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> IO PipelineDiscardRectangleStateCreateFlagsEXT
alignment :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$calignment :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
sizeOf :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$csizeOf :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
Storable, PipelineDiscardRectangleStateCreateFlagsEXT
forall a. a -> Zero a
zero :: PipelineDiscardRectangleStateCreateFlagsEXT
$czero :: PipelineDiscardRectangleStateCreateFlagsEXT
Zero, Eq PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT
Int -> PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
PipelineDiscardRectangleStateCreateFlagsEXT -> Int
PipelineDiscardRectangleStateCreateFlagsEXT -> Maybe Int
PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> Bool
PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$cpopCount :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
rotateR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$crotateR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
rotateL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$crotateL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
unsafeShiftR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cunsafeShiftR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
shiftR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cshiftR :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
unsafeShiftL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cunsafeShiftL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
shiftL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cshiftL :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
isSigned :: PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
$cisSigned :: PipelineDiscardRectangleStateCreateFlagsEXT -> Bool
bitSize :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$cbitSize :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
bitSizeMaybe :: PipelineDiscardRectangleStateCreateFlagsEXT -> Maybe Int
$cbitSizeMaybe :: PipelineDiscardRectangleStateCreateFlagsEXT -> Maybe Int
testBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> Bool
$ctestBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> Bool
complementBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$ccomplementBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
clearBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cclearBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
setBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$csetBit :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
bit :: Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cbit :: Int -> PipelineDiscardRectangleStateCreateFlagsEXT
zeroBits :: PipelineDiscardRectangleStateCreateFlagsEXT
$czeroBits :: PipelineDiscardRectangleStateCreateFlagsEXT
rotate :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$crotate :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
shift :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
$cshift :: PipelineDiscardRectangleStateCreateFlagsEXT
-> Int -> PipelineDiscardRectangleStateCreateFlagsEXT
complement :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$ccomplement :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
xor :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$cxor :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
.|. :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$c.|. :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
.&. :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
$c.&. :: PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
-> PipelineDiscardRectangleStateCreateFlagsEXT
Bits, Bits PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$ccountTrailingZeros :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
countLeadingZeros :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$ccountLeadingZeros :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
finiteBitSize :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
$cfiniteBitSize :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int
FiniteBits)
conNamePipelineDiscardRectangleStateCreateFlagsEXT :: String
conNamePipelineDiscardRectangleStateCreateFlagsEXT :: String
conNamePipelineDiscardRectangleStateCreateFlagsEXT = String
"PipelineDiscardRectangleStateCreateFlagsEXT"
enumPrefixPipelineDiscardRectangleStateCreateFlagsEXT :: String
enumPrefixPipelineDiscardRectangleStateCreateFlagsEXT :: String
enumPrefixPipelineDiscardRectangleStateCreateFlagsEXT = String
""
showTablePipelineDiscardRectangleStateCreateFlagsEXT :: [(PipelineDiscardRectangleStateCreateFlagsEXT, String)]
showTablePipelineDiscardRectangleStateCreateFlagsEXT :: [(PipelineDiscardRectangleStateCreateFlagsEXT, String)]
showTablePipelineDiscardRectangleStateCreateFlagsEXT = []
instance Show PipelineDiscardRectangleStateCreateFlagsEXT where
showsPrec :: Int -> PipelineDiscardRectangleStateCreateFlagsEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPipelineDiscardRectangleStateCreateFlagsEXT
[(PipelineDiscardRectangleStateCreateFlagsEXT, String)]
showTablePipelineDiscardRectangleStateCreateFlagsEXT
String
conNamePipelineDiscardRectangleStateCreateFlagsEXT
(\(PipelineDiscardRectangleStateCreateFlagsEXT "firstDiscardRectangle" ::: Word32
x) -> "firstDiscardRectangle" ::: Word32
x)
(\"firstDiscardRectangle" ::: Word32
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex "firstDiscardRectangle" ::: Word32
x)
instance Read PipelineDiscardRectangleStateCreateFlagsEXT where
readPrec :: ReadPrec PipelineDiscardRectangleStateCreateFlagsEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPipelineDiscardRectangleStateCreateFlagsEXT
[(PipelineDiscardRectangleStateCreateFlagsEXT, String)]
showTablePipelineDiscardRectangleStateCreateFlagsEXT
String
conNamePipelineDiscardRectangleStateCreateFlagsEXT
("firstDiscardRectangle" ::: Word32)
-> PipelineDiscardRectangleStateCreateFlagsEXT
PipelineDiscardRectangleStateCreateFlagsEXT
newtype DiscardRectangleModeEXT = DiscardRectangleModeEXT Int32
deriving newtype (DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c/= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
== :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c== :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
Eq, Eq DiscardRectangleModeEXT
DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Ordering
DiscardRectangleModeEXT
-> DiscardRectangleModeEXT -> DiscardRectangleModeEXT
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 :: DiscardRectangleModeEXT
-> DiscardRectangleModeEXT -> DiscardRectangleModeEXT
$cmin :: DiscardRectangleModeEXT
-> DiscardRectangleModeEXT -> DiscardRectangleModeEXT
max :: DiscardRectangleModeEXT
-> DiscardRectangleModeEXT -> DiscardRectangleModeEXT
$cmax :: DiscardRectangleModeEXT
-> DiscardRectangleModeEXT -> DiscardRectangleModeEXT
>= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c>= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
> :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c> :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
<= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c<= :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
< :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
$c< :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Bool
compare :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Ordering
$ccompare :: DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> Ordering
Ord, Ptr DiscardRectangleModeEXT -> IO DiscardRectangleModeEXT
Ptr DiscardRectangleModeEXT -> Int -> IO DiscardRectangleModeEXT
Ptr DiscardRectangleModeEXT
-> Int -> DiscardRectangleModeEXT -> IO ()
Ptr DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> IO ()
DiscardRectangleModeEXT -> Int
forall b. Ptr b -> Int -> IO DiscardRectangleModeEXT
forall b. Ptr b -> Int -> DiscardRectangleModeEXT -> 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 DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> IO ()
$cpoke :: Ptr DiscardRectangleModeEXT -> DiscardRectangleModeEXT -> IO ()
peek :: Ptr DiscardRectangleModeEXT -> IO DiscardRectangleModeEXT
$cpeek :: Ptr DiscardRectangleModeEXT -> IO DiscardRectangleModeEXT
pokeByteOff :: forall b. Ptr b -> Int -> DiscardRectangleModeEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DiscardRectangleModeEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DiscardRectangleModeEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DiscardRectangleModeEXT
pokeElemOff :: Ptr DiscardRectangleModeEXT
-> Int -> DiscardRectangleModeEXT -> IO ()
$cpokeElemOff :: Ptr DiscardRectangleModeEXT
-> Int -> DiscardRectangleModeEXT -> IO ()
peekElemOff :: Ptr DiscardRectangleModeEXT -> Int -> IO DiscardRectangleModeEXT
$cpeekElemOff :: Ptr DiscardRectangleModeEXT -> Int -> IO DiscardRectangleModeEXT
alignment :: DiscardRectangleModeEXT -> Int
$calignment :: DiscardRectangleModeEXT -> Int
sizeOf :: DiscardRectangleModeEXT -> Int
$csizeOf :: DiscardRectangleModeEXT -> Int
Storable, DiscardRectangleModeEXT
forall a. a -> Zero a
zero :: DiscardRectangleModeEXT
$czero :: DiscardRectangleModeEXT
Zero)
pattern $bDISCARD_RECTANGLE_MODE_INCLUSIVE_EXT :: DiscardRectangleModeEXT
$mDISCARD_RECTANGLE_MODE_INCLUSIVE_EXT :: forall {r}.
DiscardRectangleModeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = DiscardRectangleModeEXT 0
pattern $bDISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT :: DiscardRectangleModeEXT
$mDISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT :: forall {r}.
DiscardRectangleModeEXT -> ((# #) -> r) -> ((# #) -> r) -> r
DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = DiscardRectangleModeEXT 1
{-# COMPLETE
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
, DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT ::
DiscardRectangleModeEXT
#-}
conNameDiscardRectangleModeEXT :: String
conNameDiscardRectangleModeEXT :: String
conNameDiscardRectangleModeEXT = String
"DiscardRectangleModeEXT"
enumPrefixDiscardRectangleModeEXT :: String
enumPrefixDiscardRectangleModeEXT :: String
enumPrefixDiscardRectangleModeEXT = String
"DISCARD_RECTANGLE_MODE_"
showTableDiscardRectangleModeEXT :: [(DiscardRectangleModeEXT, String)]
showTableDiscardRectangleModeEXT :: [(DiscardRectangleModeEXT, String)]
showTableDiscardRectangleModeEXT =
[
( DiscardRectangleModeEXT
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
, String
"INCLUSIVE_EXT"
)
,
( DiscardRectangleModeEXT
DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
, String
"EXCLUSIVE_EXT"
)
]
instance Show DiscardRectangleModeEXT where
showsPrec :: Int -> DiscardRectangleModeEXT -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixDiscardRectangleModeEXT
[(DiscardRectangleModeEXT, String)]
showTableDiscardRectangleModeEXT
String
conNameDiscardRectangleModeEXT
(\(DiscardRectangleModeEXT Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DiscardRectangleModeEXT where
readPrec :: ReadPrec DiscardRectangleModeEXT
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixDiscardRectangleModeEXT
[(DiscardRectangleModeEXT, String)]
showTableDiscardRectangleModeEXT
String
conNameDiscardRectangleModeEXT
Int32 -> DiscardRectangleModeEXT
DiscardRectangleModeEXT
type EXT_DISCARD_RECTANGLES_SPEC_VERSION = 2
pattern EXT_DISCARD_RECTANGLES_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DISCARD_RECTANGLES_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DISCARD_RECTANGLES_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DISCARD_RECTANGLES_SPEC_VERSION = 2
type EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"
pattern EXT_DISCARD_RECTANGLES_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DISCARD_RECTANGLES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DISCARD_RECTANGLES_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"