{-# language CPP #-}
-- | = Name
--
-- VK_KHR_line_rasterization - device extension
--
-- = VK_KHR_line_rasterization
--
-- [__Name String__]
--     @VK_KHR_line_rasterization@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     535
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--     or
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Vulkan Version 1.1>
--
-- [__Contact__]
--
--     -   Piers Daniell
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_KHR_line_rasterization] @pdaniell-nv%0A*Here describe the issue or question you have about the VK_KHR_line_rasterization extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2023-06-08
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Allen Jensen, NVIDIA
--
--     -   Faith Ekstrand, Intel
--
-- == Description
--
-- This extension adds some line rasterization features that are commonly
-- used in CAD applications and supported in other APIs like OpenGL.
-- Bresenham-style line rasterization is supported, smooth rectangular
-- lines (coverage to alpha) are supported, and stippled lines are
-- supported for all three line rasterization modes.
--
-- == New Commands
--
-- -   'cmdSetLineStippleKHR'
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceLineRasterizationFeaturesKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceLineRasterizationPropertiesKHR'
--
-- -   Extending
--     'Vulkan.Core10.Pipeline.PipelineRasterizationStateCreateInfo':
--
--     -   'PipelineRasterizationLineStateCreateInfoKHR'
--
-- == New Enums
--
-- -   'LineRasterizationModeKHR'
--
-- == New Enum Constants
--
-- -   'KHR_LINE_RASTERIZATION_EXTENSION_NAME'
--
-- -   'KHR_LINE_RASTERIZATION_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.DynamicState.DynamicState':
--
--     -   'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_STIPPLE_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR'
--
-- == Issues
--
-- 1) Do we need to support Bresenham-style and smooth lines with more than
-- one rasterization sample? i.e. the equivalent of
-- glDisable(GL_MULTISAMPLE) in OpenGL when the framebuffer has more than
-- one sample?
--
-- __RESOLVED__: Yes. For simplicity, Bresenham line rasterization carries
-- forward a few restrictions from OpenGL, such as not supporting
-- per-sample shading, alpha to coverage, or alpha to one.
--
-- == Version History
--
-- -   Revision 1, 2019-05-09 (Jeff Bolz)
--
--     -   Initial draft
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_KHR_line_rasterization Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_KHR_line_rasterization  ( cmdSetLineStippleKHR
                                                    , pattern LINE_RASTERIZATION_MODE_DEFAULT_EXT
                                                    , pattern LINE_RASTERIZATION_MODE_RECTANGULAR_EXT
                                                    , pattern LINE_RASTERIZATION_MODE_BRESENHAM_EXT
                                                    , pattern LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT
                                                    , PhysicalDeviceLineRasterizationFeaturesKHR(..)
                                                    , PhysicalDeviceLineRasterizationPropertiesKHR(..)
                                                    , PipelineRasterizationLineStateCreateInfoKHR(..)
                                                    , LineRasterizationModeKHR( LINE_RASTERIZATION_MODE_DEFAULT_KHR
                                                                              , LINE_RASTERIZATION_MODE_RECTANGULAR_KHR
                                                                              , LINE_RASTERIZATION_MODE_BRESENHAM_KHR
                                                                              , LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR
                                                                              , ..
                                                                              )
                                                    , KHR_LINE_RASTERIZATION_SPEC_VERSION
                                                    , pattern KHR_LINE_RASTERIZATION_SPEC_VERSION
                                                    , KHR_LINE_RASTERIZATION_EXTENSION_NAME
                                                    , pattern KHR_LINE_RASTERIZATION_EXTENSION_NAME
                                                    ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
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 GHC.Show (showsPrec)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word16)
import Data.Word (Word32)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
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(pVkCmdSetLineStippleKHR))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetLineStippleKHR
  :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word16 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word16 -> IO ()

-- | vkCmdSetLineStippleKHR - Set line stipple dynamically for a command
-- buffer
--
-- = Description
--
-- This command sets the line stipple state for subsequent drawing commands
-- when drawing using
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-objects shader objects>,
-- or when the graphics pipeline is created with
-- 'Vulkan.Extensions.VK_EXT_line_rasterization.DYNAMIC_STATE_LINE_STIPPLE_EXT'
-- set in
-- 'Vulkan.Core10.Pipeline.PipelineDynamicStateCreateInfo'::@pDynamicStates@.
-- Otherwise, this state is specified by the
-- 'PipelineRasterizationLineStateCreateInfoKHR'::@lineStippleFactor@ and
-- 'PipelineRasterizationLineStateCreateInfoKHR'::@lineStipplePattern@
-- values used to create the currently active pipeline.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetLineStippleKHR-lineStippleFactor-02776#
--     @lineStippleFactor@ /must/ be in the range [1,256]
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetLineStippleKHR-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetLineStippleKHR-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-vkCmdSetLineStippleKHR-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics operations
--
-- -   #VUID-vkCmdSetLineStippleKHR-videocoding# This command /must/ only
--     be called outside of a video coding scope
--
-- == 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                                                                                                                    | Both                                                                                                                   | Outside                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             |                                                                                                                       |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_line_rasterization VK_EXT_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- 'Vulkan.Core10.Handles.CommandBuffer'
cmdSetLineStippleKHR :: forall io
                      . (MonadIO io)
                     => -- | @commandBuffer@ is the command buffer into which the command will be
                        -- recorded.
                        CommandBuffer
                     -> -- | @lineStippleFactor@ is the repeat factor used in stippled line
                        -- rasterization.
                        ("lineStippleFactor" ::: Word32)
                     -> -- | @lineStipplePattern@ is the bit pattern used in stippled line
                        -- rasterization.
                        ("lineStipplePattern" ::: Word16)
                     -> io ()
cmdSetLineStippleKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> io ()
cmdSetLineStippleKHR CommandBuffer
commandBuffer
                       "lineStippleFactor" ::: Word32
lineStippleFactor
                       "lineStipplePattern" ::: Word16
lineStipplePattern = 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 vkCmdSetLineStippleKHRPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> IO ())
vkCmdSetLineStippleKHRPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("lineStippleFactor" ::: Word32)
      -> ("lineStipplePattern" ::: Word16)
      -> IO ())
pVkCmdSetLineStippleKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> IO ())
vkCmdSetLineStippleKHRPtr FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("lineStippleFactor" ::: Word32)
      -> ("lineStipplePattern" ::: Word16)
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> 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 String
"" String
"The function pointer for vkCmdSetLineStippleKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdSetLineStippleKHR' :: Ptr CommandBuffer_T
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> IO ()
vkCmdSetLineStippleKHR' = FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> IO ())
-> Ptr CommandBuffer_T
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> IO ()
mkVkCmdSetLineStippleKHR FunPtr
  (Ptr CommandBuffer_T
   -> ("lineStippleFactor" ::: Word32)
   -> ("lineStipplePattern" ::: Word16)
   -> IO ())
vkCmdSetLineStippleKHRPtr
  String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetLineStippleKHR" (Ptr CommandBuffer_T
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> IO ()
vkCmdSetLineStippleKHR'
                                               (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                               ("lineStippleFactor" ::: Word32
lineStippleFactor)
                                               ("lineStipplePattern" ::: Word16
lineStipplePattern))
  () -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()


-- No documentation found for TopLevel "VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT"
pattern $mLINE_RASTERIZATION_MODE_DEFAULT_EXT :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_DEFAULT_EXT :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_DEFAULT_EXT = LINE_RASTERIZATION_MODE_DEFAULT_KHR


-- No documentation found for TopLevel "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT"
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR_EXT :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR_EXT :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = LINE_RASTERIZATION_MODE_RECTANGULAR_KHR


-- No documentation found for TopLevel "VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT"
pattern $mLINE_RASTERIZATION_MODE_BRESENHAM_EXT :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_BRESENHAM_EXT :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_BRESENHAM_EXT = LINE_RASTERIZATION_MODE_BRESENHAM_KHR


-- No documentation found for TopLevel "VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT"
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR


-- | VkPhysicalDeviceLineRasterizationFeaturesKHR - Structure describing the
-- line rasterization features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceLineRasterizationFeaturesKHR' 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. 'PhysicalDeviceLineRasterizationFeaturesKHR' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceLineRasterizationFeaturesKHR = PhysicalDeviceLineRasterizationFeaturesKHR
  { -- | #features-rectangularLines# @rectangularLines@ indicates whether the
    -- implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines rectangular line rasterization>.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
rectangularLines :: Bool
  , -- | #features-bresenhamLines# @bresenhamLines@ indicates whether the
    -- implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-bresenham Bresenham-style line rasterization>.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
bresenhamLines :: Bool
  , -- | #features-smoothLines# @smoothLines@ indicates whether the
    -- implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-smooth smooth line rasterization>.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
smoothLines :: Bool
  , -- | #features-stippledRectangularLines# @stippledRectangularLines@ indicates
    -- whether the implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-stipple stippled line rasterization>
    -- with 'LINE_RASTERIZATION_MODE_RECTANGULAR_KHR' lines.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
stippledRectangularLines :: Bool
  , -- | #features-stippledBresenhamLines# @stippledBresenhamLines@ indicates
    -- whether the implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-stipple stippled line rasterization>
    -- with 'LINE_RASTERIZATION_MODE_BRESENHAM_KHR' lines.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
stippledBresenhamLines :: Bool
  , -- | #features-stippledSmoothLines# @stippledSmoothLines@ indicates whether
    -- the implementation supports
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-stipple stippled line rasterization>
    -- with 'LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR' lines.
    PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
stippledSmoothLines :: Bool
  }
  deriving (Typeable, PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
(PhysicalDeviceLineRasterizationFeaturesKHR
 -> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool)
-> (PhysicalDeviceLineRasterizationFeaturesKHR
    -> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool)
-> Eq PhysicalDeviceLineRasterizationFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
== :: PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$c/= :: PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
/= :: PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLineRasterizationFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceLineRasterizationFeaturesKHR

instance ToCStruct PhysicalDeviceLineRasterizationFeaturesKHR where
  withCStruct :: forall b.
PhysicalDeviceLineRasterizationFeaturesKHR
-> (Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b) -> IO b
withCStruct PhysicalDeviceLineRasterizationFeaturesKHR
x Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p -> Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p PhysicalDeviceLineRasterizationFeaturesKHR
x (Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b
f Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p PhysicalDeviceLineRasterizationFeaturesKHR{Bool
$sel:rectangularLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$sel:bresenhamLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$sel:smoothLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$sel:stippledRectangularLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$sel:stippledBresenhamLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
$sel:stippledSmoothLines:PhysicalDeviceLineRasterizationFeaturesKHR :: PhysicalDeviceLineRasterizationFeaturesKHR -> Bool
rectangularLines :: Bool
bresenhamLines :: Bool
smoothLines :: Bool
stippledRectangularLines :: Bool
stippledBresenhamLines :: Bool
stippledSmoothLines :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> 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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rectangularLines))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bresenhamLines))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
smoothLines))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
stippledRectangularLines))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
stippledBresenhamLines))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
stippledSmoothLines))
    IO b
