{-# language CPP #-}
-- | = Name
--
-- VK_NV_display_stereo - instance extension
--
-- = VK_NV_display_stereo
--
-- [__Name String__]
--     @VK_NV_display_stereo@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     552
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_display VK_KHR_display>
--     and
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_display_properties2 VK_KHR_get_display_properties2>
--
-- [__Contact__]
--
--     -   Russell Chou
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_display_stereo] @russellcnv%0A*Here describe the issue or question you have about the VK_NV_display_stereo extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_NV_display_stereo.adoc VK_NV_display_stereo>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2024-11-20
--
-- [__Contributors__]
--
--     -   Russell Chou, NVIDIA
--
--     -   Jeff Juliano, NVIDIA
--
--     -   James Jones, NVIDIA
--
-- == Description
--
-- This extension allows the application to choose which type of 3D stereo
-- hardware it wants to use so the driver can configure it properly. This
-- configuration is useful for swapchains created from display surfaces
-- because some environments do not have an intermediate windowing system
-- available for easy configuration. This extension will override any
-- stereo type configuration in the windowing system.
--
-- For HDMI 3D, only some display modes support stereo rendering, and a new
-- structure is needed to expose that information to the application.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_get_display_properties2.DisplayModeProperties2KHR':
--
--     -   'DisplayModeStereoPropertiesNV'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_display.DisplaySurfaceCreateInfoKHR':
--
--     -   'DisplaySurfaceStereoCreateInfoNV'
--
-- == New Enums
--
-- -   'DisplaySurfaceStereoTypeNV'
--
-- == New Enum Constants
--
-- -   'NV_DISPLAY_STEREO_EXTENSION_NAME'
--
-- -   'NV_DISPLAY_STEREO_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV'
--
-- == Version History
--
-- -   Revision 1, 2024-11-20 (Russell Chou)
--
--     -   Initial release
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_NV_display_stereo 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_display_stereo  ( DisplaySurfaceStereoCreateInfoNV(..)
                                               , DisplayModeStereoPropertiesNV(..)
                                               , DisplaySurfaceStereoTypeNV( DISPLAY_SURFACE_STEREO_TYPE_NONE_NV
                                                                           , DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV
                                                                           , DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV
                                                                           , DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV
                                                                           , ..
                                                                           )
                                               , NV_DISPLAY_STEREO_SPEC_VERSION
                                               , pattern NV_DISPLAY_STEREO_SPEC_VERSION
                                               , NV_DISPLAY_STEREO_EXTENSION_NAME
                                               , pattern NV_DISPLAY_STEREO_EXTENSION_NAME
                                               ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
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 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.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV))
-- | VkDisplaySurfaceStereoCreateInfoNV - Structure specifying stereo
-- parameters of a newly created display plane surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_display_stereo VK_NV_display_stereo>,
-- 'DisplaySurfaceStereoTypeNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DisplaySurfaceStereoCreateInfoNV = DisplaySurfaceStereoCreateInfoNV
  { -- | #wsi-displaySurfaceStereoType# @stereoType@ is a
    -- 'DisplaySurfaceStereoTypeNV' value specifying the type of 3D stereo
    -- presentation the display will be configured for.
    --
    -- #VUID-VkDisplaySurfaceStereoCreateInfoNV-stereoType-parameter#
    -- @stereoType@ /must/ be a valid 'DisplaySurfaceStereoTypeNV' value
    DisplaySurfaceStereoCreateInfoNV -> DisplaySurfaceStereoTypeNV
stereoType :: DisplaySurfaceStereoTypeNV }
  deriving (Typeable, DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> Bool
(DisplaySurfaceStereoCreateInfoNV
 -> DisplaySurfaceStereoCreateInfoNV -> Bool)
-> (DisplaySurfaceStereoCreateInfoNV
    -> DisplaySurfaceStereoCreateInfoNV -> Bool)
-> Eq DisplaySurfaceStereoCreateInfoNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> Bool
== :: DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> Bool
$c/= :: DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> Bool
/= :: DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplaySurfaceStereoCreateInfoNV)
#endif
deriving instance Show DisplaySurfaceStereoCreateInfoNV

