{-# language CPP #-}
-- | = Name
--
-- VK_NV_viewport_swizzle - device extension
--
-- == VK_NV_viewport_swizzle
--
-- [__Name String__]
--     @VK_NV_viewport_swizzle@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     99
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
-- [__Contact__]
--
--     -   Piers Daniell
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_NV_viewport_swizzle:%20&body=@pdaniell-nv%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2016-12-22
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires @multiViewport@ and @geometryShader@
--         features to be useful.
--
-- [__Contributors__]
--
--     -   Daniel Koch, NVIDIA
--
--     -   Jeff Bolz, NVIDIA
--
-- == Description
--
-- This extension provides a new per-viewport swizzle that can modify the
-- position of primitives sent to each viewport. New viewport swizzle state
-- is added for each viewport, and a new position vector is computed for
-- each vertex by selecting from and optionally negating any of the four
-- components of the original position vector.
--
-- This new viewport swizzle is useful for a number of algorithms,
-- including single-pass cubemap rendering (broadcasting a primitive to
-- multiple faces and reorienting the vertex position for each face) and
-- voxel rasterization. The per-viewport component remapping and negation
-- provided by the swizzle allows application code to re-orient
-- three-dimensional geometry with a view along any of the __X__, __Y__, or
-- __Z__ axes. If a perspective projection and depth buffering is required,
-- 1\/W buffering should be used, as described in the single-pass cubemap
-- rendering example in the “Issues” section below.
--
-- == New Structures
--
-- -   'ViewportSwizzleNV'
--
-- -   Extending 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo':
--
--     -   'PipelineViewportSwizzleStateCreateInfoNV'
--
-- == New Enums
--
-- -   'ViewportCoordinateSwizzleNV'
--
-- == New Bitmasks
--
-- -   'PipelineViewportSwizzleStateCreateFlagsNV'
--
-- == New Enum Constants
--
-- -   'NV_VIEWPORT_SWIZZLE_EXTENSION_NAME'
--
-- -   'NV_VIEWPORT_SWIZZLE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV'
--
-- == Issues
--
-- 1) Where does viewport swizzling occur in the pipeline?
--
-- __RESOLVED__: Despite being associated with the viewport, viewport
-- swizzling must happen prior to the viewport transform. In particular, it
-- needs to be performed before clipping and perspective division.
--
-- The viewport mask expansion (@VK_NV_viewport_array2@) and the viewport
-- swizzle could potentially be performed before or after transform
-- feedback, but feeding back several viewports worth of primitives with
-- different swizzles doesn’t seem particularly useful. This specification
-- applies the viewport mask and swizzle after transform feedback, and
-- makes primitive queries only count each primitive once.
--
-- 2) Any interesting examples of how this extension,
-- @VK_NV_viewport_array2@, and @VK_NV_geometry_shader_passthrough@ can be
-- used together in practice?
--
-- __RESOLVED__: One interesting use case for this extension is for
-- single-pass rendering to a cubemap. In this example, the application
-- would attach a cubemap texture to a layered FBO where the six cube faces
-- are treated as layers. Vertices are sent through the vertex shader
-- without applying a projection matrix, where the @gl_Position@ output is
-- (x,y,z,1) and the center of the cubemap is at (0,0,0). With unextended
-- Vulkan, one could have a conventional instanced geometry shader that
-- looks something like the following:
--
-- > layout(invocations = 6) in;     // separate invocation per face
-- > layout(triangles) in;
-- > layout(triangle_strip) out;
-- > layout(max_vertices = 3) out;
-- >
-- > in Inputs {
-- > vec2 texcoord;
-- > vec3 normal;
-- > vec4 baseColor;
-- > } v[];
-- >
-- >     out Outputs {
-- >     vec2 texcoord;
-- >     vec3 normal;
-- >     vec4 baseColor;
-- >     };
-- >
-- >     void main()
-- >     {
-- >     int face = gl_InvocationID;  // which face am I?
-- >
-- >     // Project gl_Position for each vertex onto the cube map face.
-- >     vec4 positions[3];
-- >     for (int i = 0; i < 3; i++) {
-- >         positions[i] = rotate(gl_in[i].gl_Position, face);
-- >     }
-- >
-- >     // If the primitive doesn't project onto this face, we're done.
-- >     if (shouldCull(positions)) {
-- >         return;
-- >     }
-- >
-- >     // Otherwise, emit a copy of the input primitive to the
-- >     // appropriate face (using gl_Layer).
-- >     for (int i = 0; i < 3; i++) {
-- >         gl_Layer = face;
-- >         gl_Position = positions[i];
-- >         texcoord = v[i].texcoord;
-- >         normal = v[i].normal;
-- >         baseColor = v[i].baseColor;
-- >         EmitVertex();
-- >     }
-- > }
--
-- With passthrough geometry shaders, this can be done using a much simpler
-- shader:
--
-- > layout(triangles) in;
-- > layout(passthrough) in Inputs {
-- >     vec2 texcoord;
-- >     vec3 normal;
-- >     vec4 baseColor;
-- > }
-- > layout(passthrough) in gl_PerVertex {
-- >     vec4 gl_Position;
-- > } gl_in[];
-- > layout(viewport_relative) out int gl_Layer;
-- >
-- > void main()
-- > {
-- >     // Figure out which faces the primitive projects onto and
-- >     // generate a corresponding viewport mask.
-- >     uint mask = 0;
-- >     for (int i = 0; i < 6; i++) {
-- >         if (!shouldCull(face)) {
-- >         mask |= 1U << i;
-- >         }
-- >     }
-- >     gl_ViewportMask = mask;
-- >     gl_Layer = 0;
-- > }
--
-- The application code is set up so that each of the six cube faces has a
-- separate viewport (numbered 0 to 5). Each face also has a separate
-- swizzle, programmed via the 'PipelineViewportSwizzleStateCreateInfoNV'
-- pipeline state. The viewport swizzle feature performs the coordinate
-- transformation handled by the @rotate@() function in the original
-- shader. The @viewport_relative@ layout qualifier says that the viewport
-- number (0 to 5) is added to the base @gl_Layer@ value of 0 to determine
-- which layer (cube face) the primitive should be sent to.
--
-- Note that the use of the passed through input @normal@ in this example
-- suggests that the fragment shader in this example would perform an
-- operation like per-fragment lighting. The viewport swizzle would
-- transform the position to be face-relative, but @normal@ would remain in
-- the original coordinate system. It seems likely that the fragment shader
-- in either version of the example would want to perform lighting in the
-- original coordinate system. It would likely do this by reconstructing
-- the position of the fragment in the original coordinate system using
-- @gl_FragCoord@, a constant or uniform holding the size of the cube face,
-- and the input @gl_ViewportIndex@ (or @gl_Layer@), which identifies the
-- cube face. Since the value of @normal@ is in the original coordinate
-- system, it would not need to be modified as part of this coordinate
-- transformation.
--
-- Note that while the @rotate@() operation in the regular geometry shader
-- above could include an arbitrary post-rotation projection matrix, the
-- viewport swizzle does not support arbitrary math. To get proper
-- projection, 1\/W buffering should be used. To do this:
--
-- 1.  Program the viewport swizzles to move the pre-projection W eye
--     coordinate (typically 1.0) into the Z coordinate of the swizzle
--     output and the eye coordinate component used for depth into the W
--     coordinate. For example, the viewport corresponding to the +Z face
--     might use a swizzle of (+X, -Y, +W, +Z). The Z normalized device
--     coordinate computed after swizzling would then be z\'\/w\' =
--     1\/Zeye.
--
-- 2.  On NVIDIA implementations supporting floating-point depth buffers
--     with values outside [0,1], prevent unwanted near plane clipping by
--     enabling @depthClampEnable@. Ensure that the depth clamp doesn’t
--     mess up depth testing by programming the depth range to very large
--     values, such as @minDepthBounds@=-z, @maxDepthBounds@=+z, where z =
--     2127. It should be possible to use IEEE infinity encodings also
--     (@0xFF800000@ for @-INF@, @0x7F800000@ for @+INF@). Even when
--     near\/far clipping is disabled, primitives extending behind the eye
--     will still be clipped because one or more vertices will have a
--     negative W coordinate and fail X\/Y clipping tests.
--
--     On other implementations, scale X, Y, and Z eye coordinates so that
--     vertices on the near plane have a post-swizzle W coordinate of 1.0.
--     For example, if the near plane is at Zeye = 1\/256, scale X, Y, and
--     Z by 256.
--
-- 3.  Adjust depth testing to reflect the fact that 1\/W values are large
--     near the eye and small away from the eye. Clear the depth buffer to
--     zero (infinitely far away) and use a depth test of
--     'Vulkan.Core10.Enums.CompareOp.COMPARE_OP_GREATER' instead of
--     'Vulkan.Core10.Enums.CompareOp.COMPARE_OP_LESS'.
--
-- == Version History
--
-- -   Revision 1, 2016-12-22 (Piers Daniell)
--
--     -   Internal revisions
--
-- = See Also
--
-- 'PipelineViewportSwizzleStateCreateFlagsNV',
-- 'PipelineViewportSwizzleStateCreateInfoNV',
-- 'ViewportCoordinateSwizzleNV', 'ViewportSwizzleNV'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_viewport_swizzle Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_viewport_swizzle  ( ViewportSwizzleNV(..)
                                                 , PipelineViewportSwizzleStateCreateInfoNV(..)
                                                 , PipelineViewportSwizzleStateCreateFlagsNV(..)
                                                 , ViewportCoordinateSwizzleNV( VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV
                                                                              , VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV
                                                                              , ..
                                                                              )
                                                 , NV_VIEWPORT_SWIZZLE_SPEC_VERSION
                                                 , pattern NV_VIEWPORT_SWIZZLE_SPEC_VERSION
                                                 , NV_VIEWPORT_SWIZZLE_EXTENSION_NAME
                                                 , pattern NV_VIEWPORT_SWIZZLE_EXTENSION_NAME
                                                 ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV))
