{-# language CPP #-}
-- | = Name
--
-- VK_NV_memory_decompression - device extension
--
-- == VK_NV_memory_decompression
--
-- [__Name String__]
--     @VK_NV_memory_decompression@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     428
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--     and
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_buffer_device_address VK_KHR_buffer_device_address>
--
-- [__Contact__]
--
--     -   Vikram Kushwaha
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_memory_decompression] @vkushwaha-nv%0A*Here describe the issue or question you have about the VK_NV_memory_decompression extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2022-01-31
--
-- [__Contributors__]
--
--     -   Vikram Kushwaha, NVIDIA
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Christoph Kubisch, NVIDIA
--
--     -   Piers Daniell, NVIDIA
--
-- == Description
--
-- This extension adds support for performing memory to memory
-- decompression.
--
-- == New Commands
--
-- -   'cmdDecompressMemoryIndirectCountNV'
--
-- -   'cmdDecompressMemoryNV'
--
-- == New Structures
--
-- -   'DecompressMemoryRegionNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceMemoryDecompressionFeaturesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceMemoryDecompressionPropertiesNV'
--
-- == New Enums
--
-- -   'MemoryDecompressionMethodFlagBitsNV'
--
-- == New Bitmasks
--
-- -   'MemoryDecompressionMethodFlagsNV'
--
-- == New Enum Constants
--
-- -   'NV_MEMORY_DECOMPRESSION_EXTENSION_NAME'
--
-- -   'NV_MEMORY_DECOMPRESSION_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV'
--
-- == Version History
--
-- -   Revision 1, 2022-01-31 (Vikram Kushwaha)
--
--     -   Initial draft
--
-- == See Also
--
-- 'DecompressMemoryRegionNV', 'MemoryDecompressionMethodFlagBitsNV',
-- 'MemoryDecompressionMethodFlagsNV',
-- 'PhysicalDeviceMemoryDecompressionFeaturesNV',
-- 'PhysicalDeviceMemoryDecompressionPropertiesNV',
-- 'cmdDecompressMemoryIndirectCountNV', 'cmdDecompressMemoryNV'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_NV_memory_decompression Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_memory_decompression  ( cmdDecompressMemoryNV
                                                     , cmdDecompressMemoryIndirectCountNV
                                                     , PhysicalDeviceMemoryDecompressionFeaturesNV(..)
                                                     , PhysicalDeviceMemoryDecompressionPropertiesNV(..)
                                                     , DecompressMemoryRegionNV(..)
                                                     , MemoryDecompressionMethodFlagsNV
                                                     , MemoryDecompressionMethodFlagBitsNV( MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV
                                                                                          , ..
                                                                                          )
                                                     , NV_MEMORY_DECOMPRESSION_SPEC_VERSION
                                                     , pattern NV_MEMORY_DECOMPRESSION_SPEC_VERSION
                                                     , NV_MEMORY_DECOMPRESSION_EXTENSION_NAME
                                                     , pattern NV_MEMORY_DECOMPRESSION_EXTENSION_NAME
                                                     ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkCmdDecompressMemoryIndirectCountNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdDecompressMemoryNV))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.FundamentalTypes (Flags64)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdDecompressMemoryNV
  :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr DecompressMemoryRegionNV -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr DecompressMemoryRegionNV -> IO ()

-- | vkCmdDecompressMemoryNV - Decompress data between memory regions
--
-- = Description
--
-- Each region specified in @pDecompressMemoryRegions@ is decompressed from
-- the source to destination region based on the specified decompression
-- method.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdDecompressMemoryNV-None-07684# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-memoryDecompression memoryDecompression>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdDecompressMemoryNV-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdDecompressMemoryNV-pDecompressMemoryRegions-parameter#
--     @pDecompressMemoryRegions@ /must/ be a valid pointer to an array of
--     @decompressRegionCount@ valid 'DecompressMemoryRegionNV' structures
--
-- -   #VUID-vkCmdDecompressMemoryNV-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdDecompressMemoryNV-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics, or compute operations
--
-- -   #VUID-vkCmdDecompressMemoryNV-renderpass# This command /must/ only
--     be called outside of a render pass instance
--
-- -   #VUID-vkCmdDecompressMemoryNV-videocoding# This command /must/ only
--     be called outside of a video coding scope
--
-- -   #VUID-vkCmdDecompressMemoryNV-decompressRegionCount-arraylength#
--     @decompressRegionCount@ /must/ be greater than @0@
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Outside                                                                                                                     | Graphics                                                                                                              | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>,
-- 'Vulkan.Core10.Handles.CommandBuffer', 'DecompressMemoryRegionNV'
cmdDecompressMemoryNV :: forall io
                       . (MonadIO io)
                      => -- | @commandBuffer@ is the command buffer into which the command will be
                         -- recorded.
                         CommandBuffer
                      -> -- | @pDecompressMemoryRegions@ is a pointer to an array of
                         -- @decompressRegionCount@ 'DecompressMemoryRegionNV' structures specifying
                         -- decompression parameters.
                         ("decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV)
                      -> io ()
cmdDecompressMemoryNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV)
-> io ()
cmdDecompressMemoryNV CommandBuffer
commandBuffer
                        "decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV
decompressMemoryRegions = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkCmdDecompressMemoryNVPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("decompressRegionCount" ::: Word32)
   -> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
   -> IO ())
vkCmdDecompressMemoryNVPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("decompressRegionCount" ::: Word32)
      -> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
      -> IO ())
pVkCmdDecompressMemoryNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> ("decompressRegionCount" ::: Word32)
   -> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
   -> IO ())
vkCmdDecompressMemoryNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdDecompressMemoryNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdDecompressMemoryNV' :: Ptr CommandBuffer_T
-> ("decompressRegionCount" ::: Word32)
-> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO ()
vkCmdDecompressMemoryNV' = FunPtr
  (Ptr CommandBuffer_T
   -> ("decompressRegionCount" ::: Word32)
   -> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
   -> IO ())
-> Ptr CommandBuffer_T
-> ("decompressRegionCount" ::: Word32)
-> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO ()
mkVkCmdDecompressMemoryNV FunPtr
  (Ptr CommandBuffer_T
   -> ("decompressRegionCount" ::: Word32)
   -> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
   -> IO ())
vkCmdDecompressMemoryNVPtr
  "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
pPDecompressMemoryRegions <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @DecompressMemoryRegionNV ((forall a. Vector a -> Int
Data.Vector.length ("decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV
decompressMemoryRegions)) forall a. Num a => a -> a -> a
* Int
40)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i DecompressMemoryRegionNV
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
pPDecompressMemoryRegions forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
40 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DecompressMemoryRegionNV) (DecompressMemoryRegionNV
e)) ("decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV
decompressMemoryRegions)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdDecompressMemoryNV" (Ptr CommandBuffer_T
-> ("decompressRegionCount" ::: Word32)
-> ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO ()
vkCmdDecompressMemoryNV'
                                                       (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                       ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("decompressMemoryRegions" ::: Vector DecompressMemoryRegionNV
decompressMemoryRegions)) :: Word32))
                                                       ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
