{-# 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
                                                                , ..
                                                                )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkAttachmentStoreOp - Specify how contents of an attachment are stored
-- to memory 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
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Pass.AttachmentDescription',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.AttachmentDescription2',
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingAttachmentInfo'
newtype AttachmentStoreOp = AttachmentStoreOp Int32
  deriving newtype (AttachmentStoreOp -> AttachmentStoreOp -> Bool
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
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
Ord, Ptr AttachmentStoreOp -> IO AttachmentStoreOp
Ptr AttachmentStoreOp -> Int -> IO AttachmentStoreOp
Ptr AttachmentStoreOp -> Int -> AttachmentStoreOp -> IO ()
Ptr AttachmentStoreOp -> AttachmentStoreOp -> IO ()
AttachmentStoreOp -> Int
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 :: forall b. Ptr b -> Int -> AttachmentStoreOp -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AttachmentStoreOp -> IO ()
peekByteOff :: forall b. 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
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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_STORE_OP_DONT_CARE = AttachmentStoreOp 1

-- | 'ATTACHMENT_STORE_OP_NONE' specifies the contents within the render area
-- are not accessed by the store operation as long as no values are written
-- to the attachment during the render pass. If values are written during
-- the render pass, this behaves identically to
-- 'ATTACHMENT_STORE_OP_DONT_CARE' and with matching access semantics.
pattern $bATTACHMENT_STORE_OP_NONE :: AttachmentStoreOp
$mATTACHMENT_STORE_OP_NONE :: forall {r}. AttachmentStoreOp -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_STORE_OP_NONE = AttachmentStoreOp 1000301000

{-# COMPLETE
  ATTACHMENT_STORE_OP_STORE
  , ATTACHMENT_STORE_OP_DONT_CARE
  , ATTACHMENT_STORE_OP_NONE ::
    AttachmentStoreOp
  #-}

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

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

showTableAttachmentStoreOp :: [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp :: [(AttachmentStoreOp, String)]
showTableAttachmentStoreOp =
  [ (AttachmentStoreOp
ATTACHMENT_STORE_OP_STORE, String
"STORE")
  , (AttachmentStoreOp
ATTACHMENT_STORE_OP_DONT_CARE, String
"DONT_CARE")
  , (AttachmentStoreOp
ATTACHMENT_STORE_OP_NONE, String
"NONE")
  ]

instance Show AttachmentStoreOp where
  showsPrec :: Int -> AttachmentStoreOp -> ShowS
showsPrec =
    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 Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

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