instance ToCStruct DisplaySurfaceStereoCreateInfoNV where
  withCStruct :: forall b.
DisplaySurfaceStereoCreateInfoNV
-> (Ptr DisplaySurfaceStereoCreateInfoNV -> IO b) -> IO b
withCStruct DisplaySurfaceStereoCreateInfoNV
x Ptr DisplaySurfaceStereoCreateInfoNV -> IO b
f = Int -> (Ptr DisplaySurfaceStereoCreateInfoNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr DisplaySurfaceStereoCreateInfoNV -> IO b) -> IO b)
-> (Ptr DisplaySurfaceStereoCreateInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DisplaySurfaceStereoCreateInfoNV
p -> Ptr DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> IO b -> IO b
forall b.
Ptr DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DisplaySurfaceStereoCreateInfoNV
p DisplaySurfaceStereoCreateInfoNV
x (Ptr DisplaySurfaceStereoCreateInfoNV -> IO b
f Ptr DisplaySurfaceStereoCreateInfoNV
p)
  pokeCStruct :: forall b.
Ptr DisplaySurfaceStereoCreateInfoNV
-> DisplaySurfaceStereoCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr DisplaySurfaceStereoCreateInfoNV
p DisplaySurfaceStereoCreateInfoNV{DisplaySurfaceStereoTypeNV
stereoType :: DisplaySurfaceStereoCreateInfoNV -> DisplaySurfaceStereoTypeNV
stereoType :: DisplaySurfaceStereoTypeNV
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV
-> Int -> Ptr DisplaySurfaceStereoTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplaySurfaceStereoTypeNV)) (DisplaySurfaceStereoTypeNV
stereoType)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr DisplaySurfaceStereoCreateInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr DisplaySurfaceStereoCreateInfoNV
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV
-> Int -> Ptr DisplaySurfaceStereoTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplaySurfaceStereoTypeNV)) (DisplaySurfaceStereoTypeNV
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DisplaySurfaceStereoCreateInfoNV where
  peekCStruct :: Ptr DisplaySurfaceStereoCreateInfoNV
-> IO DisplaySurfaceStereoCreateInfoNV
peekCStruct Ptr DisplaySurfaceStereoCreateInfoNV
p = do
    stereoType <- forall a. Storable a => Ptr a -> IO a
peek @DisplaySurfaceStereoTypeNV ((Ptr DisplaySurfaceStereoCreateInfoNV
p Ptr DisplaySurfaceStereoCreateInfoNV
-> Int -> Ptr DisplaySurfaceStereoTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplaySurfaceStereoTypeNV))
    pure $ DisplaySurfaceStereoCreateInfoNV
             stereoType

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

instance Zero DisplaySurfaceStereoCreateInfoNV where
  zero :: DisplaySurfaceStereoCreateInfoNV
zero = DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoCreateInfoNV
DisplaySurfaceStereoCreateInfoNV
           DisplaySurfaceStereoTypeNV
forall a. Zero a => a
zero


-- | VkDisplayModeStereoPropertiesNV - Structure describing the stereo
-- properties of a display mode
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_display_stereo VK_NV_display_stereo>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DisplayModeStereoPropertiesNV = DisplayModeStereoPropertiesNV
  { -- | @hdmi3DSupported@ indicates whether this display mode can be used for a
    -- display surface configured for 'DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV'.
    DisplayModeStereoPropertiesNV -> Bool
hdmi3DSupported :: Bool }
  deriving (Typeable, DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> Bool
(DisplayModeStereoPropertiesNV
 -> DisplayModeStereoPropertiesNV -> Bool)
-> (DisplayModeStereoPropertiesNV
    -> DisplayModeStereoPropertiesNV -> Bool)
-> Eq DisplayModeStereoPropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> Bool
== :: DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> Bool
$c/= :: DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> Bool
/= :: DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayModeStereoPropertiesNV)
#endif
deriving instance Show DisplayModeStereoPropertiesNV

instance ToCStruct DisplayModeStereoPropertiesNV where
  withCStruct :: forall b.
DisplayModeStereoPropertiesNV
-> (Ptr DisplayModeStereoPropertiesNV -> IO b) -> IO b
withCStruct DisplayModeStereoPropertiesNV
x Ptr DisplayModeStereoPropertiesNV -> IO b
f = Int -> (Ptr DisplayModeStereoPropertiesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr DisplayModeStereoPropertiesNV -> IO b) -> IO b)
-> (Ptr DisplayModeStereoPropertiesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DisplayModeStereoPropertiesNV
p -> Ptr DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> IO b -> IO b
forall b.
Ptr DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DisplayModeStereoPropertiesNV
p DisplayModeStereoPropertiesNV
x (Ptr DisplayModeStereoPropertiesNV -> IO b
f Ptr DisplayModeStereoPropertiesNV
p)
  pokeCStruct :: forall b.
Ptr DisplayModeStereoPropertiesNV
-> DisplayModeStereoPropertiesNV -> IO b -> IO b
pokeCStruct Ptr DisplayModeStereoPropertiesNV
p DisplayModeStereoPropertiesNV{Bool
hdmi3DSupported :: DisplayModeStereoPropertiesNV -> Bool
hdmi3DSupported :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> 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 DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
hdmi3DSupported))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr DisplayModeStereoPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr DisplayModeStereoPropertiesNV
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> 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 DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct DisplayModeStereoPropertiesNV where
  peekCStruct :: Ptr DisplayModeStereoPropertiesNV
