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

Function TEST_F

tests/unit/video_encode_quantization_map.cpp:17–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15class NegativeVideoEncodeQuantizationMap : public VkVideoLayerTest {};
16
17TEST_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
46TEST_F(NegativeVideoEncodeQuantizationMap, CreateSessionRequiresEncodeProfile) {
47 TEST_DESCRIPTION("vkCreateVideoSessionKHR - cannot use quantization map flags without encode profile");

Callers

nothing calls this directly

Calls 15

CreateVideoSessionKHRFunction · 0.85
CmdPipelineBarrier2KHRFunction · 0.85
CreateImageFunction · 0.85
CreateImageViewFunction · 0.85
SessionCreateInfoMethod · 0.80
ProfileMethod · 0.80
StdVersionMethod · 0.80
SetAllowedFailureMsgMethod · 0.80
SetDesiredErrorMethod · 0.80
EncodeCapsMethod · 0.80

Tested by

no test coverage detected