pPDecompressMemoryRegions))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdDecompressMemoryIndirectCountNV
  :: FunPtr (Ptr CommandBuffer_T -> DeviceAddress -> DeviceAddress -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> DeviceAddress -> DeviceAddress -> Word32 -> IO ()

-- | vkCmdDecompressMemoryIndirectCountNV - Indirect decompress data between
-- memory regions
--
-- = Description
--
-- Each region specified in @indirectCommandsAddress@ is decompressed from
-- the source to destination region based on the specified decompression
-- method.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-None-07692# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-memoryDecompression memoryDecompression>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07693#
--     If @indirectCommandsAddress@ comes from a non-sparse buffer then it
--     /must/ be bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07694#
--     The 'Vulkan.Core10.Handles.Buffer' that @indirectCommandsAddress@
--     comes from /must/ have been created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT'
--     bit set
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-offset-07695# @offset@
--     /must/ be a multiple of @4@
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07696#
--     If @indirectCommandsCountAddress@ comes from a non-sparse buffer
--     then it /must/ be bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07697#
--     The 'Vulkan.Core10.Handles.Buffer' that
--     @indirectCommandsCountAddress@ comes from /must/ have been created
--     with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT'
--     bit set
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07698#
--     @indirectCommandsCountAddress@ /must/ be a multiple of @4@
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07699#
--     The count stored in @indirectCommandsCountAddress@ /must/ be less
--     than or equal to
--     'PhysicalDeviceMemoryDecompressionPropertiesNV'::@maxDecompressionIndirectCount@
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-stride-07700# @stride@
--     /must/ be a multiple of @4@ and /must/ be greater than or equal to
--     sizeof('DecompressMemoryRegionNV')
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07701#
--     If the count stored in @indirectCommandsCountAddress@ is equal to
--     @1@, (@offset@ + sizeof('DecompressMemoryRegionNV')) /must/ be less
--     than or equal to the size of the 'Vulkan.Core10.Handles.Buffer' that
--     @indirectCommandsAddress@ comes from
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07702#
--     If the count stored in @indirectCommandsCountAddress@ is greater
--     than @1@, @indirectCommandsAddress@ +
--     sizeof('DecompressMemoryRegionNV') + (@stride@ × (count stored in
--     @countBuffer@ - 1)) /must/ be less than or equal to the last valid
--     address in the 'Vulkan.Core10.Handles.Buffer' that
--     @indirectCommandsAddress@ was created from
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-cmdpool#
--     The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics, or compute operations
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-renderpass# This command
--     /must/ only be called outside of a render pass instance
--
-- -   #VUID-vkCmdDecompressMemoryIndirectCountNV-videocoding# This command
--     /must/ only be called outside of a video coding scope
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Outside                                                                                                                     | Graphics                                                                                                              | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.FundamentalTypes.DeviceAddress'
cmdDecompressMemoryIndirectCountNV :: forall io
                                    . (MonadIO io)
                                   => -- | @commandBuffer@ is the command buffer into which the command will be
                                      -- recorded.
                                      CommandBuffer
                                   -> -- | @indirectCommandsAddress@ is the device address containing decompression
                                      -- parameters laid out as an array of 'DecompressMemoryRegionNV'
                                      -- structures.
                                      ("indirectCommandsAddress" ::: DeviceAddress)
                                   -> -- | @indirectCommandsCountAddress@ is the device address containing the
                                      -- decompression count.
                                      ("indirectCommandsCountAddress" ::: DeviceAddress)
                                   -> -- | @stride@ is the byte stride between successive sets of decompression
                                      -- parameters located starting from @indirectCommandsAddress@.
                                      ("stride" ::: Word32)
                                   -> io ()
cmdDecompressMemoryIndirectCountNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> Flags64
-> Flags64
-> ("decompressRegionCount" ::: Word32)
-> io ()
cmdDecompressMemoryIndirectCountNV CommandBuffer
commandBuffer
                                     Flags64
indirectCommandsAddress
                                     Flags64
indirectCommandsCountAddress
                                     "decompressRegionCount" ::: Word32
stride = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
  let vkCmdDecompressMemoryIndirectCountNVPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> Flags64
   -> Flags64
   -> ("decompressRegionCount" ::: Word32)
   -> IO ())
vkCmdDecompressMemoryIndirectCountNVPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> Flags64
      -> Flags64
      -> ("decompressRegionCount" ::: Word32)
      -> IO ())
pVkCmdDecompressMemoryIndirectCountNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> Flags64
   -> Flags64
   -> ("decompressRegionCount" ::: Word32)
   -> IO ())
vkCmdDecompressMemoryIndirectCountNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdDecompressMemoryIndirectCountNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdDecompressMemoryIndirectCountNV' :: Ptr CommandBuffer_T
-> Flags64
-> Flags64
-> ("decompressRegionCount" ::: Word32)
-> IO ()
vkCmdDecompressMemoryIndirectCountNV' = FunPtr
  (Ptr CommandBuffer_T
   -> Flags64
   -> Flags64
   -> ("decompressRegionCount" ::: Word32)
   -> IO ())
-> Ptr CommandBuffer_T
-> Flags64
-> Flags64
-> ("decompressRegionCount" ::: Word32)
-> IO ()
mkVkCmdDecompressMemoryIndirectCountNV FunPtr
  (Ptr CommandBuffer_T
   -> Flags64
   -> Flags64
   -> ("decompressRegionCount" ::: Word32)
   -> IO ())
vkCmdDecompressMemoryIndirectCountNVPtr
  forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdDecompressMemoryIndirectCountNV" (Ptr CommandBuffer_T
-> Flags64
-> Flags64
-> ("decompressRegionCount" ::: Word32)
-> IO ()
vkCmdDecompressMemoryIndirectCountNV'
                                                             (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                             (Flags64
indirectCommandsAddress)
                                                             (Flags64
indirectCommandsCountAddress)
                                                             ("decompressRegionCount" ::: Word32
stride))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


-- | VkPhysicalDeviceMemoryDecompressionFeaturesNV - Structure describing if
-- memory decompression is supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceMemoryDecompressionFeaturesNV' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceMemoryDecompressionFeaturesNV' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceMemoryDecompressionFeaturesNV = PhysicalDeviceMemoryDecompressionFeaturesNV
  { -- | #features-memoryDecompression# @memoryDecompression@ indicates whether
    -- memory decompression is supported.
    PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
memoryDecompression :: Bool }
  deriving (Typeable, PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
$c/= :: PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
== :: PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
$c== :: PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMemoryDecompressionFeaturesNV)
#endif
deriving instance Show PhysicalDeviceMemoryDecompressionFeaturesNV