f
  cStructSize :: Int
cStructSize = Int
40
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> 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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> 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))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: 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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: 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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: 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 PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceLineRasterizationFeaturesKHR where
  peekCStruct :: Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> IO PhysicalDeviceLineRasterizationFeaturesKHR
peekCStruct Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p = do
    Bool32
rectangularLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    Bool32
bresenhamLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
smoothLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    Bool32
stippledRectangularLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
    Bool32
stippledBresenhamLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
    Bool32
stippledSmoothLines <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceLineRasterizationFeaturesKHR
p Ptr PhysicalDeviceLineRasterizationFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    PhysicalDeviceLineRasterizationFeaturesKHR
-> IO PhysicalDeviceLineRasterizationFeaturesKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceLineRasterizationFeaturesKHR
 -> IO PhysicalDeviceLineRasterizationFeaturesKHR)
-> PhysicalDeviceLineRasterizationFeaturesKHR
-> IO PhysicalDeviceLineRasterizationFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceLineRasterizationFeaturesKHR
PhysicalDeviceLineRasterizationFeaturesKHR
             (Bool32 -> Bool
bool32ToBool Bool32
rectangularLines)
             (Bool32 -> Bool
bool32ToBool Bool32
bresenhamLines)
             (Bool32 -> Bool
bool32ToBool Bool32
smoothLines)
             (Bool32 -> Bool
bool32ToBool Bool32
stippledRectangularLines)
             (Bool32 -> Bool
bool32ToBool Bool32
stippledBresenhamLines)
             (Bool32 -> Bool
bool32ToBool Bool32
stippledSmoothLines)

instance Storable PhysicalDeviceLineRasterizationFeaturesKHR where
  sizeOf :: PhysicalDeviceLineRasterizationFeaturesKHR -> Int
sizeOf ~PhysicalDeviceLineRasterizationFeaturesKHR
_ = Int
40
  alignment :: PhysicalDeviceLineRasterizationFeaturesKHR -> Int
alignment ~PhysicalDeviceLineRasterizationFeaturesKHR
_ = Int
8
  peek :: Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> IO PhysicalDeviceLineRasterizationFeaturesKHR
peek = Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> IO PhysicalDeviceLineRasterizationFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO ()
poke Ptr PhysicalDeviceLineRasterizationFeaturesKHR
ptr PhysicalDeviceLineRasterizationFeaturesKHR
poked = Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceLineRasterizationFeaturesKHR
-> PhysicalDeviceLineRasterizationFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationFeaturesKHR
ptr PhysicalDeviceLineRasterizationFeaturesKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceLineRasterizationFeaturesKHR where
  zero :: PhysicalDeviceLineRasterizationFeaturesKHR
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceLineRasterizationFeaturesKHR
PhysicalDeviceLineRasterizationFeaturesKHR
           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


-- | VkPhysicalDeviceLineRasterizationPropertiesKHR - Structure describing
-- line rasterization properties supported by an implementation
--
-- = Description
--
-- If the 'PhysicalDeviceLineRasterizationPropertiesKHR' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_line_rasterization VK_EXT_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceLineRasterizationPropertiesKHR = PhysicalDeviceLineRasterizationPropertiesKHR
  { -- | #limits-lineSubPixelPrecisionBits# @lineSubPixelPrecisionBits@ is the
    -- number of bits of subpixel precision in framebuffer coordinates xf and
    -- yf when rasterizing
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines line segments>.
    PhysicalDeviceLineRasterizationPropertiesKHR
-> "lineStippleFactor" ::: Word32
lineSubPixelPrecisionBits :: Word32 }
  deriving (Typeable, PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool
(PhysicalDeviceLineRasterizationPropertiesKHR
 -> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool)
-> (PhysicalDeviceLineRasterizationPropertiesKHR
    -> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool)
-> Eq PhysicalDeviceLineRasterizationPropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool
== :: PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool
$c/= :: PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool
/= :: PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLineRasterizationPropertiesKHR)
#endif
deriving instance Show PhysicalDeviceLineRasterizationPropertiesKHR

