The Vulkan ARM version of Furmark2 has flickering issue

Started by Kevin.Li, March 27, 2025, 11:27:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kevin.Li

I'm encountering flickering issue when running Vulkan ARM version of Furmark2.

The flickering seems to be due to the Furmark2 only renders first two swapchain images, and nothing is rendered to on the other swapchain images.

Here are the correct and incorrect render result captured by the vulkan screenshoot layer,
Frame 6 (correct frame)
Frame 7 (incorrect frame)

And the vulkan API dump shows that vkCmdBindDescriptorSet and vkCmdPushConstants functions missing in incorrect frame,
Comparison of API dumps between frames 6 and 7

Could you help confirm if there is a bug in the Vulkan ARM version of Furmark2?

JeGX

I can't tell you if there is a bug or not in furmak2 vulkan for arm. But it's really weird because when the furry object is not rendered, the background and the user interface are still rendered.

Do you see error lines in the log file (_furmark_log.txt) ? Related to pipeline layout?

I will check again with the raspberry pi 5.

Never tested furmark2 on a phone. What is your android version? and what is the terminal app you use?

Kevin.Li

Thanks for you reminder, I see errors report in _furmark_log.txt,
(10:44:55)      [Vulkan2] descriptorset (id => 155) - unable to allocate memory - err: VK_ERROR_OUT_OF_POOL_MEMORY_KHR (-1000069000).
 (10:44:55)      [Vulkan2] descriptorset (id => 156) - unable to allocate memory - err: VK_ERROR_OUT_OF_POOL_MEMORY_KHR (-1000069000).
 (10:44:55)      [Vulkan2] descriptorset (id => 157) - unable to allocate memory - err: VK_ERROR_OUT_OF_POOL_MEMORY_KHR (-1000069000).

It looks like there is an OOM issue.

>>>What is your android version? and what is the terminal app you use?
I actually tested the latest Furmark2 on debian12 using Orion O6 (https://radxa.com/products/orion/o6/).
By the way, does the Vulkan ARM version of Furmark2 run well on pi 5?


JeGX

Indeed you have some memory issues  ;)

FurMark 2.7.0 runs correctly on Raspberry Pi 5 but is slow: 3 FPS @ 1280x720...

"FurMark 2 on Raspberry Pi 5 / arm64"

Kevin.Li

It looks like you are running the OpenGL version, what about the Vulkan version?

I investigated this error further and it seems to me that Furmark2 doesn't set enough descriptorCount for the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER.

According to the Vulkan sepc,
QuoteIf a call to vkAllocateDescriptorSets would cause the total number of descriptor sets allocated from the pool to exceed the value of VkDescriptorPoolCreateInfo::maxSets used to create pAllocateInfo->descriptorPool, then the allocation may fail due to lack of space in the descriptor pool. Similarly, the allocation may fail due to lack of space if the call to vkAllocateDescriptorSets would cause the number of any given descriptor type to exceed the sum of all the descriptorCount members of each element of VkDescriptorPoolCreateInfo::pPoolSizes with a type equal to that type.

From the Vulkan Api dump, the count for the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER in vkCreateDescriptorPool() is set to 64, but the number of this type is already consumed to 65 when the OOM first occurs.
GlobalPacketIndex 67, Thread 2489253600, Frame 0:
vkCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool) returns VkResult VK_SUCCESS (0):
    device:                         VkDevice = 0xffff8c2aa6d0
    pCreateInfo:                    const VkDescriptorPoolCreateInfo* = 0xaaab1aa04038:
        sType:                          VkStructureType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO (33)
        pNext:                          const void* = NULL
        flags:                          VkDescriptorPoolCreateFlags = 1 (VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT)
        maxSets:                        uint32_t = 320
        poolSizeCount:                  uint32_t = 5
        pPoolSizes:                     const VkDescriptorPoolSize* = 0xaaab1aa04060
            pPoolSizes[0]:                  const VkDescriptorPoolSize = 0xaaab1aa04060:
                type:                           VkDescriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER (6)
                descriptorCount:                uint32_t = 64
            pPoolSizes[1]:                  const VkDescriptorPoolSize = 0xaaab1aa04068:
                type:                           VkDescriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER (1)
                descriptorCount:                uint32_t = 64
            pPoolSizes[2]:                  const VkDescriptorPoolSize = 0xaaab1aa04070:
                type:                           VkDescriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER (7)
                descriptorCount:                uint32_t = 64
            pPoolSizes[3]:                  const VkDescriptorPoolSize = 0xaaab1aa04078:
                type:                           VkDescriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE (3)
                descriptorCount:                uint32_t = 64
            pPoolSizes[4]:                  const VkDescriptorPoolSize = 0xaaab1aa04080:
                type:                           VkDescriptorType = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR (1000150000)
                descriptorCount:                uint32_t = 64
    pAllocator:                     const VkAllocationCallbacks* = NULL
    pDescriptorPool:                VkDescriptorPool* = 0xffff8c29dd00

