-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Description
Hi Robert,
I just upgrade to the latest master and found that commit 6a76d54 breaks my application. A textured surface that was rendered prior to this commit is no longer rendered.
The commit implements the check below, which fails in my case, so the graph doesn't get compiled.
if (setLayout->bindings.size() != descriptors.size())
{
throw Exception{make_string("Error: invalid DescriptorSet as setLayout bindings size (", setLayout->bindings.size(), ") and descriptors size ", descriptors.size(), ") not equal."), VK_INCOMPLETE};
}
I may be doing this wrong so I don't know if this is a bug in VSG, but what worked before was (MAX_TEXTURES = 8)
...
tileDescriptorBindings.push_back(VkDescriptorSetLayoutBinding{2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, nullptr});
tileDescriptorBindings.push_back(VkDescriptorSetLayoutBinding{7, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, MAX_TEXTURES, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr});
...
tileDescriptors.push_back(vsg::DescriptorBuffer::create(sdTileValue::create(), 2));
for(uint32_t i = 0; i < MAX_TEXTURES; i++)
{
auto texture = vsg::DescriptorImage::create(surface->_imageSampler, texData, 7, i, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER);
tileDescriptors.push_back(texture);
}
The question is, should the test in DescriptorSet::compile() take account of the descriptorCount value in the descriptor bindings before it compares it to the number of descriptors?
Thanks,
Roland
Metadata
Metadata
Assignees
Labels
No labels