instance ToCStruct PhysicalDeviceLineRasterizationPropertiesKHR where
  withCStruct :: forall b.
PhysicalDeviceLineRasterizationPropertiesKHR
-> (Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceLineRasterizationPropertiesKHR
x Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b)
 -> IO b)
-> (Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p -> Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p PhysicalDeviceLineRasterizationPropertiesKHR
x (Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b
f Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p PhysicalDeviceLineRasterizationPropertiesKHR{"lineStippleFactor" ::: Word32
$sel:lineSubPixelPrecisionBits:PhysicalDeviceLineRasterizationPropertiesKHR :: PhysicalDeviceLineRasterizationPropertiesKHR
-> "lineStippleFactor" ::: Word32
lineSubPixelPrecisionBits :: "lineStippleFactor" ::: Word32
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("lineStippleFactor" ::: Word32)
-> ("lineStippleFactor" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ("lineStippleFactor" ::: Word32
lineSubPixelPrecisionBits)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceLineRasterizationPropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("lineStippleFactor" ::: Word32)
-> ("lineStippleFactor" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ("lineStippleFactor" ::: Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceLineRasterizationPropertiesKHR where
  peekCStruct :: Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> IO PhysicalDeviceLineRasterizationPropertiesKHR
peekCStruct Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p = do
    "lineStippleFactor" ::: Word32
lineSubPixelPrecisionBits <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceLineRasterizationPropertiesKHR
p Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    PhysicalDeviceLineRasterizationPropertiesKHR
-> IO PhysicalDeviceLineRasterizationPropertiesKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceLineRasterizationPropertiesKHR
 -> IO PhysicalDeviceLineRasterizationPropertiesKHR)
-> PhysicalDeviceLineRasterizationPropertiesKHR
-> IO PhysicalDeviceLineRasterizationPropertiesKHR
forall a b. (a -> b) -> a -> b
$ ("lineStippleFactor" ::: Word32)
-> PhysicalDeviceLineRasterizationPropertiesKHR
PhysicalDeviceLineRasterizationPropertiesKHR
             "lineStippleFactor" ::: Word32
lineSubPixelPrecisionBits

instance Storable PhysicalDeviceLineRasterizationPropertiesKHR where
  sizeOf :: PhysicalDeviceLineRasterizationPropertiesKHR -> Int
sizeOf ~PhysicalDeviceLineRasterizationPropertiesKHR
_ = Int
24
  alignment :: PhysicalDeviceLineRasterizationPropertiesKHR -> Int
alignment ~PhysicalDeviceLineRasterizationPropertiesKHR
_ = Int
8
  peek :: Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> IO PhysicalDeviceLineRasterizationPropertiesKHR
peek = Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> IO PhysicalDeviceLineRasterizationPropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO ()
poke Ptr PhysicalDeviceLineRasterizationPropertiesKHR
ptr PhysicalDeviceLineRasterizationPropertiesKHR
poked = Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceLineRasterizationPropertiesKHR
-> PhysicalDeviceLineRasterizationPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLineRasterizationPropertiesKHR
ptr PhysicalDeviceLineRasterizationPropertiesKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceLineRasterizationPropertiesKHR where
  zero :: PhysicalDeviceLineRasterizationPropertiesKHR
zero = ("lineStippleFactor" ::: Word32)
-> PhysicalDeviceLineRasterizationPropertiesKHR
PhysicalDeviceLineRasterizationPropertiesKHR
           "lineStippleFactor" ::: Word32
forall a. Zero a => a
zero


-- | VkPipelineRasterizationLineStateCreateInfoKHR - Structure specifying
-- parameters of a newly created pipeline line rasterization state
--
-- = Description
--
-- If @stippledLineEnable@ is 'Vulkan.Core10.FundamentalTypes.FALSE', the
-- values of @lineStippleFactor@ and @lineStipplePattern@ are ignored.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-02768#
--     If @lineRasterizationMode@ is
--     'LINE_RASTERIZATION_MODE_RECTANGULAR_KHR', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-rectangularLines rectangularLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-02769#
--     If @lineRasterizationMode@ is
--     'LINE_RASTERIZATION_MODE_BRESENHAM_KHR', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-bresenhamLines bresenhamLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-02770#
--     If @lineRasterizationMode@ is
--     'LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-smoothLines smoothLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-stippledLineEnable-02771#
--     If @stippledLineEnable@ is 'Vulkan.Core10.FundamentalTypes.TRUE' and
--     @lineRasterizationMode@ is
--     'LINE_RASTERIZATION_MODE_RECTANGULAR_KHR', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-stippledRectangularLines stippledRectangularLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-stippledLineEnable-02772#
--     If @stippledLineEnable@ is 'Vulkan.Core10.FundamentalTypes.TRUE' and
--     @lineRasterizationMode@ is 'LINE_RASTERIZATION_MODE_BRESENHAM_KHR',
--     then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-stippledBresenhamLines stippledBresenhamLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-stippledLineEnable-02773#
--     If @stippledLineEnable@ is 'Vulkan.Core10.FundamentalTypes.TRUE' and
--     @lineRasterizationMode@ is
--     'LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-stippledSmoothLines stippledSmoothLines>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-stippledLineEnable-02774#
--     If @stippledLineEnable@ is 'Vulkan.Core10.FundamentalTypes.TRUE' and
--     @lineRasterizationMode@ is 'LINE_RASTERIZATION_MODE_DEFAULT_KHR',
--     then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-stippledRectangularLines stippledRectangularLines>
--     feature /must/ be enabled and
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@strictLines@
--     /must/ be 'Vulkan.Core10.FundamentalTypes.TRUE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR'
--
-- -   #VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-parameter#
--     @lineRasterizationMode@ /must/ be a valid 'LineRasterizationModeKHR'
--     value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_line_rasterization VK_EXT_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'LineRasterizationModeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineRasterizationLineStateCreateInfoKHR = PipelineRasterizationLineStateCreateInfoKHR
  { -- | @lineRasterizationMode@ is a 'LineRasterizationModeKHR' value selecting
    -- the style of line rasterization.
    PipelineRasterizationLineStateCreateInfoKHR
-> LineRasterizationModeKHR
lineRasterizationMode :: LineRasterizationModeKHR
  , -- | @stippledLineEnable@ enables
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-stipple stippled line rasterization>.
    PipelineRasterizationLineStateCreateInfoKHR -> Bool
stippledLineEnable :: Bool
  , -- | @lineStippleFactor@ is the repeat factor used in stippled line
    -- rasterization.
    PipelineRasterizationLineStateCreateInfoKHR
-> "lineStippleFactor" ::: Word32
lineStippleFactor :: Word32
  , -- | @lineStipplePattern@ is the bit pattern used in stippled line
    -- rasterization.
    PipelineRasterizationLineStateCreateInfoKHR
-> "lineStipplePattern" ::: Word16
lineStipplePattern :: Word16
  }
  deriving (Typeable, PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> Bool
(PipelineRasterizationLineStateCreateInfoKHR
 -> PipelineRasterizationLineStateCreateInfoKHR -> Bool)
-> (PipelineRasterizationLineStateCreateInfoKHR
    -> PipelineRasterizationLineStateCreateInfoKHR -> Bool)
-> Eq PipelineRasterizationLineStateCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> Bool
== :: PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> Bool
$c/= :: PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> Bool
/= :: PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineRasterizationLineStateCreateInfoKHR)
#endif
deriving instance Show PipelineRasterizationLineStateCreateInfoKHR

instance ToCStruct PipelineRasterizationLineStateCreateInfoKHR where
  withCStruct :: forall b.
PipelineRasterizationLineStateCreateInfoKHR
-> (Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b)
-> IO b
withCStruct PipelineRasterizationLineStateCreateInfoKHR
x Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b
f = Int
-> (Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b) -> IO b)
-> (Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineRasterizationLineStateCreateInfoKHR
p -> Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO b -> IO b
forall b.
Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineRasterizationLineStateCreateInfoKHR
p PipelineRasterizationLineStateCreateInfoKHR
x (Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b
f Ptr PipelineRasterizationLineStateCreateInfoKHR
p)
  pokeCStruct :: forall b.
Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO b -> IO b
pokeCStruct Ptr PipelineRasterizationLineStateCreateInfoKHR
p PipelineRasterizationLineStateCreateInfoKHR{Bool
"lineStipplePattern" ::: Word16
"lineStippleFactor" ::: Word32
LineRasterizationModeKHR
$sel:lineRasterizationMode:PipelineRasterizationLineStateCreateInfoKHR :: PipelineRasterizationLineStateCreateInfoKHR
-> LineRasterizationModeKHR
$sel:stippledLineEnable:PipelineRasterizationLineStateCreateInfoKHR :: PipelineRasterizationLineStateCreateInfoKHR -> Bool
$sel:lineStippleFactor:PipelineRasterizationLineStateCreateInfoKHR :: PipelineRasterizationLineStateCreateInfoKHR
-> "lineStippleFactor" ::: Word32
$sel:lineStipplePattern:PipelineRasterizationLineStateCreateInfoKHR :: PipelineRasterizationLineStateCreateInfoKHR
-> "lineStipplePattern" ::: Word16
lineRasterizationMode :: LineRasterizationModeKHR
stippledLineEnable :: Bool
lineStippleFactor :: "lineStippleFactor" ::: Word32
lineStipplePattern :: "lineStipplePattern" ::: Word16
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr LineRasterizationModeKHR -> LineRasterizationModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr LineRasterizationModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr LineRasterizationModeKHR)) (LineRasterizationModeKHR
lineRasterizationMode)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
stippledLineEnable))
    Ptr ("lineStippleFactor" ::: Word32)
-> ("lineStippleFactor" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("lineStippleFactor" ::: Word32
lineStippleFactor)
    Ptr ("lineStipplePattern" ::: Word16)
-> ("lineStipplePattern" ::: Word16) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStipplePattern" ::: Word16)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word16)) ("lineStipplePattern" ::: Word16
lineStipplePattern)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PipelineRasterizationLineStateCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr PipelineRasterizationLineStateCreateInfoKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr LineRasterizationModeKHR -> LineRasterizationModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr LineRasterizationModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr LineRasterizationModeKHR)) (LineRasterizationModeKHR
forall a. Zero a => a
zero)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr ("lineStippleFactor" ::: Word32)
-> ("lineStippleFactor" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("lineStippleFactor" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("lineStipplePattern" ::: Word16)
-> ("lineStipplePattern" ::: Word16) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStipplePattern" ::: Word16)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word16)) ("lineStipplePattern" ::: Word16
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PipelineRasterizationLineStateCreateInfoKHR where
  peekCStruct :: Ptr PipelineRasterizationLineStateCreateInfoKHR
-> IO PipelineRasterizationLineStateCreateInfoKHR
peekCStruct Ptr PipelineRasterizationLineStateCreateInfoKHR
p = do
    LineRasterizationModeKHR
lineRasterizationMode <- forall a. Storable a => Ptr a -> IO a
peek @LineRasterizationModeKHR ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr LineRasterizationModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr LineRasterizationModeKHR))
    Bool32
stippledLineEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    "lineStippleFactor" ::: Word32
lineStippleFactor <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStippleFactor" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
    "lineStipplePattern" ::: Word16
lineStipplePattern <- forall a. Storable a => Ptr a -> IO a
peek @Word16 ((Ptr PipelineRasterizationLineStateCreateInfoKHR
p Ptr PipelineRasterizationLineStateCreateInfoKHR
-> Int -> Ptr ("lineStipplePattern" ::: Word16)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word16))
    PipelineRasterizationLineStateCreateInfoKHR
-> IO PipelineRasterizationLineStateCreateInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineRasterizationLineStateCreateInfoKHR
 -> IO PipelineRasterizationLineStateCreateInfoKHR)
-> PipelineRasterizationLineStateCreateInfoKHR
-> IO PipelineRasterizationLineStateCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ LineRasterizationModeKHR
-> Bool
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> PipelineRasterizationLineStateCreateInfoKHR
PipelineRasterizationLineStateCreateInfoKHR
             LineRasterizationModeKHR
lineRasterizationMode
             (Bool32 -> Bool
bool32ToBool Bool32
stippledLineEnable)
             "lineStippleFactor" ::: Word32
lineStippleFactor
             "lineStipplePattern" ::: Word16
lineStipplePattern

instance Storable PipelineRasterizationLineStateCreateInfoKHR where
  sizeOf :: PipelineRasterizationLineStateCreateInfoKHR -> Int