-- | VkViewportSwizzleNV - Structure specifying a viewport swizzle
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'PipelineViewportSwizzleStateCreateInfoNV',
-- 'ViewportCoordinateSwizzleNV'
data ViewportSwizzleNV = ViewportSwizzleNV
  { -- | @x@ is a 'ViewportCoordinateSwizzleNV' value specifying the swizzle
    -- operation to apply to the x component of the primitive
    --
    -- #VUID-VkViewportSwizzleNV-x-parameter# @x@ /must/ be a valid
    -- 'ViewportCoordinateSwizzleNV' value
    ViewportSwizzleNV -> ViewportCoordinateSwizzleNV
x :: ViewportCoordinateSwizzleNV
  , -- | @y@ is a 'ViewportCoordinateSwizzleNV' value specifying the swizzle
    -- operation to apply to the y component of the primitive
    --
    -- #VUID-VkViewportSwizzleNV-y-parameter# @y@ /must/ be a valid
    -- 'ViewportCoordinateSwizzleNV' value
    ViewportSwizzleNV -> ViewportCoordinateSwizzleNV
y :: ViewportCoordinateSwizzleNV
  , -- | @z@ is a 'ViewportCoordinateSwizzleNV' value specifying the swizzle
    -- operation to apply to the z component of the primitive
    --
    -- #VUID-VkViewportSwizzleNV-z-parameter# @z@ /must/ be a valid
    -- 'ViewportCoordinateSwizzleNV' value
    ViewportSwizzleNV -> ViewportCoordinateSwizzleNV
z :: ViewportCoordinateSwizzleNV
  , -- | @w@ is a 'ViewportCoordinateSwizzleNV' value specifying the swizzle
    -- operation to apply to the w component of the primitive
    --
    -- #VUID-VkViewportSwizzleNV-w-parameter# @w@ /must/ be a valid
    -- 'ViewportCoordinateSwizzleNV' value
    ViewportSwizzleNV -> ViewportCoordinateSwizzleNV
w :: ViewportCoordinateSwizzleNV
  }
  deriving (Typeable, ViewportSwizzleNV -> ViewportSwizzleNV -> Bool
(ViewportSwizzleNV -> ViewportSwizzleNV -> Bool)
-> (ViewportSwizzleNV -> ViewportSwizzleNV -> Bool)
-> Eq ViewportSwizzleNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViewportSwizzleNV -> ViewportSwizzleNV -> Bool
$c/= :: ViewportSwizzleNV -> ViewportSwizzleNV -> Bool
== :: ViewportSwizzleNV -> ViewportSwizzleNV -> Bool
$c== :: ViewportSwizzleNV -> ViewportSwizzleNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ViewportSwizzleNV)
#endif
deriving instance Show ViewportSwizzleNV