instance ToCStruct PhysicalDeviceMemoryDecompressionFeaturesNV where
  withCStruct :: forall b.
PhysicalDeviceMemoryDecompressionFeaturesNV
-> (Ptr PhysicalDeviceMemoryDecompressionFeaturesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceMemoryDecompressionFeaturesNV
x Ptr PhysicalDeviceMemoryDecompressionFeaturesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p PhysicalDeviceMemoryDecompressionFeaturesNV
x (Ptr PhysicalDeviceMemoryDecompressionFeaturesNV -> IO b
f Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p PhysicalDeviceMemoryDecompressionFeaturesNV{Bool
memoryDecompression :: Bool
$sel:memoryDecompression:PhysicalDeviceMemoryDecompressionFeaturesNV :: PhysicalDeviceMemoryDecompressionFeaturesNV -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
memoryDecompression))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceMemoryDecompressionFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceMemoryDecompressionFeaturesNV where
  peekCStruct :: Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
-> IO PhysicalDeviceMemoryDecompressionFeaturesNV
peekCStruct Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p = do
    Bool32
memoryDecompression <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceMemoryDecompressionFeaturesNV
PhysicalDeviceMemoryDecompressionFeaturesNV
             (Bool32 -> Bool
bool32ToBool Bool32
memoryDecompression)

instance Storable PhysicalDeviceMemoryDecompressionFeaturesNV where
  sizeOf :: PhysicalDeviceMemoryDecompressionFeaturesNV -> Int
sizeOf ~PhysicalDeviceMemoryDecompressionFeaturesNV
_ = Int
24
  alignment :: PhysicalDeviceMemoryDecompressionFeaturesNV -> Int
alignment ~PhysicalDeviceMemoryDecompressionFeaturesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
-> IO PhysicalDeviceMemoryDecompressionFeaturesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
-> PhysicalDeviceMemoryDecompressionFeaturesNV -> IO ()
poke Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
ptr PhysicalDeviceMemoryDecompressionFeaturesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionFeaturesNV
ptr PhysicalDeviceMemoryDecompressionFeaturesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceMemoryDecompressionFeaturesNV where
  zero :: PhysicalDeviceMemoryDecompressionFeaturesNV
zero = Bool -> PhysicalDeviceMemoryDecompressionFeaturesNV
PhysicalDeviceMemoryDecompressionFeaturesNV
           forall a. Zero a => a
zero


-- | VkPhysicalDeviceMemoryDecompressionPropertiesNV - Structure describing
-- supported memory decompression methods by an implementation
--
-- = Description
--
-- If the 'PhysicalDeviceMemoryDecompressionPropertiesNV' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>,
-- 'MemoryDecompressionMethodFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceMemoryDecompressionPropertiesNV = PhysicalDeviceMemoryDecompressionPropertiesNV
  { -- | @decompressionMethods@ is a bitmask of
    -- 'MemoryDecompressionMethodFlagBitsNV' specifying memory decompression
    -- methods supported by the implementation.
    PhysicalDeviceMemoryDecompressionPropertiesNV
-> MemoryDecompressionMethodFlagBitsNV
decompressionMethods :: MemoryDecompressionMethodFlagsNV
  , -- | @maxDecompressionIndirectCount@ specifies the maximum supported count
    -- value in the @countBuffer@ of 'cmdDecompressMemoryIndirectCountNV'
    PhysicalDeviceMemoryDecompressionPropertiesNV -> Flags64
maxDecompressionIndirectCount :: Word64
  }
  deriving (Typeable, PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> Bool
$c/= :: PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> Bool
== :: PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> Bool
$c== :: PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMemoryDecompressionPropertiesNV)
#endif
deriving instance Show PhysicalDeviceMemoryDecompressionPropertiesNV

instance ToCStruct PhysicalDeviceMemoryDecompressionPropertiesNV where
  withCStruct :: forall b.
PhysicalDeviceMemoryDecompressionPropertiesNV
-> (Ptr PhysicalDeviceMemoryDecompressionPropertiesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceMemoryDecompressionPropertiesNV
x Ptr PhysicalDeviceMemoryDecompressionPropertiesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p PhysicalDeviceMemoryDecompressionPropertiesNV
x (Ptr PhysicalDeviceMemoryDecompressionPropertiesNV -> IO b
f Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p PhysicalDeviceMemoryDecompressionPropertiesNV{Flags64
MemoryDecompressionMethodFlagBitsNV
maxDecompressionIndirectCount :: Flags64
decompressionMethods :: MemoryDecompressionMethodFlagBitsNV
$sel:maxDecompressionIndirectCount:PhysicalDeviceMemoryDecompressionPropertiesNV :: PhysicalDeviceMemoryDecompressionPropertiesNV -> Flags64
$sel:decompressionMethods:PhysicalDeviceMemoryDecompressionPropertiesNV :: PhysicalDeviceMemoryDecompressionPropertiesNV
-> MemoryDecompressionMethodFlagBitsNV
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MemoryDecompressionMethodFlagsNV)) (MemoryDecompressionMethodFlagBitsNV
decompressionMethods)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) (Flags64
maxDecompressionIndirectCount)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceMemoryDecompressionPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MemoryDecompressionMethodFlagsNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceMemoryDecompressionPropertiesNV where
  peekCStruct :: Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
-> IO PhysicalDeviceMemoryDecompressionPropertiesNV
peekCStruct Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p = do
    MemoryDecompressionMethodFlagBitsNV
decompressionMethods <- forall a. Storable a => Ptr a -> IO a
peek @MemoryDecompressionMethodFlagsNV ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr MemoryDecompressionMethodFlagsNV))
    Flags64
maxDecompressionIndirectCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ MemoryDecompressionMethodFlagBitsNV
-> Flags64 -> PhysicalDeviceMemoryDecompressionPropertiesNV
PhysicalDeviceMemoryDecompressionPropertiesNV
             MemoryDecompressionMethodFlagBitsNV
decompressionMethods Flags64
maxDecompressionIndirectCount

instance Storable PhysicalDeviceMemoryDecompressionPropertiesNV where
  sizeOf :: PhysicalDeviceMemoryDecompressionPropertiesNV -> Int
sizeOf ~PhysicalDeviceMemoryDecompressionPropertiesNV
_ = Int
32
  alignment :: PhysicalDeviceMemoryDecompressionPropertiesNV -> Int
alignment ~PhysicalDeviceMemoryDecompressionPropertiesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
-> IO PhysicalDeviceMemoryDecompressionPropertiesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
-> PhysicalDeviceMemoryDecompressionPropertiesNV -> IO ()
poke Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
ptr PhysicalDeviceMemoryDecompressionPropertiesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMemoryDecompressionPropertiesNV
ptr PhysicalDeviceMemoryDecompressionPropertiesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceMemoryDecompressionPropertiesNV where
  zero :: PhysicalDeviceMemoryDecompressionPropertiesNV
zero = MemoryDecompressionMethodFlagBitsNV
-> Flags64 -> PhysicalDeviceMemoryDecompressionPropertiesNV
PhysicalDeviceMemoryDecompressionPropertiesNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkDecompressMemoryRegionNV - Structure specifying decompression
-- parameters
--
-- == Valid Usage
--
-- -   #VUID-VkDecompressMemoryRegionNV-srcAddress-07685# The @srcAddress@
--     /must/ be 4 byte aligned
--
-- -   #VUID-VkDecompressMemoryRegionNV-srcAddress-07686# The memory in
--     range @srcAddress@ and @srcAddress@ + @compressedSize@ /must/ be
--     valid and bound to a 'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-VkDecompressMemoryRegionNV-dstAddress-07687# The @dstAddress@
--     /must/ be 4 byte aligned
--
-- -   #VUID-VkDecompressMemoryRegionNV-decompressionMethod-09395# If
--     @decompressionMethod@ is
--     'MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV', then
--     @decompressedSize@ /must/ be less than or equal to 65536 bytes
--
-- -   #VUID-VkDecompressMemoryRegionNV-dstAddress-07688# The memory in
--     range @dstAddress@ and @dstAddress@ + @decompressedSize@ /must/ be
--     valid and bound to a 'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-VkDecompressMemoryRegionNV-decompressedSize-07689# The
--     @decompressedSize@ /must/ be large enough to hold the decompressed
--     data based on the @decompressionMethod@
--
-- -   #VUID-VkDecompressMemoryRegionNV-decompressionMethod-07690# The
--     @decompressionMethod@ /must/ have a single bit set
--
-- -   #VUID-VkDecompressMemoryRegionNV-srcAddress-07691# The @srcAddress@
--     to @srcAddress@ + @compressedSize@ region /must/ not overlap with
--     the @dstAddress@ and @dstAddress@ + @decompressedSize@ region
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkDecompressMemoryRegionNV-decompressionMethod-parameter#
--     @decompressionMethod@ /must/ be a valid combination of
--     'MemoryDecompressionMethodFlagBitsNV' values
--
-- -   #VUID-VkDecompressMemoryRegionNV-decompressionMethod-requiredbitmask#
--     @decompressionMethod@ /must/ not be @0@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>,
-- 'Vulkan.Core10.FundamentalTypes.DeviceAddress',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'MemoryDecompressionMethodFlagsNV', 'cmdDecompressMemoryNV'
data DecompressMemoryRegionNV = DecompressMemoryRegionNV
  { -- | @srcAddress@ is the address where compressed data is stored.
    DecompressMemoryRegionNV -> Flags64
srcAddress :: DeviceAddress
  , -- | @dstAddress@ is the destination address where decompressed data will be
    -- written.
    DecompressMemoryRegionNV -> Flags64
dstAddress :: DeviceAddress
  , -- | @compressedSize@ is the size of compressed data in bytes.
    DecompressMemoryRegionNV -> Flags64
compressedSize :: DeviceSize
  , -- | @decompressedSize@ is the size of decompressed data in bytes.
    DecompressMemoryRegionNV -> Flags64
decompressedSize :: DeviceSize
  , -- | @decompressionMethod@ is a bitmask of
    -- 'MemoryDecompressionMethodFlagBitsNV' with a single bit set specifying
    -- the method used to decompress data.
    DecompressMemoryRegionNV -> MemoryDecompressionMethodFlagBitsNV
decompressionMethod :: MemoryDecompressionMethodFlagsNV
  }
  deriving (Typeable, DecompressMemoryRegionNV -> DecompressMemoryRegionNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DecompressMemoryRegionNV -> DecompressMemoryRegionNV -> Bool
$c/= :: DecompressMemoryRegionNV -> DecompressMemoryRegionNV -> Bool
== :: DecompressMemoryRegionNV -> DecompressMemoryRegionNV -> Bool
$c== :: DecompressMemoryRegionNV -> DecompressMemoryRegionNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DecompressMemoryRegionNV)
#endif
deriving instance Show DecompressMemoryRegionNV