GlobalPacketIndex 959, Thread 2489253600, Frame 0:
vkCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout) returns VkResult VK_SUCCESS (0):
    device:                         VkDevice = 0xffff8c2aa6d0
    pCreateInfo:                    const VkDescriptorSetLayoutCreateInfo* = 0xaaab1aa095b8:
        sType:                          VkStructureType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO (32)
        pNext:                          const void* = NULL
        flags:                          VkDescriptorSetLayoutCreateFlags = 0
        bindingCount:                   uint32_t = 3
        pBindings:                      const VkDescriptorSetLayoutBinding* = 0xaaab1aa095e0
            pBindings[0]:                   const VkDescriptorSetLayoutBinding = 0xaaab1aa095e0:
                binding:                        uint32_t = 0
                descriptorType:                 VkDescriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER (6)
                descriptorCount:                uint32_t = 1
                stageFlags:                     VkShaderStageFlags = 17 (VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT)
                pImmutableSamplers:             const VkSampler* = UNUSED
            pBindings[1]:                   const VkDescriptorSetLayoutBinding = 0xaaab1aa095f8:
                binding:                        uint32_t = 1
                descriptorType:                 VkDescriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER (1)
                descriptorCount:                uint32_t = 1
                stageFlags:                     VkShaderStageFlags = 17 (VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT)
                pImmutableSamplers:             const VkSampler* = NULL
            pBindings[2]:                   const VkDescriptorSetLayoutBinding = 0xaaab1aa09610:
                binding:                        uint32_t = 2
                descriptorType:                 VkDescriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER (1)
                descriptorCount:                uint32_t = 20
                stageFlags:                     VkShaderStageFlags = 16 (VK_SHADER_STAGE_FRAGMENT_BIT)
                pImmutableSamplers:             const VkSampler* = NULL
    pAllocator:                     const VkAllocationCallbacks* = NULL
    pSetLayout:                     VkDescriptorSetLayout* = 0xffff8ca4c920

GlobalPacketIndex 960, Thread 2489253600, Frame 0:
vkAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets) returns VkResult VK_ERROR_OUT_OF_POOL_MEMORY (-1000069000):
    device:                         VkDevice = 0xffff8c2aa6d0
    pAllocateInfo:                  const VkDescriptorSetAllocateInfo* = 0xaaab1aa09dd0:
        sType:                          VkStructureType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO (34)
        pNext:                          const void* = NULL
        descriptorPool:                 VkDescriptorPool = 0xffff8c29dd00
        descriptorSetCount:             uint32_t = 1
        pSetLayouts:                    const VkDescriptorSetLayout* = 0xaaab1aa09df8
            pSetLayouts[0]:                 const VkDescriptorSetLayout = 0xffff8ca4c920
    pDescriptorSets:                VkDescriptorSet* = 0xaaab1aa09e00
        pDescriptorSets[0]:             VkDescriptorSet = 0

Could you please check if the descriptorCount size of type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER is enough in vkCreateDescriptorPool()?

JeGX

I'm going to check my Vulkan code as soon as possible and I let you know.


Kevin.Li

Glad to hear that. Please let me know when it's fixed.