bindings.emplace_back();
VkDescriptorSetLayoutBinding &binding = bindings.back();
binding.binding = u.binding&0xFFFFF;
- binding.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
+ if(is_sampled_image(u.type))
+ binding.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
+ else
+ binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
binding.descriptorCount = 1;
binding.stageFlags = stage_flags;
binding.pImmutableSamplers = 0;