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

Function TEST_F

tests/unit/object_lifetime.cpp:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class NegativeObjectLifetime : public VkLayerTest {};
24
25TEST_F(NegativeObjectLifetime, CmdBufferBufferDestroyed) {
26 TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to a buffer dependency being destroyed.");
27 RETURN_IF_SKIP(Init());
28
29 vkt::Buffer buffer(*m_device, 256, VK_BUFFER_USAGE_TRANSFER_DST_BIT);
30
31 m_command_buffer.Begin();
32 vk::CmdFillBuffer(m_command_buffer, buffer, 0, VK_WHOLE_SIZE, 0);
33 m_command_buffer.End();
34
35 m_errorMonitor->SetDesiredError("VUID-vkQueueSubmit-pCommandBuffers-00070");
36 // Destroy buffer dependency prior to submit to cause ERROR
37 buffer.Destroy();
38
39 m_default_queue->Submit(m_command_buffer);
40 m_errorMonitor->VerifyFound();
41 m_default_queue->Wait();
42}
43
44TEST_F(NegativeObjectLifetime, CmdBarrierBufferDestroyed) {
45 RETURN_IF_SKIP(Init());

Callers

nothing calls this directly

Calls 15

CmdFillBufferFunction · 0.85
CmdPipelineBarrierFunction · 0.85
FreeMemoryFunction · 0.85
EndCommandBufferFunction · 0.85
CreateBufferViewFunction · 0.85
CmdBindPipelineFunction · 0.85
CmdBindDescriptorSetsFunction · 0.85
CmdDrawFunction · 0.85
DestroyBufferViewFunction · 0.85
VkShaderObjClass · 0.85
CmdDispatchFunction · 0.85
CmdClearColorImageFunction · 0.85

Tested by

no test coverage detected