flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.26k stars 269 forks source link

mangohud: error when using QueuePresentKHR #607

Open zmike opened 2 years ago

zmike commented 2 years ago

Not sure what info is useful here, so this is what I've got.

#0  __kernel_vsyscall () at arch/x86/entry/vdso/vdso32/system_call.S:72
#1  0xf0942bb8 in raise () from /lib/libc.so.6
#2  0xf092b3c9 in abort () from /lib/libc.so.6
#3  0xf092b29b in __assert_fail_base.cold () from /lib/libc.so.6
#4  0xf093acff in __assert_fail () from /lib/libc.so.6
#5  0xa3390cf8 in radv_bind_descriptor_set (cmd_buffer=0xa3e06cb0, bind_point=VK_PIPELINE_BIND_POINT_GRAPHICS, set=0x0, idx=0) at ../src/amd/vulkan/radv_cmd_buffer.c:4477
#6  0xa3390eb9 in radv_CmdBindDescriptorSets (commandBuffer=0xa3e06cb0, pipelineBindPoint=VK_PIPELINE_BIND_POINT_GRAPHICS, _layout=218370240, firstSet=0, descriptorSetCount=1, pDescriptorSets=0xa47a1b88, dynamicOffsetCount=0, pDynamicOffsets=0x0) at ../src/amd/vulkan/radv_cmd_buffer.c:4513
#7  0xf7e3964c in overlay_QueuePresentKHR(VkQueue_T*, VkPresentInfoKHR const*) () from /usr/lib/mangohud/libMangoHud.so
#8  0xab7b17fd in copper_present (data=0x9349ffe0, gdata=0xcc07ea8, thread_idx=0) at ../src/gallium/drivers/zink/zink_copper.c:375
#9  0xaac37d5f in util_queue_thread_func (input=0xcc07d50) at ../src/util/u_queue.c:313
#10 0xaac36cfa in impl_thrd_routine (p=0xcbe5130) at ../include/c11/threads_posix.h:87
#11 0xf620c3d8 in start_thread () from /lib/libpthread.so.0
#12 0xf0a05e2a in clone () from /lib/libc.so.6
UNASSIGNED-GeneralParameterError-RequiredParameter(ERROR / SPEC): msgNum: -1711571459 - Validation Error: [ UNASSIGNED-GeneralParameterError-RequiredParameter ] Object 0: handle = 0xcfa5240, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x99fb7dfd | vkCmdBindDescriptorSets: required parameter pDescriptorSets[0] specified as VK_NULL_HANDLE
    Objects: 1
        [0] 0xcfa5240, type: 3, name: NULL
zink DEBUG: ERR: 'Validation Error: [ UNASSIGNED-GeneralParameterError-RequiredParameter ] Object 0: handle = 0xcfa5240, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x99fb7dfd | vkCmdBindDescriptorSets: required parameter pDescriptorSets[0] specified as VK_NULL_HANDLE'
VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter(ERROR / SPEC): msgNum: -941162379 - Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter ] Object 0: handle = 0xcb21e10, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xc7e70075 | Invalid VkDescriptorSet Object 0x0. The Vulkan spec states: pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)
    Objects: 1
        [0] 0xcb21e10, type: 1, name: NULL
zink DEBUG: ERR: 'Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter ] Object 0: handle = 0xcb21e10, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xc7e70075 | Invalid VkDescriptorSet Object 0x0. The Vulkan spec states: pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)'
VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter(ERROR / SPEC): msgNum: -941162379 - Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_UNKNOWN; | MessageID = 0xc7e70075 | vkCmdBindDescriptorSets(): Attempt to bind VkNonDispatchableHandle 0x0[] that doesn't exist! The Vulkan spec states: pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)
    Objects: 1
        [0] 0, type: 0, name: NULL
zink DEBUG: ERR: 'Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_UNKNOWN; | MessageID = 0xc7e70075 | vkCmdBindDescriptorSets(): Attempt to bind VkNonDispatchableHandle 0x0[] that doesn't exist! The Vulkan spec states: pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)'
TombRaider: ../src/amd/vulkan/radv_cmd_buffer.c:4477: radv_bind_descriptor_set: Assertion `set' failed.

This is mangohud 0.6.5 on a 32bit system.

flightlessmango commented 2 years ago

I don't think we have the necessary skills to fix this issue. You could check if this is reproducible with mesa overlay and if so report it there, that should help us to fix it in mangohud as well

zmike commented 2 years ago

Oh right, I forgot about that connection. Okay, I'll just fix it there.

zmike commented 2 years ago

Nope, I checked the mesa overlay and it works fine. This is a mangohud issue.

jackun commented 2 years ago

It's the first rebooted Tomb Raider? 32-bit vkcube works fine. Do you use custom font?

zmike commented 2 years ago

I tested glxgears and it has the same issue.

What's interesting is that I build mangohud from latest git and it seem to work just fine. I guess it's time for a new release? :)

zmike commented 2 years ago

Actually I was mistaken: it works with a debug build of mangohud. If I use a release build, it still explodes.

zmike commented 2 years ago

Here's a weird one: if I run with vulkan validation enabled, I get:

../subprojects/imgui-1.81/imgui.cpp:6421: void ImGui::SetCurrentFont(ImFont*): Assertion 'font->Scale > 0.0f' failed.

zmike commented 2 years ago

Seems I need to use libMangoHud_dlsym.so from git and libMangoHud.so from 0.6.5 and then it works reliably. Not sure if that helps, but that's what I've got.