Skip to content

Commit

Permalink
Only allocate bindless if supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Feb 27, 2024
1 parent 45ea111 commit ab5c0ff
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions renderer/material_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ void MaterialManager::set_bindless(Vulkan::CommandBuffer &cmd, unsigned set_inde
void MaterialManager::iterate(AssetManagerInterface *)
{
auto &res = device->get_resource_manager();
allocator.begin();
for (auto &id : bindless_texture_assets)
allocator.push(*res.get_image_view(id));
vk_set = allocator.commit(*device);
if (device->get_device_features().vk12_features.descriptorIndexing)
{
allocator.begin();
for (auto &id: bindless_texture_assets)
allocator.push(*res.get_image_view(id));
vk_set = allocator.commit(*device);
}
}

void MaterialManager::on_device_created(const Vulkan::DeviceCreatedEvent &e)
Expand Down

0 comments on commit ab5c0ff

Please sign in to comment.