Gen7.5 has a BLEND_STATE of size 0 which includes a variable length
group. We did not deal with that very well, leading to an endless
loop.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107544
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
iter->p_bit = p_bit;
int length = gen_group_get_length(iter->group, iter->p);
- iter->p_end = length > 0 ? &p[length] : NULL;
+ iter->p_end = length >= 0 ? &p[length] : NULL;
iter->print_colors = print_colors;
}
iter_start_field(iter, iter->group->next->fields);
bool result = iter_decode_field(iter);
- if (iter->p_end)
- assert(result);
+ if (!result && iter->p_end) {
+ /* We're dealing with a non empty struct of length=0 (BLEND_STATE on
+ * Gen 7.5)
+ */
+ assert(iter->group->dw_length == 0);
+ }
- return true;
+ return result;
}
if (!iter_advance_field(iter))