Skip to content

tests: Fix OneOffDescriptorSet pool sizes#11988

Merged
ziga-lunarg merged 1 commit intoKhronosGroup:mainfrom
ziga-lunarg:ziga-fix-one-off-descriptor
Mar 26, 2026
Merged

tests: Fix OneOffDescriptorSet pool sizes#11988
ziga-lunarg merged 1 commit intoKhronosGroup:mainfrom
ziga-lunarg:ziga-fix-one-off-descriptor

Conversation

@ziga-lunarg
Copy link
Copy Markdown
Contributor

Some implementations consume 2 descriptors when descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER

@ziga-lunarg ziga-lunarg requested a review from a team as a code owner March 26, 2026 15:07
@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 691172.

@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 22962 running.

@ziga-lunarg ziga-lunarg force-pushed the ziga-fix-one-off-descriptor branch from bcbbe86 to d6b9f3f Compare March 26, 2026 16:15
@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 691431.

@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 22964 running.

@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 22964 passed.

@ziga-lunarg ziga-lunarg merged commit 6e29dbc into KhronosGroup:main Mar 26, 2026
20 checks passed
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

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.

4 participants