Andrew Tomazos
Andrew Tomazos

Reputation: 68708

VkViewport negative height?

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

https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkViewport-height-01772

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.

Upvotes: 0

Views: 597

Answers (1)

krOoze
krOoze

Reputation: 13306

In order to use negative height, you need to either enable VK_KHR_maintenance1 extension, or use Vulkan 1.1+.

Upvotes: 1

Related Questions