instance ToCStruct ViewportSwizzleNV where
  withCStruct :: ViewportSwizzleNV -> (Ptr ViewportSwizzleNV -> IO b) -> IO b
withCStruct x :: ViewportSwizzleNV
x f :: Ptr ViewportSwizzleNV -> IO b
f = Int -> Int -> (Ptr ViewportSwizzleNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 16 4 ((Ptr ViewportSwizzleNV -> IO b) -> IO b)
-> (Ptr ViewportSwizzleNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr ViewportSwizzleNV
p -> Ptr ViewportSwizzleNV -> ViewportSwizzleNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ViewportSwizzleNV
p ViewportSwizzleNV
x (Ptr ViewportSwizzleNV -> IO b
f Ptr ViewportSwizzleNV
p)
  pokeCStruct :: Ptr ViewportSwizzleNV -> ViewportSwizzleNV -> IO b -> IO b
pokeCStruct p :: Ptr ViewportSwizzleNV
p ViewportSwizzleNV{..} f :: IO b
f = do
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
x)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
y)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
z)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
w)
    IO b
f
  cStructSize :: Int
cStructSize = 16
  cStructAlignment :: Int
cStructAlignment = 4
  pokeZeroCStruct :: Ptr ViewportSwizzleNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr ViewportSwizzleNV
p f :: IO b
f = do
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero)
    Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr ViewportCoordinateSwizzleNV)) (ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ViewportSwizzleNV where
  peekCStruct :: Ptr ViewportSwizzleNV -> IO ViewportSwizzleNV
peekCStruct p :: Ptr ViewportSwizzleNV
p = do
    ViewportCoordinateSwizzleNV
x <- Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
forall a. Storable a => Ptr a -> IO a
peek @ViewportCoordinateSwizzleNV ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr ViewportCoordinateSwizzleNV))
    ViewportCoordinateSwizzleNV
y <- Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
forall a. Storable a => Ptr a -> IO a
peek @ViewportCoordinateSwizzleNV ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr ViewportCoordinateSwizzleNV))
    ViewportCoordinateSwizzleNV
z <- Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
forall a. Storable a => Ptr a -> IO a
peek @ViewportCoordinateSwizzleNV ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr ViewportCoordinateSwizzleNV))
    ViewportCoordinateSwizzleNV
w <- Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
forall a. Storable a => Ptr a -> IO a
peek @ViewportCoordinateSwizzleNV ((Ptr ViewportSwizzleNV
p Ptr ViewportSwizzleNV -> Int -> Ptr ViewportCoordinateSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr ViewportCoordinateSwizzleNV))
    ViewportSwizzleNV -> IO ViewportSwizzleNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ViewportSwizzleNV -> IO ViewportSwizzleNV)
-> ViewportSwizzleNV -> IO ViewportSwizzleNV
forall a b. (a -> b) -> a -> b
$ ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportSwizzleNV
ViewportSwizzleNV
             ViewportCoordinateSwizzleNV
x ViewportCoordinateSwizzleNV
y ViewportCoordinateSwizzleNV
z ViewportCoordinateSwizzleNV
w

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

instance Zero ViewportSwizzleNV where
  zero :: ViewportSwizzleNV
zero = ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV
-> ViewportSwizzleNV
ViewportSwizzleNV
           ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero
           ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero
           ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero
           ViewportCoordinateSwizzleNV
forall a. Zero a => a
zero


-- | VkPipelineViewportSwizzleStateCreateInfoNV - Structure specifying
-- swizzle applied to primitive clip coordinates
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'PipelineViewportSwizzleStateCreateFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType', 'ViewportSwizzleNV'
data PipelineViewportSwizzleStateCreateInfoNV = PipelineViewportSwizzleStateCreateInfoNV
  { -- | @flags@ is reserved for future use.
    --
    -- #VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask#
    -- @flags@ /must/ be @0@
    PipelineViewportSwizzleStateCreateInfoNV
-> PipelineViewportSwizzleStateCreateFlagsNV
flags :: PipelineViewportSwizzleStateCreateFlagsNV
  , -- | @pViewportSwizzles@ is a pointer to an array of 'ViewportSwizzleNV'
    -- structures, defining the viewport swizzles.
    --
    -- #VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pViewportSwizzles-parameter#
    -- @pViewportSwizzles@ /must/ be a valid pointer to an array of
    -- @viewportCount@ valid 'ViewportSwizzleNV' structures
    PipelineViewportSwizzleStateCreateInfoNV
-> Vector ViewportSwizzleNV
viewportSwizzles :: Vector ViewportSwizzleNV
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineViewportSwizzleStateCreateInfoNV)
#endif
deriving instance Show PipelineViewportSwizzleStateCreateInfoNV

instance ToCStruct PipelineViewportSwizzleStateCreateInfoNV where
  withCStruct :: PipelineViewportSwizzleStateCreateInfoNV
-> (Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b) -> IO b
withCStruct x :: PipelineViewportSwizzleStateCreateInfoNV
x f :: Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b
f = Int
-> Int
-> (Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b) -> IO b)
-> (Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PipelineViewportSwizzleStateCreateInfoNV
p -> Ptr PipelineViewportSwizzleStateCreateInfoNV
-> PipelineViewportSwizzleStateCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineViewportSwizzleStateCreateInfoNV
p PipelineViewportSwizzleStateCreateInfoNV
x (Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b
f Ptr PipelineViewportSwizzleStateCreateInfoNV
p)
  pokeCStruct :: Ptr PipelineViewportSwizzleStateCreateInfoNV
-> PipelineViewportSwizzleStateCreateInfoNV -> IO b -> IO b
pokeCStruct p :: Ptr PipelineViewportSwizzleStateCreateInfoNV
p PipelineViewportSwizzleStateCreateInfoNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr PipelineViewportSwizzleStateCreateFlagsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineViewportSwizzleStateCreateFlagsNV)) (PipelineViewportSwizzleStateCreateFlagsNV
flags)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ViewportSwizzleNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ViewportSwizzleNV -> Int)
-> Vector ViewportSwizzleNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ViewportSwizzleNV
viewportSwizzles)) :: Word32))
    Ptr ViewportSwizzleNV
pPViewportSwizzles' <- ((Ptr ViewportSwizzleNV -> IO b) -> IO b)
-> ContT b IO (Ptr ViewportSwizzleNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ViewportSwizzleNV -> IO b) -> IO b)
 -> ContT b IO (Ptr ViewportSwizzleNV))
-> ((Ptr ViewportSwizzleNV -> IO b) -> IO b)
-> ContT b IO (Ptr ViewportSwizzleNV)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ViewportSwizzleNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ViewportSwizzleNV ((Vector ViewportSwizzleNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ViewportSwizzleNV
viewportSwizzles)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 16) 4
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> ViewportSwizzleNV -> IO ())
-> Vector ViewportSwizzleNV -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ViewportSwizzleNV
e -> Ptr ViewportSwizzleNV -> ViewportSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ViewportSwizzleNV
pPViewportSwizzles' Ptr ViewportSwizzleNV -> Int -> Ptr ViewportSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ViewportSwizzleNV) (ViewportSwizzleNV
e)) (Vector ViewportSwizzleNV
viewportSwizzles)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ViewportSwizzleNV) -> Ptr ViewportSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr (Ptr ViewportSwizzleNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ViewportSwizzleNV))) (Ptr ViewportSwizzleNV
pPViewportSwizzles')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PipelineViewportSwizzleStateCreateInfoNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr PipelineViewportSwizzleStateCreateInfoNV
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ViewportSwizzleNV
pPViewportSwizzles' <- ((Ptr ViewportSwizzleNV -> IO b) -> IO b)
-> ContT b IO (Ptr ViewportSwizzleNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ViewportSwizzleNV -> IO b) -> IO b)
 -> ContT b IO (Ptr ViewportSwizzleNV))