instance ToCStruct DecompressMemoryRegionNV where
  withCStruct :: forall b.
DecompressMemoryRegionNV
-> (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
    -> IO b)
-> IO b
withCStruct DecompressMemoryRegionNV
x ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \"pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p DecompressMemoryRegionNV
x (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO b
f "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p)
  pokeCStruct :: forall b.
("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> DecompressMemoryRegionNV -> IO b -> IO b
pokeCStruct "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p DecompressMemoryRegionNV{Flags64
MemoryDecompressionMethodFlagBitsNV
decompressionMethod :: MemoryDecompressionMethodFlagBitsNV
decompressedSize :: Flags64
compressedSize :: Flags64
dstAddress :: Flags64
srcAddress :: Flags64
$sel:decompressionMethod:DecompressMemoryRegionNV :: DecompressMemoryRegionNV -> MemoryDecompressionMethodFlagBitsNV
$sel:decompressedSize:DecompressMemoryRegionNV :: DecompressMemoryRegionNV -> Flags64
$sel:compressedSize:DecompressMemoryRegionNV :: DecompressMemoryRegionNV -> Flags64
$sel:dstAddress:DecompressMemoryRegionNV :: DecompressMemoryRegionNV -> Flags64
$sel:srcAddress:DecompressMemoryRegionNV :: DecompressMemoryRegionNV -> Flags64
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (Flags64
srcAddress)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (Flags64
dstAddress)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (Flags64
compressedSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (Flags64
decompressedSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MemoryDecompressionMethodFlagsNV)) (MemoryDecompressionMethodFlagBitsNV
decompressionMethod)
    IO b
f
  cStructSize :: Int
cStructSize = Int
40
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO b -> IO b
pokeZeroCStruct "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MemoryDecompressionMethodFlagsNV)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DecompressMemoryRegionNV where
  peekCStruct :: ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO DecompressMemoryRegionNV
peekCStruct "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p = do
    Flags64
srcAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress))
    Flags64
dstAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceAddress))
    Flags64
compressedSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
    Flags64
decompressedSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
    MemoryDecompressionMethodFlagBitsNV
