| 15 | class NegativeVideoEncodeQuantizationMap : public VkVideoLayerTest {}; |
| 16 | |
| 17 | TEST_F(NegativeVideoEncodeQuantizationMap, CreateSessionVideoQuantizationMapNotEnabled) { |
| 18 | TEST_DESCRIPTION("vkCreateVideoSessionKHR - quantization map flag is specified but videoEncodeQuantizationMap was not enabled"); |
| 19 | |
| 20 | AddRequiredExtensions(VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME); |
| 21 | ForceDisableFeature(vkt::Feature::videoEncodeQuantizationMap); |
| 22 | RETURN_IF_SKIP(Init()); |
| 23 | |
| 24 | VideoConfig config = GetConfigEncode(); |
| 25 | if (!config) { |
| 26 | GTEST_SKIP() << "Test requires video encode support"; |
| 27 | } |
| 28 | |
| 29 | VkVideoSessionKHR session; |
| 30 | VkVideoSessionCreateInfoKHR create_info = *config.SessionCreateInfo(); |
| 31 | create_info.pVideoProfile = config.Profile(); |
| 32 | create_info.pStdHeaderVersion = config.StdVersion(); |
| 33 | |
| 34 | for (VkVideoSessionCreateFlagBitsKHR flag : {VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, |
| 35 | VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR}) { |
| 36 | create_info.flags = flag; |
| 37 | |
| 38 | m_errorMonitor->SetAllowedFailureMsg("VUID-VkVideoSessionCreateInfoKHR-flags-10267"); |
| 39 | m_errorMonitor->SetAllowedFailureMsg("VUID-VkVideoSessionCreateInfoKHR-flags-10268"); |
| 40 | m_errorMonitor->SetDesiredError("VUID-VkVideoSessionCreateInfoKHR-flags-10264"); |
| 41 | vk::CreateVideoSessionKHR(device(), &create_info, nullptr, &session); |
| 42 | m_errorMonitor->VerifyFound(); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | TEST_F(NegativeVideoEncodeQuantizationMap, CreateSessionRequiresEncodeProfile) { |
| 47 | TEST_DESCRIPTION("vkCreateVideoSessionKHR - cannot use quantization map flags without encode profile"); |
nothing calls this directly
no test coverage detected