{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_fragment_shading_rate ( cmdSetFragmentShadingRateKHR
, getPhysicalDeviceFragmentShadingRatesKHR
, pattern IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR
, pattern ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR
, pattern IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
, pattern PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
, 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 (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
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 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_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetFragmentShadingRateKHR))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceFragmentShadingRatesKHR))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (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.CStruct.Extends (SomeStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlags)
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlagBits(ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV))
import Vulkan.Core10.Enums.ImageLayout (ImageLayout(IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV))
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV))
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV))
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 :: CommandBuffer
-> ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR))
-> io ()
cmdSetFragmentShadingRateKHR commandBuffer :: CommandBuffer
commandBuffer fragmentSize :: "fragmentSize" ::: Extent2D
fragmentSize combinerOps :: "combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
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 (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
vkCmdSetFragmentShadingRateKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCmdSetFragmentShadingRateKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- ((("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)) -> IO ())
-> IO ())
-> ContT
() IO ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ())
-> IO ())
-> ContT
() IO ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)))
-> ((("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ())
-> IO ())
-> ContT
() IO ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
forall a b. (a -> b) -> a -> b
$ ("fragmentSize" ::: Extent2D)
-> (("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("fragmentSize" ::: Extent2D
fragmentSize)
"combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps <- ((("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
-> ((("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(FixedArray 2 FragmentShadingRateCombinerOpKHR) 8 4
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> Ptr FragmentShadingRateCombinerOpKHR
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
pCombinerOps
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps) of
(e0 :: FragmentShadingRateCombinerOpKHR
e0, e1 :: FragmentShadingRateCombinerOpKHR
e1) -> do
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' Ptr FragmentShadingRateCombinerOpKHR
-> Int -> Ptr FragmentShadingRateCombinerOpKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "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))
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
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 :: PhysicalDevice
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
getPhysicalDeviceFragmentShadingRatesKHR physicalDevice :: PhysicalDevice
physicalDevice = IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> (ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> io
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
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 (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
())
-> IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
vkGetPhysicalDeviceFragmentShadingRatesKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceFragmentShadingRatesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- ((("pFragmentShadingRateCount" ::: Ptr Word32)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRateCount" ::: Ptr Word32)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pFragmentShadingRateCount" ::: Ptr Word32)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRateCount" ::: Ptr Word32))
-> ((("pFragmentShadingRateCount" ::: Ptr Word32)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRateCount" ::: Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO ("pFragmentShadingRateCount" ::: Ptr Word32)
-> (("pFragmentShadingRateCount" ::: Ptr Word32) -> IO ())
-> (("pFragmentShadingRateCount" ::: Ptr Word32)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pFragmentShadingRateCount" ::: Ptr Word32)
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result)
-> IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceFragmentShadingRatesKHR" (Ptr PhysicalDevice_T
-> ("pFragmentShadingRateCount" ::: Ptr Word32)
-> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO Result
vkGetPhysicalDeviceFragmentShadingRatesKHR' Ptr PhysicalDevice_T
physicalDevice' ("pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount) ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
forall a. Ptr a
nullPtr))
IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
())
-> IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Word32
pFragmentShadingRateCount <- IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32)
-> IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
"pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates <- ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR))
-> ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
forall a b. (a -> b) -> a -> b
$ IO
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO ())
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
forall a. Int -> IO (Ptr a)
callocBytes @PhysicalDeviceFragmentShadingRateKHR ((Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 32)) ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO ()
forall a. Ptr a -> IO ()
free
[()]
_ <- (Int
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
())
-> [Int]
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
[()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\i :: Int
i -> ((()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
())
-> ((()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall a b. (a -> b) -> a -> b
$ ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int
-> "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* 32) :: Ptr PhysicalDeviceFragmentShadingRateKHR) (IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ((()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> (()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> ()
-> IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b. (a -> b) -> a -> b
$ ())) [0..(Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- 1]
Result
r' <- IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result)
-> IO Result
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "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)))
IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
())
-> IO ()
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Word32
pFragmentShadingRateCount' <- IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32)
-> IO Word32
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
Word32
forall a b. (a -> b) -> a -> b
$ ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFragmentShadingRateCount" ::: Ptr Word32
pPFragmentShadingRateCount
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates' <- IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PhysicalDeviceFragmentShadingRateKHR)
-> IO
("fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pFragmentShadingRateCount')) (\i :: Int
i -> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PhysicalDeviceFragmentShadingRateKHR ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
pPFragmentShadingRates) ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int
-> "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (32 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PhysicalDeviceFragmentShadingRateKHR)))
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR))
-> (Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
-> ContT
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
IO
(Result,
"fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "fragmentShadingRates"
::: Vector PhysicalDeviceFragmentShadingRateKHR
pFragmentShadingRates')
pattern $bIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: ImageLayout
$mIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: forall r. ImageLayout -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
pattern $bACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR :: AccessFlagBits
$mACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR :: forall r. AccessFlagBits -> (Void# -> r) -> (Void# -> r) -> r
ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV
pattern $bIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: ImageUsageFlagBits
$mIMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: forall r. ImageUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
pattern $bPIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: PipelineStageFlagBits
$mPIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: forall r.
PipelineStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV
data FragmentShadingRateAttachmentInfoKHR = FragmentShadingRateAttachmentInfoKHR
{
FragmentShadingRateAttachmentInfoKHR
-> SomeStruct AttachmentReference2
fragmentShadingRateAttachment :: 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 :: FragmentShadingRateAttachmentInfoKHR
-> (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b) -> IO b
withCStruct x :: FragmentShadingRateAttachmentInfoKHR
x f :: Ptr FragmentShadingRateAttachmentInfoKHR -> IO b
f = Int
-> Int
-> (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr FragmentShadingRateAttachmentInfoKHR -> IO b) -> IO b)
-> (Ptr FragmentShadingRateAttachmentInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr FragmentShadingRateAttachmentInfoKHR
p -> Ptr FragmentShadingRateAttachmentInfoKHR
-> FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
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 :: Ptr FragmentShadingRateAttachmentInfoKHR
-> FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr FragmentShadingRateAttachmentInfoKHR
p FragmentShadingRateAttachmentInfoKHR{..} f :: 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 (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 FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
IO () -> ContT b IO ()
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 (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment'' <- ((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (AttachmentReference2 '[])) (((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[])))
-> ((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[]))
forall a b. (a -> b) -> a -> b
$ \cont :: Ptr (AttachmentReference2 '[]) -> IO b
cont -> SomeStruct AttachmentReference2
-> (forall (es :: [*]).
(Extendss AttachmentReference2 es, PokeChain es) =>
Ptr (AttachmentReference2 es) -> IO b)
-> IO b
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
fragmentShadingRateAttachment) (Ptr (AttachmentReference2 '[]) -> IO b
cont (Ptr (AttachmentReference2 '[]) -> IO b)
-> (Ptr (AttachmentReference2 es)
-> Ptr (AttachmentReference2 '[]))
-> Ptr (AttachmentReference2 es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (AttachmentReference2 es) -> Ptr (AttachmentReference2 '[])
forall a b. Ptr a -> Ptr b
castPtr)
IO () -> ContT b IO ()
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 (Ptr (AttachmentReference2 '[]))
-> Ptr (AttachmentReference2 '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> Ptr (Ptr (AttachmentReference2 _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr (AttachmentReference2 _)))) Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment''
IO () -> ContT b IO ()
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
$ ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr FragmentShadingRateAttachmentInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr FragmentShadingRateAttachmentInfoKHR
p f :: 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 (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 FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR)
IO () -> ContT b IO ()
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 (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment'' <- ((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[]))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (AttachmentReference2 '[])) (((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[])))
-> ((Ptr (AttachmentReference2 '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (AttachmentReference2 '[]))
forall a b. (a -> b) -> a -> b
$ \cont :: Ptr (AttachmentReference2 '[]) -> IO b
cont -> SomeStruct AttachmentReference2
-> (forall (es :: [*]).
(Extendss AttachmentReference2 es, PokeChain es) =>
Ptr (AttachmentReference2 es) -> IO b)
-> IO b
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 ((AttachmentReference2 '[] -> SomeStruct AttachmentReference2
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct AttachmentReference2 '[]
forall a. Zero a => a
zero)) (Ptr (AttachmentReference2 '[]) -> IO b
cont (Ptr (AttachmentReference2 '[]) -> IO b)
-> (Ptr (AttachmentReference2 es)
-> Ptr (AttachmentReference2 '[]))
-> Ptr (AttachmentReference2 es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (AttachmentReference2 es) -> Ptr (AttachmentReference2 '[])
forall a b. Ptr a -> Ptr b
castPtr)
IO () -> ContT b IO ()
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 (Ptr (AttachmentReference2 '[]))
-> Ptr (AttachmentReference2 '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> Ptr (Ptr (AttachmentReference2 _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr (AttachmentReference2 _)))) Ptr (AttachmentReference2 '[])
pFragmentShadingRateAttachment''
IO () -> ContT b IO ()
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
$ ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance FromCStruct FragmentShadingRateAttachmentInfoKHR where
peekCStruct :: Ptr FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR
peekCStruct p :: Ptr FragmentShadingRateAttachmentInfoKHR
p = do
SomeStruct AttachmentReference2
pFragmentShadingRateAttachment <- Ptr (SomeStruct AttachmentReference2)
-> IO (SomeStruct AttachmentReference2)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (SomeStruct AttachmentReference2)
-> IO (SomeStruct AttachmentReference2))
-> (Ptr (AttachmentReference2 Any)
-> Ptr (SomeStruct AttachmentReference2))
-> Ptr (AttachmentReference2 Any)
-> IO (SomeStruct AttachmentReference2)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (AttachmentReference2 Any)
-> Ptr (SomeStruct AttachmentReference2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (AttachmentReference2 Any)
-> IO (SomeStruct AttachmentReference2))
-> IO (Ptr (AttachmentReference2 Any))
-> IO (SomeStruct AttachmentReference2)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr (AttachmentReference2 Any))
-> IO (Ptr (AttachmentReference2 Any))
forall a. Storable a => Ptr a -> IO a
peek ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> Ptr (Ptr (AttachmentReference2 a))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr (AttachmentReference2 a))))
"fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr FragmentShadingRateAttachmentInfoKHR
p Ptr FragmentShadingRateAttachmentInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D))
FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR)
-> FragmentShadingRateAttachmentInfoKHR
-> IO FragmentShadingRateAttachmentInfoKHR
forall a b. (a -> b) -> a -> b
$ SomeStruct AttachmentReference2
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
SomeStruct AttachmentReference2
pFragmentShadingRateAttachment "fragmentSize" ::: Extent2D
shadingRateAttachmentTexelSize
instance Zero FragmentShadingRateAttachmentInfoKHR where
zero :: FragmentShadingRateAttachmentInfoKHR
zero = SomeStruct AttachmentReference2
-> ("fragmentSize" ::: Extent2D)
-> FragmentShadingRateAttachmentInfoKHR
FragmentShadingRateAttachmentInfoKHR
(AttachmentReference2 '[] -> SomeStruct AttachmentReference2
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct AttachmentReference2 '[]
forall a. Zero a => a
zero)
"fragmentSize" ::: Extent2D
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 :: PipelineFragmentShadingRateStateCreateInfoKHR
-> (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b
withCStruct x :: PipelineFragmentShadingRateStateCreateInfoKHR
x f :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b
f = Int
-> Int
-> (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b)
-> (Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p -> Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
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 :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p PipelineFragmentShadingRateStateCreateInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> Ptr FragmentShadingRateCombinerOpKHR
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int
-> "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
case ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR)
combinerOps) of
(e0 :: FragmentShadingRateCombinerOpKHR
e0, e1 :: FragmentShadingRateCombinerOpKHR
e1) -> do
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' Ptr FragmentShadingRateCombinerOpKHR
-> Int -> Ptr FragmentShadingRateCombinerOpKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
let pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' = ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> Ptr FragmentShadingRateCombinerOpKHR
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int
-> "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
case ((FragmentShadingRateCombinerOpKHR
forall a. Zero a => a
zero, FragmentShadingRateCombinerOpKHR
forall a. Zero a => a
zero)) of
(e0 :: FragmentShadingRateCombinerOpKHR
e0, e1 :: FragmentShadingRateCombinerOpKHR
e1) -> do
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e0)
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FragmentShadingRateCombinerOpKHR
pCombinerOps' Ptr FragmentShadingRateCombinerOpKHR
-> Int -> Ptr FragmentShadingRateCombinerOpKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr FragmentShadingRateCombinerOpKHR) (FragmentShadingRateCombinerOpKHR
e1)
IO b
f
instance FromCStruct PipelineFragmentShadingRateStateCreateInfoKHR where
peekCStruct :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
peekCStruct p :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p = do
"fragmentSize" ::: Extent2D
fragmentSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D))
let pcombinerOps :: Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps = ("combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR))
-> Ptr FragmentShadingRateCombinerOpKHR
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @FragmentShadingRateCombinerOpKHR ((Ptr PipelineFragmentShadingRateStateCreateInfoKHR
p Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> Int
-> "combinerOps"
::: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (FixedArray 2 FragmentShadingRateCombinerOpKHR)))
FragmentShadingRateCombinerOpKHR
combinerOps0 <- Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps Ptr FragmentShadingRateCombinerOpKHR
-> Int -> Ptr FragmentShadingRateCombinerOpKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 0 :: Ptr FragmentShadingRateCombinerOpKHR))
FragmentShadingRateCombinerOpKHR
combinerOps1 <- Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
forall a. Storable a => Ptr a -> IO a
peek @FragmentShadingRateCombinerOpKHR ((Ptr FragmentShadingRateCombinerOpKHR
pcombinerOps Ptr FragmentShadingRateCombinerOpKHR
-> Int -> Ptr FragmentShadingRateCombinerOpKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 4 :: Ptr FragmentShadingRateCombinerOpKHR))
PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR)
-> PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
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
_ = 32
alignment :: PipelineFragmentShadingRateStateCreateInfoKHR -> Int
alignment ~PipelineFragmentShadingRateStateCreateInfoKHR
_ = 8
peek :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
peek = Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> IO PipelineFragmentShadingRateStateCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO ()
poke ptr :: Ptr PipelineFragmentShadingRateStateCreateInfoKHR
ptr poked :: PipelineFragmentShadingRateStateCreateInfoKHR
poked = Ptr PipelineFragmentShadingRateStateCreateInfoKHR
-> PipelineFragmentShadingRateStateCreateInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentShadingRateStateCreateInfoKHR
ptr PipelineFragmentShadingRateStateCreateInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineFragmentShadingRateStateCreateInfoKHR where
zero :: PipelineFragmentShadingRateStateCreateInfoKHR
zero = ("fragmentSize" ::: Extent2D)
-> ("combinerOps"
::: (FragmentShadingRateCombinerOpKHR,
FragmentShadingRateCombinerOpKHR))
-> PipelineFragmentShadingRateStateCreateInfoKHR
PipelineFragmentShadingRateStateCreateInfoKHR
"fragmentSize" ::: Extent2D
forall a. Zero a => a
zero
(FragmentShadingRateCombinerOpKHR
forall a. Zero a => a
zero, FragmentShadingRateCombinerOpKHR
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
(PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool)
-> (PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> Bool)
-> Eq PhysicalDeviceFragmentShadingRateFeaturesKHR
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 :: PhysicalDeviceFragmentShadingRateFeaturesKHR
-> (Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceFragmentShadingRateFeaturesKHR
x f :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p -> Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b -> IO b
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 :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p PhysicalDeviceFragmentShadingRateFeaturesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
pipelineFragmentShadingRate))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveFragmentShadingRate))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
attachmentFragmentShadingRate))
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRateFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
peekCStruct p :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p = do
Bool32
pipelineFragmentShadingRate <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
primitiveFragmentShadingRate <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
attachmentFragmentShadingRate <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
p Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR)
-> PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
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
_ = 32
alignment :: PhysicalDeviceFragmentShadingRateFeaturesKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRateFeaturesKHR
_ = 8
peek :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
peek = Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> IO PhysicalDeviceFragmentShadingRateFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
ptr poked :: PhysicalDeviceFragmentShadingRateFeaturesKHR
poked = Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
-> PhysicalDeviceFragmentShadingRateFeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
ptr PhysicalDeviceFragmentShadingRateFeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShadingRateFeaturesKHR where
zero :: PhysicalDeviceFragmentShadingRateFeaturesKHR
zero = Bool
-> Bool -> Bool -> PhysicalDeviceFragmentShadingRateFeaturesKHR
PhysicalDeviceFragmentShadingRateFeaturesKHR
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
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 :: PhysicalDeviceFragmentShadingRatePropertiesKHR
-> (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceFragmentShadingRatePropertiesKHR
x f :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 96 8 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p -> Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
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 :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p PhysicalDeviceFragmentShadingRatePropertiesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) (Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveFragmentShadingRateWithMultipleViewports))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
layeredShadingRateAttachments))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateNonTrivialCombinerOps))
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
maxFragmentSize)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) (Word32
maxFragmentSizeAspectRatio)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32)) (Word32
maxFragmentShadingRateCoverageSamples)
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderDepthStencilWrites))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithSampleMask))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithShaderSampleMask))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithConservativeRasterization))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithFragmentShaderInterlock))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateWithCustomSampleLocations))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentShadingRateStrictMultiplyCombiner))
IO b
f
cStructSize :: Int
cStructSize = 96
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
("pFragmentShadingRateCount" ::: Ptr Word32) -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 84 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 92 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRatePropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
peekCStruct p :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p = do
"fragmentSize" ::: Extent2D
minFragmentShadingRateAttachmentTexelSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Extent2D))
"fragmentSize" ::: Extent2D
maxFragmentShadingRateAttachmentTexelSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Extent2D))
Word32
maxFragmentShadingRateAttachmentTexelSizeAspectRatio <- ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
Bool32
primitiveFragmentShadingRateWithMultipleViewports <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32))
Bool32
layeredShadingRateAttachments <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32))
Bool32
fragmentShadingRateNonTrivialCombinerOps <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32))
"fragmentSize" ::: Extent2D
maxFragmentSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Extent2D))
Word32
maxFragmentSizeAspectRatio <- ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32))
Word32
maxFragmentShadingRateCoverageSamples <- ("pFragmentShadingRateCount" ::: Ptr Word32) -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> "pFragmentShadingRateCount" ::: Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32))
SampleCountFlagBits
maxFragmentShadingRateRasterizationSamples <- Ptr SampleCountFlagBits -> IO SampleCountFlagBits
forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr SampleCountFlagBits))
Bool32
fragmentShadingRateWithShaderDepthStencilWrites <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 68 :: Ptr Bool32))
Bool32
fragmentShadingRateWithSampleMask <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Bool32))
Bool32
fragmentShadingRateWithShaderSampleMask <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr Bool32))
Bool32
fragmentShadingRateWithConservativeRasterization <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Bool32))
Bool32
fragmentShadingRateWithFragmentShaderInterlock <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 84 :: Ptr Bool32))
Bool32
fragmentShadingRateWithCustomSampleLocations <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr Bool32))
Bool32
fragmentShadingRateStrictMultiplyCombiner <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
p Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 92 :: Ptr Bool32))
PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR)
-> PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
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
_ = 96
alignment :: PhysicalDeviceFragmentShadingRatePropertiesKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRatePropertiesKHR
_ = 8
peek :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
peek = Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> IO PhysicalDeviceFragmentShadingRatePropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
ptr poked :: PhysicalDeviceFragmentShadingRatePropertiesKHR
poked = Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
-> PhysicalDeviceFragmentShadingRatePropertiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
ptr PhysicalDeviceFragmentShadingRatePropertiesKHR
poked (() -> IO ()
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
"fragmentSize" ::: Extent2D
forall a. Zero a => a
zero
"fragmentSize" ::: Extent2D
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
"fragmentSize" ::: Extent2D
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
SampleCountFlagBits
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
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 :: PhysicalDeviceFragmentShadingRateKHR
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b)
-> IO b
withCStruct x :: PhysicalDeviceFragmentShadingRateKHR
x f :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b
f = Int
-> Int
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b)
-> IO b)
-> (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p -> ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO b -> IO b
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 :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO b -> IO b
pokeCStruct p :: "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p PhysicalDeviceFragmentShadingRateKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SampleCountFlags)) (SampleCountFlagBits
sampleCounts)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
fragmentSize)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SampleCountFlags)) (SampleCountFlagBits
forall a. Zero a => a
zero)
("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> ("fragmentSize" ::: Extent2D) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Extent2D)) ("fragmentSize" ::: Extent2D
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceFragmentShadingRateKHR where
peekCStruct :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
peekCStruct p :: "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p = do
SampleCountFlagBits
sampleCounts <- Ptr SampleCountFlagBits -> IO SampleCountFlagBits
forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlags (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> Ptr SampleCountFlagBits
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr SampleCountFlags))
"fragmentSize" ::: Extent2D
fragmentSize <- ("pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D))
-> IO ("fragmentSize" ::: Extent2D)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
p ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> Int -> "pFragmentSize" ::: Ptr ("fragmentSize" ::: Extent2D)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Extent2D))
PhysicalDeviceFragmentShadingRateKHR
-> IO PhysicalDeviceFragmentShadingRateKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceFragmentShadingRateKHR
-> IO PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR
-> IO PhysicalDeviceFragmentShadingRateKHR
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
_ = 32
alignment :: PhysicalDeviceFragmentShadingRateKHR -> Int
alignment ~PhysicalDeviceFragmentShadingRateKHR
_ = 8
peek :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
peek = ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> IO PhysicalDeviceFragmentShadingRateKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO ()
poke ptr :: "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
ptr poked :: PhysicalDeviceFragmentShadingRateKHR
poked = ("pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR)
-> PhysicalDeviceFragmentShadingRateKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pFragmentShadingRates"
::: Ptr PhysicalDeviceFragmentShadingRateKHR
ptr PhysicalDeviceFragmentShadingRateKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentShadingRateKHR where
zero :: PhysicalDeviceFragmentShadingRateKHR
zero = SampleCountFlagBits
-> ("fragmentSize" ::: Extent2D)
-> PhysicalDeviceFragmentShadingRateKHR
PhysicalDeviceFragmentShadingRateKHR
SampleCountFlagBits
forall a. Zero a => a
zero
"fragmentSize" ::: Extent2D
forall a. Zero a => a
zero
newtype FragmentShadingRateCombinerOpKHR = FragmentShadingRateCombinerOpKHR Int32
deriving newtype (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool
(FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> Eq FragmentShadingRateCombinerOpKHR
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
Eq FragmentShadingRateCombinerOpKHR =>
(FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Ordering)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> Bool)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR)
-> (FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR)
-> Ord 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
$cp1Ord :: Eq FragmentShadingRateCombinerOpKHR
Ord, Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR
Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR
Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ()
FragmentShadingRateCombinerOpKHR -> Int
(FragmentShadingRateCombinerOpKHR -> Int)
-> (FragmentShadingRateCombinerOpKHR -> Int)
-> (Ptr FragmentShadingRateCombinerOpKHR
-> Int -> IO FragmentShadingRateCombinerOpKHR)
-> (Ptr FragmentShadingRateCombinerOpKHR
-> Int -> FragmentShadingRateCombinerOpKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO FragmentShadingRateCombinerOpKHR)
-> (forall b.
Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ())
-> (Ptr FragmentShadingRateCombinerOpKHR
-> IO FragmentShadingRateCombinerOpKHR)
-> (Ptr FragmentShadingRateCombinerOpKHR
-> FragmentShadingRateCombinerOpKHR -> IO ())
-> Storable FragmentShadingRateCombinerOpKHR
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 :: Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FragmentShadingRateCombinerOpKHR -> IO ()
peekByteOff :: 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
FragmentShadingRateCombinerOpKHR
-> Zero 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
-> (Void# -> r) -> (Void# -> 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
-> (Void# -> r) -> (Void# -> 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
-> (Void# -> r) -> (Void# -> 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
-> (Void# -> r) -> (Void# -> 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
-> (Void# -> r) -> (Void# -> 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 = "FragmentShadingRateCombinerOpKHR"
enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR :: String
enumPrefixFragmentShadingRateCombinerOpKHR = "FRAGMENT_SHADING_RATE_COMBINER_OP_"
showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR :: [(FragmentShadingRateCombinerOpKHR, String)]
showTableFragmentShadingRateCombinerOpKHR =
[ (FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR , "KEEP_KHR")
, (FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR, "REPLACE_KHR")
, (FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR , "MIN_KHR")
, (FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR , "MAX_KHR")
, (FragmentShadingRateCombinerOpKHR
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR , "MUL_KHR")
]
instance Show FragmentShadingRateCombinerOpKHR where
showsPrec :: Int -> FragmentShadingRateCombinerOpKHR -> ShowS
showsPrec = String
-> [(FragmentShadingRateCombinerOpKHR, String)]
-> String
-> (FragmentShadingRateCombinerOpKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> FragmentShadingRateCombinerOpKHR
-> ShowS
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 x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read FragmentShadingRateCombinerOpKHR where
readPrec :: ReadPrec FragmentShadingRateCombinerOpKHR
readPrec = String
-> [(FragmentShadingRateCombinerOpKHR, String)]
-> String
-> (Int32 -> FragmentShadingRateCombinerOpKHR)
-> ReadPrec FragmentShadingRateCombinerOpKHR
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 = 1
pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: a
$mKHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 1
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 :: a
$mKHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"