summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-11 21:43:46 -0800
committerJason Ekstrand <[email protected]>2017-11-13 07:37:23 -0800
commit93200ea26d42664006b1e63382f0b5db1c657384 (patch)
tree610ceecbe1a8d4d371ec20b6d5b077239d2f350c /src
parent74a9e516964e1dae1049343f6285f276df353c3d (diff)
aubinator: Don't skip the first field in each subgroup
The previous iteration algorithm would advance the field pointer right after we advance the group. This meant that you would end up with skipping the first field of the group. In the common case, where the only field is a struct (e.g. 3DSTATE_VERTEX_BUFFERS), it would get skipped entirely. Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/common/gen_decoder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index d09b6ea32b6..b3501aec912 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -824,14 +824,15 @@ iter_advance_group(struct gen_field_iterator *iter)
static bool
iter_advance_field(struct gen_field_iterator *iter)
{
- while (!iter_more_fields(iter)) {
+ if (iter_more_fields(iter)) {
+ iter->field = iter->field->next;
+ } else {
if (!iter_more_groups(iter))
return false;
iter_advance_group(iter);
}
- iter->field = iter->field->next;
if (iter->field->name)
strncpy(iter->name, iter->field->name, sizeof(iter->name));
else