-> IO DisplayModeStereoPropertiesNV
peekCStruct Ptr DisplayModeStereoPropertiesNV
p = do
    hdmi3DSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr DisplayModeStereoPropertiesNV
p Ptr DisplayModeStereoPropertiesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    pure $ DisplayModeStereoPropertiesNV
             (bool32ToBool hdmi3DSupported)

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

instance Zero DisplayModeStereoPropertiesNV where
  zero :: DisplayModeStereoPropertiesNV
zero = Bool -> DisplayModeStereoPropertiesNV
DisplayModeStereoPropertiesNV
           Bool
forall a. Zero a => a
zero


-- | VkDisplaySurfaceStereoTypeNV - 3D Stereo type
--
-- = Description
--
-- -   'DISPLAY_SURFACE_STEREO_TYPE_NONE_NV' specifies no configuration for
--     stereo presentation. This is the default behavior if
--     'DisplaySurfaceStereoCreateInfoNV' is not provided.
--
-- -   'DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV' specifies configuration
--     for glasses that connect via a DIN connector on the back of the
--     graphics card.
--
-- -   'DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV' specifies configuration for
--     HDMI 3D compatible display devices with their own stereo emitters.
--     This is also known as HDMI Frame Packed Stereo, where the left and
--     right eye images are stacked into a single frame with a doubled
--     pixel clock and refresh rate.
--
-- -   'DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV' specifies
--     configuration for DisplayPort display devices with in-band stereo
--     signaling and emitters.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_display_stereo VK_NV_display_stereo>,
-- 'DisplaySurfaceStereoCreateInfoNV'
newtype DisplaySurfaceStereoTypeNV = DisplaySurfaceStereoTypeNV Int32
  deriving newtype (DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
(DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> Bool)
-> Eq DisplaySurfaceStereoTypeNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
== :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
$c/= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
/= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
Eq, Eq DisplaySurfaceStereoTypeNV
Eq DisplaySurfaceStereoTypeNV =>
(DisplaySurfaceStereoTypeNV
 -> DisplaySurfaceStereoTypeNV -> Ordering)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> Bool)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> Bool)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> Bool)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> Bool)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV)
