MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Profiles / TEST

Function TEST

library/test/test_api_create_device_android.cpp:254–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254TEST(library_api, vpCreateDevice) {
255 TestScaffold scaffold;
256
257 const VpProfileProperties profile = {VP_ANDROID_VULKAN_PROFILE_2021_NAME, VP_ANDROID_VULKAN_PROFILE_2021_SPEC_VERSION};
258
259 VkDeviceCreateInfo info = {};
260 info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
261 info.pNext = nullptr;
262 info.queueCreateInfoCount = 1;
263 info.pQueueCreateInfos = &scaffold.queueCreateInfo;
264 info.enabledExtensionCount = 0;
265 info.ppEnabledExtensionNames = nullptr;
266 info.pEnabledFeatures = nullptr;
267
268 VpDeviceCreateInfo profileInfo = {};
269 profileInfo.pCreateInfo = &info;
270 profileInfo.enabledFullProfileCount = 1;
271 profileInfo.pEnabledFullProfiles = &profile;
272
273 VkDevice device = VK_NULL_HANDLE;
274 VkResult res = vpCreateDevice(scaffold.physicalDevice, &profileInfo, nullptr, &device);
275#if defined(__ANDROID__)
276 EXPECT_TRUE(res == VK_SUCCESS);
277 EXPECT_TRUE(device != VK_NULL_HANDLE);
278#else
279 EXPECT_TRUE(res != VK_SUCCESS);
280#endif
281}
282
283TEST(library_api, vpGetPhysicalDeviceProfileSupport) {
284 TestScaffold scaffold;

Callers

nothing calls this directly

Calls 1

IsShieldTvFunction · 0.85

Tested by

no test coverage detected