{-# language CPP #-}
-- No documentation found for Chapter "AttachmentStoreOp"
module Vulkan.Core10.Enums.AttachmentStoreOp  (AttachmentStoreOp( ATTACHMENT_STORE_OP_STORE
                                                                , ATTACHMENT_STORE_OP_DONT_CARE
                                                                , ATTACHMENT_STORE_OP_NONE_QCOM
                                                                , ..
                                                                )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Zero (Zero)
-- | VkAttachmentStoreOp - Specify how contents of an attachment are treated
-- at the end of a subpass
--
-- = Description
--
-- Note
--
-- 'ATTACHMENT_STORE_OP_DONT_CARE' /can/ cause contents generated during
-- previous render passes to be discarded before reaching memory, even if
-- no write to the attachment occurs during the current render pass.
--
-- = See Also
--
-- 'Vulkan.Core10.Pass.AttachmentDescription',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentDescription2'
newtype AttachmentStoreOp = AttachmentStoreOp Int32
  deriving newtype (AttachmentStoreOp -> AttachmentStoreOp -> Bool
(AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> (AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> Eq AttachmentStoreOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c/= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
== :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c== :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
Eq, Eq AttachmentStoreOp
Eq AttachmentStoreOp =>
(AttachmentStoreOp -> AttachmentStoreOp -> Ordering)
-> (AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> (AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> (AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> (AttachmentStoreOp -> AttachmentStoreOp -> Bool)
-> (AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp)
-> (AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp)
-> Ord AttachmentStoreOp
AttachmentStoreOp -> AttachmentStoreOp -> Bool
AttachmentStoreOp -> AttachmentStoreOp -> Ordering
AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp
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 :: AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp
$cmin :: AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp
max :: AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp
$cmax :: AttachmentStoreOp -> AttachmentStoreOp -> AttachmentStoreOp
>= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c>= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
> :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c> :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
<= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c<= :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
< :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
$c< :: AttachmentStoreOp -> AttachmentStoreOp -> Bool
compare :: AttachmentStoreOp -> AttachmentStoreOp -> Ordering
$ccompare :: AttachmentStoreOp -> AttachmentStoreOp -> Ordering
$cp1Ord :: Eq AttachmentStoreOp
Ord, Ptr b -> Int -> IO AttachmentStoreOp
Ptr b -> Int -> AttachmentStoreOp -> IO ()
Ptr AttachmentStoreOp -> IO AttachmentStoreOp
Ptr AttachmentStoreOp -> Int -> IO AttachmentStoreOp
Ptr AttachmentStoreOp -> Int -> AttachmentStoreOp -> IO ()
Ptr AttachmentStoreOp -> AttachmentStoreOp -> IO ()
AttachmentStoreOp -> Int
(AttachmentStoreOp -> Int)
-> (AttachmentStoreOp -> Int)
-> (Ptr AttachmentStoreOp -> Int -> IO AttachmentStoreOp)
-> (Ptr AttachmentStoreOp -> Int -> AttachmentStoreOp -> IO ())
-> (forall b. Ptr b -> Int -> IO AttachmentStoreOp)
-> (forall b. Ptr b -> Int -> AttachmentStoreOp -> IO ())
-> (Ptr AttachmentStoreOp -> IO AttachmentStoreOp)
-> (Ptr AttachmentStoreOp -> AttachmentStoreOp -> IO ())
-> Storable AttachmentStoreOp
forall b. Ptr b -> Int -> IO AttachmentStoreOp
forall b. Ptr b -> Int -> AttachmentStoreOp -> 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 AttachmentStoreOp -> AttachmentStoreOp -> IO ()
$cpoke :: Ptr AttachmentStoreOp -> AttachmentStoreOp -> IO ()
peek :: Ptr AttachmentStoreOp -> IO AttachmentStoreOp
$cpeek :: Ptr AttachmentStoreOp -> IO AttachmentStoreOp
pokeByteOff :: Ptr b -> Int -> AttachmentStoreOp -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AttachmentStoreOp -> IO ()
peekByteOff :: Ptr b -> Int -> IO AttachmentStoreOp
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AttachmentStoreOp
pokeElemOff :: Ptr AttachmentStoreOp -> Int -> AttachmentStoreOp -> IO ()
$cpokeElemOff :: Ptr AttachmentStoreOp -> Int -> AttachmentStoreOp -> IO ()
peekElemOff :: Ptr AttachmentStoreOp -> Int -> IO AttachmentStoreOp
$cpeekElemOff :: Ptr AttachmentStoreOp -> Int -> IO AttachmentStoreOp
alignment :: AttachmentStoreOp -> Int
$calignment :: AttachmentStoreOp -> Int
sizeOf :: AttachmentStoreOp -> Int
$csizeOf :: AttachmentStoreOp -> Int
Storable, AttachmentStoreOp
AttachmentStoreOp -> Zero AttachmentStoreOp
forall a. a -> Zero a
zero :: AttachmentStoreOp
$czero :: AttachmentStoreOp
Zero)

-- | 'ATTACHMENT_STORE_OP_STORE' specifies the contents generated during the
-- render pass and within the render area are written to memory. For
-- attachments with a depth\/stencil format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT'.
-- For attachments with a color format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_COLOR_ATTACHMENT_WRITE_BIT'.
pattern $bATTACHMENT_STORE_OP_STORE :: AttachmentStoreOp
$mATTACHMENT_STORE_OP_STORE :: forall r. AttachmentStoreOp -> (Void# -> r) -> (Void# -> r) -> r
ATTACHMENT_STORE_OP_STORE     = AttachmentStoreOp 0
-- | 'ATTACHMENT_STORE_OP_DONT_CARE' specifies the contents within the render
-- area are not needed after rendering, and /may/ be discarded; the
-- contents of the attachment will be undefined inside the render area. For
-- attachments with a depth\/stencil format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT'.
-- For attachments with a color format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_COLOR_ATTACHMENT_WRITE_BIT'.
pattern $bATTACHMENT_STORE_OP_DONT_CARE :: AttachmentStoreOp
$mATTACHMENT_STORE_OP_DONT_CARE :: forall r. AttachmentStoreOp -> (Void# -> r) -> (Void# -> r) -> r
ATTACHMENT_STORE_OP_DONT_CARE = AttachmentStoreOp 1
-- | 'ATTACHMENT_STORE_OP_NONE_QCOM' specifies that the contents within the
-- render area were not written during rendering, and /may/ not be written
-- to memory. If the attachment was written to during the renderpass, the
-- contents of the attachment will be undefined inside the render area.
pattern $bATTACHMENT_STORE_OP_NONE_QCOM :: AttachmentStoreOp
$mATTACHMENT_STORE_OP_NONE_QCOM :: forall r. AttachmentStoreOp -> (Void# -> r) -> (Void# -> r) -> r
ATTACHMENT_STORE_OP_NONE_QCOM = AttachmentStoreOp 1000301000
{-# complete ATTACHMENT_STORE_OP_STORE,
             ATTACHMENT_STORE_OP_DONT_CARE,
             ATTACHMENT_STORE_OP_NONE_QCOM :: AttachmentStoreOp #-}

conNameAttachmentStoreOp :: String
conNameAttachmentStoreOp :: String
conNameAttachmentStoreOp = "AttachmentStoreOp"

enumPrefixAttachmentStoreOp :: String
enumPrefixAttachmentStoreOp :: String
enumPrefixAttachmentStoreOp = "ATTACHMENT_STORE_OP_"

showTableAttachmentStoreOp :: [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp :: [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp =
  [ (AttachmentStoreOp
ATTACHMENT_STORE_OP_STORE    , "STORE")
  , (AttachmentStoreOp
ATTACHMENT_STORE_OP_DONT_CARE, "DONT_CARE")
  , (AttachmentStoreOp
ATTACHMENT_STORE_OP_NONE_QCOM, "NONE_QCOM")
  ]

instance Show AttachmentStoreOp where
  showsPrec :: Int -> AttachmentStoreOp -> ShowS
showsPrec = String
-> [(AttachmentStoreOp, String)]
-> String
-> (AttachmentStoreOp -> Int32)
-> (Int32 -> ShowS)
-> Int
-> AttachmentStoreOp
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixAttachmentStoreOp
                            [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp
                            String
conNameAttachmentStoreOp
                            (\(AttachmentStoreOp x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read AttachmentStoreOp where
  readPrec :: ReadPrec AttachmentStoreOp
readPrec =
    String
-> [(AttachmentStoreOp, String)]
-> String
-> (Int32 -> AttachmentStoreOp)
-> ReadPrec AttachmentStoreOp
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixAttachmentStoreOp [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp String
conNameAttachmentStoreOp Int32 -> AttachmentStoreOp
AttachmentStoreOp