{-# language CPP #-}
-- No documentation found for Chapter "AttachmentLoadOp"
module Vulkan.Core10.Enums.AttachmentLoadOp  (AttachmentLoadOp( ATTACHMENT_LOAD_OP_LOAD
                                                              , ATTACHMENT_LOAD_OP_CLEAR
                                                              , ATTACHMENT_LOAD_OP_DONT_CARE
                                                              , ATTACHMENT_LOAD_OP_NONE_EXT
                                                              , ..
                                                              )) 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))

-- | VkAttachmentLoadOp - Specify how contents of an attachment are
-- initialized at the beginning of a subpass
--
-- = 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 AttachmentLoadOp = AttachmentLoadOp Int32
  deriving newtype (AttachmentLoadOp -> AttachmentLoadOp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c/= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
== :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c== :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
Eq, Eq AttachmentLoadOp
AttachmentLoadOp -> AttachmentLoadOp -> Bool
AttachmentLoadOp -> AttachmentLoadOp -> Ordering
AttachmentLoadOp -> AttachmentLoadOp -> AttachmentLoadOp
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 :: AttachmentLoadOp -> AttachmentLoadOp -> AttachmentLoadOp
$cmin :: AttachmentLoadOp -> AttachmentLoadOp -> AttachmentLoadOp
max :: AttachmentLoadOp -> AttachmentLoadOp -> AttachmentLoadOp
$cmax :: AttachmentLoadOp -> AttachmentLoadOp -> AttachmentLoadOp
>= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c>= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
> :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c> :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
<= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c<= :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
< :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
$c< :: AttachmentLoadOp -> AttachmentLoadOp -> Bool
compare :: AttachmentLoadOp -> AttachmentLoadOp -> Ordering
$ccompare :: AttachmentLoadOp -> AttachmentLoadOp -> Ordering
Ord, Ptr AttachmentLoadOp -> IO AttachmentLoadOp
Ptr AttachmentLoadOp -> Int -> IO AttachmentLoadOp
Ptr AttachmentLoadOp -> Int -> AttachmentLoadOp -> IO ()
Ptr AttachmentLoadOp -> AttachmentLoadOp -> IO ()
AttachmentLoadOp -> Int
forall b. Ptr b -> Int -> IO AttachmentLoadOp
forall b. Ptr b -> Int -> AttachmentLoadOp -> 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 AttachmentLoadOp -> AttachmentLoadOp -> IO ()
$cpoke :: Ptr AttachmentLoadOp -> AttachmentLoadOp -> IO ()
peek :: Ptr AttachmentLoadOp -> IO AttachmentLoadOp
$cpeek :: Ptr AttachmentLoadOp -> IO AttachmentLoadOp
pokeByteOff :: forall b. Ptr b -> Int -> AttachmentLoadOp -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AttachmentLoadOp -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AttachmentLoadOp
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AttachmentLoadOp
pokeElemOff :: Ptr AttachmentLoadOp -> Int -> AttachmentLoadOp -> IO ()
$cpokeElemOff :: Ptr AttachmentLoadOp -> Int -> AttachmentLoadOp -> IO ()
peekElemOff :: Ptr AttachmentLoadOp -> Int -> IO AttachmentLoadOp
$cpeekElemOff :: Ptr AttachmentLoadOp -> Int -> IO AttachmentLoadOp
alignment :: AttachmentLoadOp -> Int
$calignment :: AttachmentLoadOp -> Int
sizeOf :: AttachmentLoadOp -> Int
$csizeOf :: AttachmentLoadOp -> Int
Storable, AttachmentLoadOp
forall a. a -> Zero a
zero :: AttachmentLoadOp
$czero :: AttachmentLoadOp
Zero)