-> ((Ptr ViewportSwizzleNV -> IO b) -> IO b)
-> ContT b IO (Ptr ViewportSwizzleNV)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ViewportSwizzleNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @ViewportSwizzleNV ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 16) 4
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> ViewportSwizzleNV -> IO ())
-> Vector ViewportSwizzleNV -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: ViewportSwizzleNV
e -> Ptr ViewportSwizzleNV -> ViewportSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ViewportSwizzleNV
pPViewportSwizzles' Ptr ViewportSwizzleNV -> Int -> Ptr ViewportSwizzleNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ViewportSwizzleNV) (ViewportSwizzleNV
e)) (Vector ViewportSwizzleNV
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ViewportSwizzleNV) -> Ptr ViewportSwizzleNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr (Ptr ViewportSwizzleNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ViewportSwizzleNV))) (Ptr ViewportSwizzleNV
pPViewportSwizzles')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct PipelineViewportSwizzleStateCreateInfoNV where
  peekCStruct :: Ptr PipelineViewportSwizzleStateCreateInfoNV
-> IO PipelineViewportSwizzleStateCreateInfoNV
peekCStruct p :: Ptr PipelineViewportSwizzleStateCreateInfoNV
p = do
    PipelineViewportSwizzleStateCreateFlagsNV
flags <- Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> IO PipelineViewportSwizzleStateCreateFlagsNV
forall a. Storable a => Ptr a -> IO a
peek @PipelineViewportSwizzleStateCreateFlagsNV ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr PipelineViewportSwizzleStateCreateFlagsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineViewportSwizzleStateCreateFlagsNV))
    Word32
viewportCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    Ptr ViewportSwizzleNV
pViewportSwizzles <- Ptr (Ptr ViewportSwizzleNV) -> IO (Ptr ViewportSwizzleNV)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ViewportSwizzleNV) ((Ptr PipelineViewportSwizzleStateCreateInfoNV
p Ptr PipelineViewportSwizzleStateCreateInfoNV
-> Int -> Ptr (Ptr ViewportSwizzleNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr ViewportSwizzleNV)))
    Vector ViewportSwizzleNV
pViewportSwizzles' <- Int
-> (Int -> IO ViewportSwizzleNV) -> IO (Vector ViewportSwizzleNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
viewportCount) (\i :: Int
i -> Ptr ViewportSwizzleNV -> IO ViewportSwizzleNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @ViewportSwizzleNV ((Ptr ViewportSwizzleNV
pViewportSwizzles Ptr ViewportSwizzleNV -> Int -> Ptr ViewportSwizzleNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ViewportSwizzleNV)))
    PipelineViewportSwizzleStateCreateInfoNV
-> IO PipelineViewportSwizzleStateCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PipelineViewportSwizzleStateCreateInfoNV
 -> IO PipelineViewportSwizzleStateCreateInfoNV)
-> PipelineViewportSwizzleStateCreateInfoNV
-> IO PipelineViewportSwizzleStateCreateInfoNV
forall a b. (a -> b) -> a -> b
$ PipelineViewportSwizzleStateCreateFlagsNV
-> Vector ViewportSwizzleNV
-> PipelineViewportSwizzleStateCreateInfoNV
PipelineViewportSwizzleStateCreateInfoNV
             PipelineViewportSwizzleStateCreateFlagsNV
flags Vector ViewportSwizzleNV
pViewportSwizzles'

instance Zero PipelineViewportSwizzleStateCreateInfoNV where
  zero :: PipelineViewportSwizzleStateCreateInfoNV
zero = PipelineViewportSwizzleStateCreateFlagsNV
-> Vector ViewportSwizzleNV
-> PipelineViewportSwizzleStateCreateInfoNV
PipelineViewportSwizzleStateCreateInfoNV
           PipelineViewportSwizzleStateCreateFlagsNV
forall a. Zero a => a
zero
           Vector ViewportSwizzleNV
forall a. Monoid a => a
mempty