sizeOf ~PipelineRasterizationLineStateCreateInfoKHR
_ = Int
32
  alignment :: PipelineRasterizationLineStateCreateInfoKHR -> Int
alignment ~PipelineRasterizationLineStateCreateInfoKHR
_ = Int
8
  peek :: Ptr PipelineRasterizationLineStateCreateInfoKHR
-> IO PipelineRasterizationLineStateCreateInfoKHR
peek = Ptr PipelineRasterizationLineStateCreateInfoKHR
-> IO PipelineRasterizationLineStateCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO ()
poke Ptr PipelineRasterizationLineStateCreateInfoKHR
ptr PipelineRasterizationLineStateCreateInfoKHR
poked = Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO () -> IO ()
forall b.
Ptr PipelineRasterizationLineStateCreateInfoKHR
-> PipelineRasterizationLineStateCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineRasterizationLineStateCreateInfoKHR
ptr PipelineRasterizationLineStateCreateInfoKHR
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PipelineRasterizationLineStateCreateInfoKHR where
  zero :: PipelineRasterizationLineStateCreateInfoKHR
zero = LineRasterizationModeKHR
-> Bool
-> ("lineStippleFactor" ::: Word32)
-> ("lineStipplePattern" ::: Word16)
-> PipelineRasterizationLineStateCreateInfoKHR
PipelineRasterizationLineStateCreateInfoKHR
           LineRasterizationModeKHR
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           "lineStippleFactor" ::: Word32
forall a. Zero a => a
zero
           "lineStipplePattern" ::: Word16
