{-# language CPP #-}
-- No documentation found for Chapter "ImageTiling"
module Vulkan.Core10.Enums.ImageTiling  (ImageTiling( IMAGE_TILING_OPTIMAL
                                                    , IMAGE_TILING_LINEAR
                                                    , IMAGE_TILING_DRM_FORMAT_MODIFIER_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))

-- | VkImageTiling - Specifies the tiling arrangement of data in an image
--
-- = 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.Image.ImageCreateInfo',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceSparseImageFormatInfo2',
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkVideoFormatPropertiesKHR VkVideoFormatPropertiesKHR>,
-- '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
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
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
Ord, Ptr ImageTiling -> IO ImageTiling
Ptr ImageTiling -> Int -> IO ImageTiling
Ptr ImageTiling -> Int -> ImageTiling -> IO ()
Ptr ImageTiling -> ImageTiling -> IO ()
ImageTiling -> Int
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 :: forall b. Ptr b -> Int -> ImageTiling -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ImageTiling -> IO ()
peekByteOff :: forall b. 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
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 efficient memory
-- access).
pattern $bIMAGE_TILING_OPTIMAL :: ImageTiling
$mIMAGE_TILING_OPTIMAL :: forall {r}. ImageTiling -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> r) -> r
IMAGE_TILING_LINEAR = ImageTiling 1

-- | 'IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT' indicates that the image’s tiling
-- is defined by a
-- <https://registry.khronos.org/vulkan/specs/1.3-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 -> ((# #) -> r) -> ((# #) -> r) -> r
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = ImageTiling 1000158000

{-# COMPLETE
  IMAGE_TILING_OPTIMAL
  , IMAGE_TILING_LINEAR
  , IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT ::
    ImageTiling
  #-}

conNameImageTiling :: String
conNameImageTiling :: String
conNameImageTiling = String
"ImageTiling"

enumPrefixImageTiling :: String
enumPrefixImageTiling :: String
enumPrefixImageTiling = String
"IMAGE_TILING_"

showTableImageTiling :: [(ImageTiling, String)]
showTableImageTiling :: [(ImageTiling, String)]
showTableImageTiling =
  [ (ImageTiling
IMAGE_TILING_OPTIMAL, String
"OPTIMAL")
  , (ImageTiling
IMAGE_TILING_LINEAR, String
"LINEAR")
  ,
    ( ImageTiling
IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
    , String
"DRM_FORMAT_MODIFIER_EXT"
    )
  ]

instance Show ImageTiling where
  showsPrec :: Int -> ImageTiling -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixImageTiling
      [(ImageTiling, String)]
showTableImageTiling
      String
conNameImageTiling
      (\(ImageTiling Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read ImageTiling where
  readPrec :: ReadPrec ImageTiling
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixImageTiling
      [(ImageTiling, String)]
showTableImageTiling
      String
conNameImageTiling
      Int32 -> ImageTiling
ImageTiling