-- | VkPipelineViewportSwizzleStateCreateFlagsNV - Reserved for future use
--
-- = Description
--
-- 'PipelineViewportSwizzleStateCreateFlagsNV' is a bitmask type for
-- setting a mask, but is currently reserved for future use.
--
-- = See Also
--
-- 'PipelineViewportSwizzleStateCreateInfoNV'
newtype PipelineViewportSwizzleStateCreateFlagsNV = PipelineViewportSwizzleStateCreateFlagsNV Flags
  deriving newtype (PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
(PipelineViewportSwizzleStateCreateFlagsNV
 -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> Eq PipelineViewportSwizzleStateCreateFlagsNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c/= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
== :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c== :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
Eq, Eq PipelineViewportSwizzleStateCreateFlagsNV
Eq PipelineViewportSwizzleStateCreateFlagsNV =>
(PipelineViewportSwizzleStateCreateFlagsNV
 -> PipelineViewportSwizzleStateCreateFlagsNV -> Ordering)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV)
-> Ord PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Ordering
PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$cmin :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
max :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$cmax :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
>= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c>= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
> :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c> :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
<= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c<= :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
< :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$c< :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Bool
compare :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Ordering
$ccompare :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> Ordering
$cp1Ord :: Eq PipelineViewportSwizzleStateCreateFlagsNV
Ord, Ptr b -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
Ptr b -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> IO PipelineViewportSwizzleStateCreateFlagsNV
Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
PipelineViewportSwizzleStateCreateFlagsNV -> Int
(PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> (Ptr PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV)
-> (Ptr PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ())
-> (forall b.
    Ptr b -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV)
-> (forall b.
    Ptr b -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ())
-> (Ptr PipelineViewportSwizzleStateCreateFlagsNV
    -> IO PipelineViewportSwizzleStateCreateFlagsNV)
-> (Ptr PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ())
-> Storable PipelineViewportSwizzleStateCreateFlagsNV
forall b.
Ptr b -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
forall b.
Ptr b -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
$cpoke :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
peek :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> IO PipelineViewportSwizzleStateCreateFlagsNV
$cpeek :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> IO PipelineViewportSwizzleStateCreateFlagsNV
pokeByteOff :: Ptr b -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
peekByteOff :: Ptr b -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
pokeElemOff :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
$cpokeElemOff :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV -> IO ()
peekElemOff :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
$cpeekElemOff :: Ptr PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> IO PipelineViewportSwizzleStateCreateFlagsNV
alignment :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$calignment :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
sizeOf :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$csizeOf :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
Storable, PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV
-> Zero PipelineViewportSwizzleStateCreateFlagsNV
forall a. a -> Zero a
zero :: PipelineViewportSwizzleStateCreateFlagsNV
$czero :: PipelineViewportSwizzleStateCreateFlagsNV
Zero, Eq PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV
Eq PipelineViewportSwizzleStateCreateFlagsNV =>
(PipelineViewportSwizzleStateCreateFlagsNV
 -> PipelineViewportSwizzleStateCreateFlagsNV
 -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> PipelineViewportSwizzleStateCreateFlagsNV
-> (Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Maybe Int)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Bool)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV
    -> Int -> PipelineViewportSwizzleStateCreateFlagsNV)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> Bits PipelineViewportSwizzleStateCreateFlagsNV
Int -> PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV -> Bool
PipelineViewportSwizzleStateCreateFlagsNV -> Int
PipelineViewportSwizzleStateCreateFlagsNV -> Maybe Int
PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV -> Int -> Bool
PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$cpopCount :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
rotateR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$crotateR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
rotateL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$crotateL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
unsafeShiftR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cunsafeShiftR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
shiftR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cshiftR :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
unsafeShiftL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cunsafeShiftL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
shiftL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cshiftL :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
isSigned :: PipelineViewportSwizzleStateCreateFlagsNV -> Bool
$cisSigned :: PipelineViewportSwizzleStateCreateFlagsNV -> Bool
bitSize :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$cbitSize :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
bitSizeMaybe :: PipelineViewportSwizzleStateCreateFlagsNV -> Maybe Int
$cbitSizeMaybe :: PipelineViewportSwizzleStateCreateFlagsNV -> Maybe Int
testBit :: PipelineViewportSwizzleStateCreateFlagsNV -> Int -> Bool
$ctestBit :: PipelineViewportSwizzleStateCreateFlagsNV -> Int -> Bool
complementBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$ccomplementBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
clearBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cclearBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
setBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$csetBit :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
bit :: Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cbit :: Int -> PipelineViewportSwizzleStateCreateFlagsNV
zeroBits :: PipelineViewportSwizzleStateCreateFlagsNV
$czeroBits :: PipelineViewportSwizzleStateCreateFlagsNV
rotate :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$crotate :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
shift :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
$cshift :: PipelineViewportSwizzleStateCreateFlagsNV
-> Int -> PipelineViewportSwizzleStateCreateFlagsNV
complement :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$ccomplement :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
xor :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$cxor :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
.|. :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$c.|. :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
.&. :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$c.&. :: PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
-> PipelineViewportSwizzleStateCreateFlagsNV
$cp1Bits :: Eq PipelineViewportSwizzleStateCreateFlagsNV
Bits, Bits PipelineViewportSwizzleStateCreateFlagsNV
Bits PipelineViewportSwizzleStateCreateFlagsNV =>
(PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Int)
-> FiniteBits PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$ccountTrailingZeros :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
countLeadingZeros :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$ccountLeadingZeros :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
finiteBitSize :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$cfiniteBitSize :: PipelineViewportSwizzleStateCreateFlagsNV -> Int
$cp1FiniteBits :: Bits PipelineViewportSwizzleStateCreateFlagsNV
FiniteBits)



conNamePipelineViewportSwizzleStateCreateFlagsNV :: String
conNamePipelineViewportSwizzleStateCreateFlagsNV :: String
conNamePipelineViewportSwizzleStateCreateFlagsNV = "PipelineViewportSwizzleStateCreateFlagsNV"

enumPrefixPipelineViewportSwizzleStateCreateFlagsNV :: String
enumPrefixPipelineViewportSwizzleStateCreateFlagsNV :: String
enumPrefixPipelineViewportSwizzleStateCreateFlagsNV = ""

