Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] counting of duplicate entries in _availableDescriptorPoolSizes #923

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

siystar
Copy link

@siystar siystar commented Aug 21, 2023

Pull Request Template

Description

Fixed underflow in _availableDescriptorPoolSizes when VkDescriptorPoolSizes contain duplicate entries.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

info: DescriptorPool::allocateDescriptorSet(..) allocated ref_ptr<vsg::DescriptorSet::Implementation>(...)
info: _availableDescriptorPoolSizes [DescriptorType = Count]
info: 0 = 2
info: 1 = 4294967288
info: 2 = 2
info: 6 = 4
info: 7 = 3
info: 0 = 2
info: 1 = 4294967288
info: 2 = 2
info: 6 = 4
info: 7 = 3
Validation Error: [ VUID-VkDescriptorSetAllocateInfo-apiVersion-07896 ] (...) | vkAllocateDescriptorSets(): Unable to allocate 3 descriptors of type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER from VkDescriptorPool (...). This pool only has 0 descriptors of this type remaining.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@siystar
Copy link
Author

siystar commented Aug 21, 2023

The Vulkan spec 14.2.3. states: "If multiple VkDescriptorPoolSize structures containing the same descriptor type appear in the pPoolSizes array then the pool will be created with enough storage for the total number of descriptors of each type."

@robertosfield robertosfield merged commit d57869e into vsg-dev:master Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants