{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits ( BufferUsageFlagBits( BUFFER_USAGE_TRANSFER_SRC_BIT
, BUFFER_USAGE_TRANSFER_DST_BIT
, BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
, BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
, BUFFER_USAGE_UNIFORM_BUFFER_BIT
, BUFFER_USAGE_STORAGE_BUFFER_BIT
, BUFFER_USAGE_INDEX_BUFFER_BIT
, BUFFER_USAGE_VERTEX_BUFFER_BIT
, BUFFER_USAGE_INDIRECT_BUFFER_BIT
, BUFFER_USAGE_RAY_TRACING_BIT_KHR
, BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT
, BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
, BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
, BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
, ..
)
, BufferUsageFlags
) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.Bits (Bits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Graphics.Vulkan.Core10.BaseType (Flags)
import Graphics.Vulkan.Zero (Zero)
newtype BufferUsageFlagBits = BufferUsageFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern BUFFER_USAGE_TRANSFER_SRC_BIT = BufferUsageFlagBits 0x00000001
pattern BUFFER_USAGE_TRANSFER_DST_BIT = BufferUsageFlagBits 0x00000002
pattern BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = BufferUsageFlagBits 0x00000004
pattern BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = BufferUsageFlagBits 0x00000008
pattern BUFFER_USAGE_UNIFORM_BUFFER_BIT = BufferUsageFlagBits 0x00000010
pattern BUFFER_USAGE_STORAGE_BUFFER_BIT = BufferUsageFlagBits 0x00000020
pattern BUFFER_USAGE_INDEX_BUFFER_BIT = BufferUsageFlagBits 0x00000040
pattern BUFFER_USAGE_VERTEX_BUFFER_BIT = BufferUsageFlagBits 0x00000080
pattern BUFFER_USAGE_INDIRECT_BUFFER_BIT = BufferUsageFlagBits 0x00000100
pattern BUFFER_USAGE_RAY_TRACING_BIT_KHR = BufferUsageFlagBits 0x00000400
pattern BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = BufferUsageFlagBits 0x00000200
pattern BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = BufferUsageFlagBits 0x00001000
pattern BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = BufferUsageFlagBits 0x00000800
pattern BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = BufferUsageFlagBits 0x00020000
type BufferUsageFlags = BufferUsageFlagBits
instance Show BufferUsageFlagBits where
showsPrec p = \case
BUFFER_USAGE_TRANSFER_SRC_BIT -> showString "BUFFER_USAGE_TRANSFER_SRC_BIT"
BUFFER_USAGE_TRANSFER_DST_BIT -> showString "BUFFER_USAGE_TRANSFER_DST_BIT"
BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT -> showString "BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT"
BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT -> showString "BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT"
BUFFER_USAGE_UNIFORM_BUFFER_BIT -> showString "BUFFER_USAGE_UNIFORM_BUFFER_BIT"
BUFFER_USAGE_STORAGE_BUFFER_BIT -> showString "BUFFER_USAGE_STORAGE_BUFFER_BIT"
BUFFER_USAGE_INDEX_BUFFER_BIT -> showString "BUFFER_USAGE_INDEX_BUFFER_BIT"
BUFFER_USAGE_VERTEX_BUFFER_BIT -> showString "BUFFER_USAGE_VERTEX_BUFFER_BIT"
BUFFER_USAGE_INDIRECT_BUFFER_BIT -> showString "BUFFER_USAGE_INDIRECT_BUFFER_BIT"
BUFFER_USAGE_RAY_TRACING_BIT_KHR -> showString "BUFFER_USAGE_RAY_TRACING_BIT_KHR"
BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT -> showString "BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT"
BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT -> showString "BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT"
BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT -> showString "BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT"
BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT -> showString "BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT"
BufferUsageFlagBits x -> showParen (p >= 11) (showString "BufferUsageFlagBits 0x" . showHex x)
instance Read BufferUsageFlagBits where
readPrec = parens (choose [("BUFFER_USAGE_TRANSFER_SRC_BIT", pure BUFFER_USAGE_TRANSFER_SRC_BIT)
, ("BUFFER_USAGE_TRANSFER_DST_BIT", pure BUFFER_USAGE_TRANSFER_DST_BIT)
, ("BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT", pure BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT)
, ("BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT", pure BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT)
, ("BUFFER_USAGE_UNIFORM_BUFFER_BIT", pure BUFFER_USAGE_UNIFORM_BUFFER_BIT)
, ("BUFFER_USAGE_STORAGE_BUFFER_BIT", pure BUFFER_USAGE_STORAGE_BUFFER_BIT)
, ("BUFFER_USAGE_INDEX_BUFFER_BIT", pure BUFFER_USAGE_INDEX_BUFFER_BIT)
, ("BUFFER_USAGE_VERTEX_BUFFER_BIT", pure BUFFER_USAGE_VERTEX_BUFFER_BIT)
, ("BUFFER_USAGE_INDIRECT_BUFFER_BIT", pure BUFFER_USAGE_INDIRECT_BUFFER_BIT)
, ("BUFFER_USAGE_RAY_TRACING_BIT_KHR", pure BUFFER_USAGE_RAY_TRACING_BIT_KHR)
, ("BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT", pure BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT)
, ("BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT", pure BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT)
, ("BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT", pure BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT)
, ("BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT", pure BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT)]
+++
prec 10 (do
expectP (Ident "BufferUsageFlagBits")
v <- step readPrec
pure (BufferUsageFlagBits v)))