org.lwjgl.vulkan.KHRSamplerYcbcrConversion Maven / Gradle / Ivy
Show all versions of lwjgl-vulkan Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* This extension provides the ability to perform specified color space conversions during texture sampling operations. It also adds a selection of multi-planar formats, including the ability to bind memory to the planes of an image collectively or separately.
*
*
* - Name String
* - {@code VK_KHR_sampler_ycbcr_conversion}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 157
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRMaintenance1 VK_KHR_maintenance1}
* - Requires {@link KHRBindMemory2 VK_KHR_bind_memory2}
* - Requires {@link KHRGetMemoryRequirements2 VK_KHR_get_memory_requirements2}
* - Requires {@link KHRGetPhysicalDeviceProperties2 VK_KHR_get_physical_device_properties2}
*
* - Contact
*
* - Andrew Garrard @fluppeteer
*
* - Last Modified Date
* - 2017-08-11
* - IP Status
* - No known IP claims.
* - Interactions and External Dependencies
*
* - This extension interacts with {@link EXTDebugReport VK_EXT_debug_report}
*
* - Contributors
*
* - Andrew Garrard, Samsung Electronics
* - Tobias Hector, Imagination Technologies
* - James Jones, NVIDIA
* - Daniel Koch, NVIDIA
* - Daniel Rakos, AMD
* - Romain Guy, Google
* - Jesse Hall, Google
* - Tom Cooksey, ARM Ltd
* - Jeff Leger, Qualcomm Technologies, Inc
* - Jan-Harald Fredriksen, ARM Ltd
* - Jan Outters, Samsung Electronics
* - Alon Or-bach, Samsung Electronics
* - Michael Worcester, Imagination Technologies
* - Jeff Bolz, NVIDIA
* - Tony Zlatinski, NVIDIA
* - Matthew Netsch, Qualcomm Technologies, Inc
*
*
*/
public class KHRSamplerYcbcrConversion {
/** The extension specification version. */
public static final int VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR}
* - {@link #VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR}
*
*/
public static final int
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000,
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001,
VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002,
VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004,
VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005;
/** Extends {@code VkDebugReportObjectTypeEXT}. */
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000;
/** Extends {@code VkObjectType}. */
public static final int VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = 1000156000;
/**
* Extends {@code VkFormat}.
*
* Enum values:
*
*
* - {@link #VK_FORMAT_G8B8G8R8_422_UNORM_KHR FORMAT_G8B8G8R8_422_UNORM_KHR}
* - {@link #VK_FORMAT_B8G8R8G8_422_UNORM_KHR FORMAT_B8G8R8G8_422_UNORM_KHR}
* - {@link #VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR}
* - {@link #VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR}
* - {@link #VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR}
* - {@link #VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR}
* - {@link #VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR}
* - {@link #VK_FORMAT_R10X6_UNORM_PACK16_KHR FORMAT_R10X6_UNORM_PACK16_KHR}
* - {@link #VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR FORMAT_R10X6G10X6_UNORM_2PACK16_KHR}
* - {@link #VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_R12X4_UNORM_PACK16_KHR FORMAT_R12X4_UNORM_PACK16_KHR}
* - {@link #VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR FORMAT_R12X4G12X4_UNORM_2PACK16_KHR}
* - {@link #VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR}
* - {@link #VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR}
* - {@link #VK_FORMAT_G16B16G16R16_422_UNORM_KHR FORMAT_G16B16G16R16_422_UNORM_KHR}
* - {@link #VK_FORMAT_B16G16R16G16_422_UNORM_KHR FORMAT_B16G16R16G16_422_UNORM_KHR}
* - {@link #VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR}
* - {@link #VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR}
* - {@link #VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR}
* - {@link #VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR}
* - {@link #VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR}
*
*/
public static final int
VK_FORMAT_G8B8G8R8_422_UNORM_KHR = 1000156000,
VK_FORMAT_B8G8R8G8_422_UNORM_KHR = 1000156001,
VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003,
VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004,
VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005,
VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006,
VK_FORMAT_R10X6_UNORM_PACK16_KHR = 1000156007,
VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = 1000156008,
VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009,
VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010,
VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011,
VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012,
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013,
VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014,
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015,
VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016,
VK_FORMAT_R12X4_UNORM_PACK16_KHR = 1000156017,
VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = 1000156018,
VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019,
VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020,
VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021,
VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022,
VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023,
VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024,
VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025,
VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026,
VK_FORMAT_G16B16G16R16_422_UNORM_KHR = 1000156027,
VK_FORMAT_B16G16R16G16_422_UNORM_KHR = 1000156028,
VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029,
VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030,
VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031,
VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032,
VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033;
/**
* Extends {@code VkImageAspectFlagBits}.
*
* Enum values:
*
*
* - {@link #VK_IMAGE_ASPECT_PLANE_0_BIT_KHR IMAGE_ASPECT_PLANE_0_BIT_KHR}
* - {@link #VK_IMAGE_ASPECT_PLANE_1_BIT_KHR IMAGE_ASPECT_PLANE_1_BIT_KHR}
* - {@link #VK_IMAGE_ASPECT_PLANE_2_BIT_KHR IMAGE_ASPECT_PLANE_2_BIT_KHR}
*
*/
public static final int
VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = 0x10,
VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = 0x20,
VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = 0x40;
/** Extends {@code VkImageCreateFlagBits}. */
public static final int VK_IMAGE_CREATE_DISJOINT_BIT_KHR = 0x200;
/**
* Extends {@code VkFormatFeatureFlagBits}.
*
* Enum values:
*
*
* - {@link #VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_DISJOINT_BIT_KHR FORMAT_FEATURE_DISJOINT_BIT_KHR}
* - {@link #VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR}
*
*/
public static final int
VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x20000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x40000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x80000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x100000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x200000,
VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = 0x400000,
VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x800000;
/**
* VkSamplerYcbcrModelConversionKHR - Color model component of a color space
*
* Description
*
*
* - {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR} specifies that the input values to the conversion are unmodified.
* - {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR} specifies no model conversion but the inputs are range expanded as for Y’CBCR.
* - {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR} specifies the color model conversion from Y’CBCR to R’G’B' defined in BT.709 and described in the “BT.709 Y’CBCR conversion” section of the Khronos Data Format Specification.
* - {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR} specifies the color model conversion from Y’CBCR to R’G’B' defined in BT.601 and described in the “BT.601 Y’CBCR conversion” section of the Khronos Data Format Specification.
* - {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR} specifies the color model conversion from Y’CBCR to R’G’B' defined in BT.2020 and described in the “BT.2020 Y’CBCR conversion” section of the Khronos Data Format Specification.
*
*
* In the {@code VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_*_KHR} color models, for the input to the sampler Y'CBCR range expansion and model conversion:
*
*
* - the Y (Y' luma) channel corresponds to the G channel of an RGB image.
* - the CB (CB or “U” blue color difference) channel corresponds to the B channel of an RGB image.
* - the CR (CR or “V” red color difference) channel corresponds to the R channel of an RGB image.
* - the alpha channel, if present, is not modified by color model conversion.
*
*
* These rules reflect the mapping of channels after the channel swizzle operation (controlled by {@link VkSamplerYcbcrConversionCreateInfoKHR}{@code ::components}).
*
* Note
*
* For example, an "{@code YUVA}" 32-bit format comprising four 8-bit channels can be implemented as {@link VK10#VK_FORMAT_R8G8B8A8_UNORM FORMAT_R8G8B8A8_UNORM} with a component mapping:
*
*
* - {@code components.a} = {@link VK10#VK_COMPONENT_SWIZZLE_IDENTITY COMPONENT_SWIZZLE_IDENTITY}
* - {@code components.r} = {@link VK10#VK_COMPONENT_SWIZZLE_B COMPONENT_SWIZZLE_B}
* - {@code components.g} = {@link VK10#VK_COMPONENT_SWIZZLE_R COMPONENT_SWIZZLE_R}
* - {@code components.b} = {@link VK10#VK_COMPONENT_SWIZZLE_G COMPONENT_SWIZZLE_G}
*
*
*
* See Also
*
* {@link VkSamplerYcbcrConversionCreateInfoKHR}
*/
public static final int
VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = 0,
VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = 1,
VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = 2,
VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = 3,
VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = 4;
/**
* VkSamplerYcbcrRangeKHR - Range of encoded values in a color space
*
* Description
*
*
* - {@link #VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR SAMPLER_YCBCR_RANGE_ITU_FULL_KHR} indicates that the full range of the encoded values are valid and interpreted according to the ITU “full range” quantization rules.
* - {@link #VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR} indicates 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 Sampler Y'CBCR Range Expansion section of the Image Operations chapter.
*
* No range modification takes place if {@code ycbcrModel} is {@link #VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR}; the {@code ycbcrRange} field of {@link VkSamplerYcbcrConversionCreateInfoKHR} is ignored in this case.
*
* See Also
*
* {@link VkSamplerYcbcrConversionCreateInfoKHR}
*/
public static final int
VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = 0,
VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = 1;
/**
* VkChromaLocationKHR - Position of downsampled chroma samples
*
* Description
*
*
* - {@link #VK_CHROMA_LOCATION_COSITED_EVEN_KHR CHROMA_LOCATION_COSITED_EVEN_KHR} indicates that downsampled chroma samples are aligned with luma samples with even coordinates.
* - {@link #VK_CHROMA_LOCATION_MIDPOINT_KHR CHROMA_LOCATION_MIDPOINT_KHR} indicates that downsampled chroma samples are located half way between each even luma sample and the nearest higher odd luma sample.
*
*
* See Also
*
* {@link VkSamplerYcbcrConversionCreateInfoKHR}
*/
public static final int
VK_CHROMA_LOCATION_COSITED_EVEN_KHR = 0,
VK_CHROMA_LOCATION_MIDPOINT_KHR = 1;
protected KHRSamplerYcbcrConversion() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(VKCapabilitiesDevice caps) {
return checkFunctions(
caps.vkCreateSamplerYcbcrConversionKHR, caps.vkDestroySamplerYcbcrConversionKHR
);
}
// --- [ vkCreateSamplerYcbcrConversionKHR ] ---
/** Unsafe version of: {@link #vkCreateSamplerYcbcrConversionKHR CreateSamplerYcbcrConversionKHR} */
public static int nvkCreateSamplerYcbcrConversionKHR(VkDevice device, long pCreateInfo, long pAllocator, long pYcbcrConversion) {
long __functionAddress = device.getCapabilities().vkCreateSamplerYcbcrConversionKHR;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(__functionAddress, device.address(), pCreateInfo, pAllocator, pYcbcrConversion);
}
/**
* Create a new Ycbcr conversion.
*
* C Specification
*
* To create a {@code VkSamplerYcbcrConversionKHR}, call:
*
*
* VkResult vkCreateSamplerYcbcrConversionKHR(
* VkDevice device,
* const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo,
* const VkAllocationCallbacks* pAllocator,
* VkSamplerYcbcrConversionKHR* pYcbcrConversion);
*
* Description
*
* The interpretation of the configured sampler Y'CBCR conversion is described in more detail in the description of sampler Y'CBCR conversion in the Image Operations chapter.
*
* Valid Usage
*
*
* - The sampler Y’CBCR conversion feature must be enabled
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pCreateInfo} must be a valid pointer to a valid {@link VkSamplerYcbcrConversionCreateInfoKHR} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pYcbcrConversion} must be a valid pointer to a {@code VkSamplerYcbcrConversionKHR} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
* - {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkSamplerYcbcrConversionCreateInfoKHR}
*
* @param device the logical device that creates the sampler Y’CBCR conversion.
* @param pCreateInfo a pointer to an instance of the {@link VkSamplerYcbcrConversionCreateInfoKHR} specifying the requested sampler Y’CBCR conversion.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
* @param pYcbcrConversion points to a {@code VkSamplerYcbcrConversionKHR} handle in which the resulting sampler Y’CBCR conversion is returned.
*/
@NativeType("VkResult")
public static int vkCreateSamplerYcbcrConversionKHR(VkDevice device, @NativeType("const VkSamplerYcbcrConversionCreateInfoKHR *") VkSamplerYcbcrConversionCreateInfoKHR pCreateInfo, @Nullable @NativeType("const VkAllocationCallbacks *") VkAllocationCallbacks pAllocator, @NativeType("VkSamplerYcbcrConversionKHR *") LongBuffer pYcbcrConversion) {
if (CHECKS) {
check(pYcbcrConversion, 1);
}
return nvkCreateSamplerYcbcrConversionKHR(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pYcbcrConversion));
}
// --- [ vkDestroySamplerYcbcrConversionKHR ] ---
/** Unsafe version of: {@link #vkDestroySamplerYcbcrConversionKHR DestroySamplerYcbcrConversionKHR} */
public static void nvkDestroySamplerYcbcrConversionKHR(VkDevice device, long ycbcrConversion, long pAllocator) {
long __functionAddress = device.getCapabilities().vkDestroySamplerYcbcrConversionKHR;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
callPJPV(__functionAddress, device.address(), ycbcrConversion, pAllocator);
}
/**
* Destroy a created Y'CbCr conversion.
*
* C Specification
*
* To destroy a sampler Y'CBCR conversion, call:
*
*
* void vkDestroySamplerYcbcrConversionKHR(
* VkDevice device,
* VkSamplerYcbcrConversionKHR ycbcrConversion,
* const VkAllocationCallbacks* pAllocator);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - If {@code ycbcrConversion} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code ycbcrConversion} must be a valid {@code VkSamplerYcbcrConversionKHR} handle
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - If {@code ycbcrConversion} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
*
*
* Host Synchronization
*
*
* - Host access to {@code ycbcrConversion} must be externally synchronized
*
*
* See Also
*
* {@link VkAllocationCallbacks}
*
* @param device the logical device that destroys the Y’CBCR conversion.
* @param ycbcrConversion the conversion to destroy.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
*/
public static void vkDestroySamplerYcbcrConversionKHR(VkDevice device, @NativeType("VkSamplerYcbcrConversionKHR") long ycbcrConversion, @Nullable @NativeType("const VkAllocationCallbacks *") VkAllocationCallbacks pAllocator) {
nvkDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, memAddressSafe(pAllocator));
}
/** Array version of: {@link #vkCreateSamplerYcbcrConversionKHR CreateSamplerYcbcrConversionKHR} */
@NativeType("VkResult")
public static int vkCreateSamplerYcbcrConversionKHR(VkDevice device, @NativeType("const VkSamplerYcbcrConversionCreateInfoKHR *") VkSamplerYcbcrConversionCreateInfoKHR pCreateInfo, @Nullable @NativeType("const VkAllocationCallbacks *") VkAllocationCallbacks pAllocator, @NativeType("VkSamplerYcbcrConversionKHR *") long[] pYcbcrConversion) {
long __functionAddress = device.getCapabilities().vkCreateSamplerYcbcrConversionKHR;
if (CHECKS) {
check(__functionAddress);
check(pYcbcrConversion, 1);
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(__functionAddress, device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pYcbcrConversion);
}
}