| 23 | class NegativeCommand : public VkLayerTest {}; |
| 24 | |
| 25 | TEST_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 | |
| 50 | TEST_F(NegativeCommand, IndexBufferNotBound) { |
| 51 | TEST_DESCRIPTION("Run an indexed draw call without an index buffer bound."); |
nothing calls this directly
no test coverage detected