Summary: | radv doesn't handle variable descriptor count properly | ||
---|---|---|---|
Product: | Mesa | Reporter: | Józef Kucia <joseph.kucia> |
Component: | Drivers/Vulkan/radeon | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Minimal reproducer
Minimal reproducer 2 |
Forgot a hunk somehow apparently ... https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1205 should fix this. The MR above landed. I'm marking as fixed, but please reopen if there are still issues. Thanks! Created attachment 144908 [details]
Minimal reproducer 2
With the fix it works for samplers now. Unfortunately, it still doesn't work for other descriptor types. I'm attaching a slightly modified program to reproduce the bug.
It seems that layout->buffer_count is incorrectly used for VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT. layout->buffer_count is based on the upper limit taken from descriptor set layout. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 144676 [details] Minimal reproducer When a descriptor set layout is created with VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT, descriptorCount in VkDescriptorSetLayoutBinding should be treated as an upper bound. The actual descriptor count is provided in VkDescriptorSetVariableDescriptorCountAllocateInfoEXT when vkAllocateDescriptorSets() is called. radv uses the upper limit from VkDescriptorSetLayoutBinding as descriptor count and fails to allocate descriptor sets with VK_ERROR_OUT_OF_POOL_MEMORY. The attached program reproduces the bug.