GraphicsProgramming / RVPT

Realtime Vulkan path tracer from scratch kind of thing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validation errors flood the terminal while running code from the latest master.

archydragon opened this issue · comments

The application seems to work correctly but produces a lot of validation errors like these:

[ERROR: Validation] Validation Error: [ VUID-vkMapMemory-size-00680 ] Object 0: handle = 0x68be0d00000000a8, type = VK_OBJECT_TYPE_UNKNOWN; | MessageID = 0xff4787ab | VkMapMemory: Attempting to map memory range of size zero The Vulkan spec states: If size is not equal to VK_WHOLE_SIZE, size must be greater than 0 (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-vkMapMemory-size-00680)
[ERROR: Validation] Validation Error: [ VUID-vkUnmapMemory-memory-00689 ] Object 0: handle = 0x68be0d00000000a8, type = VK_OBJECT_TYPE_UNKNOWN; | MessageID = 0x36bc763c | Unmapping Memory without memory being mapped: VkNonDispatchableHandle 0x68be0d00000000a8[]. The Vulkan spec states: memory must be currently host mapped (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-vkUnmapMemory-memory-00689)
[ERROR: Validation] Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass ] Object 0: handle = 0x4e94bdc, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa1662b9 | You cannot start a render pass using attachment 0 where the render pass initial layout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL and the previous known layout of the attachment is VK_IMAGE_LAYOUT_PRESENT_SRC_KHR. The layouts must match, or the render pass initial layout for the attachment must be VK_IMAGE_LAYOUT_UNDEFINED
[ERROR: Validation] Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0xaa7c78c, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | Submitted command buffer expects VkNonDispatchableHandle 0x52cbfd0000000098[] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, current layout is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.
[ERROR: Validation] Validation Error: [ VUID-vkFreeDescriptorSets-descriptorPool-00312 ] Object 0: handle = 0x8514b30000000096, type = VK_OBJECT_TYPE_UNKNOWN; | MessageID = 0x5f008dfb | It is invalid to call vkFreeDescriptorSets() with a pool created without setting VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT. The Vulkan spec states: descriptorPool must have been created with the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-vkFreeDescriptorSets-descriptorPool-00312)

Used the latest master commit (732202b).

Extra data:

  • Windows 10 build 19041.804
  • GPU Nvidia GeForce RTX 3070
  • GPU driver version 461.72
  • Vulkan SDK version 1.2.148.1
  • cmake 3.17.5

Cannot reproduce at master (73220b).

System details:

  • Windows 10 Build 19042
  • GPU Nvidia GeForce RTX 3090
  • GPU Driver 461.40
  • Vulkan SDK Version 1.2.154.1
  • CMake 3.20.0

Updating drivers to 461.72 to attempt to reproduce.

Cannot reproduce at master (73220b).

System details:

* Windows 10 Build 19042

* GPU Nvidia GeForce RTX 3090

* GPU Driver 461.40

* Vulkan SDK Version 1.2.154.1

* CMake 3.20.0

Updating drivers to 461.72 to attempt to reproduce.

Updated to 461.72. Still unable to reproduce. @archydragon can you try updating your Vulkan SDK version?

This seems like an implicit layer gone wild. I added debug utils names to basically all vulkan objects, and these don't have them which leads me to believe they aren't coming from RVPT directly.
One way to check this is to open up vkconfig, create a new profile, and edit the profile to disable all layers from being loaded. Do it one by one and you can find the offending layer. Note, the layer would have to be 'implicit' so you can ignore all the explicit layers that the Vulkan SDK installs (eg lunarg & khronos stuff)

Sorry for taking it too long.

When I try to run compiled rvpt.exe through vkconfig with custom specified layers configuration, it works as intended, no those warnings. They appear only if I set "Layer management: fully controlled by the Vulkan applications". Tried to enable or disable all layers in custom profile, still fine.

What layers are on your system?
This feels like a rogue third party layer running amuck.

@archydragon I'm going to move to close this is we can't get more information. I can still not reproduce.

Yeah, feel free, sorry for radio silence, I don't have much time now, and seems that it's also not really 100% reproducable as it seems.

Closing as not reproducible. Feel free to reopen in the future if you're still seeing it on master.