[Android] GPU hang or crash in FVulkanOcclusionQueryPool

I had not seen anything with -gpuvalidation, but I foolishly realised that it’s compiled out of Test builds. Turns out there are a couple of validation errors, but it doesn’t seem correlated with occlusion queries hanging--unless it’s possible to have a significant delay between validation errors and an actual issue:

[2025.10.16-22.12.44:845][ 0]LogVulkanRHI: Warning: *** [Error:Validation(VUID-VkGraphicsPipelineCreateInfo-Input-07904)] Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-Input-07904 ] Object 0: handle = 0x87cca000000006a2, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xcc9c32be | vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState->pVertexAttributeDescriptions does not have a Location 1 but vertex shader has an input variable at that Location. The Vulkan spec states: If the pipeline is being created with vertex input state and pVertexInputState is not dynamic, then all variables with the Input storage class decorated with Location in the Vertex Execution Model OpEntryPoint must contain a location in VkVertexInputAttributeDescription::location (https://www.khronos.org/registry/vulkan/specs/1\.3\-extensions/html/vkspec.html\#VUID\-VkGraphicsPipelineCreateInfo\-Input\-07904\)

[2025.10.16-22.13.19:656][ 0]LogVulkanRHI: Warning: *** [Error:Validation(VUID-vkCmdDraw-viewType-07752)] Validation Error: [ VUID-vkCmdDraw-viewType-07752 ] Object 0:handle = 0xaa3cda0000004458, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x8a7e950000004052, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x73ed4ff5 | vkCmdDraw(): the descriptor VkDescriptorSet 0xaa3cda0000004458 [Set 0, Binding 3, Index 0, variable “LogLuminanceWeightBuffer”] ImageView type is VK_IMAGE_VIEW_TYPE_2D but the OpTypeImage has (Dim = Buffer) and (Arrayed = 0). The Vulkan spec states: If a VkImageView is accessed as a result of this command, then the image view’s viewType must match the Dim operand of the OpTypeImage as described in Instruction/Sampler/Image View Validation (https://www.khronos.org/registry/vulkan/specs/1\.3\-extensions/html/vkspec.html\#VUID\-vkCmdDraw\-viewType\-07752\)

[2025.10.16-22.14.10:612][197]LogVulkanRHI: Warning: *** [Error:Validation(VUID-vkCmdDraw-None-08114)] Validation Error: [ VUID-vkCmdDraw-None-08114 ] Object 0: handle = 0x8aec9000000d78d, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0x2ba3a98e | vkCmdDraw(): the descriptor VkDescriptorSet 0x8aec9000000d78d [Set 0, Binding 1, Index 0, variable “View”] requires (none) component type, but bound descriptor format is VK_FORMAT_R32_UINT. The Vulkan spec states: Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid as described by descriptor validity if they are statically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT (https://www.khronos.org/registry/vulkan/specs/1\.3\-extensions/html/vkspec.html\#VUID\-vkCmdDraw\-None\-08114\)

Is Vulkan mobile deferred expected to run clean with validation layer currently? I’m also getting validation errors when running the stock UE5 project that I set up to reproduce the Pixel 10 crash from my other thread.

It doesn’t actually crash, just hangs, so -gpucrashdebugging doesn’t output anything. I did try manually dumping GPU breadcrumbs when the hang is detected using:

if (UE::RHI::UseGPUCrashDebugging())

{

FVulkanDevice* Device = GVulkanRHI->GetDevice();

Device->GetImmediateContext().GetGPUProfiler().DumpCrashMarkers(Device->GetCrashMarkerMappedPointer());

}

However, doing that inside FVulkanOcclusionQueryPool::InternalTryGetResults doesn’t give meaningful results--I don’t think the GPU is choking on occlusion queries in particular, it just happens to first manifest when retrieving query results. I did ask our QA with a crashy device to turn off occlusion queries and see if that gives meaningful breadcrumbs, but as mentioned, it just prevents the hang from happening.

I’ll have to see if we can do a very minimal engine upgrade, as we don’t have plans to do so before our release. I’m not holding my breath, though, it’s been around since 5.3 and was not fixed by either 5.4 or 5.5... I would update the original post tags to 5.5 if I could. :slight_smile:

Circumstances are giving us a bit of a time extension, so merging 5.6 is on the docket. If that doesn’t seem to help, I’ll reopen a new thread.

In the meantime, can I double check that Android Vulkan RHI does support GPU breadcrumbs in 5.5? I might be mixing up platforms but I could swear I saw some outputs on occasion. But if run into the crash that often follows my occlusion query hang workaround, it only outputs: “Breadcrumbs without extensions”, without any breadcrumbs.

I’m thinking it might be that the GPU is between frames when the device is lost and there is indeed nothing on the breadcrumb stack