-> (DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV)
-> Ord DisplaySurfaceStereoTypeNV
DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> Ordering
DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV
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 :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> Ordering
compare :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> Ordering
$c< :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
< :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
$c<= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
<= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
$c> :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
> :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
$c>= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
>= :: DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV -> Bool
$cmax :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV
max :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV
$cmin :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV
min :: DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> DisplaySurfaceStereoTypeNV
Ord, Ptr DisplaySurfaceStereoTypeNV -> IO DisplaySurfaceStereoTypeNV
Ptr DisplaySurfaceStereoTypeNV
-> Int -> IO DisplaySurfaceStereoTypeNV
Ptr DisplaySurfaceStereoTypeNV
-> Int -> DisplaySurfaceStereoTypeNV -> IO ()
Ptr DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> IO ()
DisplaySurfaceStereoTypeNV -> Int
(DisplaySurfaceStereoTypeNV -> Int)
-> (DisplaySurfaceStereoTypeNV -> Int)
-> (Ptr DisplaySurfaceStereoTypeNV
    -> Int -> IO DisplaySurfaceStereoTypeNV)
-> (Ptr DisplaySurfaceStereoTypeNV
    -> Int -> DisplaySurfaceStereoTypeNV -> IO ())
-> (forall b. Ptr b -> Int -> IO DisplaySurfaceStereoTypeNV)
-> (forall b. Ptr b -> Int -> DisplaySurfaceStereoTypeNV -> IO ())
-> (Ptr DisplaySurfaceStereoTypeNV
    -> IO DisplaySurfaceStereoTypeNV)
-> (Ptr DisplaySurfaceStereoTypeNV
    -> DisplaySurfaceStereoTypeNV -> IO ())
-> Storable DisplaySurfaceStereoTypeNV
forall b. Ptr b -> Int -> IO DisplaySurfaceStereoTypeNV
forall b. Ptr b -> Int -> DisplaySurfaceStereoTypeNV -> 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 :: DisplaySurfaceStereoTypeNV -> Int
sizeOf :: DisplaySurfaceStereoTypeNV -> Int
$calignment :: DisplaySurfaceStereoTypeNV -> Int
alignment :: DisplaySurfaceStereoTypeNV -> Int
$cpeekElemOff :: Ptr DisplaySurfaceStereoTypeNV
-> Int -> IO DisplaySurfaceStereoTypeNV
peekElemOff :: Ptr DisplaySurfaceStereoTypeNV
-> Int -> IO DisplaySurfaceStereoTypeNV
$cpokeElemOff :: Ptr DisplaySurfaceStereoTypeNV
-> Int -> DisplaySurfaceStereoTypeNV -> IO ()
pokeElemOff :: Ptr DisplaySurfaceStereoTypeNV
-> Int -> DisplaySurfaceStereoTypeNV -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DisplaySurfaceStereoTypeNV
peekByteOff :: forall b. Ptr b -> Int -> IO DisplaySurfaceStereoTypeNV
$cpokeByteOff :: forall b. Ptr b -> Int -> DisplaySurfaceStereoTypeNV -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> DisplaySurfaceStereoTypeNV -> IO ()
$cpeek :: Ptr DisplaySurfaceStereoTypeNV -> IO DisplaySurfaceStereoTypeNV
peek :: Ptr DisplaySurfaceStereoTypeNV -> IO DisplaySurfaceStereoTypeNV
$cpoke :: Ptr DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> IO ()
poke :: Ptr DisplaySurfaceStereoTypeNV
-> DisplaySurfaceStereoTypeNV -> IO ()
Storable, DisplaySurfaceStereoTypeNV
DisplaySurfaceStereoTypeNV -> Zero DisplaySurfaceStereoTypeNV
forall a. a -> Zero a
$czero :: DisplaySurfaceStereoTypeNV
zero :: DisplaySurfaceStereoTypeNV
Zero)

-- No documentation found for Nested "VkDisplaySurfaceStereoTypeNV" "VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV"
pattern $mDISPLAY_SURFACE_STEREO_TYPE_NONE_NV :: forall {r}.
DisplaySurfaceStereoTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
$bDISPLAY_SURFACE_STEREO_TYPE_NONE_NV :: DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = DisplaySurfaceStereoTypeNV 0

-- No documentation found for Nested "VkDisplaySurfaceStereoTypeNV" "VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV"
pattern $mDISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV :: forall {r}.
DisplaySurfaceStereoTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
$bDISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV :: DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = DisplaySurfaceStereoTypeNV 1

