{-# language CPP #-}
-- | = Name
--
-- VK_AMDX_dense_geometry_format - device extension
--
-- = VK_AMDX_dense_geometry_format
--
-- [__Name String__]
--     @VK_AMDX_dense_geometry_format@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     479
--
-- [__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_acceleration_structure VK_KHR_acceleration_structure>
--     and
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance5 VK_KHR_maintenance5>
--          or
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.4 Vulkan Version 1.4>
--
--     -   __This is a /provisional/ extension and /must/ be used with
--         caution. See the
--         <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#boilerplate-provisional-header description>
--         of provisional header files for enablement and stability
--         details.__
--
-- [__Contact__]
--
--     -   Stu Smith
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_AMDX_dense_geometry_format] @stu-s%0A*Here describe the issue or question you have about the VK_AMDX_dense_geometry_format extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_AMDX_dense_geometry_format.adoc VK_AMDX_dense_geometry_format>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2025-07-10
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Stu Smith, AMD
--
--     -   Josh Barczak, AMD
--
--     -   Carsten Benthin, AMD
--
--     -   David McAllister, AMD
--
-- == Description
--
-- This extension adds the ability to build ray tracing acceleration
-- structures from pre-compressed @Dense Geometry Format@ geometry data.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureGeometryKHR':
--
--     -   'AccelerationStructureDenseGeometryFormatTrianglesDataAMDX'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceDenseGeometryFormatFeaturesAMDX'
--
-- == New Enums
--
-- -   'CompressedTriangleFormatAMDX'
--
-- == New Enum Constants
--
-- -   'AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME'
--
-- -   'AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION'
--
-- -   'Vulkan.Core10.APIConstants.COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX'
--
-- -   'Vulkan.Core10.APIConstants.COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX'
--
-- -   Extending
--     'Vulkan.Core14.Enums.BufferUsageFlags2.BufferUsageFlagBits2':
--
--     -   'Vulkan.Core14.Enums.BufferUsageFlags2.BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryTypeKHR':
--
--     -   'Vulkan.Extensions.VK_KHR_acceleration_structure.GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_DENSE_GEOMETRY_FORMAT_FEATURES_AMDX'
--
-- == Issues
--
-- None.
--
-- == Examples
--
-- None.
--
-- == Version History
--
-- -   Revision 1, 2025-07-10 (Stu Smith)
--
--     -   Initial revision.
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_AMDX_dense_geometry_format Vulkan Specification>.
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_AMDX_dense_geometry_format  ( PhysicalDeviceDenseGeometryFormatFeaturesAMDX(..)
                                                        , AccelerationStructureDenseGeometryFormatTrianglesDataAMDX(..)
                                                        , CompressedTriangleFormatAMDX( COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX
                                                                                      , ..
                                                                                      )
                                                        , AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION
                                                        , pattern AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION
                                                        , AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME
                                                        , pattern AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME
                                                        , DeviceOrHostAddressConstKHR(..)
                                                        , GeometryTypeKHR(..)
                                                        , COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX
                                                        , pattern COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX
                                                        , COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX
                                                        , pattern COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX
                                                        ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.Ptr (castPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
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 Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
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 Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_opacity_micromap (AccelerationStructureTrianglesOpacityMicromapEXT)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR)
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DENSE_GEOMETRY_FORMAT_FEATURES_AMDX))
import Vulkan.Core10.APIConstants (COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX)
import Vulkan.Core10.APIConstants (COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryTypeKHR(..))
import Vulkan.Core10.APIConstants (pattern COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX)
import Vulkan.Core10.APIConstants (pattern COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX)
-- | VkPhysicalDeviceDenseGeometryFormatFeaturesAMDX - Structure describing
-- dense geometry format features that can be supported by an
-- implementation
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceDenseGeometryFormatFeaturesAMDX' 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. If the application wishes to use a
-- 'Vulkan.Core10.Handles.Device' with any features described by
-- 'PhysicalDeviceDenseGeometryFormatFeaturesAMDX', it /must/ add an
-- instance of the structure, with the desired feature members set to
-- 'Vulkan.Core10.FundamentalTypes.TRUE', to the @pNext@ chain of
-- 'Vulkan.Core10.Device.DeviceCreateInfo' when creating the
-- 'Vulkan.Core10.Handles.Device'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_AMDX_dense_geometry_format VK_AMDX_dense_geometry_format>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceDenseGeometryFormatFeaturesAMDX = PhysicalDeviceDenseGeometryFormatFeaturesAMDX
  { -- | #features-denseGeometryFormat# @denseGeometryFormat@ specifies whether
    -- the implementation supports DGF1 compressed geometry data.
    PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
denseGeometryFormat :: Bool }
  deriving (Typeable, PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
(PhysicalDeviceDenseGeometryFormatFeaturesAMDX
 -> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool)
-> (PhysicalDeviceDenseGeometryFormatFeaturesAMDX
    -> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool)
-> Eq PhysicalDeviceDenseGeometryFormatFeaturesAMDX
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
== :: PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
$c/= :: PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
/= :: PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> PhysicalDeviceDenseGeometryFormatFeaturesAMDX -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDenseGeometryFormatFeaturesAMDX)
#endif
deriving instance Show PhysicalDeviceDenseGeometryFormatFeaturesAMDX

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

instance FromCStruct PhysicalDeviceDenseGeometryFormatFeaturesAMDX where
  peekCStruct :: Ptr PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> IO PhysicalDeviceDenseGeometryFormatFeaturesAMDX
peekCStruct Ptr PhysicalDeviceDenseGeometryFormatFeaturesAMDX
p = do
    denseGeometryFormat <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDenseGeometryFormatFeaturesAMDX
p Ptr PhysicalDeviceDenseGeometryFormatFeaturesAMDX
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    pure $ PhysicalDeviceDenseGeometryFormatFeaturesAMDX
             (bool32ToBool denseGeometryFormat)

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

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


-- | VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX - Structure
-- specifying acceleration structure DGF compressed triangle data
--
-- = Description
--
-- If @format@ is 'COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX', @numVertices@
-- specifies the sum of vertex counts across all blocks.
--
-- == Valid Usage
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-compressedData-10885#
--     The buffer from which @compressedData.deviceAddress@ is queried
--     /must/ have been created with the
--     'Vulkan.Core14.Enums.BufferUsageFlags2.BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX'
--     usage flag set
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-denseGeometryFormat-10886#
--     The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-denseGeometryFormat ::denseGeometryFormat>
--     feature /must/ be enabled
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-10887#
--     If @format@ is VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX, then
--     @compressedData@ /must/ be aligned to
--     'Vulkan.Core10.APIConstants.COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX'
--     (128) bytes
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-10888#
--     If @format@ is VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX, then
--     @dataSize@ /must/ be a multiple of
--     'Vulkan.Core10.APIConstants.COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX'
--     (128) bytes
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-pNext-10890#
--     @pNext@ /must/ be @NULL@ or a pointer to a valid
--     'Vulkan.Extensions.VK_EXT_opacity_micromap.AccelerationStructureTrianglesOpacityMicromapEXT'
--     structure
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-pNext-10891#
--     If @pNext@ is a pointer to a valid
--     'Vulkan.Extensions.VK_EXT_opacity_micromap.AccelerationStructureTrianglesOpacityMicromapEXT'
--     structure, the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-micromap micromap>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX'
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-compressedData-parameter#
--     @compressedData@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR'
--     union
--
-- -   #VUID-VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX-format-parameter#
--     @format@ /must/ be a valid 'CompressedTriangleFormatAMDX' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_AMDX_dense_geometry_format VK_AMDX_dense_geometry_format>,
-- 'CompressedTriangleFormatAMDX',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data AccelerationStructureDenseGeometryFormatTrianglesDataAMDX (es :: [Type]) = AccelerationStructureDenseGeometryFormatTrianglesDataAMDX
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
next :: Chain es
  , -- | @compressedData@ specifies the base address of the compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceOrHostAddressConstKHR
compressedData :: DeviceOrHostAddressConstKHR
  , -- | @dataSize@ specifies the size of the compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceSize
dataSize :: DeviceSize
  , -- | @numTriangles@ specifies the total number of triangles encoded in the
    -- compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numTriangles :: Word32
  , -- | @numVertices@ specifies the number of vertices in the compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numVertices :: Word32
  , -- | @maxPrimitiveIndex@ specifies the maximum primitive index encoded in the
    -- compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxPrimitiveIndex :: Word32
  , -- | @maxGeometryIndex@ specifies the maximum geometry index encoded in the
    -- compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxGeometryIndex :: Word32
  , -- | @format@ specifies the 'CompressedTriangleFormatAMDX' format of the
    -- compressed data.
    forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> CompressedTriangleFormatAMDX
format :: CompressedTriangleFormatAMDX
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)

instance Extensible AccelerationStructureDenseGeometryFormatTrianglesDataAMDX where
  extensibleTypeName :: String
extensibleTypeName = String
"AccelerationStructureDenseGeometryFormatTrianglesDataAMDX"
  setNext :: forall (ds :: [*]) (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX ds
-> Chain es
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
setNext AccelerationStructureDenseGeometryFormatTrianglesDataAMDX{Word32
DeviceSize
Chain ds
DeviceOrHostAddressConstKHR
CompressedTriangleFormatAMDX
next :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
compressedData :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceOrHostAddressConstKHR
dataSize :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceSize
numTriangles :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numVertices :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxPrimitiveIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxGeometryIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
format :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> CompressedTriangleFormatAMDX
next :: Chain ds
compressedData :: DeviceOrHostAddressConstKHR
dataSize :: DeviceSize
numTriangles :: Word32
numVertices :: Word32
maxPrimitiveIndex :: Word32
maxGeometryIndex :: Word32
format :: CompressedTriangleFormatAMDX
..} Chain es
next' = AccelerationStructureDenseGeometryFormatTrianglesDataAMDX{next :: Chain es
next = Chain es
next', Word32
DeviceSize
DeviceOrHostAddressConstKHR
CompressedTriangleFormatAMDX
compressedData :: DeviceOrHostAddressConstKHR
dataSize :: DeviceSize
numTriangles :: Word32
numVertices :: Word32
maxPrimitiveIndex :: Word32
maxGeometryIndex :: Word32
format :: CompressedTriangleFormatAMDX
compressedData :: DeviceOrHostAddressConstKHR
dataSize :: DeviceSize
numTriangles :: Word32
numVertices :: Word32
maxPrimitiveIndex :: Word32
maxGeometryIndex :: Word32
format :: CompressedTriangleFormatAMDX
..}
  getNext :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
getNext AccelerationStructureDenseGeometryFormatTrianglesDataAMDX{Word32
DeviceSize
Chain es
DeviceOrHostAddressConstKHR
CompressedTriangleFormatAMDX
next :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
compressedData :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceOrHostAddressConstKHR
dataSize :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceSize
numTriangles :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numVertices :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxPrimitiveIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxGeometryIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
format :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> CompressedTriangleFormatAMDX
next :: Chain es
compressedData :: DeviceOrHostAddressConstKHR
dataSize :: DeviceSize
numTriangles :: Word32
numVertices :: Word32
maxPrimitiveIndex :: Word32
maxGeometryIndex :: Word32
format :: CompressedTriangleFormatAMDX
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends AccelerationStructureDenseGeometryFormatTrianglesDataAMDX e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends
      AccelerationStructureDenseGeometryFormatTrianglesDataAMDX e =>
    b)
-> Maybe b
extends proxy e
_ Extends
  AccelerationStructureDenseGeometryFormatTrianglesDataAMDX e =>
b
f
    | Just e :~: AccelerationStructureTrianglesOpacityMicromapEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @AccelerationStructureTrianglesOpacityMicromapEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends
  AccelerationStructureDenseGeometryFormatTrianglesDataAMDX e =>
b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance ( Extendss AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
         , PokeChain es ) => ToCStruct (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es) where
  withCStruct :: forall b.
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> (Ptr
      (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
    -> IO b)
-> IO b
withCStruct AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
x Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> IO b
f = Int
-> (Ptr
      (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
    -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((Ptr
    (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
  -> IO b)
 -> IO b)
-> (Ptr
      (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p -> Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> IO b
-> IO b
forall b.
Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
x (Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> IO b
f Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p)
  pokeCStruct :: forall b.
Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> IO b
-> IO b
pokeCStruct Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p AccelerationStructureDenseGeometryFormatTrianglesDataAMDX{Word32
DeviceSize
Chain es
DeviceOrHostAddressConstKHR
CompressedTriangleFormatAMDX
next :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
compressedData :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceOrHostAddressConstKHR
dataSize :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceSize
numTriangles :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numVertices :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxPrimitiveIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxGeometryIndex :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
format :: forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> CompressedTriangleFormatAMDX
next :: Chain es
compressedData :: DeviceOrHostAddressConstKHR
dataSize :: DeviceSize
numTriangles :: Word32
numVertices :: Word32
maxPrimitiveIndex :: Word32
maxGeometryIndex :: Word32
format :: CompressedTriangleFormatAMDX
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX)
    pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
    ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr DeviceOrHostAddressConstKHR)) (compressedData) . ($ ())
    lift $ poke ((p `plusPtr` 24 :: Ptr DeviceSize)) (dataSize)
    lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (numTriangles)
    lift $ poke ((p `plusPtr` 36 :: Ptr Word32)) (numVertices)
    lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (maxPrimitiveIndex)
    lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (maxGeometryIndex)
    lift $ poke ((p `plusPtr` 48 :: Ptr CompressedTriangleFormatAMDX)) (format)
    lift $ f
  cStructSize :: Int
cStructSize = Int
56
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> IO b -> IO b
pokeZeroCStruct Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
p Ptr (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX)
    pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
    ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr DeviceOrHostAddressConstKHR)) (zero) . ($ ())
    lift $ poke ((p `plusPtr` 24 :: Ptr DeviceSize)) (zero)
    lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 36 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 48 :: Ptr CompressedTriangleFormatAMDX)) (zero)
    lift $ f

