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

Function TEST_F

tests/unit/portability_subset.cpp:19–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17class NegativePortabilitySubset : public VkLayerTest {};
18
19TEST_F(NegativePortabilitySubset, Device) {
20 TEST_DESCRIPTION("Portability: CreateDevice called and VK_KHR_portability_subset not enabled");
21 AddRequiredExtensions(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
22 RETURN_IF_SKIP(InitFramework());
23
24 vkt::PhysicalDevice phys_device(Gpu());
25
26 // request all queues
27 const std::vector<VkQueueFamilyProperties> queue_props = phys_device.queue_properties_;
28 vkt::QueueCreateInfoArray queue_info(phys_device.queue_properties_);
29
30 // Only request creation with queuefamilies that have at least one queue
31 std::vector<VkDeviceQueueCreateInfo> create_queue_infos;
32 auto qci = queue_info.Data();
33 for (uint32_t j = 0; j < queue_info.Size(); ++j) {
34 if (qci[j].queueCount) {
35 create_queue_infos.push_back(qci[j]);
36 }
37 }
38
39 VkDeviceCreateInfo dev_info = vku::InitStructHelper();
40 dev_info.queueCreateInfoCount = create_queue_infos.size();
41 dev_info.pQueueCreateInfos = create_queue_infos.data();
42 dev_info.enabledLayerCount = 0;
43 dev_info.ppEnabledLayerNames = NULL;
44 dev_info.enabledExtensionCount = 0;
45 dev_info.ppEnabledExtensionNames =
46 nullptr; // VK_KHR_portability_subset not included in enabled extensions should trigger 04451
47
48 m_errorMonitor->SetDesiredError("VUID-VkDeviceCreateInfo-pProperties-04451");
49 VkDevice device;
50 vk::CreateDevice(Gpu(), &dev_info, nullptr, &device);
51 m_errorMonitor->VerifyFound();
52}
53
54TEST_F(NegativePortabilitySubset, Event) {
55 TEST_DESCRIPTION("Portability: CreateEvent when not supported");

Callers

nothing calls this directly

Calls 15

CreateEventFunction · 0.85
CreateRenderPassFunction · 0.85
UpdateDescriptorSetsFunction · 0.85
SetDesiredErrorMethod · 0.80
SetUnexpectedErrorMethod · 0.80
CreateViewMethod · 0.80
VertexShaderOnlyMethod · 0.80

Tested by

no test coverage detected