for (uint32_t b = 0; b < pCreateInfo->count; b++) {
uint32_t array_size = MAX2(1, pCreateInfo->pBinding[b].arraySize);
set_layout->binding[b].array_size = array_size;
+ set_layout->binding[b].descriptor_index = set_layout->size;
set_layout->size += array_size;
switch (pCreateInfo->pBinding[b].descriptorType) {
for (uint32_t set = 0; set < pCreateInfo->descriptorSetCount; set++) {
struct anv_descriptor_set_layout *set_layout = l.set[set].layout;
- unsigned set_offset = 0;
for (uint32_t b = 0; b < set_layout->binding_count; b++) {
unsigned array_size = set_layout->binding[b].array_size;
+ unsigned set_offset = set_layout->binding[b].descriptor_index;
if (set_layout->binding[b].stage[s].surface_index >= 0) {
assert(surface == l.set[set].stage[s].surface_start +
}
sampler += array_size;
}
-
- set_offset += array_size;
}
}
}
/* Number of array elements in this binding */
uint16_t array_size;
+ /* Index into the flattend descriptor set */
+ uint16_t descriptor_index;
+
/* Index into the dynamic state array for a dynamic buffer */
int16_t dynamic_offset_index;