{-# language CPP #-}
module Vulkan.Extensions.VK_NV_displacement_micromap ( PhysicalDeviceDisplacementMicromapFeaturesNV(..)
, PhysicalDeviceDisplacementMicromapPropertiesNV(..)
, AccelerationStructureTrianglesDisplacementMicromapNV(..)
, DisplacementMicromapFormatNV( DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV
, DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV
, DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV
, ..
)
, NV_DISPLACEMENT_MICROMAP_SPEC_VERSION
, pattern NV_DISPLACEMENT_MICROMAP_SPEC_VERSION
, NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME
, pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME
, MicromapEXT(..)
, MicromapUsageEXT(..)
, DeviceOrHostAddressConstKHR(..)
, BuildAccelerationStructureFlagBitsKHR(..)
, BuildAccelerationStructureFlagsKHR
, MicromapTypeEXT(..)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
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 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 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 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 Data.Vector (Vector)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR)
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.Extensions.Handles (MicromapEXT)
import Vulkan.Extensions.VK_EXT_opacity_micromap (MicromapUsageEXT)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR(..))
import Vulkan.Extensions.Handles (MicromapEXT(..))
import Vulkan.Extensions.VK_EXT_opacity_micromap (MicromapTypeEXT(..))
import Vulkan.Extensions.VK_EXT_opacity_micromap (MicromapUsageEXT(..))
data PhysicalDeviceDisplacementMicromapFeaturesNV = PhysicalDeviceDisplacementMicromapFeaturesNV
{
PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
displacementMicromap :: Bool }
deriving (Typeable, PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
$c/= :: PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
== :: PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
$c== :: PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDisplacementMicromapFeaturesNV)
#endif
deriving instance Show PhysicalDeviceDisplacementMicromapFeaturesNV
instance ToCStruct PhysicalDeviceDisplacementMicromapFeaturesNV where
withCStruct :: forall b.
PhysicalDeviceDisplacementMicromapFeaturesNV
-> (Ptr PhysicalDeviceDisplacementMicromapFeaturesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceDisplacementMicromapFeaturesNV
x Ptr PhysicalDeviceDisplacementMicromapFeaturesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p PhysicalDeviceDisplacementMicromapFeaturesNV
x (Ptr PhysicalDeviceDisplacementMicromapFeaturesNV -> IO b
f Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p PhysicalDeviceDisplacementMicromapFeaturesNV{Bool
displacementMicromap :: Bool
$sel:displacementMicromap:PhysicalDeviceDisplacementMicromapFeaturesNV :: PhysicalDeviceDisplacementMicromapFeaturesNV -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
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 PhysicalDeviceDisplacementMicromapFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
displacementMicromap))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDisplacementMicromapFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
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 PhysicalDeviceDisplacementMicromapFeaturesNV
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 PhysicalDeviceDisplacementMicromapFeaturesNV where
peekCStruct :: Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
-> IO PhysicalDeviceDisplacementMicromapFeaturesNV
peekCStruct Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
p = do
Bool32
displacementMicromap <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
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 -> PhysicalDeviceDisplacementMicromapFeaturesNV
PhysicalDeviceDisplacementMicromapFeaturesNV
(Bool32 -> Bool
bool32ToBool Bool32
displacementMicromap)
instance Storable PhysicalDeviceDisplacementMicromapFeaturesNV where
sizeOf :: PhysicalDeviceDisplacementMicromapFeaturesNV -> Int
sizeOf ~PhysicalDeviceDisplacementMicromapFeaturesNV
_ = Int
24
alignment :: PhysicalDeviceDisplacementMicromapFeaturesNV -> Int
alignment ~PhysicalDeviceDisplacementMicromapFeaturesNV
_ = Int
8
peek :: Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
-> IO PhysicalDeviceDisplacementMicromapFeaturesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
-> PhysicalDeviceDisplacementMicromapFeaturesNV -> IO ()
poke Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
ptr PhysicalDeviceDisplacementMicromapFeaturesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapFeaturesNV
ptr PhysicalDeviceDisplacementMicromapFeaturesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDisplacementMicromapFeaturesNV where
zero :: PhysicalDeviceDisplacementMicromapFeaturesNV
zero = Bool -> PhysicalDeviceDisplacementMicromapFeaturesNV
PhysicalDeviceDisplacementMicromapFeaturesNV
forall a. Zero a => a
zero
data PhysicalDeviceDisplacementMicromapPropertiesNV = PhysicalDeviceDisplacementMicromapPropertiesNV
{
PhysicalDeviceDisplacementMicromapPropertiesNV -> Word32
maxDisplacementMicromapSubdivisionLevel :: Word32 }
deriving (Typeable, PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> Bool
$c/= :: PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> Bool
== :: PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> Bool
$c== :: PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDisplacementMicromapPropertiesNV)
#endif
deriving instance Show PhysicalDeviceDisplacementMicromapPropertiesNV
instance ToCStruct PhysicalDeviceDisplacementMicromapPropertiesNV where
withCStruct :: forall b.
PhysicalDeviceDisplacementMicromapPropertiesNV
-> (Ptr PhysicalDeviceDisplacementMicromapPropertiesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceDisplacementMicromapPropertiesNV
x Ptr PhysicalDeviceDisplacementMicromapPropertiesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p PhysicalDeviceDisplacementMicromapPropertiesNV
x (Ptr PhysicalDeviceDisplacementMicromapPropertiesNV -> IO b
f Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p PhysicalDeviceDisplacementMicromapPropertiesNV{Word32
maxDisplacementMicromapSubdivisionLevel :: Word32
$sel:maxDisplacementMicromapSubdivisionLevel:PhysicalDeviceDisplacementMicromapPropertiesNV :: PhysicalDeviceDisplacementMicromapPropertiesNV -> Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
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 PhysicalDeviceDisplacementMicromapPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxDisplacementMicromapSubdivisionLevel)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDisplacementMicromapPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
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 PhysicalDeviceDisplacementMicromapPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceDisplacementMicromapPropertiesNV where
peekCStruct :: Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
-> IO PhysicalDeviceDisplacementMicromapPropertiesNV
peekCStruct Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p = do
Word32
maxDisplacementMicromapSubdivisionLevel <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32 -> PhysicalDeviceDisplacementMicromapPropertiesNV
PhysicalDeviceDisplacementMicromapPropertiesNV
Word32
maxDisplacementMicromapSubdivisionLevel
instance Storable PhysicalDeviceDisplacementMicromapPropertiesNV where
sizeOf :: PhysicalDeviceDisplacementMicromapPropertiesNV -> Int
sizeOf ~PhysicalDeviceDisplacementMicromapPropertiesNV
_ = Int
24
alignment :: PhysicalDeviceDisplacementMicromapPropertiesNV -> Int
alignment ~PhysicalDeviceDisplacementMicromapPropertiesNV
_ = Int
8
peek :: Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
-> IO PhysicalDeviceDisplacementMicromapPropertiesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
-> PhysicalDeviceDisplacementMicromapPropertiesNV -> IO ()
poke Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
ptr PhysicalDeviceDisplacementMicromapPropertiesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDisplacementMicromapPropertiesNV
ptr PhysicalDeviceDisplacementMicromapPropertiesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDisplacementMicromapPropertiesNV where
zero :: PhysicalDeviceDisplacementMicromapPropertiesNV
zero = Word32 -> PhysicalDeviceDisplacementMicromapPropertiesNV
PhysicalDeviceDisplacementMicromapPropertiesNV
forall a. Zero a => a
zero
data AccelerationStructureTrianglesDisplacementMicromapNV = AccelerationStructureTrianglesDisplacementMicromapNV
{
AccelerationStructureTrianglesDisplacementMicromapNV -> Format
displacementBiasAndScaleFormat :: Format
,
AccelerationStructureTrianglesDisplacementMicromapNV -> Format
displacementVectorFormat :: Format
,
AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
displacementBiasAndScaleBuffer :: DeviceOrHostAddressConstKHR
,
AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
displacementBiasAndScaleStride :: DeviceSize
,
AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
displacementVectorBuffer :: DeviceOrHostAddressConstKHR
,
AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
displacementVectorStride :: DeviceSize
,
AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
displacedMicromapPrimitiveFlags :: DeviceOrHostAddressConstKHR
,
AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
displacedMicromapPrimitiveFlagsStride :: DeviceSize
,
AccelerationStructureTrianglesDisplacementMicromapNV -> IndexType
indexType :: IndexType
,
AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
indexBuffer :: DeviceOrHostAddressConstKHR
,
AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
indexStride :: DeviceSize
,
AccelerationStructureTrianglesDisplacementMicromapNV -> Word32
baseTriangle :: Word32
,
AccelerationStructureTrianglesDisplacementMicromapNV
-> Vector MicromapUsageEXT
usageCounts :: Vector MicromapUsageEXT
,
AccelerationStructureTrianglesDisplacementMicromapNV -> MicromapEXT
micromap :: MicromapEXT
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureTrianglesDisplacementMicromapNV)
#endif
deriving instance Show AccelerationStructureTrianglesDisplacementMicromapNV
instance ToCStruct AccelerationStructureTrianglesDisplacementMicromapNV where
withCStruct :: forall b.
AccelerationStructureTrianglesDisplacementMicromapNV
-> (Ptr AccelerationStructureTrianglesDisplacementMicromapNV
-> IO b)
-> IO b
withCStruct AccelerationStructureTrianglesDisplacementMicromapNV
x Ptr AccelerationStructureTrianglesDisplacementMicromapNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
128 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p AccelerationStructureTrianglesDisplacementMicromapNV
x (Ptr AccelerationStructureTrianglesDisplacementMicromapNV -> IO b
f Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureTrianglesDisplacementMicromapNV
-> AccelerationStructureTrianglesDisplacementMicromapNV
-> IO b
-> IO b
pokeCStruct Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p AccelerationStructureTrianglesDisplacementMicromapNV{Word32
DeviceSize
Vector MicromapUsageEXT
Format
IndexType
MicromapEXT
DeviceOrHostAddressConstKHR
micromap :: MicromapEXT
usageCounts :: Vector MicromapUsageEXT
baseTriangle :: Word32
indexStride :: DeviceSize
indexBuffer :: DeviceOrHostAddressConstKHR
indexType :: IndexType
displacedMicromapPrimitiveFlagsStride :: DeviceSize
displacedMicromapPrimitiveFlags :: DeviceOrHostAddressConstKHR
displacementVectorStride :: DeviceSize
displacementVectorBuffer :: DeviceOrHostAddressConstKHR
displacementBiasAndScaleStride :: DeviceSize
displacementBiasAndScaleBuffer :: DeviceOrHostAddressConstKHR
displacementVectorFormat :: Format
displacementBiasAndScaleFormat :: Format
$sel:micromap:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> MicromapEXT
$sel:usageCounts:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV
-> Vector MicromapUsageEXT
$sel:baseTriangle:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> Word32
$sel:indexStride:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
$sel:indexBuffer:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
$sel:indexType:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> IndexType
$sel:displacedMicromapPrimitiveFlagsStride:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
$sel:displacedMicromapPrimitiveFlags:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
$sel:displacementVectorStride:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
$sel:displacementVectorBuffer:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
$sel:displacementBiasAndScaleStride:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> DeviceSize
$sel:displacementBiasAndScaleBuffer:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV
-> DeviceOrHostAddressConstKHR
$sel:displacementVectorFormat:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> Format
$sel:displacementBiasAndScaleFormat:AccelerationStructureTrianglesDisplacementMicromapNV :: AccelerationStructureTrianglesDisplacementMicromapNV -> Format
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (Format
displacementBiasAndScaleFormat)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Format)) (Format
displacementVectorFormat)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
displacementBiasAndScaleBuffer) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (DeviceSize
displacementBiasAndScaleStride)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
displacementVectorBuffer) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceSize)) (DeviceSize
displacementVectorStride)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
displacedMicromapPrimitiveFlags) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr DeviceSize)) (DeviceSize
displacedMicromapPrimitiveFlagsStride)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr IndexType)) (IndexType
indexType)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
indexBuffer) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr DeviceSize)) (DeviceSize
indexStride)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32)) (Word32
baseTriangle)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Word32)) ((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
$ (Vector MicromapUsageEXT
usageCounts)) :: Word32))
Ptr MicromapUsageEXT
pPUsageCounts' <- 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 @MicromapUsageEXT ((forall a. Vector a -> Int
Data.Vector.length (Vector MicromapUsageEXT
usageCounts)) forall a. Num a => a -> a -> a
* Int
12)
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 MicromapUsageEXT
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MicromapUsageEXT
pPUsageCounts' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
12 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr MicromapUsageEXT) (MicromapUsageEXT
e)) (Vector MicromapUsageEXT
usageCounts)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr (Ptr MicromapUsageEXT))) (Ptr MicromapUsageEXT
pPUsageCounts')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr (Ptr (Ptr MicromapUsageEXT)))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr MicromapEXT)) (MicromapEXT
micromap)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
128
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr AccelerationStructureTrianglesDisplacementMicromapNV
-> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Format)) (forall a. Zero a => a
zero)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceOrHostAddressConstKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceOrHostAddressConstKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr IndexType)) (forall a. Zero a => a
zero)
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. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr DeviceOrHostAddressConstKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureTrianglesDisplacementMicromapNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr (Ptr (Ptr MicromapUsageEXT)))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero AccelerationStructureTrianglesDisplacementMicromapNV where
zero :: AccelerationStructureTrianglesDisplacementMicromapNV
zero = Format
-> Format
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> IndexType
-> DeviceOrHostAddressConstKHR
-> DeviceSize
-> Word32
-> Vector MicromapUsageEXT
-> MicromapEXT
-> AccelerationStructureTrianglesDisplacementMicromapNV
AccelerationStructureTrianglesDisplacementMicromapNV
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
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
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
newtype DisplacementMicromapFormatNV = DisplacementMicromapFormatNV Int32
deriving newtype (DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c/= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
== :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c== :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
Eq, Eq DisplacementMicromapFormatNV
DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Ordering
DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> DisplacementMicromapFormatNV
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 :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> DisplacementMicromapFormatNV
$cmin :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> DisplacementMicromapFormatNV
max :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> DisplacementMicromapFormatNV
$cmax :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> DisplacementMicromapFormatNV
>= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c>= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
> :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c> :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
<= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c<= :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
< :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
$c< :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Bool
compare :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Ordering
$ccompare :: DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> Ordering
Ord, Ptr DisplacementMicromapFormatNV -> IO DisplacementMicromapFormatNV
Ptr DisplacementMicromapFormatNV
-> Int -> IO DisplacementMicromapFormatNV
Ptr DisplacementMicromapFormatNV
-> Int -> DisplacementMicromapFormatNV -> IO ()
Ptr DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> IO ()
DisplacementMicromapFormatNV -> Int
forall b. Ptr b -> Int -> IO DisplacementMicromapFormatNV
forall b. Ptr b -> Int -> DisplacementMicromapFormatNV -> 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 DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> IO ()
$cpoke :: Ptr DisplacementMicromapFormatNV
-> DisplacementMicromapFormatNV -> IO ()
peek :: Ptr DisplacementMicromapFormatNV -> IO DisplacementMicromapFormatNV
$cpeek :: Ptr DisplacementMicromapFormatNV -> IO DisplacementMicromapFormatNV
pokeByteOff :: forall b. Ptr b -> Int -> DisplacementMicromapFormatNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DisplacementMicromapFormatNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO DisplacementMicromapFormatNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DisplacementMicromapFormatNV
pokeElemOff :: Ptr DisplacementMicromapFormatNV
-> Int -> DisplacementMicromapFormatNV -> IO ()
$cpokeElemOff :: Ptr DisplacementMicromapFormatNV
-> Int -> DisplacementMicromapFormatNV -> IO ()
peekElemOff :: Ptr DisplacementMicromapFormatNV
-> Int -> IO DisplacementMicromapFormatNV
$cpeekElemOff :: Ptr DisplacementMicromapFormatNV
-> Int -> IO DisplacementMicromapFormatNV
alignment :: DisplacementMicromapFormatNV -> Int
$calignment :: DisplacementMicromapFormatNV -> Int
sizeOf :: DisplacementMicromapFormatNV -> Int
$csizeOf :: DisplacementMicromapFormatNV -> Int
Storable, DisplacementMicromapFormatNV
forall a. a -> Zero a
zero :: DisplacementMicromapFormatNV
$czero :: DisplacementMicromapFormatNV
Zero)
pattern $bDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV :: DisplacementMicromapFormatNV
$mDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV :: forall {r}.
DisplacementMicromapFormatNV -> ((# #) -> r) -> ((# #) -> r) -> r
DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = DisplacementMicromapFormatNV 1
pattern $bDISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV
$mDISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV :: forall {r}.
DisplacementMicromapFormatNV -> ((# #) -> r) -> ((# #) -> r) -> r
DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = DisplacementMicromapFormatNV 2
pattern $bDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV
$mDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV :: forall {r}.
DisplacementMicromapFormatNV -> ((# #) -> r) -> ((# #) -> r) -> r
DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = DisplacementMicromapFormatNV 3
{-# COMPLETE
DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV
, DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV
, DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV ::
DisplacementMicromapFormatNV
#-}
conNameDisplacementMicromapFormatNV :: String
conNameDisplacementMicromapFormatNV :: String
conNameDisplacementMicromapFormatNV = String
"DisplacementMicromapFormatNV"
enumPrefixDisplacementMicromapFormatNV :: String
enumPrefixDisplacementMicromapFormatNV :: String
enumPrefixDisplacementMicromapFormatNV = String
"DISPLACEMENT_MICROMAP_FORMAT_"
showTableDisplacementMicromapFormatNV :: [(DisplacementMicromapFormatNV, String)]
showTableDisplacementMicromapFormatNV :: [(DisplacementMicromapFormatNV, String)]
showTableDisplacementMicromapFormatNV =
[
( DisplacementMicromapFormatNV
DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV
, String
"64_TRIANGLES_64_BYTES_NV"
)
,
( DisplacementMicromapFormatNV
DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV
, String
"256_TRIANGLES_128_BYTES_NV"
)
,
( DisplacementMicromapFormatNV
DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV
, String
"1024_TRIANGLES_128_BYTES_NV"
)
]
instance Show DisplacementMicromapFormatNV where
showsPrec :: Int -> DisplacementMicromapFormatNV -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixDisplacementMicromapFormatNV
[(DisplacementMicromapFormatNV, String)]
showTableDisplacementMicromapFormatNV
String
conNameDisplacementMicromapFormatNV
(\(DisplacementMicromapFormatNV Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read DisplacementMicromapFormatNV where
readPrec :: ReadPrec DisplacementMicromapFormatNV
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixDisplacementMicromapFormatNV
[(DisplacementMicromapFormatNV, String)]
showTableDisplacementMicromapFormatNV
String
conNameDisplacementMicromapFormatNV
Int32 -> DisplacementMicromapFormatNV
DisplacementMicromapFormatNV
type NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2
pattern NV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: forall a. Integral a => a
$mNV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2
type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"
pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"