MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / VkVideoLayerTest

Class VkVideoLayerTest

tests/framework/video_objects.h:3119–4100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3117};
3118
3119class VkVideoLayerTest : public VkLayerTest {
3120 protected:
3121 void SetTargetApiVersion(APIVersion target_api_version) {
3122 assert(!initialized_);
3123 VkLayerTest::SetTargetApiVersion(target_api_version);
3124 custom_target_api_version_ = true;
3125 }
3126
3127 void AddRequiredFeature(vkt::Feature feature) {
3128 assert(!initialized_);
3129 required_features_.insert(feature);
3130 }
3131
3132 void AddOptionalFeature(vkt::Feature feature) {
3133 assert(!initialized_);
3134 optional_features_.insert(feature);
3135 }
3136
3137 void ForceDisableFeature(vkt::Feature feature) {
3138 assert(!initialized_);
3139 required_features_.erase(feature);
3140 optional_features_.erase(feature);
3141 }
3142
3143 void Init() {
3144 // Video requires at least Vulkan 1.1
3145 if (!custom_target_api_version_) {
3146 SetTargetApiVersion(VK_API_VERSION_1_1);
3147 }
3148
3149 AddRequiredExtensions(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME);
3150
3151 AddRequiredExtensions(VK_KHR_VIDEO_QUEUE_EXTENSION_NAME);
3152
3153 AddOptionalExtensions(VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME);
3154 AddOptionalExtensions(VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME);
3155
3156 // NOTE: this appears to be required for the format that is chosen in
3157 // VkVideoLayerTest.BeginCodingIncompatRefPicProfile
3158 AddOptionalExtensions(VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME);
3159 AddOptionalFeature(vkt::Feature::ycbcr2plane444Formats);
3160
3161 AddOptionalExtensions(VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME);
3162 AddOptionalExtensions(VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME);
3163 AddOptionalExtensions(VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME);
3164 AddOptionalExtensions(VK_KHR_VIDEO_DECODE_VP9_EXTENSION_NAME);
3165
3166 AddOptionalExtensions(VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME);
3167 AddOptionalExtensions(VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME);
3168 AddOptionalExtensions(VK_KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME);
3169
3170 AddOptionalExtensions(VK_KHR_VIDEO_ENCODE_FEEDBACK_2_EXTENSION_NAME);
3171
3172 for (auto feature : required_features_) {
3173 VkLayerTest::AddRequiredFeature(feature);
3174 }
3175 for (auto feature : optional_features_) {
3176 VkLayerTest::AddOptionalFeature(feature);

Callers

nothing calls this directly

Calls 6

NeedsSessionParamsMethod · 0.80
EncodeCapsMethod · 0.80
CapsMethod · 0.80
emptyMethod · 0.45
IsEncodeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected