VkVideoSessionCreateInfoKHR
The VkVideoSessionCreateInfoKHR structure is defined as:
typedef struct VkVideoSessionCreateInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t queueFamilyIndex;
VkVideoSessionCreateFlagsKHR flags;
const VkVideoProfileInfoKHR* pVideoProfile;
VkFormat pictureFormat;
VkExtent2D maxCodedExtent;
VkFormat referencePictureFormat;
uint32_t maxDpbSlots;
uint32_t maxActiveReferencePictures;
const VkExtensionProperties* pStdHeaderVersion;
} VkVideoSessionCreateInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.queueFamilyIndexis the index of the queue family the created video session will be used with.flagsis a bitmask of VkVideoSessionCreateFlagBitsKHR specifying creation flags.pVideoProfileis a pointer to a VkVideoProfileInfoKHR structure specifying the video profile the created video session will be used with.pictureFormatis the image format the created video session will be used with. IfpVideoProfile→videoCodecOperationspecifies a decode operation, thenpictureFormatis the image format of decode output pictures usable with the created video session. IfpVideoProfile→videoCodecOperationspecifies an encode operation, thenpictureFormatis the image format of encode input pictures usable with the created video session.maxCodedExtentis the maximum width and height of the coded frames the created video session will be used with.referencePictureFormatis the image format of reference pictures stored in the DPB the created video session will be used with.maxDpbSlotsis the maximum number of DPB Slots that can be used with the created video session.maxActiveReferencePicturesis the maximum number of active reference pictures that can be used in a single video coding operation using the created video session.pStdHeaderVersionis a pointer to a VkExtensionProperties structure requesting the Video Std header version to use for thevideoCodecOperationspecified inpVideoProfile.
Valid Usage
VUID-VkVideoSessionCreateInfoKHR-protectedMemory-07189
If the protectedMemory feature is
not enabled or if VkVideoCapabilitiesKHR::flags does not
include VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, as returned
by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified by pVideoProfile, then flags must not include
VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR
VUID-VkVideoSessionCreateInfoKHR-flags-08371
If flags includes
VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then
videoMaintenance1 must be enabled
VUID-VkVideoSessionCreateInfoKHR-flags-10398
If flags includes
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then
videoMaintenance2 must be enabled
VUID-VkVideoSessionCreateInfoKHR-flags-10399
If flags includes
VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then
pVideoProfile→videoCodecOperation must specify a decode
operation
VUID-VkVideoSessionCreateInfoKHR-flags-10264
If flags includes
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR
or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then
the videoEncodeQuantizationMap feature must be enabled
VUID-VkVideoSessionCreateInfoKHR-flags-10265
If flags includes
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR
or VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, then
pVideoProfile→videoCodecOperation must specify an encode
operation
VUID-VkVideoSessionCreateInfoKHR-flags-10266
If flags includes
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR,
then it must not also include
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR
VUID-VkVideoSessionCreateInfoKHR-flags-10267
If VkVideoEncodeCapabilitiesKHR::flags does not include
VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile specified by pVideoProfile, then flags must not
include
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR
VUID-VkVideoSessionCreateInfoKHR-flags-10268
If VkVideoEncodeCapabilitiesKHR::flags does not include
VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified by pVideoProfile, then flags must not include
VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-04845
pVideoProfile must be a supported video
profile
VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04847
maxDpbSlots must be less than or equal to
VkVideoCapabilitiesKHR::maxDpbSlots, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified by pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-maxActiveReferencePictures-04849
maxActiveReferencePictures must be less than or equal to
VkVideoCapabilitiesKHR::maxActiveReferencePictures, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile specified by pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-maxDpbSlots-04850
If either maxDpbSlots or maxActiveReferencePictures is 0,
then both must be 0
VUID-VkVideoSessionCreateInfoKHR-maxCodedExtent-04851
maxCodedExtent must be between
VkVideoCapabilitiesKHR::minCodedExtent and
VkVideoCapabilitiesKHR::maxCodedExtent, inclusive, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile specified by pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-04852
If pVideoProfile→videoCodecOperation specifies a decode operation
and maxActiveReferencePictures is greater than 0, then
referencePictureFormat must be one of the supported decode DPB
formats, as returned by
vkGetPhysicalDeviceVideoFormatPropertiesKHR in
VkVideoFormatPropertiesKHR::format when called with the
imageUsage member of its pVideoFormatInfo parameter
containing VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, and with a
VkVideoProfileListInfoKHR structure specified in the pNext
chain of its pVideoFormatInfo parameter whose pProfiles
member contains an element matching pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-06814
If pVideoProfile→videoCodecOperation specifies an encode
operation and maxActiveReferencePictures is greater than 0, then
referencePictureFormat must be one of the supported decode DPB
formats, as returned by then referencePictureFormat must be one
of the supported encode DPB formats, as returned by
vkGetPhysicalDeviceVideoFormatPropertiesKHR in
VkVideoFormatPropertiesKHR::format when called with the
imageUsage member of its pVideoFormatInfo parameter
containing VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, and with a
VkVideoProfileListInfoKHR structure specified in the pNext
chain of its pVideoFormatInfo parameter whose pProfiles
member contains an element matching pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04853
If pVideoProfile→videoCodecOperation specifies a decode
operation, then pictureFormat must be one of the supported decode
output formats, as returned by
vkGetPhysicalDeviceVideoFormatPropertiesKHR in
VkVideoFormatPropertiesKHR::format when called with the
imageUsage member of its pVideoFormatInfo parameter
containing VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, and with a
VkVideoProfileListInfoKHR structure specified in the pNext
chain of its pVideoFormatInfo parameter whose pProfiles
member contains an element matching pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pictureFormat-04854
If pVideoProfile→videoCodecOperation specifies an encode
operation, then pictureFormat must be one of the supported encode
input formats, as returned by
vkGetPhysicalDeviceVideoFormatPropertiesKHR in
VkVideoFormatPropertiesKHR::format when called with the
imageUsage member of its pVideoFormatInfo parameter
containing VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, and with a
VkVideoProfileListInfoKHR structure specified in the pNext
chain of its pVideoFormatInfo parameter whose pProfiles
member contains an element matching pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190
pStdHeaderVersion→extensionName must match
VkVideoCapabilitiesKHR::stdHeaderVersion.extensionName, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile specified by pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191
pStdHeaderVersion→specVersion must be less than or equal to
VkVideoCapabilitiesKHR::stdHeaderVersion.specVersion, as
returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video
profile specified by pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08251
If pVideoProfile→videoCodecOperation is
VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and the pNext
chain of this structure includes a
VkVideoEncodeH264SessionCreateInfoKHR structure, then its
maxLevelIdc member must be less than or equal to
VkVideoEncodeH264CapabilitiesKHR::maxLevelIdc, as returned
by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified in pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-08252
If pVideoProfile→videoCodecOperation is
VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and the pNext
chain of this structure includes a
VkVideoEncodeH265SessionCreateInfoKHR structure, then its
maxLevelIdc member must be less than or equal to
VkVideoEncodeH265CapabilitiesKHR::maxLevelIdc, as returned
by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified in pVideoProfile
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10269
If pVideoProfile→videoCodecOperation is
VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, then the
videoEncodeAV1 feature must be
enabled
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-10270
If pVideoProfile→videoCodecOperation is
VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and the pNext
chain of this structure includes a
VkVideoEncodeAV1SessionCreateInfoKHR structure, then its
maxLevel member must be less than or equal to
VkVideoEncodeAV1CapabilitiesKHR::maxLevel, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile
specified in pVideoProfile
Valid Usage (Implicit)
VUID-VkVideoSessionCreateInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR
VUID-VkVideoSessionCreateInfoKHR-pNext-pNext
Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkVideoEncodeAV1SessionCreateInfoKHR, VkVideoEncodeH264SessionCreateInfoKHR, or VkVideoEncodeH265SessionCreateInfoKHR
VUID-VkVideoSessionCreateInfoKHR-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkVideoSessionCreateInfoKHR-flags-parameter
flags must be a valid combination of VkVideoSessionCreateFlagBitsKHR values
VUID-VkVideoSessionCreateInfoKHR-pVideoProfile-parameter
pVideoProfile must be a valid pointer to a valid VkVideoProfileInfoKHR structure
VUID-VkVideoSessionCreateInfoKHR-pictureFormat-parameter
pictureFormat must be a valid VkFormat value
VUID-VkVideoSessionCreateInfoKHR-referencePictureFormat-parameter
referencePictureFormat must be a valid VkFormat value
VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-parameter
pStdHeaderVersion must be a valid pointer to a valid VkExtensionProperties structure