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

Function TEST_F

tests/unit/device_generated_commands.cpp:23–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21class NegativeDeviceGeneratedCommands : public DeviceGeneratedCommandsTest {};
22
23TEST_F(NegativeDeviceGeneratedCommands, MissingFeature) {
24 SetTargetApiVersion(VK_API_VERSION_1_1);
25 AddRequiredExtensions(VK_EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME);
26 RETURN_IF_SKIP(Init());
27 InitRenderTarget();
28
29 CreatePipelineHelper pipe(*this);
30 pipe.CreateGraphicsPipeline();
31
32 vkt::PipelineLayout pipeline_layout(*m_device, {});
33 VkIndirectExecutionSetPipelineInfoEXT exe_set_pipeline_info = vku::InitStructHelper();
34 exe_set_pipeline_info.initialPipeline = pipe;
35 exe_set_pipeline_info.maxPipelineCount = 1;
36
37 VkIndirectExecutionSetCreateInfoEXT exe_set_ci = vku::InitStructHelper();
38 exe_set_ci.type = VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT;
39 exe_set_ci.info.pPipelineInfo = &exe_set_pipeline_info;
40
41 VkIndirectExecutionSetEXT exe_set;
42 m_errorMonitor->SetDesiredError("VUID-vkCreateIndirectExecutionSetEXT-deviceGeneratedCommands-11013");
43 vk::CreateIndirectExecutionSetEXT(device(), &exe_set_ci, nullptr, &exe_set);
44 m_errorMonitor->VerifyFound();
45
46 VkIndirectCommandsLayoutTokenEXT token = vku::InitStructHelper();
47 token.type = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT;
48 token.offset = 0;
49
50 VkIndirectCommandsLayoutCreateInfoEXT command_layout_ci = vku::InitStructHelper();
51 command_layout_ci.shaderStages = VK_SHADER_STAGE_VERTEX_BIT;
52 command_layout_ci.pipelineLayout = VK_NULL_HANDLE;
53 command_layout_ci.tokenCount = 1;
54 command_layout_ci.pTokens = &token;
55
56 VkIndirectCommandsLayoutEXT command_layout;
57 m_errorMonitor->SetDesiredError("VUID-vkCreateIndirectCommandsLayoutEXT-deviceGeneratedCommands-11089");
58 vk::CreateIndirectCommandsLayoutEXT(device(), &command_layout_ci, nullptr, &command_layout);
59 m_errorMonitor->VerifyFound();
60}
61
62TEST_F(NegativeDeviceGeneratedCommands, NullPipelineInfo) {
63 RETURN_IF_SKIP(InitBasicDeviceGeneratedCommands());

Callers

nothing calls this directly

Tested by

no test coverage detected