instance es ~ '[] => Zero (AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es) where
  zero :: AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
zero = Chain es
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> Word32
-> Word32
-> Word32
-> Word32
-> CompressedTriangleFormatAMDX
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
forall (es :: [*]).
Chain es
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> Word32
-> Word32
-> Word32
-> Word32
-> CompressedTriangleFormatAMDX
-> AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX
           ()
           DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
           DeviceSize
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           CompressedTriangleFormatAMDX
forall a. Zero a => a
zero


-- | VkCompressedTriangleFormatAMDX - Available compressed triangle formats
--
-- = Description
--
-- -   'COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX' specifies that the compressed
--     triangle data is in
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#dense-geometry-format Dense Geometry Format>,
--     version 1, consisting of an array of 128B DGF blocks.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_AMDX_dense_geometry_format VK_AMDX_dense_geometry_format>,
-- 'AccelerationStructureDenseGeometryFormatTrianglesDataAMDX'
newtype CompressedTriangleFormatAMDX = CompressedTriangleFormatAMDX Int32
  deriving newtype (CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
(CompressedTriangleFormatAMDX
 -> CompressedTriangleFormatAMDX -> Bool)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> Bool)
-> Eq CompressedTriangleFormatAMDX
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
== :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
$c/= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
/= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
Eq, Eq CompressedTriangleFormatAMDX
Eq CompressedTriangleFormatAMDX =>
(CompressedTriangleFormatAMDX
 -> CompressedTriangleFormatAMDX -> Ordering)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> Bool)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> Bool)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> Bool)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> Bool)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX)
-> (CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX)
-> Ord CompressedTriangleFormatAMDX
CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Ordering
CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX
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
$ccompare :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Ordering
compare :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Ordering
$c< :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
< :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
$c<= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
<= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
$c> :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
> :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
$c>= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
>= :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> Bool
$cmax :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX
max :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX
$cmin :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX
min :: CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> CompressedTriangleFormatAMDX
Ord, Ptr CompressedTriangleFormatAMDX -> IO CompressedTriangleFormatAMDX
Ptr CompressedTriangleFormatAMDX
-> Int -> IO CompressedTriangleFormatAMDX
Ptr CompressedTriangleFormatAMDX
-> Int -> CompressedTriangleFormatAMDX -> IO ()
Ptr CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> IO ()
CompressedTriangleFormatAMDX -> Int
(CompressedTriangleFormatAMDX -> Int)
-> (CompressedTriangleFormatAMDX -> Int)
-> (Ptr CompressedTriangleFormatAMDX
    -> Int -> IO CompressedTriangleFormatAMDX)
-> (Ptr CompressedTriangleFormatAMDX
    -> Int -> CompressedTriangleFormatAMDX -> IO ())
-> (forall b. Ptr b -> Int -> IO CompressedTriangleFormatAMDX)
-> (forall b.
    Ptr b -> Int -> CompressedTriangleFormatAMDX -> IO ())
-> (Ptr CompressedTriangleFormatAMDX
    -> IO CompressedTriangleFormatAMDX)
-> (Ptr CompressedTriangleFormatAMDX
    -> CompressedTriangleFormatAMDX -> IO ())
-> Storable CompressedTriangleFormatAMDX
forall b. Ptr b -> Int -> IO CompressedTriangleFormatAMDX
forall b. Ptr b -> Int -> CompressedTriangleFormatAMDX -> 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
$csizeOf :: CompressedTriangleFormatAMDX -> Int
sizeOf :: CompressedTriangleFormatAMDX -> Int
$calignment :: CompressedTriangleFormatAMDX -> Int
alignment :: CompressedTriangleFormatAMDX -> Int
$cpeekElemOff :: Ptr CompressedTriangleFormatAMDX
-> Int -> IO CompressedTriangleFormatAMDX
peekElemOff :: Ptr CompressedTriangleFormatAMDX
-> Int -> IO CompressedTriangleFormatAMDX
$cpokeElemOff :: Ptr CompressedTriangleFormatAMDX
-> Int -> CompressedTriangleFormatAMDX -> IO ()
pokeElemOff :: Ptr CompressedTriangleFormatAMDX
-> Int -> CompressedTriangleFormatAMDX -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CompressedTriangleFormatAMDX
peekByteOff :: forall b. Ptr b -> Int -> IO CompressedTriangleFormatAMDX
$cpokeByteOff :: forall b. Ptr b -> Int -> CompressedTriangleFormatAMDX -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> CompressedTriangleFormatAMDX -> IO ()
$cpeek :: Ptr CompressedTriangleFormatAMDX -> IO CompressedTriangleFormatAMDX
peek :: Ptr CompressedTriangleFormatAMDX -> IO CompressedTriangleFormatAMDX
$cpoke :: Ptr CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> IO ()
poke :: Ptr CompressedTriangleFormatAMDX
-> CompressedTriangleFormatAMDX -> IO ()
Storable, CompressedTriangleFormatAMDX
CompressedTriangleFormatAMDX -> Zero CompressedTriangleFormatAMDX
forall a. a -> Zero a
$czero :: CompressedTriangleFormatAMDX
zero :: CompressedTriangleFormatAMDX
Zero)

-- No documentation found for Nested "VkCompressedTriangleFormatAMDX" "VK_COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX"
pattern $mCOMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX :: forall {r}.
CompressedTriangleFormatAMDX -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX :: CompressedTriangleFormatAMDX
COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX = CompressedTriangleFormatAMDX 0

{-# COMPLETE COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX :: CompressedTriangleFormatAMDX #-}

conNameCompressedTriangleFormatAMDX :: String
conNameCompressedTriangleFormatAMDX :: String
conNameCompressedTriangleFormatAMDX = String
"CompressedTriangleFormatAMDX"

enumPrefixCompressedTriangleFormatAMDX :: String
enumPrefixCompressedTriangleFormatAMDX :: String
enumPrefixCompressedTriangleFormatAMDX = String
"COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX"

showTableCompressedTriangleFormatAMDX :: [(CompressedTriangleFormatAMDX, String)]
showTableCompressedTriangleFormatAMDX :: [(CompressedTriangleFormatAMDX, String)]
showTableCompressedTriangleFormatAMDX =
  [
    ( CompressedTriangleFormatAMDX
COMPRESSED_TRIANGLE_FORMAT_DGF1_AMDX
    , String
""
    )
  ]

instance Show CompressedTriangleFormatAMDX where
  showsPrec :: Int -> CompressedTriangleFormatAMDX -> ShowS
showsPrec =
    String
-> [(CompressedTriangleFormatAMDX, String)]
-> String
-> (CompressedTriangleFormatAMDX -> Int32)
-> (Int32 -> ShowS)
-> Int
-> CompressedTriangleFormatAMDX
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixCompressedTriangleFormatAMDX
      [(CompressedTriangleFormatAMDX, String)]
showTableCompressedTriangleFormatAMDX
      String
conNameCompressedTriangleFormatAMDX
      (\(CompressedTriangleFormatAMDX Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read CompressedTriangleFormatAMDX where
  readPrec :: ReadPrec CompressedTriangleFormatAMDX
readPrec =
    String
-> [(CompressedTriangleFormatAMDX, String)]
-> String
-> (Int32 -> CompressedTriangleFormatAMDX)
-> ReadPrec CompressedTriangleFormatAMDX
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixCompressedTriangleFormatAMDX
      [(CompressedTriangleFormatAMDX, String)]
showTableCompressedTriangleFormatAMDX
      String
conNameCompressedTriangleFormatAMDX
      Int32 -> CompressedTriangleFormatAMDX
CompressedTriangleFormatAMDX

type AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION"
pattern AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION :: forall a . Integral a => a
pattern $mAMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bAMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION :: forall a. Integral a => a
AMDX_DENSE_GEOMETRY_FORMAT_SPEC_VERSION = 1


type AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME = "VK_AMDX_dense_geometry_format"

-- No documentation found for TopLevel "VK_AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME"
pattern AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mAMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bAMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
AMDX_DENSE_GEOMETRY_FORMAT_EXTENSION_NAME = "VK_AMDX_dense_geometry_format"