Skip to content

Commit ab5c0ff

Browse files
committed
Only allocate bindless if supported.
1 parent 45ea111 commit ab5c0ff

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

renderer/material_manager.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,13 @@ void MaterialManager::set_bindless(Vulkan::CommandBuffer &cmd, unsigned set_inde
107107
void MaterialManager::iterate(AssetManagerInterface *)
108108
{
109109
auto &res = device->get_resource_manager();
110-
allocator.begin();
111-
for (auto &id : bindless_texture_assets)
112-
allocator.push(*res.get_image_view(id));
113-
vk_set = allocator.commit(*device);
110+
if (device->get_device_features().vk12_features.descriptorIndexing)
111+
{
112+
allocator.begin();
113+
for (auto &id: bindless_texture_assets)
114+
allocator.push(*res.get_image_view(id));
115+
vk_set = allocator.commit(*device);
116+
}
114117
}
115118

116119
void MaterialManager::on_device_created(const Vulkan::DeviceCreatedEvent &e)

0 commit comments

Comments
 (0)