showTablePipelineViewportSwizzleStateCreateFlagsNV :: [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
showTablePipelineViewportSwizzleStateCreateFlagsNV :: [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
showTablePipelineViewportSwizzleStateCreateFlagsNV = []

instance Show PipelineViewportSwizzleStateCreateFlagsNV where
  showsPrec :: Int -> PipelineViewportSwizzleStateCreateFlagsNV -> ShowS
showsPrec = String
-> [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
-> String
-> (PipelineViewportSwizzleStateCreateFlagsNV -> Word32)
-> (Word32 -> ShowS)
-> Int
-> PipelineViewportSwizzleStateCreateFlagsNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPipelineViewportSwizzleStateCreateFlagsNV
                            [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
showTablePipelineViewportSwizzleStateCreateFlagsNV
                            String
conNamePipelineViewportSwizzleStateCreateFlagsNV
                            (\(PipelineViewportSwizzleStateCreateFlagsNV x :: Word32
x) -> Word32
x)
                            (\x :: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word32 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word32
x)

instance Read PipelineViewportSwizzleStateCreateFlagsNV where
  readPrec :: ReadPrec PipelineViewportSwizzleStateCreateFlagsNV
readPrec = String
-> [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
-> String
-> (Word32 -> PipelineViewportSwizzleStateCreateFlagsNV)
-> ReadPrec PipelineViewportSwizzleStateCreateFlagsNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPipelineViewportSwizzleStateCreateFlagsNV
                          [(PipelineViewportSwizzleStateCreateFlagsNV, String)]
showTablePipelineViewportSwizzleStateCreateFlagsNV
                          String
conNamePipelineViewportSwizzleStateCreateFlagsNV
                          Word32 -> PipelineViewportSwizzleStateCreateFlagsNV
PipelineViewportSwizzleStateCreateFlagsNV


-- | VkViewportCoordinateSwizzleNV - Specify how a viewport coordinate is
-- swizzled
--
-- = Description
--
-- These values are described in detail in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-viewport-swizzle Viewport Swizzle>.
--
-- = See Also
--
-- 'ViewportSwizzleNV'
newtype ViewportCoordinateSwizzleNV = ViewportCoordinateSwizzleNV Int32
  deriving newtype (ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
(ViewportCoordinateSwizzleNV
 -> ViewportCoordinateSwizzleNV -> Bool)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> Bool)
-> Eq ViewportCoordinateSwizzleNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c/= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
== :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c== :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
Eq, Eq ViewportCoordinateSwizzleNV
Eq ViewportCoordinateSwizzleNV =>
(ViewportCoordinateSwizzleNV
 -> ViewportCoordinateSwizzleNV -> Ordering)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> Bool)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> Bool)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> Bool)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> Bool)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV)
-> (ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV)
-> Ord ViewportCoordinateSwizzleNV
ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> Ordering
ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV
$cmin :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV
max :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV
$cmax :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV
>= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c>= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
> :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c> :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
<= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c<= :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
< :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
$c< :: ViewportCoordinateSwizzleNV -> ViewportCoordinateSwizzleNV -> Bool
compare :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> Ordering
$ccompare :: ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> Ordering
$cp1Ord :: Eq ViewportCoordinateSwizzleNV
Ord, Ptr b -> Int -> IO ViewportCoordinateSwizzleNV
Ptr b -> Int -> ViewportCoordinateSwizzleNV -> IO ()
Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
Ptr ViewportCoordinateSwizzleNV
-> Int -> IO ViewportCoordinateSwizzleNV
Ptr ViewportCoordinateSwizzleNV
-> Int -> ViewportCoordinateSwizzleNV -> IO ()
Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
ViewportCoordinateSwizzleNV -> Int
(ViewportCoordinateSwizzleNV -> Int)
-> (ViewportCoordinateSwizzleNV -> Int)
-> (Ptr ViewportCoordinateSwizzleNV
    -> Int -> IO ViewportCoordinateSwizzleNV)
-> (Ptr ViewportCoordinateSwizzleNV
    -> Int -> ViewportCoordinateSwizzleNV -> IO ())
-> (forall b. Ptr b -> Int -> IO ViewportCoordinateSwizzleNV)
-> (forall b. Ptr b -> Int -> ViewportCoordinateSwizzleNV -> IO ())
-> (Ptr ViewportCoordinateSwizzleNV
    -> IO ViewportCoordinateSwizzleNV)
-> (Ptr ViewportCoordinateSwizzleNV
    -> ViewportCoordinateSwizzleNV -> IO ())
