vulkan-3.27: src/Vulkan/Core11/Enums/SamplerYcbcrRange.hs
{-# language CPP #-}
-- No documentation found for Chapter "SamplerYcbcrRange"
module Vulkan.Core11.Enums.SamplerYcbcrRange (SamplerYcbcrRange( SAMPLER_YCBCR_RANGE_ITU_FULL
, SAMPLER_YCBCR_RANGE_ITU_NARROW
, ..
)) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
-- | VkSamplerYcbcrRange - Range of encoded values in a color space
--
-- = Description
--
-- - 'SAMPLER_YCBCR_RANGE_ITU_FULL' specifies that the full range of the
-- encoded values are valid and interpreted according to the ITU “full
-- range” quantization rules.
--
-- - 'SAMPLER_YCBCR_RANGE_ITU_NARROW' specifies that headroom and foot
-- room are reserved in the numerical range of encoded values, and the
-- remaining values are expanded according to the ITU “narrow range”
-- quantization rules.
--
-- The formulae for these conversions is described in the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#textures-sampler-YCbCr-conversion-rangeexpand Sampler Y′CBCR Range Expansion>
-- section of the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#textures Image Operations>
-- chapter.
--
-- No range modification takes place if @ycbcrModel@ is
-- 'Vulkan.Core11.Enums.SamplerYcbcrModelConversion.SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY';
-- the @ycbcrRange@ field of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo'
-- is ignored in this case.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_sampler_ycbcr_conversion VK_KHR_sampler_ycbcr_conversion>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_1 VK_VERSION_1_1>,
-- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatProperties2ANDROID',
-- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatPropertiesANDROID',
-- 'Vulkan.Extensions.VK_FUCHSIA_buffer_collection.BufferCollectionPropertiesFUCHSIA',
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkNativeBufferFormatPropertiesOHOS VkNativeBufferFormatPropertiesOHOS>,
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo',
-- 'Vulkan.Extensions.VK_QNX_external_memory_screen_buffer.ScreenBufferFormatPropertiesQNX'
newtype SamplerYcbcrRange = SamplerYcbcrRange Int32
deriving newtype (Eq, Ord, Storable, Zero)
-- No documentation found for Nested "VkSamplerYcbcrRange" "VK_SAMPLER_YCBCR_RANGE_ITU_FULL"
pattern SAMPLER_YCBCR_RANGE_ITU_FULL = SamplerYcbcrRange 0
-- No documentation found for Nested "VkSamplerYcbcrRange" "VK_SAMPLER_YCBCR_RANGE_ITU_NARROW"
pattern SAMPLER_YCBCR_RANGE_ITU_NARROW = SamplerYcbcrRange 1
{-# COMPLETE
SAMPLER_YCBCR_RANGE_ITU_FULL
, SAMPLER_YCBCR_RANGE_ITU_NARROW ::
SamplerYcbcrRange
#-}
conNameSamplerYcbcrRange :: String
conNameSamplerYcbcrRange = "SamplerYcbcrRange"
enumPrefixSamplerYcbcrRange :: String
enumPrefixSamplerYcbcrRange = "SAMPLER_YCBCR_RANGE_ITU_"
showTableSamplerYcbcrRange :: [(SamplerYcbcrRange, String)]
showTableSamplerYcbcrRange =
[ (SAMPLER_YCBCR_RANGE_ITU_FULL, "FULL")
, (SAMPLER_YCBCR_RANGE_ITU_NARROW, "NARROW")
]
instance Show SamplerYcbcrRange where
showsPrec =
enumShowsPrec
enumPrefixSamplerYcbcrRange
showTableSamplerYcbcrRange
conNameSamplerYcbcrRange
(\(SamplerYcbcrRange x) -> x)
(showsPrec 11)
instance Read SamplerYcbcrRange where
readPrec =
enumReadPrec
enumPrefixSamplerYcbcrRange
showTableSamplerYcbcrRange
conNameSamplerYcbcrRange
SamplerYcbcrRange