struct radv_descriptor_set **out_set)
{
struct radv_descriptor_set *set;
+ uint32_t buffer_count = layout->buffer_count;
+ if (variable_count) {
+ unsigned stride = 1;
+ if (layout->binding[layout->binding_count - 1].type == VK_DESCRIPTOR_TYPE_SAMPLER ||
+ layout->binding[layout->binding_count - 1].type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT)
+ stride = 0;
+ buffer_count = layout->binding[layout->binding_count - 1].buffer_offset +
+ *variable_count * stride;
+ }
unsigned range_offset = sizeof(struct radv_descriptor_set) +
- sizeof(struct radeon_winsys_bo *) * layout->buffer_count;
+ sizeof(struct radeon_winsys_bo *) * buffer_count;
unsigned mem_size = range_offset +
sizeof(struct radv_descriptor_range) * layout->dynamic_offset_count;