{-# language CPP #-}
module Vulkan.Core10.Enums.ImageTiling  (ImageTiling( IMAGE_TILING_OPTIMAL
                                                    , IMAGE_TILING_LINEAR
                                                    , IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
                                                    , ..
                                                    )) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
-- | VkImageTiling - Specifies the tiling arrangement of data in an image
--
-- = See Also
--
-- 'Vulkan.Core10.Image.ImageCreateInfo',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceSparseImageFormatInfo2',
-- 'Vulkan.Extensions.VK_NV_external_memory_capabilities.getPhysicalDeviceExternalImageFormatPropertiesNV',
-- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties',
-- 'Vulkan.Core10.SparseResourceMemoryManagement.getPhysicalDeviceSparseImageFormatProperties'
newtype ImageTiling = ImageTiling Int32
  deriving newtype (ImageTiling -> ImageTiling -> Bool
(ImageTiling -> ImageTiling -> Bool)
-> (ImageTiling -> ImageTiling -> Bool) -> Eq ImageTiling
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageTiling -> ImageTiling -> Bool
$c/= :: ImageTiling -> ImageTiling -> Bool
== :: ImageTiling -> ImageTiling -> Bool
$c== :: ImageTiling -> ImageTiling -> Bool
Eq, Eq ImageTiling
Eq ImageTiling =>
(ImageTiling -> ImageTiling -> Ordering)
-> (ImageTiling -> ImageTiling -> Bool)
-> (ImageTiling -> ImageTiling -> Bool)
-> (ImageTiling -> ImageTiling -> Bool)
-> (ImageTiling -> ImageTiling -> Bool)
-> (ImageTiling -> ImageTiling -> ImageTiling)
-> (ImageTiling -> ImageTiling -> ImageTiling)
-> Ord ImageTiling
ImageTiling -> ImageTiling -> Bool
ImageTiling -> ImageTiling -> Ordering
ImageTiling -> ImageTiling -> ImageTiling
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 :: ImageTiling -> ImageTiling -> ImageTiling
$cmin :: ImageTiling -> ImageTiling -> ImageTiling
max :: ImageTiling -> ImageTiling -> ImageTiling
$cmax :: ImageTiling -> ImageTiling -> ImageTiling
>= :: ImageTiling -> ImageTiling -> Bool
$c>= :: ImageTiling -> ImageTiling -> Bool
> :: ImageTiling -> ImageTiling -> Bool
$c> :: ImageTiling -> ImageTiling -> Bool
<= :: ImageTiling -> ImageTiling -> Bool
$c<= :: ImageTiling -> ImageTiling -> Bool
< :: ImageTiling -> ImageTiling -> Bool
$c< :: ImageTiling -> ImageTiling -> Bool
compare :: ImageTiling -> ImageTiling -> Ordering
$ccompare :: ImageTiling -> ImageTiling -> Ordering
$cp1Ord :: Eq ImageTiling
Ord, Ptr b -> Int -> IO ImageTiling
Ptr b -> Int -> ImageTiling -> IO ()
Ptr ImageTiling -> IO ImageTiling
Ptr ImageTiling -> Int -> IO ImageTiling
Ptr ImageTiling -> Int -> ImageTiling -> IO ()
Ptr ImageTiling -> ImageTiling -> IO ()
ImageTiling -> Int
(ImageTiling -> Int)
-> (ImageTiling -> Int)
-> (Ptr ImageTiling -> Int -> IO ImageTiling)
-> (Ptr ImageTiling -> Int -> ImageTiling -> IO ())
-> (forall b. Ptr b -> Int -> IO ImageTiling)
-> (forall b. Ptr b -> Int -> ImageTiling -> IO ())
-> (Ptr ImageTiling -> IO ImageTiling)
-> (Ptr ImageTiling -> ImageTiling -> IO ())
-> Storable ImageTiling
forall b. Ptr b -> Int -> IO ImageTiling
forall b. Ptr b -> Int -> ImageTiling -> 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 ImageTiling -> ImageTiling -> IO ()
$cpoke :: Ptr ImageTiling -> ImageTiling -> IO ()
peek :: Ptr ImageTiling -> IO ImageTiling
$cpeek :: Ptr ImageTiling -> IO ImageTiling
pokeByteOff :: Ptr b -> Int -> ImageTiling -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ImageTiling -> IO ()
peekByteOff :: Ptr b -> Int -> IO ImageTiling
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ImageTiling
pokeElemOff :: Ptr ImageTiling -> Int -> ImageTiling -> IO ()
$cpokeElemOff :: Ptr ImageTiling -> Int -> ImageTiling -> IO ()
peekElemOff :: Ptr ImageTiling -> Int -> IO ImageTiling
$cpeekElemOff :: Ptr ImageTiling -> Int -> IO ImageTiling
alignment :: ImageTiling -> Int
$calignment :: ImageTiling -> Int
sizeOf :: ImageTiling -> Int
$csizeOf :: ImageTiling -> Int
Storable, ImageTiling
ImageTiling -> Zero ImageTiling
forall a. a -> Zero a
zero :: ImageTiling
$czero :: ImageTiling
Zero)

-- | 'IMAGE_TILING_OPTIMAL' specifies optimal tiling (texels are laid out in
-- an implementation-dependent arrangement, for more optimal memory
-- access).
pattern $bIMAGE_TILING_OPTIMAL :: ImageTiling
$mIMAGE_TILING_OPTIMAL :: forall r. ImageTiling -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_TILING_OPTIMAL = ImageTiling 0
-- | 'IMAGE_TILING_LINEAR' specifies linear tiling (texels are laid out in
-- memory in row-major order, possibly with some padding on each row).
pattern $bIMAGE_TILING_LINEAR :: ImageTiling
$mIMAGE_TILING_LINEAR :: forall r. ImageTiling -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_TILING_LINEAR = ImageTiling 1
-- | 'IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT' indicates that the image’s tiling
-- is defined by a
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#glossary-drm-format-modifier Linux DRM format modifier>.
-- The modifier is specified at image creation with
-- 'Vulkan.Extensions.VK_EXT_image_drm_format_modifier.ImageDrmFormatModifierListCreateInfoEXT'
-- or
-- 'Vulkan.Extensions.VK_EXT_image_drm_format_modifier.ImageDrmFormatModifierExplicitCreateInfoEXT',
-- and /can/ be queried with
-- 'Vulkan.Extensions.VK_EXT_image_drm_format_modifier.getImageDrmFormatModifierPropertiesEXT'.
pattern $bIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT :: ImageTiling
$mIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT :: forall r. ImageTiling -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = ImageTiling 1000158000
{-# complete IMAGE_TILING_OPTIMAL,
             IMAGE_TILING_LINEAR,
             IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT :: ImageTiling #-}

instance Show ImageTiling where
  showsPrec :: Int -> ImageTiling -> ShowS
showsPrec p :: Int
p = \case
    IMAGE_TILING_OPTIMAL -> String -> ShowS
showString "IMAGE_TILING_OPTIMAL"
    IMAGE_TILING_LINEAR -> String -> ShowS
showString "IMAGE_TILING_LINEAR"
    IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT -> String -> ShowS
showString "IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT"
    ImageTiling x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ImageTiling " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read ImageTiling where
  readPrec :: ReadPrec ImageTiling
readPrec = ReadPrec ImageTiling -> ReadPrec ImageTiling
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ImageTiling)] -> ReadPrec ImageTiling
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("IMAGE_TILING_OPTIMAL", ImageTiling -> ReadPrec ImageTiling
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageTiling
IMAGE_TILING_OPTIMAL)
                            , ("IMAGE_TILING_LINEAR", ImageTiling -> ReadPrec ImageTiling
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageTiling
IMAGE_TILING_LINEAR)
                            , ("IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT", ImageTiling -> ReadPrec ImageTiling
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageTiling
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)]
                     ReadPrec ImageTiling
-> ReadPrec ImageTiling -> ReadPrec ImageTiling
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int -> ReadPrec ImageTiling -> ReadPrec ImageTiling
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ImageTiling")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       ImageTiling -> ReadPrec ImageTiling
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> ImageTiling
ImageTiling Int32
v)))