-- | 'ATTACHMENT_LOAD_OP_LOAD' specifies that the previous contents of the
-- image within the render area will be preserved as the initial values.
-- For attachments with a depth\/stencil format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT'.
-- For attachments with a color format, this uses the access type
-- 'Vulkan.Core10.Enums.AccessFlagBits.ACCESS_COLOR_ATTACHMENT_READ_BIT'.
pattern $bATTACHMENT_LOAD_OP_LOAD :: AttachmentLoadOp
$mATTACHMENT_LOAD_OP_LOAD :: forall {r}. AttachmentLoadOp -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_LOAD_OP_LOAD = AttachmentLoadOp 0

-- | 'ATTACHMENT_LOAD_OP_CLEAR' specifies that the contents within the render
-- area will be cleared to a uniform value, which is specified when a
-- render pass instance is begun. 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_LOAD_OP_CLEAR :: AttachmentLoadOp
$mATTACHMENT_LOAD_OP_CLEAR :: forall {r}. AttachmentLoadOp -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_LOAD_OP_CLEAR = AttachmentLoadOp 1

-- | 'ATTACHMENT_LOAD_OP_DONT_CARE' specifies that the previous contents
-- within the area need not be preserved; 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_LOAD_OP_DONT_CARE :: AttachmentLoadOp
$mATTACHMENT_LOAD_OP_DONT_CARE :: forall {r}. AttachmentLoadOp -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_LOAD_OP_DONT_CARE = AttachmentLoadOp 2

-- | 'ATTACHMENT_LOAD_OP_NONE_EXT' specifies that the previous contents of
-- the image will be undefined inside the render pass. No access type is
-- used as the image is not accessed.
pattern $bATTACHMENT_LOAD_OP_NONE_EXT :: AttachmentLoadOp
$mATTACHMENT_LOAD_OP_NONE_EXT :: forall {r}. AttachmentLoadOp -> ((# #) -> r) -> ((# #) -> r) -> r
ATTACHMENT_LOAD_OP_NONE_EXT = AttachmentLoadOp 1000400000

{-# COMPLETE
  ATTACHMENT_LOAD_OP_LOAD
  , ATTACHMENT_LOAD_OP_CLEAR
  , ATTACHMENT_LOAD_OP_DONT_CARE
  , ATTACHMENT_LOAD_OP_NONE_EXT ::
    AttachmentLoadOp
  #-}

conNameAttachmentLoadOp :: String
conNameAttachmentLoadOp :: String
conNameAttachmentLoadOp = String
"AttachmentLoadOp"

enumPrefixAttachmentLoadOp :: String
enumPrefixAttachmentLoadOp :: String
enumPrefixAttachmentLoadOp = String
"ATTACHMENT_LOAD_OP_"

showTableAttachmentLoadOp :: [(AttachmentLoadOp, String)]
showTableAttachmentLoadOp :: [(AttachmentLoadOp, String)]
showTableAttachmentLoadOp =
  [ (AttachmentLoadOp
ATTACHMENT_LOAD_OP_LOAD, String
"LOAD")
  , (AttachmentLoadOp
ATTACHMENT_LOAD_OP_CLEAR, String
"CLEAR")
  , (AttachmentLoadOp
ATTACHMENT_LOAD_OP_DONT_CARE, String
"DONT_CARE")
  , (AttachmentLoadOp
ATTACHMENT_LOAD_OP_NONE_EXT, String
"NONE_EXT")
  ]

instance Show AttachmentLoadOp where
  showsPrec :: Int -> AttachmentLoadOp -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixAttachmentLoadOp
      [(AttachmentLoadOp, String)]
showTableAttachmentLoadOp
      String
conNameAttachmentLoadOp
      (\(AttachmentLoadOp Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read AttachmentLoadOp where
  readPrec :: ReadPrec AttachmentLoadOp
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixAttachmentLoadOp
      [(AttachmentLoadOp, String)]
showTableAttachmentLoadOp
      String
conNameAttachmentLoadOp
      Int32 -> AttachmentLoadOp
AttachmentLoadOp