Mesa (main): intel: relax assertion in INTEL_MEASURE
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 16 03:30:00 UTC 2022
Module: Mesa
Branch: main
Commit: c4c096e66e52752f546e428e93b9a9ec2312005f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4c096e66e52752f546e428e93b9a9ec2312005f
Author: Mark Janes <markjanes at swizzler.org>
Date: Wed May 18 11:58:43 2022 -0700
intel: relax assertion in INTEL_MEASURE
It is possible that a secondary command buffer was submitted with no
renders in it. For that case, no timestamp will be collected. Only
verify that timestamps if the index is nonzero.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16571>
---
src/intel/common/intel_measure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/common/intel_measure.c b/src/intel/common/intel_measure.c
index aa933ad5a3d..9e50325ebed 100644
--- a/src/intel/common/intel_measure.c
+++ b/src/intel/common/intel_measure.c
@@ -406,7 +406,7 @@ intel_measure_push_result(struct intel_measure_device *device,
uint64_t *timestamps = batch->timestamps;
assert(timestamps != NULL);
- assert(timestamps[0] != 0);
+ assert(batch->index == 0 || timestamps[0] != 0);
for (int i = 0; i < batch->index; i += 2) {
const struct intel_measure_snapshot *begin = &batch->snapshots[i];
More information about the mesa-commit
mailing list