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

Function TEST_F

tests/unit/threading_positive.cpp:24–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22class PositiveThreading : public VkLayerTest {};
23
24TEST_F(PositiveThreading, DisplayObjects) {
25 TEST_DESCRIPTION("Create and use VkDisplayKHR objects with GetPhysicalDeviceDisplayPropertiesKHR in thread-safety.");
26
27 AddRequiredExtensions(VK_KHR_SURFACE_EXTENSION_NAME);
28 AddRequiredExtensions(VK_KHR_DISPLAY_EXTENSION_NAME);
29 RETURN_IF_SKIP(Init());
30
31 uint32_t prop_count = 0;
32 vk::GetPhysicalDeviceDisplayPropertiesKHR(Gpu(), &prop_count, nullptr);
33 if (prop_count == 0) {
34 GTEST_SKIP() << "No VkDisplayKHR properties to query";
35 }
36
37 std::vector<VkDisplayPropertiesKHR> display_props{prop_count};
38 // Create a VkDisplayKHR object
39 vk::GetPhysicalDeviceDisplayPropertiesKHR(Gpu(), &prop_count, display_props.data());
40 ASSERT_NE(prop_count, 0U);
41
42 // Now use this new object in an API call that thread safety will track
43 prop_count = 0;
44 vk::GetDisplayModePropertiesKHR(Gpu(), display_props[0].display, &prop_count, nullptr);
45}
46
47TEST_F(PositiveThreading, DisplayPlaneObjects) {
48 TEST_DESCRIPTION("Create and use VkDisplayKHR objects with GetPhysicalDeviceDisplayPlanePropertiesKHR in thread-safety.");

Callers

nothing calls this directly

Calls 15

UpdateDescriptorFunction · 0.85
DestroyFenceFunction · 0.85
UpdateDescriptorSetsFunction · 0.85
CmdBindDescriptorSetsFunction · 0.85
GetDeviceQueueFunction · 0.85
QueueSubmitFunction · 0.85
QueueWaitIdleFunction · 0.85
EnumeratePhysicalDevicesFunction · 0.85

Tested by

no test coverage detected