-- No documentation found for Nested "VkDisplaySurfaceStereoTypeNV" "VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV"
pattern $mDISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV :: forall {r}.
DisplaySurfaceStereoTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
$bDISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV :: DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = DisplaySurfaceStereoTypeNV 2

-- No documentation found for Nested "VkDisplaySurfaceStereoTypeNV" "VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV"
pattern $mDISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV :: forall {r}.
DisplaySurfaceStereoTypeNV -> ((# #) -> r) -> ((# #) -> r) -> r
$bDISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV :: DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = DisplaySurfaceStereoTypeNV 3

{-# COMPLETE
  DISPLAY_SURFACE_STEREO_TYPE_NONE_NV
  , DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV
  , DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV
  , DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV ::
    DisplaySurfaceStereoTypeNV
  #-}

conNameDisplaySurfaceStereoTypeNV :: String
conNameDisplaySurfaceStereoTypeNV :: String
conNameDisplaySurfaceStereoTypeNV = String
"DisplaySurfaceStereoTypeNV"

enumPrefixDisplaySurfaceStereoTypeNV :: String
enumPrefixDisplaySurfaceStereoTypeNV :: String
enumPrefixDisplaySurfaceStereoTypeNV = String
"DISPLAY_SURFACE_STEREO_TYPE_"

showTableDisplaySurfaceStereoTypeNV :: [(DisplaySurfaceStereoTypeNV, String)]
showTableDisplaySurfaceStereoTypeNV :: [(DisplaySurfaceStereoTypeNV, String)]
showTableDisplaySurfaceStereoTypeNV =
  [
    ( DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_NONE_NV
    , String
"NONE_NV"
    )
  ,
    ( DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV
    , String
"ONBOARD_DIN_NV"
    )
  ,
    ( DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV
    , String
"HDMI_3D_NV"
    )
  ,
    ( DisplaySurfaceStereoTypeNV
DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV
    , String
"INBAND_DISPLAYPORT_NV"
    )
  ]

instance Show DisplaySurfaceStereoTypeNV where
  showsPrec :: Int -> DisplaySurfaceStereoTypeNV -> ShowS
showsPrec =
    String
-> [(DisplaySurfaceStereoTypeNV, String)]
-> String
-> (DisplaySurfaceStereoTypeNV -> Int32)
-> (Int32 -> ShowS)
-> Int
-> DisplaySurfaceStereoTypeNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixDisplaySurfaceStereoTypeNV
      [(DisplaySurfaceStereoTypeNV, String)]
showTableDisplaySurfaceStereoTypeNV
      String
conNameDisplaySurfaceStereoTypeNV
      (\(DisplaySurfaceStereoTypeNV Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read DisplaySurfaceStereoTypeNV where
  readPrec :: ReadPrec DisplaySurfaceStereoTypeNV
readPrec =
    String
-> [(DisplaySurfaceStereoTypeNV, String)]
-> String
-> (Int32 -> DisplaySurfaceStereoTypeNV)
-> ReadPrec DisplaySurfaceStereoTypeNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixDisplaySurfaceStereoTypeNV
      [(DisplaySurfaceStereoTypeNV, String)]
showTableDisplaySurfaceStereoTypeNV
      String
conNameDisplaySurfaceStereoTypeNV
      Int32 -> DisplaySurfaceStereoTypeNV
DisplaySurfaceStereoTypeNV

type NV_DISPLAY_STEREO_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_DISPLAY_STEREO_SPEC_VERSION"
pattern NV_DISPLAY_STEREO_SPEC_VERSION :: forall a . Integral a => a
pattern $mNV_DISPLAY_STEREO_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_DISPLAY_STEREO_SPEC_VERSION :: forall a. Integral a => a
NV_DISPLAY_STEREO_SPEC_VERSION = 1


type NV_DISPLAY_STEREO_EXTENSION_NAME = "VK_NV_display_stereo"

-- No documentation found for TopLevel "VK_NV_DISPLAY_STEREO_EXTENSION_NAME"
pattern NV_DISPLAY_STEREO_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mNV_DISPLAY_STEREO_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_DISPLAY_STEREO_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
NV_DISPLAY_STEREO_EXTENSION_NAME = "VK_NV_display_stereo"