decompressionMethod <- forall a. Storable a => Ptr a -> IO a
peek @MemoryDecompressionMethodFlagsNV (("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr MemoryDecompressionMethodFlagsNV))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Flags64
-> Flags64
-> Flags64
-> Flags64
-> MemoryDecompressionMethodFlagBitsNV
-> DecompressMemoryRegionNV
DecompressMemoryRegionNV
             Flags64
srcAddress
             Flags64
dstAddress
             Flags64
compressedSize
             Flags64
decompressedSize
             MemoryDecompressionMethodFlagBitsNV
decompressionMethod

instance Storable DecompressMemoryRegionNV where
  sizeOf :: DecompressMemoryRegionNV -> Int
sizeOf ~DecompressMemoryRegionNV
_ = Int
40
  alignment :: DecompressMemoryRegionNV -> Int
alignment ~DecompressMemoryRegionNV
_ = Int
8
  peek :: ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> IO DecompressMemoryRegionNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV)
-> DecompressMemoryRegionNV -> IO ()
poke "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
ptr DecompressMemoryRegionNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDecompressMemoryRegions" ::: Ptr DecompressMemoryRegionNV
ptr DecompressMemoryRegionNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DecompressMemoryRegionNV where
  zero :: DecompressMemoryRegionNV
zero = Flags64
-> Flags64
-> Flags64
-> Flags64
-> MemoryDecompressionMethodFlagBitsNV
-> DecompressMemoryRegionNV
DecompressMemoryRegionNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


type MemoryDecompressionMethodFlagsNV = MemoryDecompressionMethodFlagBitsNV

-- | VkMemoryDecompressionMethodFlagBitsNV - List the supported memory
-- decompression methods
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_memory_decompression VK_NV_memory_decompression>
newtype MemoryDecompressionMethodFlagBitsNV = MemoryDecompressionMethodFlagBitsNV Flags64
  deriving newtype (MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c/= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
== :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c== :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
Eq, Eq MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Ordering
MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
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 :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$cmin :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
max :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$cmax :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
>= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c>= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
> :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c> :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
<= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c<= :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
< :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
$c< :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Bool
compare :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Ordering
$ccompare :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> Ordering
Ord, Ptr MemoryDecompressionMethodFlagBitsNV
-> IO MemoryDecompressionMethodFlagBitsNV
Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> IO MemoryDecompressionMethodFlagBitsNV
Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV -> IO ()
Ptr MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> IO ()
MemoryDecompressionMethodFlagBitsNV -> Int
forall b. Ptr b -> Int -> IO MemoryDecompressionMethodFlagBitsNV
forall b.
Ptr b -> Int -> MemoryDecompressionMethodFlagBitsNV -> 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 MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> IO ()
$cpoke :: Ptr MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV -> IO ()
peek :: Ptr MemoryDecompressionMethodFlagBitsNV
-> IO MemoryDecompressionMethodFlagBitsNV
$cpeek :: Ptr MemoryDecompressionMethodFlagBitsNV
-> IO MemoryDecompressionMethodFlagBitsNV
pokeByteOff :: forall b.
Ptr b -> Int -> MemoryDecompressionMethodFlagBitsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> MemoryDecompressionMethodFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO MemoryDecompressionMethodFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO MemoryDecompressionMethodFlagBitsNV
pokeElemOff :: Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV -> IO ()
peekElemOff :: Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> IO MemoryDecompressionMethodFlagBitsNV
$cpeekElemOff :: Ptr MemoryDecompressionMethodFlagBitsNV
-> Int -> IO MemoryDecompressionMethodFlagBitsNV
alignment :: MemoryDecompressionMethodFlagBitsNV -> Int
$calignment :: MemoryDecompressionMethodFlagBitsNV -> Int
sizeOf :: MemoryDecompressionMethodFlagBitsNV -> Int
$csizeOf :: MemoryDecompressionMethodFlagBitsNV -> Int
Storable, MemoryDecompressionMethodFlagBitsNV
forall a. a -> Zero a
zero :: MemoryDecompressionMethodFlagBitsNV
$czero :: MemoryDecompressionMethodFlagBitsNV
Zero, Eq MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV
Int -> MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV -> Bool
MemoryDecompressionMethodFlagBitsNV -> Int
MemoryDecompressionMethodFlagBitsNV -> Maybe Int
MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV -> Int -> Bool
MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: MemoryDecompressionMethodFlagBitsNV -> Int
$cpopCount :: MemoryDecompressionMethodFlagBitsNV -> Int
rotateR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$crotateR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
rotateL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$crotateL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
unsafeShiftR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cunsafeShiftR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
shiftR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cshiftR :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
unsafeShiftL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cunsafeShiftL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
shiftL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cshiftL :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
isSigned :: MemoryDecompressionMethodFlagBitsNV -> Bool
$cisSigned :: MemoryDecompressionMethodFlagBitsNV -> Bool
bitSize :: MemoryDecompressionMethodFlagBitsNV -> Int
$cbitSize :: MemoryDecompressionMethodFlagBitsNV -> Int
bitSizeMaybe :: MemoryDecompressionMethodFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: MemoryDecompressionMethodFlagBitsNV -> Maybe Int
testBit :: MemoryDecompressionMethodFlagBitsNV -> Int -> Bool
$ctestBit :: MemoryDecompressionMethodFlagBitsNV -> Int -> Bool
complementBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$ccomplementBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
clearBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cclearBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
setBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$csetBit :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
bit :: Int -> MemoryDecompressionMethodFlagBitsNV
$cbit :: Int -> MemoryDecompressionMethodFlagBitsNV
zeroBits :: MemoryDecompressionMethodFlagBitsNV
$czeroBits :: MemoryDecompressionMethodFlagBitsNV
rotate :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$crotate :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
shift :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
$cshift :: MemoryDecompressionMethodFlagBitsNV
-> Int -> MemoryDecompressionMethodFlagBitsNV
complement :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$ccomplement :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
xor :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$cxor :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
.|. :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$c.|. :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
.&. :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
$c.&. :: MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
-> MemoryDecompressionMethodFlagBitsNV
Bits, Bits MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: MemoryDecompressionMethodFlagBitsNV -> Int
$ccountTrailingZeros :: MemoryDecompressionMethodFlagBitsNV -> Int
countLeadingZeros :: MemoryDecompressionMethodFlagBitsNV -> Int
$ccountLeadingZeros :: MemoryDecompressionMethodFlagBitsNV -> Int
finiteBitSize :: MemoryDecompressionMethodFlagBitsNV -> Int
$cfiniteBitSize :: MemoryDecompressionMethodFlagBitsNV -> Int
FiniteBits)

-- | 'MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV' specifies that the
-- GDeflate 1.0 algorithm is used to decompress data.
pattern $bMEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV :: MemoryDecompressionMethodFlagBitsNV
$mMEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV :: forall {r}.
MemoryDecompressionMethodFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = MemoryDecompressionMethodFlagBitsNV 0x0000000000000001

conNameMemoryDecompressionMethodFlagBitsNV :: String
conNameMemoryDecompressionMethodFlagBitsNV :: String
conNameMemoryDecompressionMethodFlagBitsNV = String
"MemoryDecompressionMethodFlagBitsNV"

enumPrefixMemoryDecompressionMethodFlagBitsNV :: String
enumPrefixMemoryDecompressionMethodFlagBitsNV :: String
enumPrefixMemoryDecompressionMethodFlagBitsNV = String
"MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV"

showTableMemoryDecompressionMethodFlagBitsNV :: [(MemoryDecompressionMethodFlagBitsNV, String)]
showTableMemoryDecompressionMethodFlagBitsNV :: [(MemoryDecompressionMethodFlagBitsNV, String)]
showTableMemoryDecompressionMethodFlagBitsNV =
  [
    ( MemoryDecompressionMethodFlagBitsNV
MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV
    , String
""
    )
  ]

instance Show MemoryDecompressionMethodFlagBitsNV where
  showsPrec :: Int -> MemoryDecompressionMethodFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixMemoryDecompressionMethodFlagBitsNV
      [(MemoryDecompressionMethodFlagBitsNV, String)]
showTableMemoryDecompressionMethodFlagBitsNV
      String
conNameMemoryDecompressionMethodFlagBitsNV
      (\(MemoryDecompressionMethodFlagBitsNV Flags64
x) -> Flags64
x)
      (\Flags64
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags64
x)

instance Read MemoryDecompressionMethodFlagBitsNV where
  readPrec :: ReadPrec MemoryDecompressionMethodFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixMemoryDecompressionMethodFlagBitsNV
      [(MemoryDecompressionMethodFlagBitsNV, String)]
showTableMemoryDecompressionMethodFlagBitsNV
      String
conNameMemoryDecompressionMethodFlagBitsNV
      Flags64 -> MemoryDecompressionMethodFlagBitsNV
MemoryDecompressionMethodFlagBitsNV

type NV_MEMORY_DECOMPRESSION_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION"
pattern NV_MEMORY_DECOMPRESSION_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_MEMORY_DECOMPRESSION_SPEC_VERSION :: forall a. Integral a => a
$mNV_MEMORY_DECOMPRESSION_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_MEMORY_DECOMPRESSION_SPEC_VERSION = 1


type NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"

-- No documentation found for TopLevel "VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME"
pattern NV_MEMORY_DECOMPRESSION_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_MEMORY_DECOMPRESSION_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_MEMORY_DECOMPRESSION_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"