[2.3] Issues With Vulkan RenderSystem

Problems building or running the engine, queries about how to use features etc.
Post Reply
psysu
Halfling
Posts: 72
Joined: Tue Jun 01, 2021 7:47 am
x 6

[2.3] Issues With Vulkan RenderSystem

Post by psysu »

Ogre Version: 2.3.1
Operating System: Windows 10
Render System: Vulkan Rendering System

Hi, im creating a external render window using QT. When i load Vulkan Rendering System in my application i get loads of exceptions especially when i resize the render window after rendering one frame. i handled all necessary Window Resize or Moved CBs from QT by calling Ogre::windowMovedOrResized() in my application code. Do i have to do anything specific for Vulkan Rendering System other than this ?

Here is the Ogre.log file, where you can see the exceptions i get from Ogre and Validation layer.

Code: Select all

10:55:53:  _hlmsMacroblockCreated 
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1920). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:55:54: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (951). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:01: OGRE EXCEPTION(3:RenderingAPIException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:06: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:07: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:08: OGRE EXCEPTION(3:FileNotFoundException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:09: OGRE EXCEPTION(3:InternalErrorException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:12: OGRE EXCEPTION(3:RuntimeAssertionException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:13: OGRE EXCEPTION(3:UnimplementedException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:14: OGRE EXCEPTION(3:InvalidCallException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:16: OGRE EXCEPTION(3:Exception): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:17: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkResetFences-pFences-01123 ] Object 0: handle = 0xcb3ee80000000007, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x68a5074e | VkFence 0xcb3ee80000000007[] is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkResetFences-pFences-01123)
10:56:17: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkResetDescriptorPool-descriptorPool-00313 ] Object 0: handle = 0x67022e000000004b, type = VK_OBJECT_TYPE_DESCRIPTOR_POOL; | MessageID = 0x9ff5bcc3 | It is invalid to call vkResetDescriptorPool() with descriptor sets in use by a command buffer. The Vulkan spec states: All uses of descriptorPool (via any allocated descriptor sets) must have completed execution (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkResetDescriptorPool-descriptorPool-00313)
10:56:18: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkQueuePresentKHR-pWaitSemaphores-03268 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; Object 1: handle = 0xb527dd00000000cd, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x251f8f7a | vkQueuePresentKHR: Queue VkQueue 0x227a7136780[] is waiting on pWaitSemaphores[0] (VkSemaphore 0xb527dd00000000cd[]) that has no way to be signaled. The Vulkan spec states: All elements of the pWaitSemaphores member of pPresentInfo must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-03268)
10:56:18: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkPresentInfoKHR-pImageIndices-01296 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0xc7aabc16 | vkQueuePresentKHR(): pSwapchains[0] images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in VK_IMAGE_LAYOUT_UNDEFINED. The Vulkan spec states: Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice (https://github.com/KhronosGroup/Vulkan-Docs/search?q=)VUID-VkPresentInfoKHR-pImageIndices-01296)
10:56:18: OGRE EXCEPTION(3:RenderingAPIException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:20: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:21: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:22: OGRE EXCEPTION(3:FileNotFoundException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:22: OGRE EXCEPTION(3:InternalErrorException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:24: OGRE EXCEPTION(3:RuntimeAssertionException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:24: OGRE EXCEPTION(3:UnimplementedException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:25: OGRE EXCEPTION(3:InvalidCallException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:27: OGRE EXCEPTION(3:Exception): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkQueuePresentKHR-pWaitSemaphores-03268 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; Object 1: handle = 0xad092800000000d0, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x251f8f7a | vkQueuePresentKHR: Queue VkQueue 0x227a7136780[] is waiting on pWaitSemaphores[0] (VkSemaphore 0xad092800000000d0[]) that has no way to be signaled. The Vulkan spec states: All elements of the pWaitSemaphores member of pPresentInfo must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-03268)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkPresentInfoKHR-pImageIndices-01296 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0xc7aabc16 | vkQueuePresentKHR(): pSwapchains[0] images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in VK_IMAGE_LAYOUT_UNDEFINED. The Vulkan spec states: Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice (https://github.com/KhronosGroup/Vulkan-Docs/search?q=)VUID-VkPresentInfoKHR-pImageIndices-01296)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkResetCommandPool-commandPool-00040 ] Object 0: handle = 0x227bbeb24f0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xb53e2331 | Attempt to reset command pool with VkCommandBuffer 0x227bbeb24f0[] which is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkResetCommandPool-commandPool-00040)
10:56:28: Trying presentMode = IMMEDIATE_KHR
10:56:28: Chosen presentMode = IMMEDIATE_KHR
10:56:28: surfaceCaps.currentTransform = 1
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: Trying presentMode = IMMEDIATE_KHR
10:56:28: Chosen presentMode = IMMEDIATE_KHR
10:56:28: surfaceCaps.currentTransform = 1
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (640) smaller than the corresponding framebuffer width (1056). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::width greater than or equal to width (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04533)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x227a6e1c120, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (480) smaller than the corresponding framebuffer height (528). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkQueuePresentKHR-pWaitSemaphores-03268 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; Object 1: handle = 0xad092800000000d0, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x251f8f7a | vkQueuePresentKHR: Queue VkQueue 0x227a7136780[] is waiting on pWaitSemaphores[0] (VkSemaphore 0xad092800000000d0[]) that has no way to be signaled. The Vulkan spec states: All elements of the pWaitSemaphores member of pPresentInfo must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-03268)
10:56:28: ERROR: [Validation] Code 0 : Validation Error: [ VUID-VkPresentInfoKHR-pImageIndices-01296 ] Object 0: handle = 0x227a7136780, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0xc7aabc16 | vkQueuePresentKHR(): pSwapchains[0] images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in VK_IMAGE_LAYOUT_UNDEFINED. The Vulkan spec states: Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice (https://github.com/KhronosGroup/Vulkan-Docs/search?q=)VUID-VkPresentInfoKHR-pImageIndices-01296)
10:56:28: OGRE EXCEPTION(3:RenderingAPIException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:31: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:32: OGRE EXCEPTION(3:ItemIdentityException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)
10:56:32: OGRE EXCEPTION(3:FileNotFoundException): vkWaitForFences failed
VkResult = VK_ERROR_DEVICE_LOST in bool __cdecl Ogre::VulkanQueue::_isFrameFinished(unsigned char) at RenderSystems\Vulkan\src\OgreVulkanQueue.cpp (line 1150)

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

These messages:

Code: Select all

10:55:54: Trying presentMode = IMMEDIATE_KHR
10:55:54: Chosen presentMode = IMMEDIATE_KHR
10:55:54: surfaceCaps.currentTransform = 1

Suggest that the swapchain is indeed getting recreated.

However the further errors suggest we are not really getting the new resolution.

Try stepping into VulkanWin32Window::updateWindowRect to see what the readings are, and why OgreNext receives width = 640 instead of 1056.

Perhaps you are calling windowMovedOrResized too early.

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

Did you ever solve this issue?

I have similar issues with Vulkan on Linux. It crashes after printing similar validation error messages as yours after a window is resized to a larger size than before. For some reason, the framebuffer attachment sizes still have the dimensions of the pre-enlarged window.

This doesn't happen in the Ogre examples, so there is likely something that I am doing wrong. I am not sure how to best get to the bottom of this issue, some initial debugging didn't yield any obvious causes.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

@zxz I assume you use X11 + NV? (since OP used Win32). Do you use Qt? SDL2? native?

Usually this problem is because Window::windowMovedOrResized() was not called soon enough.

On our PBS samples, it seems that after resize we notice this in VulkanWindowSwapChainBased::acquireNextSwapchain while inside VulkanRenderSystem::_endFrameOnce because vkAcquireNextImageKHR returns either VK_ERROR_OUT_OF_DATE_KHR or VK_SUBOPTIMAL_KHR.

So there's two possibilities:

  • Window::windowMovedOrResized is never called (or too late). Possibly an Ogre bug, possibly yours.

  • Window::windowMovedOrResized is called yet there is an FBO that was never updated (that'd be a blatant Ogre bug).

If you can provide a repro that'd be great. It's possible the bug has to do in how you're updating the compositor (i.e. you directly call CompositorWorkspace::_update instead of relying on Root::renderOneFrame)

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

I just realized: Some OgreNext users manually attach a depth buffer to the render window, even though this is not allowed in OgreNext.

If you are doing some weird thing with depth buffers and render windows, chances this bug would happen are high.

Can you post a callstack of when the error happens? (you can place breakpoints inside dbgFunc in OgreVulkanRenderSystem.cpp)

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

dark_sylinc wrote: Fri Mar 24, 2023 5:05 pm

@zxz I assume you use X11 + NV? (since OP used Win32). Do you use Qt? SDL2? native?

That assumption is correct. The application uses Qt, but I have tried to simplify as much as possible just to get something running. For that reason, I have not yet tried to embed the render window in the Qt application.

dark_sylinc wrote: Fri Mar 24, 2023 5:05 pm

Usually this problem is because Window::windowMovedOrResized() was not called soon enough.

On our PBS samples, it seems that after resize we notice this in VulkanWindowSwapChainBased::acquireNextSwapchain while inside VulkanRenderSystem::_endFrameOnce because vkAcquireNextImageKHR returns either VK_ERROR_OUT_OF_DATE_KHR or VK_SUBOPTIMAL_KHR.

I do not call that function manually, as I currently don't have much control over the window itself. It has just been created by createRenderWindow, and is not embedded or otherwise controlled by my application (the goal is to embed it successfully later, but I'm trying to take baby steps here). I think Ogre should still handle the resize though. The resize is currently triggered by manually resizing the window using the window manager (not through my own application). The function seems to be triggered in a similar place as you mentioned above (this breakpoint was triggered by the validation layer error):

Code: Select all

#0  0x00007ffff17152ab in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffa9b7c4b2 in ?? () from /lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so
#2  0x00007fffa96fdc5c in ?? () from /lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so
#3  0x00007fffa978cbcb in ?? () from /lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so
#4  0x00007fffa9754af9 in ?? () from /lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so
#5  0x00007fffa9545a3c in ?? () from /lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so
#6  0x00007fffbc9374f0 in Ogre::VulkanRenderPassDescriptor::setupFbo (this=0x46260c0, fboDesc=...)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp:625
#7  0x00007fffbc937f46 in Ogre::VulkanRenderPassDescriptor::entriesModified (this=0x46260c0, entryTypes=3221225727)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp:758
#8  0x00007fffbc937cae in Ogre::VulkanRenderPassDescriptor::notifySwapchainCreated (this=0x46260c0, window=0x41fde90)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp:700
#9  0x00007fffbc947584 in Ogre::VulkanRenderSystem::notifySwapchainCreated (this=0xd43850, window=0x41fde90)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp:2678
#10 0x00007fffbc96776c in Ogre::VulkanWindowSwapChainBased::createSwapchain (this=0x41fde90) at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanWindow.cpp:485
#11 0x00007fffbc99a4d8 in Ogre::VulkanXcbWindow::windowMovedOrResized (this=0x41fde90)
    at ogre-next-master/RenderSystems/Vulkan/src/Windowing/X11/OgreVulkanXcbWindow.cpp:532
#12 0x00007fffbc967e10 in Ogre::VulkanWindowSwapChainBased::acquireNextSwapchain (this=0x41fde90)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanWindow.cpp:528
#13 0x00007fffbc93022f in Ogre::VulkanQueue::commitAndNextCommandBuffer (this=0x14317b0, submissionType=Ogre::SubmissionType::EndFrameAndSwap)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanQueue.cpp:1279
#14 0x00007fffbc9047f7 in Ogre::VulkanDevice::commitAndNextCommandBuffer (this=0x1431790, submissionType=Ogre::SubmissionType::EndFrameAndSwap)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp:676
#15 0x00007fffbc9450b5 in Ogre::VulkanRenderSystem::_endFrameOnce (this=0xd43850) atogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp:1895
#16 0x00007fffce5f70fc in Ogre::CompositorManager2::_swapAllFinalTargets (this=0x19c4f70) at src/ogre-next-master/OgreMain/src/Compositor/OgreCompositorManager2.cpp:828
#17 0x00007fffce434545 in Ogre::Root::_updateAllRenderTargets (this=0x5324c0) at src/ogre-next-master/OgreMain/src/OgreRoot.cpp:1573
#18 0x00007fffce431fbc in Ogre::Root::renderOneFrame (this=0x5324c0) at ogre-next-master/OgreMain/src/OgreRoot.cpp:1102

Code: Select all

VUID-VkFramebufferCreateInfo-flags-04534(ERROR / SPEC): msgNum: 2011804586 - Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x1607360, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (1010) smaller than the corresponding framebuffer height (1100). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::extent.height greater than or equal to height (https://vulkan.lunarg.com/doc/view/1.3.224.0/linux/1.3-extensions/vkspec.html#VUID-VkFramebufferCreateInfo-flags-04534)
dark_sylinc wrote: Fri Mar 24, 2023 5:05 pm

If you can provide a repro that'd be great. It's possible the bug has to do in how you're updating the compositor (i.e. you directly call CompositorWorkspace::_update instead of relying on Root::renderOneFrame)

We normally update the compositors manually as you mentioned, but I've tried to remove that source of possible errors by reverting back to using Root::renderOneFrame while debugging this issue. I've tried to minimize the compositor setup and everything to even get this far. I will eventually have to enable features one by one to reach a fully functional application.

I get multiple validation errors as quoted above, and finally, an exception is thrown:

Code: Select all

#0  0x00007ffff17d8bb0 in __cxa_throw () from /opt/oryx/gcc11.2.0r2/lib64/libstdc++.so.6
#1  0x00007fffbc8f9c33 in Ogre::ExceptionFactory::throwException (code=Ogre::Exception::ERR_RENDERINGAPI_ERROR, number=3, desc="vkQueueSubmit failed\nVkResult = VK_ERROR_DEVICE_LOST", 
    src="void Ogre::VulkanQueue::commitAndNextCommandBuffer(Ogre::SubmissionType::SubmissionType)", 
    file=0x7fffbce7cb80 " ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanQueue.cpp", line=1239)
    at ogre-next-master/OgreMain/include/OgreException.h:299
#2  0x00007fffbc92ff69 in Ogre::VulkanQueue::commitAndNextCommandBuffer (this=0x13897c0, submissionType=Ogre::SubmissionType::EndFrameAndSwap)
    at src/ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanQueue.cpp:1239
#3  0x00007fffbc9047f7 in Ogre::VulkanDevice::commitAndNextCommandBuffer (this=0x13897a0, submissionType=Ogre::SubmissionType::EndFrameAndSwap)
    at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp:676
#4  0x00007fffbc9450b5 in Ogre::VulkanRenderSystem::_endFrameOnce (this=0xd42d40) at ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp:1895
#5  0x00007fffce7110fc in Ogre::CompositorManager2::_swapAllFinalTargets (this=0x19c5190) at ogre-next-master/OgreMain/src/Compositor/OgreCompositorManager2.cpp:828
#6  0x00007fffce54e545 in Ogre::Root::_updateAllRenderTargets (this=0x9da1a0) at ogre-next-master/OgreMain/src/OgreRoot.cpp:1573
#7  0x00007fffce54bfbc in Ogre::Root::renderOneFrame (this=0x9da1a0) at ogre-next-master/OgreMain/src/OgreRoot.cpp:1102

Code: Select all

OGRE EXCEPTION(3:RenderingAPIException): vkQueueSubmit failed
VkResult = VK_ERROR_DEVICE_LOST in void Ogre::VulkanQueue::commitAndNextCommandBuffer(Ogre::SubmissionType::SubmissionType) at src/ogre-next-master/RenderSystems/Vulkan/src/OgreVulkanQueue.cpp (line 1239)

My guess is that the failure in vkQueueSubmit is just a result of the previous fault.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

OK everything you're describing points to an OgreNext bug. This bug is happening while we're recreating the resources, however the resources we are creating have wrong settings (how?!)

I can't make sense of it:

  1. The bug happens inside notifySwapchainCreated. Which happens as the last stage of VulkanWindowSwapChainBased::createSwapchain. At this point, Window::getWidth & getHeight should have the correct settings (do they?) because this:

    Code: Select all

    setFinalResolution( Math::Clamp( getWidth(), surfaceCaps.minImageExtent.width,
                                             surfaceCaps.maxImageExtent.width ),
                                Math::Clamp( getHeight(), surfaceCaps.minImageExtent.height,
                                             surfaceCaps.maxImageExtent.height ) );

    got called. Perhaps the clamping is altering the width/height in ways that we shouldn't do?
    Now that I think about it, getWidth() and getHeight() are obtained in VulkanXcbWindow::windowMovedOrResized . The data coming straight from XCB's geometry. Perhaps this data doesn't match surfaceCaps.currentExtent???

  2. The callstack is also inside setupFbo( mSharedFboItor->second );, which is inside VulkanRenderPassDescriptor::entriesModified. That means mTargetWidth & mTargetHeight also just got updated. anyTargetTexture->isRenderWindowSpecific() must return true (if it doesn't, something fishy is going on).

  3. vkGetSwapchainImagesKHR has already been called, which means VulkanWindowSwapChainBased::mSwapchainImages should already have been populated with the new VkImage.

    • The only thing that could be fishy is if the first call to vkGetSwapchainImagesKHR (which we use to obtain numSwapchainImages) and the second call to vkGetSwapchainImagesKHR don't agree in the value of numSwapchainImages.
  4. setupFbo should be calling into VulkanRenderPassDescriptor::setupColourAttachment. Because it's a render window, it should be hitting this code:

    Code: Select all

    texName = textureVulkan->getWindowFinalTextureName( surfIdx );
    fboDesc.mWindowImageViews[surfIdx] = texture->_createView(
        texture->getPixelFormat(), mipLevel, 1u, slice, false, false, 1u, texName );

    That's why point #3 is so important, because getWindowFinalTextureName sources from VulkanWindowSwapChainBased::mSwapchainImages.

  5. setupDepthAttachment will source the depth buffer's VkImage from Window::mDepthBuffer, but it should already be at the correct resolution because of what happens in VulkanWindowSwapChainBased::createSwapchain (see setFinalResolution and then the call to mDepthBuffer->_transitionTo)

  6. The validation layer says that this:

    Code: Select all

    fbCreateInfo.width = mTargetWidth;
    fbCreateInfo.height = mTargetHeight;

    and the resolution from the VkImages (which we received from the swapchains) we submit to vkCreateFramebuffer via fboDesc.mImageViews (the pointer of fboDesc.mImageViews is set at fbCreateInfo.pAttachments = fboDesc.mImageViews;) do not match.

That makes no sense. Perhaps the swapchain we receive from the driver (see surfaceCaps.currentExtent) does not match geom obtained in windowMovedOrResized?

Back in the early days of DX11 and DX9, I remember similar bugs happening because Windows would return the size of the window including the title bar, while the swapchain doesn't have it. Or sometimes the height would be clamped against the start menu or against the monitor's max resolution.

Btw what's your monitor's resolution? If you're running on 1920x1080, It's fishy that the framebuffer height would be 1100 (20 pixels larger than the max height), which is what the validation layer is complaining.

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

dark_sylinc wrote: Fri Mar 24, 2023 11:30 pm
  1. The bug happens inside notifySwapchainCreated. Which happens as the last stage of VulkanWindowSwapChainBased::createSwapchain. At this point, Window::getWidth & getHeight should have the correct settings (do they?) because this:

    Code: Select all

    setFinalResolution( Math::Clamp( getWidth(), surfaceCaps.minImageExtent.width,
                                             surfaceCaps.maxImageExtent.width ),
                                Math::Clamp( getHeight(), surfaceCaps.minImageExtent.height,
                                             surfaceCaps.maxImageExtent.height ) );
    got called. Perhaps the clamping is altering the width/height in ways that we shouldn't do?

getHeight() and getWidth() at this point contain the new window size (looks ok). surfaceCaps.minImageExtent also contains the new dimensions.

dark_sylinc wrote: Fri Mar 24, 2023 11:30 pm

Now that I think about it, getWidth() and getHeight() are obtained in VulkanXcbWindow::windowMovedOrResized . The data coming straight from XCB's geometry. Perhaps this data doesn't match surfaceCaps.currentExtent???

  1. The callstack is also inside setupFbo( mSharedFboItor->second );, which is inside VulkanRenderPassDescriptor::entriesModified. That means mTargetWidth & mTargetHeight also just got updated. anyTargetTexture->isRenderWindowSpecific() must return true (if it doesn't, something fishy is going on).

mTargetWidth and mTargetWidth contain the new window dimensions, seems alright.

dark_sylinc wrote: Fri Mar 24, 2023 11:30 pm
  1. vkGetSwapchainImagesKHR has already been called, which means VulkanWindowSwapChainBased::mSwapchainImages should already have been populated with the new VkImage.

    • The only thing that could be fishy is if the first call to vkGetSwapchainImagesKHR (which we use to obtain numSwapchainImages) and the second call to vkGetSwapchainImagesKHR don't agree in the value of numSwapchainImages.
  2. setupFbo should be calling into VulkanRenderPassDescriptor::setupColourAttachment. Because it's a render window, it should be hitting this code:

    Code: Select all

    texName = textureVulkan->getWindowFinalTextureName( surfIdx );
    fboDesc.mWindowImageViews[surfIdx] = texture->_createView(
        texture->getPixelFormat(), mipLevel, 1u, slice, false, false, 1u, texName );

    That's why point #3 is so important, because getWindowFinalTextureName sources from VulkanWindowSwapChainBased::mSwapchainImages.

It does call into _createView. However, I don't quite understand where the new resolution get passed into the new attachments though. I am having some trouble following along with the code here. I'll try to dig a bit deeper. Let me know if there are some locations in the code where I can query the resolutions. The places I've found so far refer to the new (correct) resolution.

dark_sylinc wrote: Fri Mar 24, 2023 11:30 pm

Btw what's your monitor's resolution? If you're running on 1920x1080, It's fishy that the framebuffer height would be 1100 (20 pixels larger than the max height), which is what the validation layer is complaining.

The monitor resolution is larger than 1920x1080, the window dimensions seem correct to me. I don't think this is the problem.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

surfaceCaps.minImageExtent also contains the new dimensions.

You mean surfaceCaps.currentExtent?
Also does the value change after clamping?

at this point contain the new window size (looks ok)

Be extra careful because the validation layer is complaining the difference is 1010 vs 1100. It's very easy to confuse them and think they are alright.

However, I don't quite understand where the new resolution get passed into the new attachments though.

Two ways:

  1. Via mTargetWidth & mTargetHeight (passed to fbCreateInfo)
  2. Implicitly in the VkImage (which we obtain from vkGetSwapchainImagesKHR from the render window, and we create them for the depth buffer)

The validation layer says the resolution passed to fbCreateInfo.width/height does not match that of the VkImage(s).

Btw what is the value of mTargetHeight? 1010 or 1100?

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

dark_sylinc wrote: Sat Mar 25, 2023 12:15 am

surfaceCaps.minImageExtent also contains the new dimensions.

You mean surfaceCaps.currentExtent?

I didn't see this variable accessed in the Ogre code, but I've now queried it inside VulkanWindowSwapChainBased::createSwapchain, where it contains the new (larger) window dimensions.

dark_sylinc wrote: Sat Mar 25, 2023 12:15 am

Also does the value change after clamping?

at this point contain the new window size (looks ok)

Be extra careful because the validation layer is complaining the difference is 1010 vs 1100. It's very easy to confuse them and think they are alright.

I understand your point of caution here :)

dark_sylinc wrote: Sat Mar 25, 2023 12:15 am

However, I don't quite understand where the new resolution get passed into the new attachments though.

Two ways:

  1. Via mTargetWidth & mTargetHeight (passed to fbCreateInfo)
  2. Implicitly in the VkImage (which we obtain from vkGetSwapchainImagesKHR from the render window, and we create them for the depth buffer)

The validation layer says the resolution passed to fbCreateInfo.width/height does not match that of the VkImage(s).

Btw what is the value of mTargetHeight? 1010 or 1100?

Well, those numbers came from a random run with a manual resize, and aren't easily reproducible. To make it less confusing, I have set up an example where I set the window to a fixed size instead. mTargetWidth and mTargetHeight contain the new, larger dimensions (same as in the validation warning). It looks normal.

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

My previous (deleted) reply was rather confused, because the smaller dimensions happened to be the window dimensions given to createRenderWindow, (which I wasn't aware of at the time of writing), despite the physical window ending up smaller afterwards (because of the window manager).

Any window resize to smaller dimensions than the initial one does not result in a crash, but can give funny blocky artifacts in the render window (irrelevant to this investigation). The validation errors only occur when the window is resized to a larger size. I have verified the physical dimensions of the window before and after the resize now, and the numbers in the validation error matches. That is, the smaller dimensions correspond to the pre-resize dimensions, and the larger ones correspond to the post-resize dimensions. This doesn't add a lot of new information, but I just wanted to clarify this point.

zxz
Gremlin
Posts: 184
Joined: Sat Apr 16, 2016 9:25 pm
x 19

Re: [2.3] Issues With Vulkan RenderSystem

Post by zxz »

I think that I've figured something out. One of the VkImages used for creating an image view that is then passed to the framebuffer creation, texName in the snippet below:

Code: Select all

fboDesc.mWindowImageViews[surfIdx] = texture->_createView(
    texture->getPixelFormat(), mipLevel, 1u, slice, false, false, 1u, texName );

comes from the colour attachment (the window) that is looked up here in VulkanRenderPassDescriptor::setupColourAttachment:
https://github.com/OGRECave/ogre-next/b ... r.cpp#L294

This VkImage is created in VulkanTextureGpuRenderTarget::createMsaaSurface here:
https://github.com/OGRECave/ogre-next/b ... u.cpp#L961

That texture is never resized, and has the initial dimensions of the render window. So the view is created over that, which is too small after the window has been grown.

The OgreNext samples never run into this issue because they always select the maximum resolution when creating the window. Or more precisely, they use the values from the "Video mode" option, which by default is large enough for the whole screen. I can easily reproduce the error in the samples by selecting a "Video mode" smaller than the window size.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

Aha!!!

I can repro your problem. MSAA is also required to trigger the problem. I created a ticket on Github to track the bug.

I suspect the MSAA surface's resolution is not updated. Thanks for the detective work!

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.3] Issues With Vulkan RenderSystem

Post by dark_sylinc »

Fixed.

Thanks for all the detective work!

Post Reply