It matters only when counters are not ordered by offset.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
/* So far we aren't using uint32, double or bool32... */
unreachable("unexpected counter data type");
}
- written = counter->offset + counter_size;
+
+ if (counter->offset + counter_size > written)
+ written = counter->offset + counter_size;
}
}