The validation layer complains:
vkCreateGraphicsPipelines: pCreateInfos[0].pViewportState->pViewports[0].height is not greater than 0.0. The Vulkan spec states: height must be greater than 0.0
and yet the vulkan spec says in documentation of VkViewport
:
The application can specify a negative term for
height
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViewport.html
What am I missing? These two statements seem to contradict each other.
In order to use negative height, you need to either enable VK_KHR_maintenance1
extension, or use Vulkan 1.1+.
I thought I was using Vulkan 1.1? I have 1.1.130 SDK installed. vulkaninfo returns 1.1.130 vulkan version, and 1.1.99 device API version. Do I need to tell vkCreateInstance something to tell it I want 1.1?
@AndrewTomazos yes, pass
VK_API_VERSION_1_1
toVkApplicationInfo.apiVersion
Technically, the physical device must support the 1.1 version (via
vkEnumeratePhysicalDevices
) in this case. That does imply though theVkApplicationInfo.apiVersion
and Instance version have to be 1.1 too to use it.