KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

VK_EXT_debug_utils - missing object names in cases where they could be added #2654

Open danginsburg opened 6 years ago

danginsburg commented 6 years ago

I've hooked up my engine to VK_EXT_debug_utils. For a while I have been using debug_marker extension with Renderdoc to name resources including images, buffers, and shader modules. I noticed after hooking up to VK_EXT_debug_utils that there are cases where object names could easily be provided for shader modules, but are not done. For example:

VK WARNING : VALIDATION - Message Id Number: 2 | Message Id Name: none
    fragment shader writes to output location 0 with no matching attachment

    Objects - 1
        Object[0] - VK_OBJECT_TYPE_UNKNOWN, Handle 0000000000000000

Looking at where these messages originate in shader_validation.cpp, it is because it is doing log_msg with VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and null object even though it knows the VkShaderModule at the point of finding the error.

The request here is to provide the VkShaderModule object so the name gets passed through.

In general, I would request that if it hasn't been done already that there is an audit of log_msg's to make sure they pass in the known object so the application can get the name.

MarkY-LunarG commented 6 years ago

Since this is a validation layer item, I'm assigning it to @mark-lunarg, he can re-assign it as necessary. Thanks @danginsburg for the suggestion.