I've been coding a Vulkan rendering engine for the past few weeks. My code still continues to execute and I get the desired output, but I am getting an error.
I'm fairly certain that my error is a mistake in my code somewhere. My code is 1000+ lines, so I'm not going to ask anyone to debug it. I guess my question is what typically causes the error I'm getting, and how can I fix it?
I've been pretty closely following this (if this helps anyone): https://software.intel.com/en-us/articles/api-without-secrets-introduction-to-vulkan-part-3#_Toc445674490
My code draws the desired triangle from the tutorial, but I get an error for the first 3 frames:
VKDBG: ERROR: @[DS]: Cannot submit cmd buffer using image (0x6) [sub-resource: aspectMask 0x1 array layer 0, mip level 0], with layout VK_IMAGE_LAYOUT_UNDEFINED when first use is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
VKDBG: ERROR: @[DS]: Cannot submit cmd buffer using image (0x7) [sub-resource: aspectMask 0x1 array layer 0, mip level 0], with layout VK_IMAGE_LAYOUT_UNDEFINED when first use is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
VKDBG: ERROR: @[DS]: Cannot submit cmd buffer using image (0x8) [sub-resource: aspectMask 0x1 array layer 0, mip level 0], with layout VK_IMAGE_LAYOUT_UNDEFINED when first use is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
I suppose I could just ignore this, because I get a desired output and the error doesn't seem to break anything, but I would guess that it's bad practice to leave this unfixed.
Thank you for anyone helping!