{-# language CPP #-} -- | = Name -- -- VK_HUAWEI_invocation_mask - device extension -- -- = VK_HUAWEI_invocation_mask -- -- [__Name String__] -- @VK_HUAWEI_invocation_mask@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 371 -- -- [__Revision__] -- 1 -- -- [__Ratification Status__] -- Not ratified -- -- [__Extension and Version Dependencies__] -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_ray_tracing_pipeline VK_KHR_ray_tracing_pipeline> -- and -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_synchronization2 VK_KHR_synchronization2> -- or -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.3 Vulkan Version 1.3> -- -- [__Contact__] -- -- - Pan Gao -- <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_HUAWEI_invocation_mask] @PanGao-h%0A*Here describe the issue or question you have about the VK_HUAWEI_invocation_mask extension* > -- -- [__Extension Proposal__] -- <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_HUAWEI_invocation_mask.adoc VK_HUAWEI_invocation_mask> -- -- == Other Extension Metadata -- -- [__Last Modified Date__] -- 2021-05-27 -- -- [__Interactions and External Dependencies__] -- -- - This extension requires @VK_KHR_ray_tracing_pipeline@, which -- allow to bind an invocation mask image before the ray tracing -- command -- -- - This extension requires @VK_KHR_synchronization2@, which allows -- new pipeline stage for the invocation mask image -- -- [__Contributors__] -- -- - Yunpeng Zhu -- -- - Juntao Li, Huawei -- -- - Liang Chen, Huawei -- -- - Shaozhuang Shi, Huawei -- -- - Hailong Chu, Huawei -- -- == Description -- -- The rays to trace may be sparse in some use cases. For example, the -- scene only have a few regions to reflect. Providing an invocation mask -- image to the ray tracing commands could potentially give the hardware -- the hint to do certain optimization without invoking an additional pass -- to compact the ray buffer. -- -- == New Commands -- -- - 'cmdBindInvocationMaskHUAWEI' -- -- == New Structures -- -- - Extending -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2', -- 'Vulkan.Core10.Device.DeviceCreateInfo': -- -- - 'PhysicalDeviceInvocationMaskFeaturesHUAWEI' -- -- == New Enum Constants -- -- - 'HUAWEI_INVOCATION_MASK_EXTENSION_NAME' -- -- - 'HUAWEI_INVOCATION_MASK_SPEC_VERSION' -- -- - Extending 'Vulkan.Core13.Enums.AccessFlags2.AccessFlagBits2': -- -- - 'Vulkan.Core13.Enums.AccessFlags2.ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI' -- -- - Extending -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits': -- -- - 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI' -- -- - Extending -- 'Vulkan.Core13.Enums.PipelineStageFlags2.PipelineStageFlagBits2': -- -- - 'Vulkan.Core13.Enums.PipelineStageFlags2.PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI' -- -- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': -- -- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI' -- -- == Examples -- -- RT mask is updated before each traceRay. -- -- Step 1. Generate InvocationMask. -- -- > //the rt mask image bind as color attachment in the fragment shader -- > Layout(location = 2) out vec4 outRTmask -- > vec4 mask = vec4(x,x,x,x); -- > outRTmask = mask; -- -- Step 2. traceRay with InvocationMask -- -- > vkCmdBindPipeline( -- > commandBuffers[imageIndex], -- > VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, m_rtPipeline); -- > vkCmdBindDescriptorSets(commandBuffers[imageIndex], -- > VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, -- > m_rtPipelineLayout, 0, 1, &m_rtDescriptorSet, -- > 0, nullptr); -- > -- > vkCmdBindInvocationMaskHUAWEI( -- > commandBuffers[imageIndex], -- > InvocationMaskimageView, -- > InvocationMaskimageLayout); -- > vkCmdTraceRaysKHR(commandBuffers[imageIndex], -- > pRaygenShaderBindingTable, -- > pMissShaderBindingTable, -- > swapChainExtent.width, -- > swapChainExtent.height, 1); -- -- == Version History -- -- - Revision 1, 2021-05-27 (Yunpeng Zhu) -- -- - Initial draft. -- -- == See Also -- -- No cross-references are available -- -- == Document Notes -- -- For more information, see the -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_HUAWEI_invocation_mask Vulkan Specification>. -- -- This page is a generated document. Fixes and changes should be made to -- the generator scripts, not directly. module Vulkan.Extensions.VK_HUAWEI_invocation_mask ( cmdBindInvocationMaskHUAWEI , PhysicalDeviceInvocationMaskFeaturesHUAWEI(..) , HUAWEI_INVOCATION_MASK_SPEC_VERSION , pattern HUAWEI_INVOCATION_MASK_SPEC_VERSION , HUAWEI_INVOCATION_MASK_EXTENSION_NAME , pattern HUAWEI_INVOCATION_MASK_EXTENSION_NAME ) where import Vulkan.Internal.Utils (traceAroundEvent) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytes) import GHC.IO (throwIO) import GHC.Ptr (nullFunPtr) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Vulkan.CStruct (FromCStruct) import Vulkan.CStruct (FromCStruct(..)) import Vulkan.CStruct (ToCStruct) import Vulkan.CStruct (ToCStruct(..)) import Vulkan.Zero (Zero(..)) import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek)) import Foreign.Storable (Storable(poke)) import qualified Foreign.Storable (Storable(..)) import GHC.Generics (Generic) import GHC.IO.Exception (IOErrorType(..)) import GHC.IO.Exception (IOException(..)) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr) import Data.Kind (Type) import Vulkan.Core10.FundamentalTypes (bool32ToBool) import Vulkan.Core10.FundamentalTypes (boolToBool32) import Vulkan.Core10.FundamentalTypes (Bool32) import Vulkan.Core10.Handles (CommandBuffer) import Vulkan.Core10.Handles (CommandBuffer(..)) import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer)) import Vulkan.Core10.Handles (CommandBuffer_T) import Vulkan.Dynamic (DeviceCmds(pVkCmdBindInvocationMaskHUAWEI)) import Vulkan.Core10.Enums.ImageLayout (ImageLayout) import Vulkan.Core10.Enums.ImageLayout (ImageLayout(..)) import Vulkan.Core10.Handles (ImageView) import Vulkan.Core10.Handles (ImageView(..)) import Vulkan.Core10.Enums.StructureType (StructureType) import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI)) foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe #endif "dynamic" mkVkCmdBindInvocationMaskHUAWEI :: FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) -> Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO () -- | vkCmdBindInvocationMaskHUAWEI - Bind an invocation mask image on a -- command buffer -- -- == Valid Usage -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-None-04976# The -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-invocationMask invocationMask> -- feature /must/ be enabled -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04977# If @imageView@ -- is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ be a -- valid 'Vulkan.Core10.Handles.ImageView' handle of type -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04978# If @imageView@ -- is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ have a -- format of 'Vulkan.Core10.Enums.Format.FORMAT_R8_UINT' -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04979# If @imageView@ -- is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ have been -- created with the -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI' -- usage flag set -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04980# If @imageView@ -- is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', @imageLayout@ -- /must/ be 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-width-04981# Thread mask image -- resolution /must/ match the @width@ and @height@ in -- 'Vulkan.Extensions.VK_KHR_ray_tracing_pipeline.cmdTraceRaysKHR' -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-None-04982# Each element in the -- invocation mask image /must/ have the value @0@ or @1@. The value 1 -- means the invocation is active -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-depth-04983# @depth@ in -- 'Vulkan.Extensions.VK_KHR_ray_tracing_pipeline.cmdTraceRaysKHR' -- /must/ be 1 -- -- == Valid Usage (Implicit) -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-parameter# -- @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageView-parameter# If -- @imageView@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', -- @imageView@ /must/ be a valid 'Vulkan.Core10.Handles.ImageView' -- handle -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-imageLayout-parameter# -- @imageLayout@ /must/ be a valid -- 'Vulkan.Core10.Enums.ImageLayout.ImageLayout' value -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-recording# -- @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-cmdpool# The -- 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support -- 'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT' operations -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-renderpass# This command /must/ -- only be called outside of a render pass instance -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-videocoding# This command /must/ -- only be called outside of a video coding scope -- -- - #VUID-vkCmdBindInvocationMaskHUAWEI-commonparent# Both of -- @commandBuffer@, and @imageView@ that are valid handles of -- non-ignored parameters /must/ have been created, allocated, or -- retrieved from the same 'Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> | -- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+ -- | Primary | Outside | Outside | VK_QUEUE_COMPUTE_BIT | State | -- | Secondary | | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -- -- == Conditional Rendering -- -- vkCmdBindInvocationMaskHUAWEI is not affected by -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-conditional-rendering conditional rendering> -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_HUAWEI_invocation_mask VK_HUAWEI_invocation_mask>, -- 'Vulkan.Core10.Handles.CommandBuffer', -- 'Vulkan.Core10.Enums.ImageLayout.ImageLayout', -- 'Vulkan.Core10.Handles.ImageView' cmdBindInvocationMaskHUAWEI :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command will be -- recorded CommandBuffer -> -- | @imageView@ is an image view handle specifying the invocation mask image -- @imageView@ /may/ be 'Vulkan.Core10.APIConstants.NULL_HANDLE', which is -- equivalent to specifying a view of an image filled with ones value. ImageView -> -- | @imageLayout@ is the layout that the image subresources accessible from -- @imageView@ will be in when the invocation mask image is accessed ImageLayout -> io () cmdBindInvocationMaskHUAWEI :: forall (io :: * -> *). MonadIO io => CommandBuffer -> ImageView -> ImageLayout -> io () cmdBindInvocationMaskHUAWEI CommandBuffer commandBuffer ImageView imageView ImageLayout imageLayout = IO () -> io () forall a. IO a -> io a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> io ()) -> IO () -> io () forall a b. (a -> b) -> a -> b $ do let vkCmdBindInvocationMaskHUAWEIPtr :: FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) vkCmdBindInvocationMaskHUAWEIPtr = DeviceCmds -> FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) pVkCmdBindInvocationMaskHUAWEI (case CommandBuffer commandBuffer of CommandBuffer{DeviceCmds deviceCmds :: DeviceCmds deviceCmds :: CommandBuffer -> DeviceCmds deviceCmds} -> DeviceCmds deviceCmds) Bool -> IO () -> IO () forall (f :: * -> *). Applicative f => Bool -> f () -> f () unless (FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) vkCmdBindInvocationMaskHUAWEIPtr FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) -> FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) -> Bool forall a. Eq a => a -> a -> Bool /= FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) forall a. FunPtr a nullFunPtr) (IO () -> IO ()) -> IO () -> IO () forall a b. (a -> b) -> a -> b $ IOException -> IO () forall e a. (HasCallStack, 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 String "" String "The function pointer for vkCmdBindInvocationMaskHUAWEI is null" Maybe CInt forall a. Maybe a Nothing Maybe String forall a. Maybe a Nothing let vkCmdBindInvocationMaskHUAWEI' :: Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO () vkCmdBindInvocationMaskHUAWEI' = FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) -> Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO () mkVkCmdBindInvocationMaskHUAWEI FunPtr (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO ()) vkCmdBindInvocationMaskHUAWEIPtr String -> IO () -> IO () forall a. String -> IO a -> IO a traceAroundEvent String "vkCmdBindInvocationMaskHUAWEI" (Ptr CommandBuffer_T -> ImageView -> ImageLayout -> IO () vkCmdBindInvocationMaskHUAWEI' (CommandBuffer -> Ptr CommandBuffer_T commandBufferHandle (CommandBuffer commandBuffer)) (ImageView imageView) (ImageLayout imageLayout)) () -> IO () forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure (() -> IO ()) -> () -> IO () forall a b. (a -> b) -> a -> b $ () -- | VkPhysicalDeviceInvocationMaskFeaturesHUAWEI - Structure describing -- invocation mask features that can be supported by an implementation -- -- = Members -- -- This structure describes the following feature: -- -- = Description -- -- If the 'PhysicalDeviceInvocationMaskFeaturesHUAWEI' structure is -- included in the @pNext@ chain of the -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2' -- structure passed to -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2', -- it is filled in to indicate whether each corresponding feature is -- supported. If the application wishes to use a -- 'Vulkan.Core10.Handles.Device' with any features described by -- 'PhysicalDeviceInvocationMaskFeaturesHUAWEI', it /must/ add an instance -- of the structure, with the desired feature members set to -- 'Vulkan.Core10.FundamentalTypes.TRUE', to the @pNext@ chain of -- 'Vulkan.Core10.Device.DeviceCreateInfo' when creating the -- 'Vulkan.Core10.Handles.Device'. -- -- == Valid Usage (Implicit) -- -- = See Also -- -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_HUAWEI_invocation_mask VK_HUAWEI_invocation_mask>, -- 'Vulkan.Core10.FundamentalTypes.Bool32', -- 'Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceInvocationMaskFeaturesHUAWEI = PhysicalDeviceInvocationMaskFeaturesHUAWEI { -- | #features-invocationMask# @invocationMask@ indicates that the -- implementation supports the use of an invocation mask image to optimize -- the ray dispatch. PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool invocationMask :: Bool } deriving (Typeable, PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool (PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool) -> (PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool) -> Eq PhysicalDeviceInvocationMaskFeaturesHUAWEI forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool == :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool $c/= :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool /= :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool Eq) #if defined(GENERIC_INSTANCES) deriving instance Generic (PhysicalDeviceInvocationMaskFeaturesHUAWEI) #endif deriving instance Show PhysicalDeviceInvocationMaskFeaturesHUAWEI instance ToCStruct PhysicalDeviceInvocationMaskFeaturesHUAWEI where withCStruct :: forall b. PhysicalDeviceInvocationMaskFeaturesHUAWEI -> (Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b) -> IO b withCStruct PhysicalDeviceInvocationMaskFeaturesHUAWEI x Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b f = Int -> (Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b) -> IO b forall a b. Int -> (Ptr a -> IO b) -> IO b allocaBytes Int 24 ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b) -> IO b) -> (Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b) -> IO b forall a b. (a -> b) -> a -> b $ \Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p -> Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b -> IO b forall b. Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b -> IO b forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b pokeCStruct Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p PhysicalDeviceInvocationMaskFeaturesHUAWEI x (Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b f Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p) pokeCStruct :: forall b. Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b -> IO b pokeCStruct Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p PhysicalDeviceInvocationMaskFeaturesHUAWEI{Bool invocationMask :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Bool invocationMask :: Bool ..} IO b f = do Ptr StructureType -> StructureType -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr StructureType forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 0 :: Ptr StructureType)) (StructureType STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI) Ptr (Ptr ()) -> Ptr () -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr (Ptr ()) forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 8 :: Ptr (Ptr ()))) (Ptr () forall a. Ptr a nullPtr) Ptr Bool32 -> Bool32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr Bool32 forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 16 :: Ptr Bool32)) (Bool -> Bool32 boolToBool32 (Bool invocationMask)) IO b f cStructSize :: Int cStructSize = Int 24 cStructAlignment :: Int cStructAlignment = Int 8 pokeZeroCStruct :: forall b. Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b -> IO b pokeZeroCStruct Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p IO b f = do Ptr StructureType -> StructureType -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr StructureType forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 0 :: Ptr StructureType)) (StructureType STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI) Ptr (Ptr ()) -> Ptr () -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr (Ptr ()) forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 8 :: Ptr (Ptr ()))) (Ptr () forall a. Ptr a nullPtr) Ptr Bool32 -> Bool32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr Bool32 forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 16 :: Ptr Bool32)) (Bool -> Bool32 boolToBool32 (Bool forall a. Zero a => a zero)) IO b f instance FromCStruct PhysicalDeviceInvocationMaskFeaturesHUAWEI where peekCStruct :: Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO PhysicalDeviceInvocationMaskFeaturesHUAWEI peekCStruct Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p = do invocationMask <- forall a. Storable a => Ptr a -> IO a peek @Bool32 ((Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI p Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int -> Ptr Bool32 forall a b. Ptr a -> Int -> Ptr b `plusPtr` Int 16 :: Ptr Bool32)) pure $ PhysicalDeviceInvocationMaskFeaturesHUAWEI (bool32ToBool invocationMask) instance Storable PhysicalDeviceInvocationMaskFeaturesHUAWEI where sizeOf :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int sizeOf ~PhysicalDeviceInvocationMaskFeaturesHUAWEI _ = Int 24 alignment :: PhysicalDeviceInvocationMaskFeaturesHUAWEI -> Int alignment ~PhysicalDeviceInvocationMaskFeaturesHUAWEI _ = Int 8 peek :: Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO PhysicalDeviceInvocationMaskFeaturesHUAWEI peek = Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO PhysicalDeviceInvocationMaskFeaturesHUAWEI forall a. FromCStruct a => Ptr a -> IO a peekCStruct poke :: Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO () poke Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI poked = Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO () -> IO () forall b. Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI -> PhysicalDeviceInvocationMaskFeaturesHUAWEI -> IO b -> IO b forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b pokeCStruct Ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI ptr PhysicalDeviceInvocationMaskFeaturesHUAWEI poked (() -> IO () forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure ()) instance Zero PhysicalDeviceInvocationMaskFeaturesHUAWEI where zero :: PhysicalDeviceInvocationMaskFeaturesHUAWEI zero = Bool -> PhysicalDeviceInvocationMaskFeaturesHUAWEI PhysicalDeviceInvocationMaskFeaturesHUAWEI Bool forall a. Zero a => a zero type HUAWEI_INVOCATION_MASK_SPEC_VERSION = 1 -- No documentation found for TopLevel "VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION" pattern HUAWEI_INVOCATION_MASK_SPEC_VERSION :: forall a . Integral a => a pattern $mHUAWEI_INVOCATION_MASK_SPEC_VERSION :: forall {r} {a}. Integral a => a -> ((# #) -> r) -> ((# #) -> r) -> r $bHUAWEI_INVOCATION_MASK_SPEC_VERSION :: forall a. Integral a => a HUAWEI_INVOCATION_MASK_SPEC_VERSION = 1 type HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask" -- No documentation found for TopLevel "VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME" pattern HUAWEI_INVOCATION_MASK_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a pattern $mHUAWEI_INVOCATION_MASK_EXTENSION_NAME :: forall {r} {a}. (Eq a, IsString a) => a -> ((# #) -> r) -> ((# #) -> r) -> r $bHUAWEI_INVOCATION_MASK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"