Module: Mesa Branch: master Commit: e7e6f709389be9744841d42dade3fcee8e8c6a30 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7e6f709389be9744841d42dade3fcee8e8c6a30
Author: Marcin Ślusarz <[email protected]> Date: Wed Jun 10 15:29:53 2020 +0200 intel/perf: fix calculation of used counter space It matters only when counters are not ordered by offset. Signed-off-by: Marcin Ślusarz <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788> --- src/intel/perf/gen_perf_query.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/perf/gen_perf_query.c b/src/intel/perf/gen_perf_query.c index 57b01203a6f..755ec9a83dd 100644 --- a/src/intel/perf/gen_perf_query.c +++ b/src/intel/perf/gen_perf_query.c @@ -1469,7 +1469,9 @@ get_oa_counter_data(struct gen_perf_context *perf_ctx, /* 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; } } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
