googlesamples/android-vulkan-tutorials

Validation layers give some messages

jaebaek opened this issue · 2 comments

I ran tutorial05 while turned on the following layers:

07-10 11:07:46.493 5944 5959 I Vulkan-Tutorial05: 5 layers exists
07-10 11:07:46.494 5944 5959 I Vulkan-Tutorial05: VK_LAYER_LUNARG_parameter_validation
07-10 11:07:46.494 5944 5959 I Vulkan-Tutorial05: VK_LAYER_GOOGLE_unique_objects
07-10 11:07:46.494 5944 5959 I Vulkan-Tutorial05: VK_LAYER_LUNARG_core_validation
07-10 11:07:46.494 5944 5959 I Vulkan-Tutorial05: VK_LAYER_GOOGLE_threading
07-10 11:07:46.494 5944 5959 I Vulkan-Tutorial05: VK_LAYER_LUNARG_object_tracker

They gave the following messages:

07-10 11:57:05.732 10192 10208 E Vulkan-Tutorial05: validation layer (DS): vkCreateSwapChainKHR() called with a non-supported pCreateInfo->compositeAlpha (i.e. Unhandled VkCompositeAlphaFlagBitsKHR). Supported values are:
07-10 11:57:05.732 10192 10208 E Vulkan-Tutorial05: VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
07-10 11:57:05.732 10192 10208 E Vulkan-Tutorial05: . The spec valid usage text states 'compositeAlpha must be one of the bits present in the supportedCompositeAlpha member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-compositeAlpha-01280)
07-10 11:57:05.738 10192 10208 I Vulkan-Tutorial05: <-createSwapChain
07-10 11:57:05.745 10192 10208 E Vulkan-Tutorial05: validation layer (DS): For image 0x731a276b00 you cannot transition the layout of aspect 1 from VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL when current layout is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
07-10 11:57:05.745 10192 10208 E Vulkan-Tutorial05: validation layer (DS): For image 0x731a276e00 you cannot transition the layout of aspect 1 from VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL when current layout is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
07-10 11:57:05.746 10192 10208 E Vulkan-Tutorial05: validation layer (DS): Cannot submit cmd buffer using image (0x731a276b00) [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.
07-10 11:57:05.746 10192 10208 I Vulkan-Tutorial05: Drawing frames......
07-10 11:57:05.747 10192 10208 E Vulkan-Tutorial05: validation layer (DS): Cannot submit cmd buffer using image (0x731a276e00) [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.
07-10 11:57:05.747 10192 10208 I Vulkan-Tutorial05: Drawing frames......
07-10 11:57:05.773 10192 10208 I Vulkan-Tutorial05: Drawing frames......

I just put the code how I turned on the validation layer:
https://github.com/jaebaek/android-vulkan-tutorials/tree/validation

ggfan commented

thanks fo filing the issue, will take a look.

ggfan commented

I did see errors from your app; when I added the validation layers to the tutorial5 with the same ways as tutorial2, it does not show up those errors somehow. One thing is: the code here are from the original Vulkan release days ( 2016 ), validation layers now does not have to be added for device, but that would not account for the deficits. The layer order suppose to be re-ordered so that

  // VK_LAYER_GOOGLE_unique_objects need to be after
  // VK_LAYER_LUNARG_core_validation
  // VK_GOOGLE_THREADING_LAYER better to be the very first one

I will look at the errors and fix them accordingly in app