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

Function TEST_F

tests/unit/command.cpp:25–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class NegativeCommand : public VkLayerTest {};
24
25TEST_F(NegativeCommand, CommandPoolConsistency) {
26 TEST_DESCRIPTION("Allocate command buffers from one command pool and attempt to delete them from another.");
27
28 m_errorMonitor->SetDesiredError("VUID-vkFreeCommandBuffers-pCommandBuffers-parent");
29
30 RETURN_IF_SKIP(Init());
31
32 VkCommandPoolCreateInfo pool_create_info = vku::InitStructHelper();
33 pool_create_info.queueFamilyIndex = m_device->graphics_queue_node_index_;
34 pool_create_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
35
36 vkt::CommandPool command_pool_1(*m_device, pool_create_info);
37 vkt::CommandPool command_pool_2(*m_device, pool_create_info);
38
39 VkCommandBuffer cb;
40 VkCommandBufferAllocateInfo command_buffer_allocate_info = vku::InitStructHelper();
41 command_buffer_allocate_info.commandPool = command_pool_1;
42 command_buffer_allocate_info.commandBufferCount = 1;
43 command_buffer_allocate_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
44 vk::AllocateCommandBuffers(device(), &command_buffer_allocate_info, &cb);
45
46 vk::FreeCommandBuffers(device(), command_pool_2, 1, &cb);
47 m_errorMonitor->VerifyFound();
48}
49
50TEST_F(NegativeCommand, IndexBufferNotBound) {
51 TEST_DESCRIPTION("Run an indexed draw call without an index buffer bound.");

Callers

nothing calls this directly

Calls 15

AllocateCommandBuffersFunction · 0.85
FreeCommandBuffersFunction · 0.85
CmdBindPipelineFunction · 0.85
CmdDrawIndexedFunction · 0.85
CmdBindIndexBufferFunction · 0.85
CmdDrawFunction · 0.85
CmdClearAttachmentsFunction · 0.85
QueueSubmit2KHRFunction · 0.85
CmdPushConstantsFunction · 0.85
CmdPushConstants2KHRFunction · 0.85
EndCommandBufferFunction · 0.85

Tested by

no test coverage detected