[Bug] Mario Kart 8 Crashes on arm64 after loading a Grand Prix (Headless) #651

Open
opened 2025-02-11 07:02:04 +00:00 by StonedEdge · 2 comments
StonedEdge commented 2025-02-11 07:02:04 +00:00 (Migrated from github.com)

Description of the issue

Mario Kart 8 Deluxe hangs at the beginning of a GP with the following graphics error:

00:01:21.553 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1b4e0000001b4e, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xc8b0000000c8b0, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed():  the descriptor (VkDescriptorSet 0x1b4e0000001b4e[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xc8b0000000c8b0[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-09002)
00:01:21.553 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1b4e0000001b4e, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xc8b0000000c8b0, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed():  the descriptor (VkDescriptorSet 0x1b4e0000001b4e[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xc8b0000000c8b0[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-09002)
00:01:21.538 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndQuery-None-07007 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x9b000000009b, type = VK_OBJECT_TYPE_QUERY_POOL; Object 2: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x1f270e65 | vkCmdEndQuery():  query (0) was started outside a renderpass. The Vulkan spec states: If called within a subpass of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called previously within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndQuery-None-07007)
00:01:21.539 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndQuery-None-07007 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x9d000000009d, type = VK_OBJECT_TYPE_QUERY_POOL; Object 2: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x1f270e65 | vkCmdEndQuery():  query (0) was started outside a renderpass. The Vulkan spec states: If called within a subpass of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called previously within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndQuery-None-07007)
00:01:21.540 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndRenderPass-None-07004 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; Object 2: handle = 0xa700000000a7, type = VK_OBJECT_TYPE_QUERY_POOL; | MessageID = 0xa38b78a2 | vkCmdEndRenderPass():  query 0 from VkQueryPool 0xa700000000a7[] was began in subpass 0 but never ended. The Vulkan spec states: If vkCmdBeginQuery* was called within a subpass of the render pass, the corresponding vkCmdEndQuery* must have been called subsequently within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndRenderPass-None-07004)
00:01:21.547 |W| GUI.RenderLoop Gpu UserCallback: Validation Performance Warning: [ WARNING-Shader-OutputNotConsumed ] Object 0: handle = 0x3080000000308, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xc81ad50e | vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState Vertex attribute at location 2 not consumed by vertex shader.
00:01:21.548 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1c940000001c94, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xb391000000b391, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed():  the descriptor (VkDescriptorSet 0x1c940000001c94[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xb391000000b391[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command 
00:01:22.296 |E| HLE.OsThread.4 Gpu WaitOnSyncpoint: Wait on syncpoint 1 for threshold 7109 took more than 1000ms, resuming execution...
00:01:25.918 |E| CPU.CounterQueue.0 Gpu AwaitResult: Error: Query result SamplesPassed timed out. Took more than 5000 tries.

Reproduction steps

Launch the game with headless on an aarch64 linux build, using the following script & parameters:

#!/bin/bash

export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/mali.json
export VK_LAYER_PATH=/usr/share/vulkan/explicit_layer.d
export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/mali:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
export SDL_VIDEODRIVER=wayland

./Ryujinx --no-gui --exclusive-fullscreen --exclusive-fullscreen-width 1280 --exclusive-fullscreen-height 720 --input-id-1 "0-9b870003-cafe-0000-0550-000011010000" --resolution-scale 0.7 --graphics-backend Vulkan MK8.nsp

Try to run a Grand Prix/vs battle with other CPUs.
Time Trials and solo races work fine however Grand Prix hangs the emulator.

Log file

Ryujinx_1.2.81_2025-02-11_02-31-14 (2).log

OS

Armbian GNOME46 Wayland 6.1 rkr5 kernel

Ryujinx version

1.2.81

Game version

3.0.3

CPU

RK3588
Quad-core ARM Cortex A76 (1.8GHz)
Quad-core ARM Cortex A55 (2.3GHz)

GPU

Mali-G610 MC4

RAM

8GB

List of applied mods

No response

Additional context?

No response

### Description of the issue Mario Kart 8 Deluxe hangs at the beginning of a GP with the following graphics error: ``` 00:01:21.553 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1b4e0000001b4e, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xc8b0000000c8b0, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed(): the descriptor (VkDescriptorSet 0x1b4e0000001b4e[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xc8b0000000c8b0[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-09002) 00:01:21.553 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1b4e0000001b4e, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xc8b0000000c8b0, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed(): the descriptor (VkDescriptorSet 0x1b4e0000001b4e[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xc8b0000000c8b0[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-09002) 00:01:21.538 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndQuery-None-07007 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x9b000000009b, type = VK_OBJECT_TYPE_QUERY_POOL; Object 2: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x1f270e65 | vkCmdEndQuery(): query (0) was started outside a renderpass. The Vulkan spec states: If called within a subpass of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called previously within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndQuery-None-07007) 00:01:21.539 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndQuery-None-07007 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x9d000000009d, type = VK_OBJECT_TYPE_QUERY_POOL; Object 2: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x1f270e65 | vkCmdEndQuery(): query (0) was started outside a renderpass. The Vulkan spec states: If called within a subpass of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called previously within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndQuery-None-07007) 00:01:21.540 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdEndRenderPass-None-07004 ] Object 0: handle = 0xffbd011fa960, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xb11c000000b11c, type = VK_OBJECT_TYPE_RENDER_PASS; Object 2: handle = 0xa700000000a7, type = VK_OBJECT_TYPE_QUERY_POOL; | MessageID = 0xa38b78a2 | vkCmdEndRenderPass(): query 0 from VkQueryPool 0xa700000000a7[] was began in subpass 0 but never ended. The Vulkan spec states: If vkCmdBeginQuery* was called within a subpass of the render pass, the corresponding vkCmdEndQuery* must have been called subsequently within the same subpass (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndRenderPass-None-07004) 00:01:21.547 |W| GUI.RenderLoop Gpu UserCallback: Validation Performance Warning: [ WARNING-Shader-OutputNotConsumed ] Object 0: handle = 0x3080000000308, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xc81ad50e | vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState Vertex attribute at location 2 not consumed by vertex shader. 00:01:21.548 |E| GUI.RenderLoop Gpu UserCallback: Validation Error: [ VUID-vkCmdDrawIndexed-None-09002 ] Object 0: handle = 0x1c940000001c94, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x40bc00000040bc, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0xb391000000b391, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x2cef0000002cef, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x680422c4 | vkCmdDrawIndexed(): the descriptor (VkDescriptorSet 0x1c940000001c94[], binding 128, index 0) has VkImageView 0x40bc00000040bc[] which will be overlap written to as VkImageView 0x2cef0000002cef[] in VkFramebuffer 0xb391000000b391[] attachment 1. The Vulkan spec states: If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it is not in the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT image layout, and either: the VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT is set on the currently bound pipeline or the last call to vkCmdSetAttachmentFeedbackLoopEnableEXT included VK_IMAGE_ASPECT_STENCIL_BIT and there is no currently bound graphics pipeline or the currently bound graphics pipeline was created with VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT it must not be accessed in any way other than as an attachment by this command 00:01:22.296 |E| HLE.OsThread.4 Gpu WaitOnSyncpoint: Wait on syncpoint 1 for threshold 7109 took more than 1000ms, resuming execution... 00:01:25.918 |E| CPU.CounterQueue.0 Gpu AwaitResult: Error: Query result SamplesPassed timed out. Took more than 5000 tries. ``` ### Reproduction steps Launch the game with headless on an aarch64 linux build, using the following script & parameters: #!/bin/bash export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/mali.json export VK_LAYER_PATH=/usr/share/vulkan/explicit_layer.d export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/mali:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH export SDL_VIDEODRIVER=wayland ./Ryujinx --no-gui --exclusive-fullscreen --exclusive-fullscreen-width 1280 --exclusive-fullscreen-height 720 --input-id-1 "0-9b870003-cafe-0000-0550-000011010000" --resolution-scale 0.7 --graphics-backend Vulkan MK8.nsp Try to run a Grand Prix/vs battle with other CPUs. Time Trials and solo races work fine however Grand Prix hangs the emulator. ### Log file [Ryujinx_1.2.81_2025-02-11_02-31-14 (2).log](https://github.com/user-attachments/files/18746238/Ryujinx_1.2.81_2025-02-11_02-31-14.2.log) ### OS Armbian GNOME46 Wayland 6.1 rkr5 kernel ### Ryujinx version 1.2.81 ### Game version 3.0.3 ### CPU RK3588 Quad-core ARM Cortex A76 (1.8GHz) Quad-core ARM Cortex A55 (2.3GHz) ### GPU Mali-G610 MC4 ### RAM 8GB ### List of applied mods _No response_ ### Additional context? _No response_
StonedEdge commented 2025-02-14 00:34:34 +00:00 (Migrated from github.com)

This might be something to do with SynchronousQueueSubmits. In my port of ryujinx to iOS, setting it to true fixes it. This causes glitches on other games but that’s an other issue

Huh? This is a MoltenVk parameter it seems. I can’t find anything to do with it for regular ARM64 builds.

(And he deleted his comment). So this bug still remains at large on ARM64 Linux.

> This might be something to do with SynchronousQueueSubmits. In my port of ryujinx to iOS, setting it to true fixes it. This causes glitches on other games but that’s an other issue Huh? This is a MoltenVk parameter it seems. I can’t find anything to do with it for regular ARM64 builds. (And he deleted his comment). So this bug still remains at large on ARM64 Linux.
stossy11 commented 2025-02-14 03:03:23 +00:00 (Migrated from github.com)

This might be something to do with SynchronousQueueSubmits. In my port of ryujinx to iOS, setting it to true fixes it. This causes glitches on other games but that’s an other issue

MoltenVK is not on arm64 linux, this does not have anything to do with that. and it's not your port. its mine and the rest of the MeloNX team.

> This might be something to do with SynchronousQueueSubmits. In my port of ryujinx to iOS, setting it to true fixes it. This causes glitches on other games but that’s an other issue MoltenVK is not on arm64 linux, this does not have anything to do with that. and it's not **your** port. its mine and the rest of the MeloNX team.
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MeloNX/Ryujinx-ryubing#651
No description provided.