forall a. Zero a => a
zero


-- | VkLineRasterizationModeKHR - Line rasterization modes
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_line_rasterization VK_EXT_line_rasterization>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_line_rasterization VK_KHR_line_rasterization>,
-- 'PipelineRasterizationLineStateCreateInfoKHR',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state3.cmdSetLineRasterizationModeEXT'
newtype LineRasterizationModeKHR = LineRasterizationModeKHR Int32
  deriving newtype (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
(LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> Eq LineRasterizationModeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
== :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
$c/= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
/= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
Eq, Eq LineRasterizationModeKHR
Eq LineRasterizationModeKHR =>
(LineRasterizationModeKHR -> LineRasterizationModeKHR -> Ordering)
-> (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> (LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool)
-> (LineRasterizationModeKHR
    -> LineRasterizationModeKHR -> LineRasterizationModeKHR)
-> (LineRasterizationModeKHR
    -> LineRasterizationModeKHR -> LineRasterizationModeKHR)
-> Ord LineRasterizationModeKHR
LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
LineRasterizationModeKHR -> LineRasterizationModeKHR -> Ordering
LineRasterizationModeKHR
-> LineRasterizationModeKHR -> LineRasterizationModeKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Ordering
compare :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Ordering
$c< :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
< :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
$c<= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
<= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
$c> :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
> :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
$c>= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
>= :: LineRasterizationModeKHR -> LineRasterizationModeKHR -> Bool
$cmax :: LineRasterizationModeKHR
-> LineRasterizationModeKHR -> LineRasterizationModeKHR
max :: LineRasterizationModeKHR
-> LineRasterizationModeKHR -> LineRasterizationModeKHR
$cmin :: LineRasterizationModeKHR
-> LineRasterizationModeKHR -> LineRasterizationModeKHR
min :: LineRasterizationModeKHR
-> LineRasterizationModeKHR -> LineRasterizationModeKHR
Ord, Ptr LineRasterizationModeKHR -> IO LineRasterizationModeKHR
Ptr LineRasterizationModeKHR -> Int -> IO LineRasterizationModeKHR
Ptr LineRasterizationModeKHR
-> Int -> LineRasterizationModeKHR -> IO ()
Ptr LineRasterizationModeKHR -> LineRasterizationModeKHR -> IO ()
LineRasterizationModeKHR -> Int
(LineRasterizationModeKHR -> Int)
-> (LineRasterizationModeKHR -> Int)
-> (Ptr LineRasterizationModeKHR
    -> Int -> IO LineRasterizationModeKHR)
-> (Ptr LineRasterizationModeKHR
    -> Int -> LineRasterizationModeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO LineRasterizationModeKHR)
-> (forall b. Ptr b -> Int -> LineRasterizationModeKHR -> IO ())
-> (Ptr LineRasterizationModeKHR -> IO LineRasterizationModeKHR)
-> (Ptr LineRasterizationModeKHR
    -> LineRasterizationModeKHR -> IO ())
-> Storable LineRasterizationModeKHR
forall b. Ptr b -> Int -> IO LineRasterizationModeKHR
forall b. Ptr b -> Int -> LineRasterizationModeKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
$csizeOf :: LineRasterizationModeKHR -> Int
sizeOf :: LineRasterizationModeKHR -> Int
$calignment :: LineRasterizationModeKHR -> Int
alignment :: LineRasterizationModeKHR -> Int
$cpeekElemOff :: Ptr LineRasterizationModeKHR -> Int -> IO LineRasterizationModeKHR
peekElemOff :: Ptr LineRasterizationModeKHR -> Int -> IO LineRasterizationModeKHR
$cpokeElemOff :: Ptr LineRasterizationModeKHR
-> Int -> LineRasterizationModeKHR -> IO ()
pokeElemOff :: Ptr LineRasterizationModeKHR
-> Int -> LineRasterizationModeKHR -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO LineRasterizationModeKHR
peekByteOff :: forall b. Ptr b -> Int -> IO LineRasterizationModeKHR
$cpokeByteOff :: forall b. Ptr b -> Int -> LineRasterizationModeKHR -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> LineRasterizationModeKHR -> IO ()
$cpeek :: Ptr LineRasterizationModeKHR -> IO LineRasterizationModeKHR
peek :: Ptr LineRasterizationModeKHR -> IO LineRasterizationModeKHR
$cpoke :: Ptr LineRasterizationModeKHR -> LineRasterizationModeKHR -> IO ()
poke :: Ptr LineRasterizationModeKHR -> LineRasterizationModeKHR -> IO ()
Storable, LineRasterizationModeKHR
LineRasterizationModeKHR -> Zero LineRasterizationModeKHR
forall a. a -> Zero a
$czero :: LineRasterizationModeKHR
zero :: LineRasterizationModeKHR
Zero)

-- | 'LINE_RASTERIZATION_MODE_DEFAULT_KHR' is equivalent to
-- 'LINE_RASTERIZATION_MODE_RECTANGULAR_KHR' if
-- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@strictLines@
-- is 'Vulkan.Core10.FundamentalTypes.TRUE', otherwise lines are drawn as
-- non-@strictLines@ parallelograms. Both of these modes are defined in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-basic Basic Line Segment Rasterization>.
pattern $mLINE_RASTERIZATION_MODE_DEFAULT_KHR :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_DEFAULT_KHR :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_DEFAULT_KHR = LineRasterizationModeKHR 0

-- | 'LINE_RASTERIZATION_MODE_RECTANGULAR_KHR' specifies lines drawn as if
-- they were rectangles extruded from the line
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR_KHR :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR_KHR :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = LineRasterizationModeKHR 1

-- | 'LINE_RASTERIZATION_MODE_BRESENHAM_KHR' specifies lines drawn by
-- determining which pixel diamonds the line intersects and exits, as
-- defined in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-bresenham Bresenham Line Segment Rasterization>.
pattern $mLINE_RASTERIZATION_MODE_BRESENHAM_KHR :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_BRESENHAM_KHR :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_BRESENHAM_KHR = LineRasterizationModeKHR 2

-- | 'LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR' specifies lines drawn
-- if they were rectangles extruded from the line, with alpha falloff, as
-- defined in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-lines-smooth Smooth Lines>.
pattern $mLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR :: forall {r}.
LineRasterizationModeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR :: LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = LineRasterizationModeKHR 3

{-# COMPLETE
  LINE_RASTERIZATION_MODE_DEFAULT_KHR
  , LINE_RASTERIZATION_MODE_RECTANGULAR_KHR
  , LINE_RASTERIZATION_MODE_BRESENHAM_KHR
  , LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR ::
    LineRasterizationModeKHR
  #-}

conNameLineRasterizationModeKHR :: String
conNameLineRasterizationModeKHR :: String
conNameLineRasterizationModeKHR = String
"LineRasterizationModeKHR"

enumPrefixLineRasterizationModeKHR :: String
enumPrefixLineRasterizationModeKHR :: String
enumPrefixLineRasterizationModeKHR = String
"LINE_RASTERIZATION_MODE_"

showTableLineRasterizationModeKHR :: [(LineRasterizationModeKHR, String)]
showTableLineRasterizationModeKHR :: [(LineRasterizationModeKHR, String)]
showTableLineRasterizationModeKHR =
  [
    ( LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_DEFAULT_KHR
    , String
"DEFAULT_KHR"
    )
  ,
    ( LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_KHR
    , String
"RECTANGULAR_KHR"
    )
  ,
    ( LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_BRESENHAM_KHR
    , String
"BRESENHAM_KHR"
    )
  ,
    ( LineRasterizationModeKHR
LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR
    , String
"RECTANGULAR_SMOOTH_KHR"
    )
  ]

instance Show LineRasterizationModeKHR where
  showsPrec :: Int -> LineRasterizationModeKHR -> ShowS
showsPrec =
    String
-> [(LineRasterizationModeKHR, String)]
-> String
-> (LineRasterizationModeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> LineRasterizationModeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixLineRasterizationModeKHR
      [(LineRasterizationModeKHR, String)]
showTableLineRasterizationModeKHR
      String
conNameLineRasterizationModeKHR
      (\(LineRasterizationModeKHR Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read LineRasterizationModeKHR where
  readPrec :: ReadPrec LineRasterizationModeKHR
readPrec =
    String
-> [(LineRasterizationModeKHR, String)]
-> String
-> (Int32 -> LineRasterizationModeKHR)
-> ReadPrec LineRasterizationModeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixLineRasterizationModeKHR
      [(LineRasterizationModeKHR, String)]
showTableLineRasterizationModeKHR
      String
conNameLineRasterizationModeKHR
      Int32 -> LineRasterizationModeKHR
LineRasterizationModeKHR

type KHR_LINE_RASTERIZATION_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_KHR_LINE_RASTERIZATION_SPEC_VERSION"
pattern KHR_LINE_RASTERIZATION_SPEC_VERSION :: forall a . Integral a => a
pattern $mKHR_LINE_RASTERIZATION_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_LINE_RASTERIZATION_SPEC_VERSION :: forall a. Integral a => a
KHR_LINE_RASTERIZATION_SPEC_VERSION = 1


type KHR_LINE_RASTERIZATION_EXTENSION_NAME = "VK_KHR_line_rasterization"

-- No documentation found for TopLevel "VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME"
pattern KHR_LINE_RASTERIZATION_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mKHR_LINE_RASTERIZATION_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_LINE_RASTERIZATION_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
KHR_LINE_RASTERIZATION_EXTENSION_NAME = "VK_KHR_line_rasterization"