{-# language CPP #-}
module Vulkan.Extensions.VK_QCOM_rotated_copy_commands ( CopyCommandTransformInfoQCOM(..)
, QCOM_rotated_copy_commands_SPEC_VERSION
, pattern QCOM_rotated_copy_commands_SPEC_VERSION
, QCOM_rotated_copy_commands_EXTENSION_NAME
, pattern QCOM_rotated_copy_commands_EXTENSION_NAME
, SurfaceTransformFlagBitsKHR(..)
, SurfaceTransformFlagsKHR
) where
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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 Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagsKHR)
data CopyCommandTransformInfoQCOM = CopyCommandTransformInfoQCOM
{
CopyCommandTransformInfoQCOM -> SurfaceTransformFlagBitsKHR
transform :: SurfaceTransformFlagBitsKHR }
deriving (Typeable, CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool
(CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool)
-> (CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool)
-> Eq CopyCommandTransformInfoQCOM
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool
$c/= :: CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool
== :: CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool
$c== :: CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CopyCommandTransformInfoQCOM)
#endif
deriving instance Show CopyCommandTransformInfoQCOM
instance ToCStruct CopyCommandTransformInfoQCOM where
withCStruct :: CopyCommandTransformInfoQCOM
-> (Ptr CopyCommandTransformInfoQCOM -> IO b) -> IO b
withCStruct x :: CopyCommandTransformInfoQCOM
x f :: Ptr CopyCommandTransformInfoQCOM -> IO b
f = Int -> Int -> (Ptr CopyCommandTransformInfoQCOM -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr CopyCommandTransformInfoQCOM -> IO b) -> IO b)
-> (Ptr CopyCommandTransformInfoQCOM -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr CopyCommandTransformInfoQCOM
p -> Ptr CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CopyCommandTransformInfoQCOM
p CopyCommandTransformInfoQCOM
x (Ptr CopyCommandTransformInfoQCOM -> IO b
f Ptr CopyCommandTransformInfoQCOM
p)
pokeCStruct :: Ptr CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> IO b -> IO b
pokeCStruct p :: Ptr CopyCommandTransformInfoQCOM
p CopyCommandTransformInfoQCOM{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagBitsKHR
transform)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr CopyCommandTransformInfoQCOM -> IO b -> IO b
pokeZeroCStruct p :: Ptr CopyCommandTransformInfoQCOM
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct CopyCommandTransformInfoQCOM where
peekCStruct :: Ptr CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM
peekCStruct p :: Ptr CopyCommandTransformInfoQCOM
p = do
SurfaceTransformFlagBitsKHR
transform <- Ptr SurfaceTransformFlagBitsKHR -> IO SurfaceTransformFlagBitsKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagBitsKHR ((Ptr CopyCommandTransformInfoQCOM
p Ptr CopyCommandTransformInfoQCOM
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SurfaceTransformFlagBitsKHR))
CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM
forall (f :: * -> *) a. Applicative f => a -> f a
pure (CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM)
-> CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM
forall a b. (a -> b) -> a -> b
$ SurfaceTransformFlagBitsKHR -> CopyCommandTransformInfoQCOM
CopyCommandTransformInfoQCOM
SurfaceTransformFlagBitsKHR
transform
instance Storable CopyCommandTransformInfoQCOM where
sizeOf :: CopyCommandTransformInfoQCOM -> Int
sizeOf ~CopyCommandTransformInfoQCOM
_ = 24
alignment :: CopyCommandTransformInfoQCOM -> Int
alignment ~CopyCommandTransformInfoQCOM
_ = 8
peek :: Ptr CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM
peek = Ptr CopyCommandTransformInfoQCOM -> IO CopyCommandTransformInfoQCOM
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> IO ()
poke ptr :: Ptr CopyCommandTransformInfoQCOM
ptr poked :: CopyCommandTransformInfoQCOM
poked = Ptr CopyCommandTransformInfoQCOM
-> CopyCommandTransformInfoQCOM -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CopyCommandTransformInfoQCOM
ptr CopyCommandTransformInfoQCOM
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero CopyCommandTransformInfoQCOM where
zero :: CopyCommandTransformInfoQCOM
zero = SurfaceTransformFlagBitsKHR -> CopyCommandTransformInfoQCOM
CopyCommandTransformInfoQCOM
SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero
type QCOM_rotated_copy_commands_SPEC_VERSION = 0
pattern QCOM_rotated_copy_commands_SPEC_VERSION :: forall a . Integral a => a
pattern $bQCOM_rotated_copy_commands_SPEC_VERSION :: a
$mQCOM_rotated_copy_commands_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
QCOM_rotated_copy_commands_SPEC_VERSION = 0
type QCOM_rotated_copy_commands_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"
pattern QCOM_rotated_copy_commands_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bQCOM_rotated_copy_commands_EXTENSION_NAME :: a
$mQCOM_rotated_copy_commands_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
QCOM_rotated_copy_commands_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"