-> Storable ViewportCoordinateSwizzleNV
forall b. Ptr b -> Int -> IO ViewportCoordinateSwizzleNV
forall b. Ptr b -> Int -> ViewportCoordinateSwizzleNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
$cpoke :: Ptr ViewportCoordinateSwizzleNV
-> ViewportCoordinateSwizzleNV -> IO ()
peek :: Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
$cpeek :: Ptr ViewportCoordinateSwizzleNV -> IO ViewportCoordinateSwizzleNV
pokeByteOff :: Ptr b -> Int -> ViewportCoordinateSwizzleNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ViewportCoordinateSwizzleNV -> IO ()
peekByteOff :: Ptr b -> Int -> IO ViewportCoordinateSwizzleNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ViewportCoordinateSwizzleNV
pokeElemOff :: Ptr ViewportCoordinateSwizzleNV
-> Int -> ViewportCoordinateSwizzleNV -> IO ()
$cpokeElemOff :: Ptr ViewportCoordinateSwizzleNV
-> Int -> ViewportCoordinateSwizzleNV -> IO ()
peekElemOff :: Ptr ViewportCoordinateSwizzleNV
-> Int -> IO ViewportCoordinateSwizzleNV
$cpeekElemOff :: Ptr ViewportCoordinateSwizzleNV
-> Int -> IO ViewportCoordinateSwizzleNV
alignment :: ViewportCoordinateSwizzleNV -> Int
$calignment :: ViewportCoordinateSwizzleNV -> Int
sizeOf :: ViewportCoordinateSwizzleNV -> Int
$csizeOf :: ViewportCoordinateSwizzleNV -> Int
Storable, ViewportCoordinateSwizzleNV
ViewportCoordinateSwizzleNV -> Zero ViewportCoordinateSwizzleNV
forall a. a -> Zero a
zero :: ViewportCoordinateSwizzleNV
$czero :: ViewportCoordinateSwizzleNV
Zero)

-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = ViewportCoordinateSwizzleNV 0
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = ViewportCoordinateSwizzleNV 1
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = ViewportCoordinateSwizzleNV 2
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = ViewportCoordinateSwizzleNV 3
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = ViewportCoordinateSwizzleNV 4
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = ViewportCoordinateSwizzleNV 5
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = ViewportCoordinateSwizzleNV 6
-- No documentation found for Nested "VkViewportCoordinateSwizzleNV" "VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV"
pattern $bVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV :: ViewportCoordinateSwizzleNV
$mVIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV :: forall r.
ViewportCoordinateSwizzleNV -> (Void# -> r) -> (Void# -> r) -> r
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = ViewportCoordinateSwizzleNV 7
{-# complete VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV,
             VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV,
             VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV,
             VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV,
             VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV,
             VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV,
             VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV,
             VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV :: ViewportCoordinateSwizzleNV #-}

conNameViewportCoordinateSwizzleNV :: String
conNameViewportCoordinateSwizzleNV :: String
conNameViewportCoordinateSwizzleNV = "ViewportCoordinateSwizzleNV"

enumPrefixViewportCoordinateSwizzleNV :: String
enumPrefixViewportCoordinateSwizzleNV :: String
enumPrefixViewportCoordinateSwizzleNV = "VIEWPORT_COORDINATE_SWIZZLE_"

showTableViewportCoordinateSwizzleNV :: [(ViewportCoordinateSwizzleNV, String)]
showTableViewportCoordinateSwizzleNV :: [(ViewportCoordinateSwizzleNV, String)]
showTableViewportCoordinateSwizzleNV =
  [ (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, "POSITIVE_X_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV, "NEGATIVE_X_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV, "POSITIVE_Y_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV, "NEGATIVE_Y_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV, "POSITIVE_Z_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV, "NEGATIVE_Z_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV, "POSITIVE_W_NV")
  , (ViewportCoordinateSwizzleNV
VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV, "NEGATIVE_W_NV")
  ]

instance Show ViewportCoordinateSwizzleNV where
  showsPrec :: Int -> ViewportCoordinateSwizzleNV -> ShowS
showsPrec = String
-> [(ViewportCoordinateSwizzleNV, String)]
-> String
-> (ViewportCoordinateSwizzleNV -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ViewportCoordinateSwizzleNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixViewportCoordinateSwizzleNV
                            [(ViewportCoordinateSwizzleNV, String)]
showTableViewportCoordinateSwizzleNV
                            String
conNameViewportCoordinateSwizzleNV
                            (\(ViewportCoordinateSwizzleNV x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read ViewportCoordinateSwizzleNV where
  readPrec :: ReadPrec ViewportCoordinateSwizzleNV
readPrec = String
-> [(ViewportCoordinateSwizzleNV, String)]
-> String
-> (Int32 -> ViewportCoordinateSwizzleNV)
-> ReadPrec ViewportCoordinateSwizzleNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixViewportCoordinateSwizzleNV
                          [(ViewportCoordinateSwizzleNV, String)]
showTableViewportCoordinateSwizzleNV
                          String
conNameViewportCoordinateSwizzleNV
                          Int32 -> ViewportCoordinateSwizzleNV
ViewportCoordinateSwizzleNV


type NV_VIEWPORT_SWIZZLE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION"
pattern NV_VIEWPORT_SWIZZLE_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_VIEWPORT_SWIZZLE_SPEC_VERSION :: a
$mNV_VIEWPORT_SWIZZLE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
NV_VIEWPORT_SWIZZLE_SPEC_VERSION = 1


type NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"

-- No documentation found for TopLevel "VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME"
pattern NV_VIEWPORT_SWIZZLE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_VIEWPORT_SWIZZLE_EXTENSION_NAME :: a
$mNV_VIEWPORT_SWIZZLE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"