No longer enable validation layers at device level, deprecated since SDK 1.0.17.0 (refs #189)
This commit is contained in:
parent
268d268859
commit
8ff0ad57ba
1 changed files with 7 additions and 6 deletions
|
|
@ -54,12 +54,18 @@ VkResult VulkanExampleBase::createDevice(VkDeviceQueueCreateInfo requestedQueues
|
||||||
{
|
{
|
||||||
std::vector<const char*> enabledExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME };
|
std::vector<const char*> enabledExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME };
|
||||||
|
|
||||||
|
VkPhysicalDeviceFeatures enabledFeatures = {};
|
||||||
|
enabledFeatures.tessellationShader = true;
|
||||||
|
enabledFeatures.shaderTessellationAndGeometryPointSize = true;
|
||||||
|
enabledFeatures.shaderClipDistance = true;
|
||||||
|
enabledFeatures.shaderCullDistance = true;
|
||||||
|
|
||||||
VkDeviceCreateInfo deviceCreateInfo = {};
|
VkDeviceCreateInfo deviceCreateInfo = {};
|
||||||
deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
||||||
deviceCreateInfo.pNext = NULL;
|
deviceCreateInfo.pNext = NULL;
|
||||||
deviceCreateInfo.queueCreateInfoCount = 1;
|
deviceCreateInfo.queueCreateInfoCount = 1;
|
||||||
deviceCreateInfo.pQueueCreateInfos = &requestedQueues;
|
deviceCreateInfo.pQueueCreateInfos = &requestedQueues;
|
||||||
deviceCreateInfo.pEnabledFeatures = NULL;
|
deviceCreateInfo.pEnabledFeatures = &enabledFeatures;
|
||||||
|
|
||||||
// enable the debug marker extension if it is present (likely meaning a debugging tool is present)
|
// enable the debug marker extension if it is present (likely meaning a debugging tool is present)
|
||||||
if (vkTools::checkDeviceExtensionPresent(physicalDevice, VK_EXT_DEBUG_MARKER_EXTENSION_NAME))
|
if (vkTools::checkDeviceExtensionPresent(physicalDevice, VK_EXT_DEBUG_MARKER_EXTENSION_NAME))
|
||||||
|
|
@ -73,11 +79,6 @@ VkResult VulkanExampleBase::createDevice(VkDeviceQueueCreateInfo requestedQueues
|
||||||
deviceCreateInfo.enabledExtensionCount = (uint32_t)enabledExtensions.size();
|
deviceCreateInfo.enabledExtensionCount = (uint32_t)enabledExtensions.size();
|
||||||
deviceCreateInfo.ppEnabledExtensionNames = enabledExtensions.data();
|
deviceCreateInfo.ppEnabledExtensionNames = enabledExtensions.data();
|
||||||
}
|
}
|
||||||
if (enableValidation)
|
|
||||||
{
|
|
||||||
deviceCreateInfo.enabledLayerCount = vkDebug::validationLayerCount;
|
|
||||||
deviceCreateInfo.ppEnabledLayerNames = vkDebug::validationLayerNames;
|
|
||||||
}
|
|
||||||
|
|
||||||
return vkCreateDevice(physicalDevice, &deviceCreateInfo, nullptr, &device);
|
return vkCreateDevice(physicalDevice, &deviceCreateInfo, nullptr, &device);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue