Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/framework/descriptor_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ OneOffDescriptorSet::OneOffDescriptorSet(vkt::Device* device, const std::vector<
: device_{device}, layout_(*device, bindings, layout_flags, layout_pnext) {
std::vector<VkDescriptorPoolSize> pool_sizes;
for (const auto& b : bindings) {
pool_sizes.emplace_back(VkDescriptorPoolSize{b.descriptorType, std::max(1u, b.descriptorCount)});
uint32_t count = std::max(1u, b.descriptorCount);
if (b.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) {
count *= 2;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems totally wrong and going to hide other issues in tests... where is this in the spec???

There is maxCombinedImageSamplerDescriptorCount which I explicitly check for YCbCr tests... what test was this fixing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is PositiveYcbcr.ImageLayoutUpdate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed this is wrong and was YCbCr tests...

if you have maintenance6 enabled (which non of are tests do nor report warnings by default) you will get this nice message

Validation Warning: [ WARNING-VkDescriptorSetAllocateInfo-descriptorCount ] | MessageID = 0x1ed8505a
vkAllocateDescriptorSets(): Trying to allocate 3 of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors from VkDescriptorPool 0xf000000000f, but this pool only has a total of 1 descriptors for this type so you will likely get VK_ERROR_OUT_OF_POOL_MEMORY_KHR. While this might succeed on some implementations, it will fail on others.
Where VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER is found in the pool:
  pPoolSizes[0].descriptorCount = 1
Where the allocation are being requested:
  pSetLayouts[0]::pBindings[0].descriptorCount = 3 (adjusted by multiplying maxCombinedImageSamplerDescriptorCount which is 3)

Objects: 1
    [0] VkDescriptorPool 0xf000000000f

}
pool_sizes.emplace_back(VkDescriptorPoolSize{b.descriptorType, count});
}

VkDescriptorPoolCreateInfo pool_ci = vku::InitStructHelper(create_pool_pnext);
Expand Down
Loading