if (binding == NULL)
continue;
- assert(binding->descriptorCount > 0);
+ if (binding->descriptorCount == 0)
+ continue;
+
#ifndef NDEBUG
set_layout->binding[b].type = binding->descriptorType;
#endif
layout->buffer_count * sizeof(struct anv_buffer_view);
}
+size_t
+anv_descriptor_set_binding_layout_get_hw_size(const struct anv_descriptor_set_binding_layout *binding)
+{
+ if (!binding->immutable_samplers)
+ return binding->array_size;
+
+ uint32_t total_plane_count = 0;
+ for (uint32_t i = 0; i < binding->array_size; i++)
+ total_plane_count += binding->immutable_samplers[i]->n_planes;
+
+ return total_plane_count;
+}
+
struct surface_state_free_list_entry {
void *next;
struct anv_state state;
*desc = (struct anv_descriptor) {
.type = type,
+ .layout = info->imageLayout,
.image_view = image_view,
.sampler = sampler,
- .aux_usage = image_view == NULL ? ISL_AUX_USAGE_NONE :
- anv_layout_to_aux_usage(devinfo, image_view->image,
- image_view->aspect_mask,
- info->imageLayout),
};
}
for (uint32_t i = 0; i < descriptorCopyCount; i++) {
const VkCopyDescriptorSet *copy = &pDescriptorCopies[i];
- ANV_FROM_HANDLE(anv_descriptor_set, src, copy->dstSet);
+ ANV_FROM_HANDLE(anv_descriptor_set, src, copy->srcSet);
ANV_FROM_HANDLE(anv_descriptor_set, dst, copy->dstSet);
const struct anv_descriptor_set_binding_layout *src_layout =