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

Function TEST_F

tests/unit/best_practices_nvidia.cpp:29–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27class NegativeBestPracticesNV : public VkBestPracticesLayerTest {};
28
29TEST_F(NegativeBestPracticesNV, PageableDeviceLocalMemory) {
30 AddRequiredExtensions(VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME);
31 RETURN_IF_SKIP(InitBestPracticesFramework(kEnableNVIDIAValidation));
32
33 VkDeviceQueueCreateInfo queue_ci = vku::InitStructHelper();
34 queue_ci.queueCount = 1;
35 queue_ci.pQueuePriorities = &defaultQueuePriority;
36
37 VkDeviceCreateInfo device_ci = vku::InitStructHelper();
38 device_ci.queueCreateInfoCount = 1;
39 device_ci.pQueueCreateInfos = &queue_ci;
40
41 VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT pageable = vku::InitStructHelper();
42 pageable.pageableDeviceLocalMemory = VK_TRUE;
43
44 {
45 m_errorMonitor->SetDesiredFailureMsg(kPerformanceWarningBit, "BestPractices-NVIDIA-CreateDevice-PageableDeviceLocalMemory");
46 VkDevice test_device = VK_NULL_HANDLE;
47 VkResult err = vk::CreateDevice(Gpu(), &device_ci, nullptr, &test_device);
48 m_errorMonitor->VerifyFound();
49 if (err == VK_SUCCESS) {
50 vk::DestroyDevice(test_device, nullptr);
51 }
52 }
53
54 // Now enable the expected features
55 device_ci.enabledExtensionCount = m_device_extension_names.size();
56 device_ci.ppEnabledExtensionNames = m_device_extension_names.data();
57 device_ci.pNext = &pageable;
58
59 {
60 m_errorMonitor->SetDesiredFailureMsg(kPerformanceWarningBit, "BestPractices-NVIDIA-CreateDevice-PageableDeviceLocalMemory");
61 vkt::Device test_device(Gpu(), device_ci);
62 m_errorMonitor->Finish();
63 }
64}
65
66TEST_F(NegativeBestPracticesNV, TilingLinear) {
67 RETURN_IF_SKIP(InitBestPracticesFramework(kEnableNVIDIAValidation));

Callers

nothing calls this directly

Calls 15

GetDeviceQueueFunction · 0.85
QueueBindSparseFunction · 0.85
BindBufferMemoryFunction · 0.85
CmdBindPipelineFunction · 0.85
CmdSetDepthTestEnableFunction · 0.85
CmdBeginRenderingFunction · 0.85
CmdSetDepthCompareOpFunction · 0.85
CmdDrawFunction · 0.85
CmdEndRenderingFunction · 0.85
CmdClearAttachmentsFunction · 0.85

Tested by

no test coverage detected