{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_fragment_shading_rate ( cmdSetFragmentShadingRateKHR
, getPhysicalDeviceFragmentShadingRatesKHR
, FragmentShadingRateAttachmentInfoKHR(..)
, PipelineFragmentShadingRateStateCreateInfoKHR(..)
, PhysicalDeviceFragmentShadingRateFeaturesKHR(..)
, PhysicalDeviceFragmentShadingRatePropertiesKHR(..)
, PhysicalDeviceFragmentShadingRateKHR(..)
, FragmentShadingRateCombinerOpKHR( FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR
, ..
)
, KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION
, pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION
, KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME
, pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME
) where
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
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 Data.Vector (generateM)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
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.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (withSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2 (AttachmentReference2)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetFragmentShadingRateKHR))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceFragmentShadingRatesKHR))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits)
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetFragmentShadingRateKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr Extent2D -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()) -> Ptr CommandBuffer_T -> Ptr Extent2D -> Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR) -> IO ()
cmdSetFragmentShadingRateKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("fragmentSize" ::: Extent2D)
->
("combinerOps" ::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR))
-> io ()
cmdSetFragmentShadingRateKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR))
-> io ()
cmdSetFragmentShadingRateKHR CommandBuffer
commandBuffer
"fragmentSize" ::: Extent2D
fragmentSize
"combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCmdSetFragmentShadingRateKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
vkCmdSetFragmentShadingRateKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
pVkCmdSetFragmentShadingRateKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
vkCmdSetFragmentShadingRateKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetFragmentShadingRateKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdSetFragmentShadingRateKHR' :: Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
mkVkCmdSetFragmentShadingRateKHR FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
vkCmdSetFragmentShadingRateKHRPtr
"pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
pFragmentSize <- 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 => a -> (Ptr a -> IO b) -> IO b
withCStruct ("fragmentSize" ::: Extent2D
fragmentSize)
"combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps <- 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 @(FixedArray 2 FragmentShadingRateCombinerOpKHR) Int
8
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps) of
(FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetFragmentShadingRateKHR" (Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ()
vkCmdSetFragmentShadingRateKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
pFragmentSize
("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceFragmentShadingRatesKHR
:: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceFragmentShadingRateKHR -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr PhysicalDeviceFragmentShadingRateKHR -> IO Result
getPhysicalDeviceFragmentShadingRatesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
-> io (Result, ("fragmentShadingRates" ::: Vector PhysicalDeviceFragmentShadingRateKHR))
getPhysicalDeviceFragmentShadingRatesKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
getPhysicalDeviceFragmentShadingRatesKHR PhysicalDevice
physicalDevice = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceFragmentShadingRatesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
pVkGetPhysicalDeviceFragmentShadingRatesKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceFragmentShadingRatesKHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetPhysicalDeviceFragmentShadingRatesKHR' :: Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
mkVkGetPhysicalDeviceFragmentShadingRatesKHR FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount <- 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 c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceFragmentShadingRatesKHR" (Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR'
Ptr PhysicalDevice_T
physicalDevice'
("pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount)
(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 (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Word32
pFragmentShadingRateCount <- 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 -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
"pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates <- 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 c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @PhysicalDeviceFragmentShadingRateKHR ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) forall a. Num a => a -> a -> a
* Int
32)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> 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 -> IO b -> IO b
pokeZeroCStruct ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
32) :: Ptr PhysicalDeviceFragmentShadingRateKHR) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceFragmentShadingRatesKHR" (Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR'
Ptr PhysicalDevice_T
physicalDevice'
("pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount)
(("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates)))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Word32
pFragmentShadingRateCount' <- 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 -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PhysicalDeviceFragmentShadingRateKHR ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PhysicalDeviceFragmentShadingRateKHR)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates')
data FragmentShadingRateAttachmentInfoKHR = FragmentShadingRateAttachmentInfoKHR
{
FragmentShadingRateAttachmentInfoKHR
-> Maybe (SomeStruct AttachmentReference2)
fragmentShadingRateAttachment :: Maybe (SomeStruct AttachmentReference2)
,
FragmentShadingRateAttachmentInfoKHR -> "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize :: Extent2D
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (FragmentShadingRateAttachmentInfoKHR)
#endif
deriving instance Show FragmentShadingRateAttachmentInfoKHR
instance ToCStruct FragmentShadingRateAttachmentInfoKHR where
withCStruct :: forall b.
FragmentShadingRateAttachmentInfoKHR
-> (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b) -> IO b
withCStruct FragmentShadingRateAttachmentInfoKHR
x Ptr FragmentShadingRateAttachmentInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr FragmentShadingRateAttachmentInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p FragmentShadingRateAttachmentInfoKHR
x (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b
f Ptr FragmentShadingRateAttachmentInfoKHR
p)
pokeCStruct :: forall b.
Ptr FragmentShadingRateAttachmentInfoKHR
-> FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p FragmentShadingRateAttachmentInfoKHR{Maybe (SomeStruct AttachmentReference2)
"fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
fragmentShadingRateAttachment :: Maybe (SomeStruct AttachmentReference2)
$sel:shadingRateAttachmentTexelSize:FragmentShadingRateAttachmentInfoKHR :: FragmentShadingRateAttachmentInfoKHR -> "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateAttachment:FragmentShadingRateAttachmentInfoKHR :: FragmentShadingRateAttachmentInfoKHR
-> Maybe (SomeStruct AttachmentReference2)
..} 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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment'' <- case (Maybe (SomeStruct AttachmentReference2)
fragmentShadingRateAttachment) of
Maybe (SomeStruct AttachmentReference2)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just SomeStruct AttachmentReference2
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (AttachmentReference2 '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (AttachmentReference2 '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @AttachmentReference2 (SomeStruct AttachmentReference2
j) (Ptr (AttachmentReference2 '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (AttachmentReference2 _)))) Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment''
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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize)
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
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
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 FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct FragmentShadingRateAttachmentInfoKHR where
peekCStruct :: Ptr FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR
peekCStruct Ptr FragmentShadingRateAttachmentInfoKHR
p = do
Ptr (AttachmentReference2 Any)
pFragmentShadingRateAttachment <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (AttachmentReference2 _)) ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr (AttachmentReference2 _))))
Maybe (SomeStruct AttachmentReference2)
pFragmentShadingRateAttachment' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (AttachmentReference2 Any)
j -> forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (AttachmentReference2 Any)
j))) Ptr (AttachmentReference2 Any)
pFragmentShadingRateAttachment
"fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr FragmentShadingRateAttachmentInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Maybe (SomeStruct AttachmentReference2)
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
Maybe (SomeStruct AttachmentReference2)
pFragmentShadingRateAttachment' "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize
instance Zero FragmentShadingRateAttachmentInfoKHR where
zero :: FragmentShadingRateAttachmentInfoKHR
zero = Maybe (SomeStruct AttachmentReference2)
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
forall a. Maybe a
Nothing
forall a. Zero a => a
zero
data PipelineFragmentShadingRateStateCreateInfoKHR = PipelineFragmentShadingRateStateCreateInfoKHR
{
PipelineFragmentShadingRateStateCreateInfoKHR
-> "fragmentSize" ::: Extent2D
fragmentSize :: Extent2D
,
PipelineFragmentShadingRateStateCreateInfoKHR
-> "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps :: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineFragmentShadingRateStateCreateInfoKHR)
#endif
deriving instance Show PipelineFragmentShadingRateStateCreateInfoKHR
instance ToCStruct PipelineFragmentShadingRateStateCreateInfoKHR where
withCStruct :: forall b.
PipelineFragmentShadingRateStateCreateInfoKHR
-> (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b
withCStruct PipelineFragmentShadingRateStateCreateInfoKHR
x Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p PipelineFragmentShadingRateStateCreateInfoKHR
x (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b
f Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p)
pokeCStruct :: forall b.
Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p PipelineFragmentShadingRateStateCreateInfoKHR{"combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
"fragmentSize" ::: Extent2D
combinerOps :: "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
fragmentSize :: "fragmentSize" ::: Extent2D
$sel:combinerOps:PipelineFragmentShadingRateStateCreateInfoKHR :: PipelineFragmentShadingRateStateCreateInfoKHR
-> "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
$sel:fragmentSize:PipelineFragmentShadingRateStateCreateInfoKHR :: PipelineFragmentShadingRateStateCreateInfoKHR
-> "fragmentSize" ::: Extent2D
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps) of
(FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
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 PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
case ((forall a. Zero a => a
zero, forall a. Zero a => a
zero)) of
(FragmentShadingRateCombinerOpKHR
e0, FragmentShadingRateCombinerOpKHR
e1) -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
IO b
f
instance FromCStruct PipelineFragmentShadingRateStateCreateInfoKHR where
peekCStruct :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
peekCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p = do
"fragmentSize" ::: Extent2D
fragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
let pcombinerOps :: Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @FragmentShadingRateCombinerOpKHR ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
FragmentShadingRateCombinerOpKHR
combinerOps0 <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr FragmentShadingRateCombinerOpKHR))
FragmentShadingRateCombinerOpKHR
combinerOps1 <- forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr FragmentShadingRateCombinerOpKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateStateCreateInfoKHR
PipelineFragmentShadingRateStateCreateInfoKHR
"fragmentSize" ::: Extent2D
fragmentSize ((FragmentShadingRateCombinerOpKHR
combinerOps0, FragmentShadingRateCombinerOpKHR
combinerOps1))
instance Storable PipelineFragmentShadingRateStateCreateInfoKHR where
sizeOf :: PipelineFragmentShadingRateStateCreateInfoKHR -> Int
sizeOf ~PipelineFragmentShadingRateStateCreateInfoKHR
_ = Int
32
alignment :: PipelineFragmentShadingRateStateCreateInfoKHR -> Int
alignment ~PipelineFragmentShadingRateStateCreateInfoKHR
_ = Int
8
peek :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO ()
poke Ptr PipelineFragmentShadingRateStateCreateInfoKHR
ptr PipelineFragmentShadingRateStateCreateInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
ptr PipelineFragmentShadingRateStateCreateInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineFragmentShadingRateStateCreateInfoKHR where
zero :: PipelineFragmentShadingRateStateCreateInfoKHR
zero = ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateStateCreateInfoKHR
PipelineFragmentShadingRateStateCreateInfoKHR
forall a. Zero a => a
zero
(forall a. Zero a => a
zero, forall a. Zero a => a
zero)
data PhysicalDeviceFragmentShadingRateFeaturesKHR = PhysicalDeviceFragmentShadingRateFeaturesKHR
{
PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
pipelineFragmentShadingRate :: Bool
,
PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
primitiveFragmentShadingRate :: Bool
,
PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
attachmentFragmentShadingRate :: Bool
}
deriving (Typeable, PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$c/= :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
== :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$c== :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateFeaturesKHR
instance ToCStruct PhysicalDeviceFragmentShadingRateFeaturesKHR where
withCStruct :: forall b.
PhysicalDeviceFragmentShadingRateFeaturesKHR
-> (Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShadingRateFeaturesKHR
x Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p PhysicalDeviceFragmentShadingRateFeaturesKHR
x (Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b
f Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p PhysicalDeviceFragmentShadingRateFeaturesKHR{Bool
attachmentFragmentShadingRate :: Bool
primitiveFragmentShadingRate :: Bool
pipelineFragmentShadingRate :: Bool
$sel:attachmentFragmentShadingRate:PhysicalDeviceFragmentShadingRateFeaturesKHR :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$sel:primitiveFragmentShadingRate:PhysicalDeviceFragmentShadingRateFeaturesKHR :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
$sel:pipelineFragmentShadingRate:PhysicalDeviceFragmentShadingRateFeaturesKHR :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
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 PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineFragmentShadingRate))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveFragmentShadingRate))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
attachmentFragmentShadingRate))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
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 PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRateFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
peekCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p = do
Bool32
pipelineFragmentShadingRate <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
primitiveFragmentShadingRate <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
attachmentFragmentShadingRate <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> Bool -> Bool -> PhysicalDeviceFragmentShadingRateFeaturesKHR
PhysicalDeviceFragmentShadingRateFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
pipelineFragmentShadingRate)
(Bool32 -> Bool
bool32ToBool Bool32
primitiveFragmentShadingRate)
(Bool32 -> Bool
bool32ToBool Bool32
attachmentFragmentShadingRate)
instance Storable PhysicalDeviceFragmentShadingRateFeaturesKHR where
sizeOf :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Int
sizeOf ~PhysicalDeviceFragmentShadingRateFeaturesKHR
_ = Int
32
alignment :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRateFeaturesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO ()
poke Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShadingRateFeaturesKHR where
zero :: PhysicalDeviceFragmentShadingRateFeaturesKHR
zero = Bool
-> Bool -> Bool -> PhysicalDeviceFragmentShadingRateFeaturesKHR
PhysicalDeviceFragmentShadingRateFeaturesKHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data PhysicalDeviceFragmentShadingRatePropertiesKHR = PhysicalDeviceFragmentShadingRatePropertiesKHR
{
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize :: Extent2D
,
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize :: Extent2D
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio :: Word32
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
primitiveFragmentShadingRateWithMultipleViewports :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
layeredShadingRateAttachments :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateNonTrivialCombinerOps :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
maxFragmentSize :: Extent2D
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentSizeAspectRatio :: Word32
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
maxFragmentShadingRateCoverageSamples :: Word32
,
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples :: SampleCountFlagBits
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithShaderDepthStencilWrites :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithSampleMask :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithShaderSampleMask :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithConservativeRasterization :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithFragmentShaderInterlock :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateWithCustomSampleLocations :: Bool
,
PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
fragmentShadingRateStrictMultiplyCombiner :: Bool
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRatePropertiesKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRatePropertiesKHR
instance ToCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR where
withCStruct :: forall b.
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR
x Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p PhysicalDeviceFragmentShadingRatePropertiesKHR
x (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b
f Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p PhysicalDeviceFragmentShadingRatePropertiesKHR{Bool
Word32
SampleCountFlagBits
"fragmentSize" ::: Extent2D
fragmentShadingRateStrictMultiplyCombiner :: Bool
fragmentShadingRateWithCustomSampleLocations :: Bool
fragmentShadingRateWithFragmentShaderInterlock :: Bool
fragmentShadingRateWithConservativeRasterization :: Bool
fragmentShadingRateWithShaderSampleMask :: Bool
fragmentShadingRateWithSampleMask :: Bool
fragmentShadingRateWithShaderDepthStencilWrites :: Bool
maxFragmentShadingRateRasterizationSamples :: SampleCountFlagBits
maxFragmentShadingRateCoverageSamples :: Word32
maxFragmentSizeAspectRatio :: Word32
maxFragmentSize :: "fragmentSize" ::: Extent2D
fragmentShadingRateNonTrivialCombinerOps :: Bool
layeredShadingRateAttachments :: Bool
primitiveFragmentShadingRateWithMultipleViewports :: Bool
maxFragmentShadingRateAttachmentTexelSizeAspectRatio :: Word32
maxFragmentShadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize :: "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateStrictMultiplyCombiner:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithCustomSampleLocations:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithFragmentShaderInterlock:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithConservativeRasterization:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithShaderSampleMask:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithSampleMask:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:fragmentShadingRateWithShaderDepthStencilWrites:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:maxFragmentShadingRateRasterizationSamples:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> SampleCountFlagBits
$sel:maxFragmentShadingRateCoverageSamples:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentSizeAspectRatio:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
$sel:fragmentShadingRateNonTrivialCombinerOps:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:layeredShadingRateAttachments:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:primitiveFragmentShadingRateWithMultipleViewports:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Bool
$sel:maxFragmentShadingRateAttachmentTexelSizeAspectRatio:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Word32
$sel:maxFragmentShadingRateAttachmentTexelSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
$sel:minFragmentShadingRateAttachmentTexelSize:PhysicalDeviceFragmentShadingRatePropertiesKHR :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> "fragmentSize" ::: Extent2D
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
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 PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveFragmentShadingRateWithMultipleViewports))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
layeredShadingRateAttachments))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateNonTrivialCombinerOps))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
maxFragmentSizeAspectRatio)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
maxFragmentShadingRateCoverageSamples)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderDepthStencilWrites))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithSampleMask))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderSampleMask))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithConservativeRasterization))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithFragmentShaderInterlock))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithCustomSampleLocations))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateStrictMultiplyCombiner))
IO b
f
cStructSize :: Int
cStructSize = Int
96
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
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 PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
peekCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p = do
"fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
"fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Bool32
primitiveFragmentShadingRateWithMultipleViewports <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
Bool32
layeredShadingRateAttachments <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
Bool32
fragmentShadingRateNonTrivialCombinerOps <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32))
"fragmentSize" ::: Extent2D
maxFragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Extent2D))
Word32
maxFragmentSizeAspectRatio <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
Word32
maxFragmentShadingRateCoverageSamples <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32))
SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SampleCountFlagBits))
Bool32
fragmentShadingRateWithShaderDepthStencilWrites <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr Bool32))
Bool32
fragmentShadingRateWithSampleMask <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Bool32))
Bool32
fragmentShadingRateWithShaderSampleMask <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr Bool32))
Bool32
fragmentShadingRateWithConservativeRasterization <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Bool32))
Bool32
fragmentShadingRateWithFragmentShaderInterlock <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84 :: Ptr Bool32))
Bool32
fragmentShadingRateWithCustomSampleLocations <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Bool32))
Bool32
fragmentShadingRateStrictMultiplyCombiner <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
92 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("fragmentSize" ::: Extent2D)
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Bool
-> Bool
-> Bool
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Word32
-> SampleCountFlagBits
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFragmentShadingRatePropertiesKHR
PhysicalDeviceFragmentShadingRatePropertiesKHR
"fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize
"fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize
Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio
(Bool32 -> Bool
bool32ToBool Bool32
primitiveFragmentShadingRateWithMultipleViewports)
(Bool32 -> Bool
bool32ToBool Bool32
layeredShadingRateAttachments)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateNonTrivialCombinerOps)
"fragmentSize" ::: Extent2D
maxFragmentSize
Word32
maxFragmentSizeAspectRatio
Word32
maxFragmentShadingRateCoverageSamples
SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithShaderDepthStencilWrites)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithSampleMask)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithShaderSampleMask)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithConservativeRasterization)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithFragmentShaderInterlock)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateWithCustomSampleLocations)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentShadingRateStrictMultiplyCombiner)
instance Storable PhysicalDeviceFragmentShadingRatePropertiesKHR where
sizeOf :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Int
sizeOf ~PhysicalDeviceFragmentShadingRatePropertiesKHR
_ = Int
96
alignment :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRatePropertiesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO ()
poke Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShadingRatePropertiesKHR where
zero :: PhysicalDeviceFragmentShadingRatePropertiesKHR
zero = ("fragmentSize" ::: Extent2D)
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Bool
-> Bool
-> Bool
-> ("fragmentSize" ::: Extent2D)
-> Word32
-> Word32
-> SampleCountFlagBits
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceFragmentShadingRatePropertiesKHR
PhysicalDeviceFragmentShadingRatePropertiesKHR
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. 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
data PhysicalDeviceFragmentShadingRateKHR = PhysicalDeviceFragmentShadingRateKHR
{
PhysicalDeviceFragmentShadingRateKHR -> SampleCountFlagBits
sampleCounts :: SampleCountFlags
,
PhysicalDeviceFragmentShadingRateKHR -> "fragmentSize" ::: Extent2D
fragmentSize :: Extent2D
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentShadingRateKHR)
#endif
deriving instance Show PhysicalDeviceFragmentShadingRateKHR
instance ToCStruct PhysicalDeviceFragmentShadingRateKHR where
withCStruct :: forall b.
PhysicalDeviceFragmentShadingRateKHR
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentShadingRateKHR
x ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p PhysicalDeviceFragmentShadingRateKHR
x (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b
f "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p)
pokeCStruct :: forall b.
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p PhysicalDeviceFragmentShadingRateKHR{SampleCountFlagBits
"fragmentSize" ::: Extent2D
fragmentSize :: "fragmentSize" ::: Extent2D
sampleCounts :: SampleCountFlagBits
$sel:fragmentSize:PhysicalDeviceFragmentShadingRateKHR :: PhysicalDeviceFragmentShadingRateKHR -> "fragmentSize" ::: Extent2D
$sel:sampleCounts:PhysicalDeviceFragmentShadingRateKHR :: PhysicalDeviceFragmentShadingRateKHR -> SampleCountFlagBits
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
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 (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags)) (SampleCountFlagBits
sampleCounts)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b -> IO b
pokeZeroCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
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 (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRateKHR where
peekCStruct :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
peekCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p = do
SampleCountFlagBits
sampleCounts <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlags (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr SampleCountFlags))
"fragmentSize" ::: Extent2D
fragmentSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Extent2D))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SampleCountFlagBits
-> ("fragmentSize" ::: Extent2D)
-> PhysicalDeviceFragmentShadingRateKHR
PhysicalDeviceFragmentShadingRateKHR
SampleCountFlagBits
sampleCounts "fragmentSize" ::: Extent2D
fragmentSize
instance Storable PhysicalDeviceFragmentShadingRateKHR where
sizeOf :: PhysicalDeviceFragmentShadingRateKHR -> Int
sizeOf ~PhysicalDeviceFragmentShadingRateKHR
_ = Int
32
alignment :: PhysicalDeviceFragmentShadingRateKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRateKHR
_ = Int
8
peek :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO ()
poke "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
ptr PhysicalDeviceFragmentShadingRateKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
ptr PhysicalDeviceFragmentShadingRateKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShadingRateKHR where
zero :: PhysicalDeviceFragmentShadingRateKHR
zero = SampleCountFlagBits
-> ("fragmentSize" ::: Extent2D)
-> PhysicalDeviceFragmentShadingRateKHR
PhysicalDeviceFragmentShadingRateKHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype FragmentShadingRateCombinerOpKHR = FragmentShadingRateCombinerOpKHR Int32
deriving newtype (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c/= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
== :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c== :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
Eq, Eq FragmentShadingRateCombinerOpKHR
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
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 :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
$cmin :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
max :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
$cmax :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
>= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c>= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
> :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c> :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
<= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c<= :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
< :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
$c< :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
compare :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
$ccompare :: FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering
Ord, Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
FragmentShadingRateCombinerOpKHR -> Int
forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> 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 FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
$cpoke :: Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
peek :: Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
$cpeek :: Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
pokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
pokeElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
$cpokeElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
peekElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
$cpeekElemOff :: Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
alignment :: FragmentShadingRateCombinerOpKHR -> Int
$calignment :: FragmentShadingRateCombinerOpKHR -> Int
sizeOf :: FragmentShadingRateCombinerOpKHR -> Int
$csizeOf :: FragmentShadingRateCombinerOpKHR -> Int
Storable, FragmentShadingRateCombinerOpKHR
forall a. a -> Zero a
zero :: FragmentShadingRateCombinerOpKHR
$czero :: FragmentShadingRateCombinerOpKHR
Zero)
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = FragmentShadingRateCombinerOpKHR 0
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = FragmentShadingRateCombinerOpKHR 1
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = FragmentShadingRateCombinerOpKHR 2
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = FragmentShadingRateCombinerOpKHR 3
pattern $bFRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: FragmentShadingRateCombinerOpKHR
$mFRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: forall {r}.
FragmentShadingRateCombinerOpKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = FragmentShadingRateCombinerOpKHR 4
{-# COMPLETE
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
, FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR ::
FragmentShadingRateCombinerOpKHR
#-}
conNameFragmentShadingRateCombinerOpKHR :: String
conNameFragmentShadingRateCombinerOpKHR :: String
conNameFragmentShadingRateCombinerOpKHR = String
"FragmentShadingRateCombinerOpKHR"
enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR = String
"FRAGMENT_SHADING_RATE_COMBINER_OP_"
showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR =
[
( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
, String
"KEEP_KHR"
)
,
( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
, String
"REPLACE_KHR"
)
,
( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR
, String
"MIN_KHR"
)
,
( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR
, String
"MAX_KHR"
)
,
( FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR
, String
"MUL_KHR"
)
]
instance Show FragmentShadingRateCombinerOpKHR where
showsPrec :: Int -> FragmentShadingRateCombinerOpKHR -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixFragmentShadingRateCombinerOpKHR
[(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR
String
conNameFragmentShadingRateCombinerOpKHR
(\(FragmentShadingRateCombinerOpKHR Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read FragmentShadingRateCombinerOpKHR where
readPrec :: ReadPrec FragmentShadingRateCombinerOpKHR
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixFragmentShadingRateCombinerOpKHR
[(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR
String
conNameFragmentShadingRateCombinerOpKHR
Int32 -> FragmentShadingRateCombinerOpKHR
FragmentShadingRateCombinerOpKHR
type KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2
pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a. Integral a => a
$mKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2
type KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"
pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"