Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.12k stars 513 forks source link

Viewport were not provided via calls to vkCmdSetViewport #144

Closed ChetanGandhi closed 5 years ago

ChetanGandhi commented 5 years ago

Hi,

I am getting this error Dynamic viewport(s) 0 are used by pipeline state object, but were not provided via calls to vkCmdSetViewport

I am not sure why the validation layer started reporting this, but might be due to the new driver and Vulkan SDK.

Can you please provide more details on this API and where and how to use it.

My system configuration: Graphics card: Nvidia GeForce 930M Driver version: 431.60 CPU: Intel i5-6200U Vulkan SDK: 1.1.114.0

Thanks a lot for your wonderful tutorial :)

Overv commented 5 years ago

Did you set pDynamicState to something other than nullptr? Because if you did and you set the viewport to be dynamic, then you must have a call to vkCmdSetViewport.

ChetanGandhi commented 5 years ago

Yes, you are correct. I am setting following values VkDynamicState dynamicStates[] = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_LINE_WIDTH };

This code is from Fixed functions chapter but we are not using vkCmdSetViewport anywhere. Are we missing the call to this API ?

Overv commented 5 years ago

No, you're just not supposed to use dynamic states in this tutorial. It is meant as an example for further exploration.

ChetanGandhi commented 5 years ago

Ok. Thanks for clarifying this. I will remove the related code :)