{-# language CPP #-}
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)
data PhysicalDeviceDenseGeometryFormatFeaturesAMDX = PhysicalDeviceDenseGeometryFormatFeaturesAMDX
{
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
data AccelerationStructureDenseGeometryFormatTrianglesDataAMDX (es :: [Type]) = AccelerationStructureDenseGeometryFormatTrianglesDataAMDX
{
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Chain es
next :: Chain es
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceOrHostAddressConstKHR
compressedData :: DeviceOrHostAddressConstKHR
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> DeviceSize
dataSize :: DeviceSize
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numTriangles :: Word32
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
numVertices :: Word32
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxPrimitiveIndex :: Word32
,
forall (es :: [*]).
AccelerationStructureDenseGeometryFormatTrianglesDataAMDX es
-> Word32
maxGeometryIndex :: Word32
,
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
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)
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
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"
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"