You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto dsgInfos = std::vector<std::unique_ptr<Anvil::DescriptorSetInfo>>{};
auto descSetInfo = Anvil::DescriptorSetInfo::create();
const auto numBindings = 5u;
for(auto i=0u;i<numBindings;++i)
{
descSetInfo->add_binding(
i, /* binding */
static_cast<VkDescriptorType>(vk::DescriptorType::eCombinedImageSampler),
1u, /* n_elements */
static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eFragment)
);
}
dsgInfos.push_back(std::move(descSetInfo));
auto dsg = Anvil::DescriptorSetGroup::create(dev,dsgInfos,false);
auto ds = dsg->get_descriptor_set(0u);
for(auto i=0u;i<5u;++i)
{
ds->set_binding_item(i,Anvil::DescriptorSet::CombinedImageSamplerBindingElement{
static_cast<VkImageLayout>(vk::ImageLayout::eShaderReadOnlyOptimal),
imgView,sampler
});
}
drawCmd->record_bind_descriptor_sets(
static_cast<VkPipelineBindPoint>(vk::PipelineBindPoint::eGraphics),
GetPipelineLayout(),
0u, /* first set */
1u, /* set count */
&ds,
0u, /* dynamic offset count */
nullptr
);
The code above works fine, both baking and binding run without issues.
However, if you change the second loop so it only binds 4 elements (i.e. one of the bindings is NULL):
then you get an exception during the baking process when trying to bind the descriptor set. The exception is caused in src/wrappers/descriptor_set.cpp (Anvil::DescriptorSet::bake()), in the vkUpdateDescriptorSets-call of this code block:
I'm not actually sure if it is valid to have NULL bindings in a descriptor set when binding it, but I can't find anything in the vulkan specification that says otherwise.
The text was updated successfully, but these errors were encountered:
* #62: Exception when trying to bake a descriptor set with null bindings
* Descriptor set write support can now handle arrayed bindings with gaps.
* Fix an issue where RenderPassInfo would use obsolete pointers under certain
circumstances.
* Fix an issue where bindings would not be marked as clean at update time
* Fix broken sampler descriptor support.
* Fix VK_AMD_texture_gather_bias_lod support regression
Example:
The code above works fine, both baking and binding run without issues.
However, if you change the second loop so it only binds 4 elements (i.e. one of the bindings is NULL):
then you get an exception during the baking process when trying to bind the descriptor set. The exception is caused in src/wrappers/descriptor_set.cpp (Anvil::DescriptorSet::bake()), in the vkUpdateDescriptorSets-call of this code block:
I'm not actually sure if it is valid to have NULL bindings in a descriptor set when binding it, but I can't find anything in the vulkan specification that says otherwise.
The text was updated successfully, but these errors were encountered: